Discussion:
[timidity-talk] Linux, use a SoundFont?
Torsten Mohr
2010-01-23 08:14:57 UTC
Permalink
Hello,

i read the "man page" and read some infos that users put on their web pages,
but i somehow can't seem to tell timidity to use a soundfont.

I have downloaded some free sound fonts and demos and unpacked them
so they have the extension .sf2

Timidity seems to load /etc/timidity.cfg, which sources
/usr/share/timidity/timidity.cfg

I tried in timidity.cfg:

bank 0
dir /usr/share/timidity
0 %font WurlitzerEPdry.SF2 0 3

(I also tried several countless other combinations)

When playing a midi file, the other voices are missing now (as expected), but
i also don't hear the piano part.


QSynth loads the sound file and says in "Channels":
Channel 1 Bank 0 Prog 3

So i created a MIDI file in Rosegarden that plays fine with the old timidity
configuration.
I created the MIDI file with: channel 1, Bank "General Midi", Program 4
(because the start to count from 1). I also tried it as Program 3.

Timidity tells me:
No instrument mapped to tone bank 0, program 2 - this instrument will not be
heard

In the second case it tells me:
No instrument mapped to tone bank 0, program 3 - this instrument will not be
heard


I'm not sure what i need to do to make timidity play soundfonts or how to map
soundfonts to MIDI instruments


Can anybody tell me what i need to do to play sounds?

I'm also not sure if i need to supply more information, if there are any
useful tests i could do then please write to me.


Thanks for any hints,
Torsten.
A. Zimmer
2010-01-23 15:58:10 UTC
Permalink
On Sat, 23 Jan 2010 09:14:57 +0100
Post by Torsten Mohr
No instrument mapped to tone bank 0, program 2 - this instrument will not be
heard
No instrument mapped to tone bank 0, program 3 - this instrument will not be
heard
Sometimes when an sf2 soundfont contains a single instrument, it
is mapped internally to program 0. For example, an sf2 flute
soundfont will sometimes contain program # 0 instead of # 73.
Timidity will read this internal program number and will believe
that the instrument is not present.

