View Full Version : Howto: Easy MIDI
RastaMahata
August 21st, 2005, 08:04 PM
I was trying to play scummvm with alsa, and I coudlnt get it to play midis.. So I did a Little research, and found this (http://www.ubuntu-es.org/node/3777). He did an excellent job at adding midi in hoary, so this is kind of a translation and a bit of fix.
Install timidity & pmidi: sudo apt-get install timidity pmidi
sudo gedit /etc/modules and add the following lines: snd-seq-device
snd-seq-midi
snd-seq-oss
snd-seq-midi-event
snd-seq
Download the Unison Soundfont: wget ftp://ftp.personalcopy.net/pub/Unison.sf2.gz
Extract it to /etc/sounds: sudo mkdir /etc/sounds/
tar -xzf Unison.sf2.gz
mv Unison.SF2 Unison.sf2
sudo mv Unison.sf2 /etc/sounds/
sudo gedit /etc/timidity/timidity.cfgIt should look like this (No more, no less):soundfont /etc/sounds/Unison.sf2
sudo gedit /etc/init.d/timidityvariable TIM_ALSASEQPARAMS (variable 22 I think), should look like this:TIM_ALSASEQPARAMS="-iA -B2,8 -Os1l -s 44100"
sudo gedit /etc/default/timidityUncomment the two TIM variables. It should look like this: # Defaults for TiMidity++ scripts
# sourced by /etc/init.d/timidity
# installed at /etc/default/timidity by the maintainer scripts
# $Id: timidity.default,v 1.3 2004/08/07 14:33:26 hmh Exp $
#
# This is a POSIX shell fragment
#
# Enable MIDI sequencer (ALSA), default is disabled
TIM_ALSASEQ=true
# Setting overrides (of /etc/timidity.conf) for the ALSA sequencer daemon
TIM_ALSASEQPARAMS="-iA -B2,8 -Os1l -s 44100"
gedit ~/.bashrcAdd the following line (A good idea is to add it after line 9):export ALSA_OUTPUT_PORTS="128:0"
Done! Now you can play midis with pmidi. Like this:pmidi Song.midIf it doesnt work, reboot (just to be sure... Damn windows tick!)
Bonus: SCUMMVM
Now you can play scumm vm through alsa! Just follow these steps:
gedit ~/.bashrcAdd the following line (Again, after line 9 is a good idea):export SCUMMVM_PORT=128:0
(If you want to create a launcher)gedit ~/.gnomercAdd the folowing lines:export ALSA_OUTPUT_PORTS="128:0"
export SCUMMVM_PORT=128:0
In scummvm, go to options, audio, music driver: ALSA
Good luck.
PD: Thanks to:
http://www.ubuntu-es.org/node/3777
http://www.ubuntulinux.org/wiki/MidiSoftwareSynthesisHowTo
http://www.personalcopy.com/home.htm
http://ubuntuforums.org/showthread.php?t=30559&highlight=timidity
Note: I think Ubuntu should have MIDI support by default :(
deaderthanyou
August 22nd, 2005, 03:30 AM
Wow, worked perfectly :) I like your choice of soundfont, could you tell me why you use it? Reboot was required. Just wondering if you know of any command that I can use with pmidi or timidity that would save a midi as a .wav file.
gammyhand
August 22nd, 2005, 04:08 PM
Wow, worked perfectly :) I like your choice of soundfont, could you tell me why you use it? Reboot was required. Just wondering if you know of any command that I can use with pmidi or timidity that would save a midi as a .wav file.
I have an audigy2 zs sound card, surely I can use it's rom stored soundfonts?
gammyhand
August 22nd, 2005, 04:26 PM
I have an audigy2 zs sound card, surely I can use it's rom stored soundfonts?
I get these errors when trying to run the tar command:
ralph@ralph:~$ tar -xzf Unison.sf2.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
RastaMahata
August 22nd, 2005, 10:45 PM
I get these errors when trying to run the tar command:
ralph@ralph:~$ tar -xzf Unison.sf2.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
I think you should download it again... maybe its a corrupted download.
Try downloading the file through your browser.
deaderthanyou
August 22nd, 2005, 11:26 PM
I think you should download it again... maybe its a corrupted download.
Try downloading the file through your browser.
Actually, mine did the same thing. I just went to my home folder, right clicked on the file, and chose extract here. Something must be wrong with that command :(
papabean
August 27th, 2005, 03:57 AM
I get these errors when trying to run the tar command:
ralph@ralph:~$ tar -xzf Unison.sf2.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
I think it's because this file is just g'zipped and not tar g'zipped. A simple gunzip Unison.sf2.gz should do the trick.
Many thanks, RastaMahata, for posting this HOWTO. ScummVM was the EXACT reason I even started looking for sequencer support in ALSA. I just found my old Day of the Tentacle CD and had no sound.
Kyral
August 27th, 2005, 10:31 AM
Hopefully this will let me play Final Fantasy 8 on Cedega now :D (Thing wouldn't load b/c it couldn't find MIDI support)
drx
September 4th, 2005, 02:47 PM
Hi RastaMahata,
thanks for this guide which is the first that seems to work ok for me ;) But still, i have problems with MIDI ... the sound is skippy (crackling replay) and laggy. It sounds like wavetable sonftware synthesis five years ago on my incredibly slow Pentium that wasn't fast enough to do it. But now i have a 2Ghz computer and an Audigy ZS. Is there a good guide how to set up the Audigy "natively"?
Quirky
September 4th, 2005, 04:10 PM
No need to reboot!
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
sudo /etc/init.d/timidity start
RastaMahata
September 20th, 2005, 03:12 PM
Wow, worked perfectly :) I like your choice of soundfont, could you tell me why you use it? Reboot was required. Just wondering if you know of any command that I can use with pmidi or timidity that would save a midi as a .wav file.
easy... timidity <type> <file>
where type is what kind of file output you want.
-Od dsp device
-Os ALSA pcm device
-OR aRts
-Oe Enlightened sound daemon
-Oj JACK device
-On Network Audio Server
-Ow RIFF WAVE file
-Or Raw waveform data
-Ou Sun audio file
-Oa AIFF file
-Ov Ogg Vorbis
-OF FLAC / OggFLAC
-Ol List MIDI event
-OM MOD -> MIDI file conversion
RastaMahata
September 20th, 2005, 03:14 PM
ack, double post. My bad :(
fragmental
September 23rd, 2005, 12:19 AM
Hi RastaMahata,
thanks for this guide which is the first that seems to work ok for me ;) But still, i have problems with MIDI ... the sound is skippy (crackling replay) and laggy. It sounds like wavetable sonftware synthesis five years ago on my incredibly slow Pentium that wasn't fast enough to do it. But now i have a 2Ghz computer and an Audigy ZS. Is there a good guide how to set up the Audigy "natively"?
Should be the same as it is for sblive. I could be wrong, though, but I think it is. In that case you want awesfx. I think there's a good howto somewhere in this forum, so you should be able to find it. I'm too tired too look right now. You can try the search items "midi awesfx".
You should not need timidity or any other software synth but you will need a soundfont. The soundfont mentioned in this post is probably not a bad one. My personal favorite is AnotherGS (http://bennetng.kc-studio.com/AnotherGS/AnotherGS.html), but it comes in an exe archive. I extracted it while in windows but it might work using wine. I haven't tried it.
Here (http://tangentmind.blogspot.com/2005/08/soundfonts.html) is a link to my blog that has 3 links to some other soundfonts which may be alright, but I can't guarantee that they will be easy to extract in linux. If you have a windows install you should have a "soundbank" floating around somewhere too. I forgot what it should be called.
PatrickMay16
September 23rd, 2005, 05:11 AM
EDIT: No matter, I realised what to do.
It's working perfectly. Thanks very much!
serzz
December 2nd, 2005, 08:11 PM
Can somebody post own /etc/init.d/timidity and /etc/dafault/timidity files? I have deleted them and I can't find way to bring them back.
thetictacaddict
August 22nd, 2006, 08:47 PM
Maybe I was a little late finding this. Perhaps there's a newer document. I tried to use EasyUbuntu to install midi support but I had already installed something which prevented it from EasyUbuntu from taking action (I think it was Timidity). Anyhow, this document helped me get MIDI support working. Thanks a lot, RastaMahata!
detyabozhye
November 27th, 2006, 10:46 PM
All works with just installing timidity in Edgy; I have an Audigy 2.
scunc_dvl
December 14th, 2006, 09:03 AM
In my Edgy this thread came in handy when I wanted to install Unison.sf2 to fix a few missing instruments in freepats, the instrument patch is all that's missing from the Edgy ubuntuguide.
Has anyone noticed staticy sound mixing? timidity in Zdoom works but sounds a bit staticy like it's been turned up too much, I doubt that's an easy fix and I haven't seen other apps do similarly, yet..
EDIT: It's okay - if you get staticy sound or distorted sound, check your sample rate. It should likely be up to 48,000Hz. Zdoom had this setting in it all along, and works great (if only you get it to compile) :)
scunc_dvl
July 16th, 2007, 04:03 PM
I still need this "Easy MIDI" thread because Freepats is missing a pile of instruments. Kind of frustrating
mit74
November 1st, 2009, 04:44 AM
Thanks!
This totally solved my MIDI problems in Kubuntu 9.10!
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.