> Date: Thu, 15 Jan 2009 15:30:31 +0000 > From: Jonathan Gazeley > <jonathan.gaze...@bristol.ac.uk> > Subject: Re: [timidity-talk] Running Timidity as a service > > Hi Jimmy, > > Thanks for your response. What I don't understand is > why timidity is > trying to use jack at all. I want it to use alsa, and so > when I run > timidity from the command line by hand I use the -iA > switches, and it > all works fine. So I don't know why it is trying to use > jack as a > backend when I run it as a service. > > I guess if it can't easily be fixed, I will just have > to write something > that starts timidity when I start my midi program. > > Cheers, > Jonathan
Jonathan, If I want to play a midi file directly, asumming Alsa midi kernel module(s) have been loaded: timidity /some/path/to/some_song.mid Or, I also use timidity -A90a,90a -in -Os /some/path/to/some_song.mid You can lookup the Timidity manual page for some pointers on options I used above. If I want to have timidity run in server mode (wait for midi input), I would use the -i option. The -iA tells timidity server to use the Alsa midi api to wait for input. For example, I can have timidity or fluidsynth run in server mode, then use kmid, or aplaymidi to send midi events to the Alsa-midi server. Of course, this will need something like aconnect, aconnect-gui or others to connect those Alsa-midi ports together. I can also use vkeybd, or a real midi keyboard/drum to play along, too. Timidity also needs to know where to send the audio output to, here the -O is used. With -Os, the audio output is sent to Alsa audio device driver. With -Oj, the output is sent to Jackd, which normally is sent to Alsa Audio output on Linux. Although, with jackd, the audio data could be sent to other jackd plugins to process audio (reverb, echo, special effects) before sent to Alsa audio device driver. So with timidity -iA -B2,8 -Oj I have timidity running as an Alsa-midi server, output to jackd. With timidity -iA -B2,8 -Os I have timidity running as an Alsa-midi server, output to Alsa audio device driver. >From what I understand, Alsa device driver only allows one application to send >audio output to it. So If you want to use multiple applications to send >multiple audio output streams to Alsa device driver, Alsa doesn't allow it. I >think that's why jackd was written for this purpose. Jackd adds a little bit extra layer into the process, but can mix multiple audo streams, also allow special effects and other jackd capable apps, too. For example, if I want to play a .WAV, or .MP3 file and play along some midi instruments (keyboard, drums...), then Alsa won't allow those apps to send those outputs concurrently to Alsa device driver, only one app at a time. Jackd is the app that outputs to Alsa device driver, has its own API to let other apps send audio data to it to send to Alsa. Jackd latency is very good. So I can use some apps like Kaffein to play MP3, WAVE to send audio to jackd. At the same time, plays midi instrument (midi keyboard, midi drums), or midi applications like timidity, kmid, vkeybd, or all of these at the same time sending audio output to jackd. Recent jackd releases also aims to synchronize midi and audio output using high-resolution timer as a way to mix audio and midi output. Previously, people have had issues with with mixing midi audio output and other audio streams (prerecorded, or live audio), timing wise to achieve near-hardware mixing. Recent jackd releases along with the new jack-midi-api (not the old Alsa-midi api) aim to achieve this. I haven't use these specificly so I don't know how well jackd has delivered on this front. Jimmy ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Timidity-talk mailing list Timidity-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/timidity-talk