Skip navigation.

exploreopera

| Help

Sign up | Help

想起 MIDI

I guess as computer technology has grown with so many new ways of listening to, and obtaining music, midi format has gotten left behind. I remember when my father was letting me play on his computer a long time ago, midi files were really popular, and he had bunches of them. Well I kind of forgot about them too. They really can't substitute for the ever so popular mp3, flac, ogg, etc, but they are still fun to listen too, alter, and edit. To be honest, I didn't even know if my computer would even play a midi file. I searched for them on the net and discovered you can still find lots of them to download. Well, my computer wouldn't play them. I had to dig up a popular linux app called timidity. If you google search timidity, you find lots of info, and lots of people having problems, and lots of weird commands and switches to type, and it just looked like it was going to be complicated. Well it wasn't really that hard, or maybe I just got lucky?

This is what the "timidity -ig" gui looks like. Nothing fancy, but it's simple.



Timidity++, most linux distributions will probably have this, and installing timidity is the easy part. Afterwards, you have to do a few things to make timidity work. I happen to have a "Creative Labs SB live" sound card which is well supported by linux. Even so, I still need sound fonts for timidity to play midi files. Well there's lots of free sound fonts on the net, but I decided to go with the most popular eawpatches. My distro, and I think most others will have this as "timidity-eawpatches". Also, "timidity-freepats" seems to be popular as well, but I've never tried that one. Anyway, after installing timidity++ and timidity-eawpatches, you should have a file called (timidity.cfg) located in (/ect/timidity++) without the (). You also need to find the directory (eawpats) which is probably located at (/usr/share/timidity/eawpats) you'll see some instrument .cfg files in this eawpats directory. You will also need to make a note of the (usr/share/timidity) directory where all the .pat files are.

Now open up /etc/timidity++/timidity.cfg with a text editor. At end of the file you should see something like this...

dir /usr/share/timidity/eawpats
source /usr/share/timidity/eawpats/gravis.cfg
source /usr/share/timidity/eawpats/gsdrums.cfg
source /usr/share/timidity/eawpats/gssfx.cfg
source /usr/share/timidity/eawpats/xgmap2.cfg

Edit... The recent archlinux update put everything in the same dir /usr/share/timidity/eawpats/ making it a little simpler.

You need to make sure (usr/share/timidity) is the actual path to timidity where all the .pat files are. You also need to make sure the source eawpats paths are correct. That's where the instrument .cfg files are in usr/share/timidity/eawpats. If not, you need to find the eawpats directory, and make sure the source lines are pointing to the right place.

After that, save the timidity.cfg file. Then copy the timidity.cfg you just edited, or verified, to your eawpats directory, In my case, (/usr/share/timidity/eawpats). So that you have the same timidity.cfg file in both locations... (/etc/timidity++/timidity.cfg) and (/usr/share/timidity/eawpats/timidity.cfg)

Now, if you use the alsa sound server, you should be able to test timidity by activating it in alsa server mode, at the terminal ... typing the command....

> timidity -iA -B8,2 -Os

You should see an output something like this....

Requested buffer size 128, fragment size 16
ALSA pcm 'default' set buffer size 16384, period size 8192 bytes
TiMidity starting in ALSA server mode
Opening sequencer port: 128:0 128:1 128:2 128:3

However, you shouldn't really need to run timidity in alsa server mode unless you want to. It can help depending on your system and sound card. For me it's just enough to create a start up menu item called timidity to run timidity with the command (timidity -ig) which will launch timidity with a little gtk gui. After that, I associated midi and mid files with the new timidity menu item. So when ever I click on a midi file, it will open in the timidity gui.

Anyway, that's the basics of getting timidity set up. I won't go into setting up alsa, or oss sound, as that can get into depth depending on your system and sound card. basically, if your sound is working well before setting up timidity, you shouldn't have any problems, and if you do, it's probably not timidity, but something to do with your systems sound setup. For my sound card and kernel configuration, I have to load some specific modules like, snd-emu10k1, snd-emu10k1-synth, snd-mixer-oss, snd-pcm-oss, snd-seq-oss, and snd-seq-midi to get all around sound with the option of using either oss or alsa.

I was just thinking maybe the above info will help someone nostalgic like myself. I'm sure there's others lots geekier than me who knows more about midi and linux. I just figured out enough to make my computer obey when I click on midi files :smile:

Linux 英文和中文字体,and 快乐新年好 Wishes!我们可以一定胜利

Comments

avatar
Thanks for your good wish... But I cant get the meaning..

By Slava54, # 19. February 2008, 05:56:58

avatar
P.S. My Fother still knows nothing about the word PC at all....)))

By Slava54, # 19. February 2008, 06:01:13

avatar
Hi Slava54, Thanks for stopping by, and your very welcome!

My mother is like that too. She is really clueless when it comes to computers.

The Chinese title of the post when I wish everyone a happy new year, in English means...

"Linux English and Chinese fonts, and Happy New Year"

I'm learning Chinese and sometimes I mix Chinese and English in my posts :smile:

By allisonleigh, # 19. February 2008, 11:21:49

avatar
MIDI is not old,MOD is really old.
It's a long time I have not play with MIDI.
But MIDI is getting very professional.I know several musican to compose by MIDI,since they don't need an orchestra.There is a good place in Chinese www.midifan.com .Check it out.
With proper software you can turn computer into drum-machine even a whold band.Here is a lot of them en.wikipedia.org/wiki/Linux_audio_software.Choice what you want,and maybe you could practice guitar with your computer,when it's hard to find friends to practice with.
I'm doing a funny thing these day. Monica claiming she is werewolf reminds me that I can howl like a realy wolf.So I trying to record my howl into computer.But I can get satisfy with low-frequency ,which sounds very weak,because my poor micphone.If I enhance the low-frequency,I will get much noisy.If I get satisfy, I will post it.

My father is werid.More than 2 decades ago,he learnt to use Apple II and BASIC programming for a long time.He did that very well. e.g He drew a very good ascii-art panda on a paper.And the program drew that panda still in a casetts,which I really don't know how to run again.But now he is like a average people don't understand the computer.

By hohoxnes, # 22. February 2008, 09:21:03

avatar
Thanks :smile:

By Slava54, # 22. February 2008, 22:18:44

avatar
You're welcome Slava :smile:

hohoxnes, HaHa! Monica is a warewolf! :smile: :smile: She is so funny! I'll have to visite her blog and ask her how her world domination thing is going. P: She probably thinks I dropped off the planet.

That's such a wonderful Idea about midi!! I definately am going to research on what software I need to make my computer a programmable drum machine. That would be sooooooo cool!! :D

By allisonleigh, # 23. February 2008, 06:48:37

avatar
Hey. How time flies.

I now work for Opera. P:

By Thruth, # 26. February 2008, 11:32:04

avatar
ltns Thruth! 是的,时间匆匆飞逝...

Wow! working for Opera. That's great! :smile:

Are you still protecting the Chinese forum?

I always thought you were a wonderful choice for moderator, and I always enjoy reading your clever, (insightful) forum posts. : )

By allisonleigh, # 26. February 2008, 12:35:13

Write a comment

You must be logged in to write a comment. if you're not a registered member, please sign up.