当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 5 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [wiki]MidiSoftwareSynthesisHowTo
帖子发表于 : 2005-06-15 22:44 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
How to get midi sound in Ubuntu

This could come in handy if you don't have a soundcard with hardware MIDI or have no external MIDI instruments connected to your PC. You must then use software synthesis. There are two common options, Timidity and Fluidsynth. This section only covers setting up and using Timidity at the moment.
Installing Timidity

First install Timidity (using apt-get or Synaptic).

Next you need a set of samples. The easiest way is to install package 'freepats' (a 28 MB download), and you're done. Alternatively, for better sound, read the section below to set up a soundfont.

Once you've done that, you can try playing a midi file:

timidity myfile.mid

If all is well, you should hear delicate strains of synthesised music. If you have problems, read 'Reducing CPU usage' below.
Setting up Timidity as a MIDI server

Issue the following commands:

sudo modprobe snd-seq-device
sudo modprobe snd-seq-midi
sudo modprobe snd-seq-oss
sudo modprobe snd-seq-midi-event
sudo modprobe snd-seq

This loads missing modules. You may not need all these (I found it worked with just the first two). Then enter:

timidity -iA -B2,8 -Os1l -s 44100

This loads timidity as a midi server and opens 2 midi ports, 128:0 ad 128:1. After issuing it, you should have midi players working. You can open another terminal and issue a command such as:

pmidi -p 128:0 music.mid
kmid music.mid

To close timidity, press CTRL-C in the terminal it's running in.

Launching the server as root may improve performance because of higher priorities given to the process.

Notedit, or your score editor of choice can then be loaded and recognised the midi ports.

If the computer is busy doing something else other than playing music, you may hear scratches or have latency problems. This might be solved with a realtime kernel patch, but is out of the scope of this HOWTO.
Automatically starting Timidity on boot

Ubuntu Hoary sets up scripts in /etc/init.d when you install Timidity. To start it on boot, edit /etc/default/timidity and uncomment the line

TIM_ALSASEQ=true

You'll also need to add the modules you loaded earlier to /etc/modules.
Finding and setting up a soundfont

Websites: [WWW] http://www.personalcopy.com (try Unison.sf2) [WWW] http://www.hammersound.net/ or look up soundfonts in a search engine.

If you end up with a file ending with .sfArk, it's compressed in an annoying proprietary format. You may need a windows machine to decompress it, depending which version they've used. Details at [WWW] http://melodymachine.com/sfark.htm

Then you need to create the file /etc/timidity/timidity.cfg and add the following line (edit as appropriate):

soundfont /pathtothesoundfontfile/soundfontfile.sf2

Reducing CPU usage

If Timidity uses too much CPU on your slow machine, try adding these lines to the start of /etc/timidity/timidity.cfg (you may need to create this file)

opt EFresamp=l #use linear resampling
opt EFvlpf=d #disable VLPF
opt EFreverb=d #disable reverb
opt EFchorus=d #disable chorus
opt EFdelay=d #disable delay


_________________
当净其意如虚空,远离妄想及诸取,令心所向皆无碍


页首
 用户资料  
 
2 楼 
 文章标题 : MIDI软件Synthesis指南
帖子发表于 : 2005-06-16 13:36 
头像

注册: 2005-04-10 16:54
帖子: 2625
地址: 温州大学
送出感谢: 0 次
接收感谢: 1
How to get midi sound in Ubuntu
怎样在Ubuntu中得到MIDI声音

This could come in handy if you don't have a soundcard with hardware MIDI or have no external MIDI instruments connected to your PC. You must then use software synthesis. There are two common options, Timidity and Fluidsynth. This section only covers setting up and using Timidity at the moment.
如果你没有支持MIDI的声卡或没有连接到你PC的外接MIDI设备,那你就必须要用软件Synthesis。它有两个通用组件,Timidity和Fluidsynth。本节此时只是展示如何安装和使用Timidity。

Installing Timidity
安装Timidity

First install Timidity (using apt-get or Synaptic).
首先安装Timidity(使用apt-get或Synaptic)

Next you need a set of samples. The easiest way is to install package 'freepats' (a 28 MB download), and you're done. Alternatively, for better sound, read the section below to set up a soundfont.
接下来你需要一组例子。最容易的方式就是安装‘freepats’包(下载需28MB),或者为了能得到更好的声音,阅读下面的章节以安装Soundfont。

Once you've done that, you can try playing a midi file:
当你安装好了之后,你可以尝试播放一个MIDI文件:

timidity myfile.mid

If all is well, you should hear delicate strains of synthesised music. If you have problems, read 'Reducing CPU usage' below.
如果一切正常的话,你可以听到Synthesis音乐的优美旋律。如果你有问题,请阅读下面的“减少CPU的使用”。

Setting up Timidity as a MIDI server
将Timidity设为MIDI服务器

Issue the following commands:
执行下列命令:

sudo modprobe snd-seq-device
sudo modprobe snd-seq-midi
sudo modprobe snd-seq-oss
sudo modprobe snd-seq-midi-event
sudo modprobe snd-seq

This loads missing modules. You may not need all these (I found it worked with just the first two). Then enter:
这样会引导错过的模块。你也许不需要全部的模块(我发现只需要前面二个就可以正常工作了)。然后输入:

timidity -iA -B2,8 -Os1l -s 44100

This loads timidity as a midi server and opens 2 midi ports, 128:0 ad 128:1. After issuing it, you should have midi players working. You can open another terminal and issue a command such as:
该命令使Timidity成为MIDI服务器并打开2个MIDI端口,128:0 ad 128:1。在你运行它之后,你就可以运行MIDI播放器了。你可以打开另一个终端并运行命令:

pmidi -p 128:0 music.mid
kmid music.mid

To close timidity, press CTRL-C in the terminal it's running in.
关闭Timidity,可以在它运行的终端里按CTRL-C。

Launching the server as root may improve performance because of higher priorities given to the process.
以根用户来运行服务也许能提高性能,因为它能给进程更高的权限。

Notedit, or your score editor of choice can then be loaded and recognised the midi ports.
不进行编辑或你选择的乐谱编辑器将被引导并能自动识别MIDI端口。

If the computer is busy doing something else other than playing music, you may hear scratches or have latency problems. This might be solved with a realtime kernel patch, but is out of the scope of this HOWTO.
如果计算机除了播放音乐外还在忙于处理其他事情,你也许会听到一些刮擦音或者有一些潜在的问题。这可以通过打实时内核补丁来解决,但这已经超出了本指南的范围。

Automatically starting Timidity on boot
引导时自启动Timidity

Ubuntu Hoary sets up scripts in /etc/init.d when you install Timidity. To start it on boot, edit /etc/default/timidity and uncomment the line
当你安装Timidity时,Ubuntu Hoary会在/etc/init.d目录中设置启动脚本。为了能在引导时启动,编辑/etc/default/timidity文件并反注释下列行:

TIM_ALSASEQ=true

You'll also need to add the modules you loaded earlier to /etc/modules.
你也需要添加需更早引导的模块到/etc/modules目录中。

Finding and setting up a soundfont
找到并设置soundfont

Websites: [WWW] http://www.personalcopy.com (try Unison.sf2) [WWW] http://www.hammersound.net/ or look up soundfonts in a search engine.
网站:[WWW] http://www.personalcopy.com (尝试 Unison.sf2) [WWW] http://www.hammersound.net/ 或在搜索引擎中查找Soundfonts。

If you end up with a file ending with .sfArk, it's compressed in an annoying proprietary format. You may need a windows machine to decompress it, depending which version they've used. Details at [WWW] http://melodymachine.com/sfark.htm
如果你的文件是以.afArk结束的话,那么它是用讨厌的私有格式压缩的。你也许需要用Windows机器根据所用版本来来解压它。详情请参见[WWW] http://melodymachine.com/sfark.htm

Then you need to create the file /etc/timidity/timidity.cfg and add the following line (edit as appropriate):
接下来,你需要创建文件/etc/timidity/timidity.cfg,并将下列行添加其中(适当编辑)

soundfont /pathtothesoundfontfile/soundfontfile.sf2

Reducing CPU usage
减少CPU的使用

If Timidity uses too much CPU on your slow machine, try adding these lines to the start of /etc/timidity/timidity.cfg (you may need to create this file)
如果Timidity在你低配置机器上占用太多CPU的话,试着将下列几行添加到/etc/timidity/timidity.cfg文件的开头(你也许需要创建该文件)

opt EFresamp=l #use linear resampling
opt EFvlpf=d #disable VLPF
opt EFreverb=d #disable reverb
opt EFchorus=d #disable chorus
opt EFdelay=d #disable delay


_________________
我心无畏,源自于我心无知。
图片


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2005-07-18 14:42 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
http://www.ubuntu.org.cn/support/docume ... hesisHowTo


_________________
当净其意如虚空,远离妄想及诸取,令心所向皆无碍


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-06-04 11:29 
头像

注册: 2005-04-15 5:59
帖子: 308
送出感谢: 0 次
接收感谢: 0 次
安装简单、删除比较不容易啊~~

删除不干净,安装要30多MB删除之空出2MB不到 郁闷~~


_________________
AMD Althon64X2 Dual Core Processor 5000+
Jetway Hammar A770
Segate SATA 160G + Segate ATA 80G
Geil DDR2-800 2048 MB
AOC2016SW 1650x1050 with Geforce 9600GT

Windows XP sp3 & ubuntu 10.10


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2006-07-29 1:26 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
http://wiki.ubuntu.org.cn/MidiSoftwareSynthesisHowTo


_________________
https://weakish.github.io


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 5 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译