The way to correct this is to open the soundfont in an sf2 editor,
such as Swami (http://swami.sourceforge.net), and change the program
number to the appropriate value. Then Timidity will recognize
the instrument and play it.

Andrew Zimmer
Bob van der Poel
2010-01-23 16:29:49 UTC
Permalink
My /etc/timidity/timidity.cfg has 2 lines:

soundfont /home/bob/sounds/sfx-lib/SGM-V2.01.sf2
soundfont /home/bob/sounds/sfx-lib/acoustic_grand_piano_ydp_20080808.sf2 amp=800

This sets all voices to the stuff in 1st library; then resets the
piano0 to the 2nd. Works for me.

I think that the channel voice settings are set in the sf2 files, but not sure.
Post by Torsten Mohr
Hello,
i read the "man page" and read some infos that users put on their web pages,
but i somehow can't seem to tell timidity to use a soundfont.
I have downloaded some free sound fonts and demos and unpacked them
so they have the extension .sf2
Timidity seems to load /etc/timidity.cfg, which sources
/usr/share/timidity/timidity.cfg
bank 0
dir /usr/share/timidity
0 %font WurlitzerEPdry.SF2 0 3
(I also tried several countless other combinations)
When playing a midi file, the other voices are missing now (as expected), but
i also don't hear the piano part.
Channel 1 Bank 0 Prog 3
So i created a MIDI file in Rosegarden that plays fine with the old timidity
configuration.
I created the MIDI file with: channel 1, Bank "General Midi", Program 4
(because the start to count from 1).  I also tried it as Program 3.
No instrument mapped to tone bank 0, program 2 - this instrument will not be
heard
No instrument mapped to tone bank 0, program 3 - this instrument will not be
heard
I'm not sure what i need to do to make timidity play soundfonts or how to map
soundfonts to MIDI instruments
Can anybody tell me what i need to do to play sounds?
I'm also not sure if i need to supply more information, if there are any
useful tests i could do then please write to me.
Thanks for any hints,
Torsten.
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Timidity-talk mailing list
https://lists.sourceforge.net/lists/listinfo/timidity-talk
--
**** Listen to my CD at http://www.mellowood.ca/music/cedars ****
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: ***@mellowood.ca
WWW: http://www.mellowood.ca
jimmy
2010-01-23 18:15:46 UTC
Permalink
Date: Sat, 23 Jan 2010 09:29:49 -0700
soundfont /home/bob/sounds/sfx-lib/SGM-V2.01.sf2
soundfont
/home/bob/sounds/sfx-lib/acoustic_grand_piano_ydp_20080808.sf2
amp=800
This sets all voices to the stuff in 1st library; then
resets the
piano0 to the 2nd. Works for me.
I think that the channel voice settings are set in the sf2
files, but not sure.
Most "GM" (General MIDI) soundfonts should have 128 instruments of "bank 0" defined. Many midis use instruments in other banks.

All the non-GM soundfonts generally has 1 or a few instruments defined, and may use other bank number, not bank 0. These are often used in additional to a GM soundfont.

I would rather see Timidity use a reasonable instrument mapping "fall-back" scheme. Especially when requested for instrument 63 from bank 5 and it doesn't have anything loaded there, that it could try to use instrument 63 from bank 0 instead. This is how most GM hardware sound modules (or keyboards) handle instruments that it doesn't have. You will never hear "nothing" with a GM sound module, or a GM keyboard when it plays virtually all Midi files.

Anyway, here are some links that may help you.

http://ocmnet.com/saxguru/setupForum.htm

http://alsa.opensrc.org/index.php/GusSoundfont

Note the mentioning of "sf2cfg" and "unsf" may be useful for some folks.

Jimmy
SATO Kentaro
2010-01-24 05:36:09 UTC
Permalink
Hello,
Post by Torsten Mohr
bank 0
dir /usr/share/timidity
0 %font WurlitzerEPdry.SF2 0 3
You are mapping prog 3 of bank 0 of SF2 to prog 0 of bank 0 of TiMidity++.
Post by Torsten Mohr
No instrument mapped to tone bank 0, program 2 - this instrument will not be
heard
So for TiMidity++, nothing is mapped to prog 2 of bank 0.


Regards,
Kentaro Sato.
Post by Torsten Mohr
Hello,
i read the "man page" and read some infos that users put on their web pages,
but i somehow can't seem to tell timidity to use a soundfont.
I have downloaded some free sound fonts and demos and unpacked them
so they have the extension .sf2
Timidity seems to load /etc/timidity.cfg, which sources
/usr/share/timidity/timidity.cfg
bank 0
dir /usr/share/timidity
0 %font WurlitzerEPdry.SF2 0 3
(I also tried several countless other combinations)
When playing a midi file, the other voices are missing now (as expected), but
i also don't hear the piano part.
Channel 1 Bank 0 Prog 3
So i created a MIDI file in Rosegarden that plays fine with the old timidity
configuration.
I created the MIDI file with: channel 1, Bank "General Midi", Program 4
(because the start to count from 1).  I also tried it as Program 3.
No instrument mapped to tone bank 0, program 2 - this instrument will not be
heard
No instrument mapped to tone bank 0, program 3 - this instrument will not be
heard
I'm not sure what i need to do to make timidity play soundfonts or how to map
soundfonts to MIDI instruments
Can anybody tell me what i need to do to play sounds?
I'm also not sure if i need to supply more information, if there are any
useful tests i could do then please write to me.
Thanks for any hints,
Torsten.
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Timidity-talk mailing list
https://lists.sourceforge.net/lists/listinfo/timidity-talk
Torsten Mohr
2010-01-24 17:28:58 UTC
Permalink
Hello,
Post by SATO Kentaro
Post by Torsten Mohr
bank 0
dir /usr/share/timidity
0 %font WurlitzerEPdry.SF2 0 3
You are mapping prog 3 of bank 0 of SF2 to prog 0 of bank 0 of TiMidity++.
Post by Torsten Mohr
No instrument mapped to tone bank 0, program 2 - this instrument will not
be heard
So for TiMidity++, nothing is mapped to prog 2 of bank 0.
Thanks a lot. I've read the man page for timidity.cfg but interpreted
the description there in a different way.

I've now created a MIDI file that uses channel 0, program 0 and
i can hear output from timidity.


Best regards,
Torsten.

Continue reading on narkive:
Loading...