LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-23-2010, 01:18 PM   #1
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Rep: Reputation: 15
MIDI does not work in GNU/Linux


MIDI does not work in GNU/Linux.

It doesn't work, due to the fact that the only free soundfont I've come across -- Freepats -- is missing a lot of instruments; this results in the typical:

Code:
No instrument mapped to tone bank 0, program 41 - this instrument will not be heard
No instrument mapped to tone bank 0, program 43 - this instrument will not be heard
No instrument mapped to tone bank 0, program 52 - this instrument will not be heard
No instrument mapped to tone bank 0, program 82 - this instrument will not be heard
I can see that these are indeed missing in the directory which contains my samples from Freepats:

Code:
036_Slap_Bass_1.pat:                         GUS patch
037_Slap_Bass_2.pat:                         GUS patch
038_Synth_Bass_1.pat:                        GUS patch
040_Violin.pat:                              GUS patch
042_Cello.pat:                               GUS patch
044_Tremolo_Strings.pat:                     GUS patch
045_Pizzicato_Strings.pat:                   GUS patch
046_Harp.pat:                                GUS patch
This is a small excerpt from my directory /usr/local/share/timidity/Tone_000, as can be seen e.g. 41 and 42 is there, but 41 is missing.

However:

Code:
x86_1# cat /etc/timidity/crude.cfg |grep 41
      041  Tone_000/042_Cello.pat
       41  Drum_000/041_Tom_Low_2.pat
Timidity is configured to play this instrument -- if it only existed -- so all I need is a proper soundfont that Timidity can read.

I've searched around a lot and come up with nothing, any ideas?

If the only solution is to pay for a soundfont, then fine, just tell me the name of a soundfont that will work without any hacking and/or modification or patches with Timidity.

If not even a (payware) soundfont like that exists -- if my only option is to buy something else than Timidity, that comes with its own proprietary soundfont, then please tell me the name of that, I'm tired of this.
 
Old 03-23-2010, 06:39 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
You may find the KMidi wiki helpful for finding some other patch sets.

There was an original Gravis Ultrasound archive set, but I'm not sure where you can still get this. The company was bought out by Kensington and no longer supply MIDI related products (the website disappeared in mid 2007).

It was the Gravis set that was adopted by freepats, but many of the samples could not be freely licensed, so they were removed.

Last edited by neonsignal; 03-23-2010 at 06:48 PM.
 
Old 03-23-2010, 08:33 PM   #3
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by neonsignal View Post
You may find the KMidi wiki helpful for finding some other patch sets.

There was an original Gravis Ultrasound archive set, but I'm not sure where you can still get this. The company was bought out by Kensington and no longer supply MIDI related products (the website disappeared in mid 2007).

It was the Gravis set that was adopted by freepats, but many of the samples could not be freely licensed, so they were removed.
The only link working on that site was:

http://www.anime.net/~goemon/timidity/

Which gives me a set of GUS patch-files which are seemingly completely useless, there is no config-file which can allow me to map them to instruments and they are by no means any equivalent/replacement for the other Freepat files. In the included .txt it is stated that:

"Simply unzip these patches into your %ultrasnd%\midi directory right
over the originals."

These are clearly for a completely different system, DOS?

I'm not saying they are unusable, I'm just saying that I don't know how to use them. How can I tell Timidity to use these files, or how can I know which files I should use to (by hand) replace the missing GUS patches that I need?
 
Old 03-25-2010, 09:35 AM   #4
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
On the goemon site is the archive goemon.tgz. The zip file mentioned in the leftover inf file was originally intended for the Gravis UltraSound Windows driver (which uploaded the patches to the soundcard).

The archive can be extracted using tar/gzip:
Code:
tar xzf goemon.tgz
This will give you a cfg file and a directory full of the patches (in GUS format, which is one format that timidity uses).

What you do next will depend on your distribution (because some of these directories may be different), but on Debian, this is how you might go about it.

First you just need to create the patch directory, for example /usr/share/midi/goemon, and copy all the patch files to it. Don't change the directory structure (ie, keep the drumsets in the subdirectories, and the majority of the patches in the top level, so that the configuration file doesn't need to be changed).

Next, the goemon.cfg file needs to be placed in /etc/timidity.

The goemon configuration file contains the details about where the midi patches are located. It is relatively easy to write a configuration file and build your own collection of GUS format patches, but this one is provided for you. You just need to change the dir line to the name of the directory where the patches are, for example:
Code:
dir /usr/share/midi/goemon
The timidity configuration file /etc/timidity/timidity.cfg has a source line pointing to the patch configuration file. Change the source line to something like this:
Code:
source /etc/timidity/goemon.cfg
You may need to restart timidity (depending on how it is being used), as follows:
Code:
/etc/init.d/timidity restart
Then it is ready to go.

The goemon has a full set of patches for the GM melodic instruments, but I notice that the drum set is incomplete.

Last edited by neonsignal; 03-25-2010 at 07:59 PM. Reason: have now tested Merlin soundfont
 
