NOGDUS

Articles, Tutorials, and other things. => Sounds and Music => Topic started by: Richard Marks on November 10, 2008, 01:24:13 PM



Title: Converting MIDI files to OGG on Linux
Post by: Richard Marks on November 10, 2008, 01:24:13 PM
How to create OGG files from MIDIs using Timidity++ and OGGEnc on Linux.

You need to have the OGG/Vorbis tools installed, and Timidity++.
I don't remember the package names exactly, but I think its ogg123 and timidity.
Search in Synaptic (if you are using Ubuntu) for ogg and timidity.

Lets assume that you have a MIDI file called source.mid that you want to convert to an OGG file.

Output the MIDI to a WAV file.

Code:
$ timidity source.mid -Ow -o dest.wav

Convert the WAV to OGG.

Code:
$ oggenc dest.wav

(optional) Delete the intermediate WAV.

Code:
$ rm -f dest.wav

The resulting ogg is named dest.ogg


Title: Re: Converting MIDI files to OGG on Linux
Post by: Richard Marks on November 12, 2008, 06:54:47 PM
I have been messing with using soundfonts in Rosegarden, and I tried to create an ogg of my composition that I created that made use of special sounds that are in the soundfont I was using, and following the steps above will not give you what you expect.

You need to tell timidity where your soundfont is and optionally adjust the volume.

Code:
$ timidity source.mid --config-string='soundfont "path/to/soundfont/soundfont.sf2"' -A200 -Ow -o dest.wav

As you see above, I'm increasing the volume of the output by 200% with the -A200 command.

The rest of the steps are the same as above.