8

I am trying to play this midi file downloaded from here, but I get:

$ timidity --verbose marivonnig1\ \(1\).mid 
Requested buffer size 32768, fragment size 8192
ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
Playing marivonnig1 (1).mid
MIDI file: marivonnig1 (1).mid
Format: 1  Tracks: 2  Divisions: 192
Sequence: Marivonnig
Text: By Traditionnel
Text: Generated by NoteWorthy Composer
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Track name: Staff
364 supported events, 3413810 samples, time 1:17
No instrument mapped to tone bank 0, program 41 - this instrument will not be heard
No pre-resampling cache hit

and no sound at all.

One more link, a different melody for the same text.

For some midi files from that site, I hear some sound, but I still get the message No instrument mapped to tone bank 0 -- this instrument will not be heard and I suspect that what I hear is not what I should hear.

Maybe it needs some soundfont, but it does not tell me which one.

How do I hear the melody?

13

timidity is a midi-renderer, but it doesn't come with instrument definitions by itself.

it seems that you are missing some soundfonts (at least for program 41). in order to fix this, you might want to install/enable another set of instruments. e.g. fluid-GM seems to be pretty complete. make sure to enable it, once you have it installed. something like the following should help (lines starting with $ are commands to be executed; lines starting with # are mere comments):

 $ sudo apt-get install fluid-soundfont-gm
 # then edit your /etc/timidity/timidity.cfg to activate the new soundfont
 # (and deactivate the old ones), e.g.:
 $ sudo sed -e 's|^source|#source|' -e '$a source /etc/timidity/fluidr3_gm.cfg' -i /etc/timidity/timidity.cfg
 # restart timidity
 $ sudo /etc/init.d/timidity restart
 # and play your file
 $ timidity --verbose marivonnig1\ \(1\).mid 
  • This works, but it seems like the instruments are mapped to different kinds, The midi Random Trance Music Generator does only sound correct with the standard source /etc/timidity/freepats.cfg – rubo77 Apr 1 at 17:48
1

install eawpatches

timidity is using freepats as default, try installing eawpatches as alternative:

sudo su
echo "deb https://www.fbriere.net/debian stable misc" > /etc/apt/sources.list.d/midi-fbriere.net.list
wget -q -O- 'https://www.fbriere.net/public_key.html' | sudo apt-key add -
wget -q -O- 'http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x96B4BF71E4D7FB01' | sudo apt-key add -
apt install eawpatches-package
make-eawpatches-package
chmod 777 ./eawpatches_12-10+local_all.deb
sudo apt-get install ./eawpatches_12-10+local_all.deb
# then edit your /etc/timidity/timidity.cfg to activate the new soundfont
# (and deactivate the old ones) with:
sudo sed -e 's|^source|#source|' -e '$a source /etc/timidity/eawpatches.cfg' -i /etc/timidity/timidity.cfg

Source Enable eawpatches midi soundfont as alternative to freepats

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.