1 members found this post helpful.
Old 03-25-2010, 07:58 PM   #5
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
The SoundFont files are even easier, and there are plenty of sets out there. I tried out the big Merlin Vienna one (unpacks to about 100Mb). If it is an sfark filetype, you will also need to decompress it to sf2.

Just put the sf2 file somewhere, eg in /usr/share/midi/. Then point the timidity configuration file to it; remove the source line, and replace it with a soundfont one. For example, in /etc/timidity/timidity.cfg:
Code:
soundfont /usr/share/midi/merlin_vienna.sf2
That's it!

Last edited by neonsignal; 03-25-2010 at 08:02 PM.
 
1 members found this post helpful.
Old 03-25-2010, 09:11 PM   #6
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by neonsignal View Post
On the goemon site is the archive goemon.tgz. The zip file mentioned in the leftover inf file was originally intended for the Gravis UltraSound Windows driver (which uploaded the patches to the soundcard).

The archive can be extracted using tar/gzip:
Code:
tar xzf goemon.tgz
This will give you a cfg file and a directory full of the patches (in GUS format, which is one format that timidity uses).

What you do next will depend on your distribution (because some of these directories may be different), but on Debian, this is how you might go about it.

First you just need to create the patch directory, for example /usr/share/midi/goemon, and copy all the patch files to it. Don't change the directory structure (ie, keep the drumsets in the subdirectories, and the majority of the patches in the top level, so that the configuration file doesn't need to be changed).

Next, the goemon.cfg file needs to be placed in /etc/timidity.

The goemon configuration file contains the details about where the midi patches are located. It is relatively easy to write a configuration file and build your own collection of GUS format patches, but this one is provided for you. You just need to change the dir line to the name of the directory where the patches are, for example:
Code:
dir /usr/share/midi/goemon
The timidity configuration file /etc/timidity/timidity.cfg has a source line pointing to the patch configuration file. Change the source line to something like this:
Code:
source /etc/timidity/goemon.cfg
You may need to restart timidity (depending on how it is being used), as follows:
Code:
/etc/init.d/timidity restart
Then it is ready to go.

The goemon has a full set of patches for the GM melodic instruments, but I notice that the drum set is incomplete.
Fantastic, I must have somehow managed to overlook said configuration file.

It works now; thanks.
 
Old 03-25-2010, 09:52 PM   #7
posix_memalign
Member
 
Registered: Aug 2008
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by neonsignal View Post
The SoundFont files are even easier, and there are plenty of sets out there. I tried out the big Merlin Vienna one (unpacks to about 100Mb). If it is an sfark filetype, you will also need to decompress it to sf2.

Just put the sf2 file somewhere, eg in /usr/share/midi/. Then point the timidity configuration file to it; remove the source line, and replace it with a soundfont one. For example, in /etc/timidity/timidity.cfg:
Code:
soundfont /usr/share/midi/merlin_vienna.sf2
That's it!
Tried that one instead, MUCH MUCH better than the GUS patches! Thanks!
 
Old 09-16-2014, 09:03 AM   #8
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
Thanks for the tip on .sf2 files. Indeed installing and loading the proper soundfont files enabled me to play midi files in an acceptable way.

About the sfArk files: I also downloaded a file from Merlin merlin_gmv32 which was in sfArk format. To uncompress it in Linux, refer to this post: http://linuxmusicians.com/viewtopic.php?f=24&t=9854

I was able to run the compiled executable on Debian Wheezy on a 64-bit i7 processor. However, I got checksum errors while unpacking the sfArk file. In the abovementioned post the author of the decompression utility explains the problem with checksums. Anyway, the playback did not sound good, with pops and crackles in the sound.

Then I found this site with a couple of links to free soundfonts files, including non-compressed .sf2 files or .zip compressed files.
http://hiphopmakers.com/over-2000-fr...undfont-player

Not all of the downloaded files provide all tracks I needed, but in general the result was successful. This one in particular was satisfactory:
http://www.ntonyx.com/soft/32MbGMStereo.sf2

jlinkels

Last edited by jlinkels; 09-16-2014 at 09:06 AM.
 
Old 09-16-2014, 11:40 AM   #9
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,449
Blog Entries: 15

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
TiMidity++ can work with both eawpats and freepats and can run as a daemon. There is some controversy around eawpats using proprietary sound samples from Gravis, but honestly it works better than freepats does at times so why fuss over it?
 
Old 09-16-2014, 01:46 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
I use MIDI every day to send sysex to MIDI external synths (midi port from M-Audio 2496 pci card), MIDI does work in GNU/Linux
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
External MIDI - does not work eagle136 Linux - Newbie 3 02-27-2010 08:49 AM
LXer: Hotmail doesn't work with Firefox 2.0: Microsoft answers to GNU/Linux users "Sw LXer Syndicated Linux News 1 02-07-2008 08:14 PM
going to MIDI, will it work?.. iiv Slackware 4 12-15-2007 04:46 PM
Getting Midi to work RodWC Debian 14 04-18-2006 07:32 AM
getting midi to work Howie97 Slackware 4 03-12-2006 12:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration