[vorbis] convert midi directly to Vorbis (Unix users enjoy)

Lorenzo Prince lorenzo at princenet.sytes.net
Tue May 13 21:50:05 PDT 2003


Just thought soome of you all may be interested in this.  It is a small
simple Bash script that will convert a midi file to Ogg Vorbis at the
quality you specify using TiMidity++ and oggenc.

If you have any suggestions, feel free to either implement them or send
them to me either on or off list.  If you decide to implement a suggestion
yourself, I would like a copy of your modified version of the script sent
to me off list.

Unix users enjoy!

Lorenzo

Intel engineering seem to have misheard Intel marketing strategy.  The
phrase was "Divide and conquer" not "Divide and cock up"
        -- Alan Cox, iialan at www.linux.org.uk
-------------- next part --------------
#/bin/bash
# midi2ogg
# by Lorenzo Prince
# Converts a midi file to Ogg Vorbis at the quality specified
# This script requires oggenc and TiMidity++ and will support all file 
# formats that can be played by TiMidity++.
# Usage: midi2ogg <middifile> <Oggfile> <quality>
# example: midi2ogg test.mid test.ogg 3.5

if [ "$1" = "-v" -o "$1" = "--version" ]; then
 echo midi2ogg version 1.0 by Lorenzo Prince
elif [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "" ]; then
 echo midi2ogg
 echo by Lorenzo Prince
 echo Converts a midi file to Ogg Vorbis at the quality specified
 echo This script requires oggenc and TiMidity++ and will support all file 
 echo formats that can be played by TiMidity++.
 echo
 echo "Usage: midi2ogg <middifile> <Oggfile> <quality>"
 echo example: midi2ogg test.mid test.ogg 3.5
 echo
 echo other options:
 echo midi2ogg -v [--version] Print version information
 echo midi2ogg -h [--help] Print this help message
elif [ -e "$1" ]; then
 timidity "$1" -Ow1S -s 44100 -o - | oggenc - -q$3 -o "$2"
else
 echo midi2ogg: $1: No such file or directory
fi


More information about the Vorbis mailing list