[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: playing midi with timidity



On Thu, 22 Sep 2005 22:50:19 +0100
Joe Mc Cool <joe@benburb.demon.co.uk> wrote:


> Sorry, I don't know what iec958 is.
> 
> I have used alsamixer and muted all the inputs I can.

iec958 are the optical digital lines and it seems like something that
normally shows on the mixer even if the optical jack was not included
on the card, but they could be something you don't have. If all the
available inputs are muted that should take care of it if you are
using the alsamixer or some other mixer that shows all of the alsa
stuff.

> 
> > > Essentially my perl script is:
> > > 
> > > system("timidity -L /usr/share/timidity -Ou -o$au_file $midi_file > /tmp/timidity 2> /dev/null");
> > > 
> > > system("play -v $volume $au_file ");	
> > 

Since the script tells timidity to create an audio file from the midi
then uses play to play back the audio it just seems odd that it would
be an issue with timidity.

This is why I question whether the file is actually created in it's
entirety or if it is actually being played back while it is being
created by timidity. If it is being read while it is being created by
timidity this might create some odd behaviour.

I don't see any reason for there to be a significant difference between
the use of alsa or oss. This is why I wondered if the oss driver would
work with the 2.6 kernel. If you are using the stock Debian kernel the
oss should be there they are just not the default.

If you edit /etc/modules and put:

es1371

: in there then the oss modules should load at boot time instead of the
alsa modules.

Depending on what you are running you may be able to open a terminal
window and type:

/etc/init.d/alsa stop
modprobe es1371

: and switch modules without rebooting.

The efficiency of timidity leaves something to be desired, but even on
a slow system I think it should work. Especially since you have
commented the stuff as the configuration file suggests for a slower
system. 

Going back to the script, if the audio file is created in it's
entirety before play starts to play it back the speed of the machine
should not be a factor. This is assuming my thinking is correct that
when you output to an audio file the resulting file will be the same no
matter how fast the machine is.

The only two suggestions I have left at this point are:

1. If the option is available to you try the oss module. 

2. Open a terminal window and use timidity directly to create an audio
file instead of using the script and then see if it sounds the same
when you try to play the audio file back with the play command and if
it does sound the same try playing the audio file with something else.

Later, Seeker



Reply to: