Re: [linux-audio-dev] Basic MIDI question

From: Lee Revell <rlrevell@email-addr-hidden-job.com>
Date: Tue Jul 25 2006 - 02:38:47 EEST

On Tue, 2006-07-25 at 01:33 +0200, Jens M Andreasen wrote:
> On Mon, 2006-07-24 at 19:28 -0400, Lee Revell wrote:
> > On Tue, 2006-07-25 at 01:19 +0200, Jens M Andreasen wrote:
> > > On Mon, 2006-07-24 at 17:55 -0400, Lee Revell wrote:
> > >
> > > > Ugh. All I need to do is snoop note on, note off, and the note number.
> > > > But you're saying that 0x81 is sometimes part of a timestamp, and other
> > > > times it means note off on channel 1?
> > > >
> > > > So you are saying my driver needs to have full knowledge of the MIDI
> > > > state machine in order to snoop note on and note off?
> > > >
> > > Driver? This is a driver for a midi-port on a sound-card or a some kind
> > > of midi-file player?
> >
> > It's similar to a driver for a MIDI port on a sound card, except the
> > driver additionally has to respond to note on and note off by twiddling
> > some other bits in the hardware. It's equivalent to having to flash an
> > LED for note on and another for note off.
> >
> > I wrote the driver as an ALSA rawmidi device, which was probably not the
> > best idea - I did not realize at the time that I would have to interpret
> > the MIDI stream. An ALSA kernel sequencer client would have been more
> > appropriate.
>
> Confused again here. There are no delta-times in the midi-stream. You
> mean: " ... have to interpret the midi *file*"
>

I think it's me that's confused - as you can see I'm certainly not a
MIDI expert.

When playing a MIDI file to a rawmidi port with aplaymidi, it was not
clear to me that it just passes the file through - I was under the
impression that the driver would only see the actual events, not the
timestamps and other metadata.

Lee
Received on Tue Jul 25 04:15:04 2006

This archive was generated by hypermail 2.1.8 : Tue Jul 25 2006 - 04:15:04 EEST