[linux-audio-dev] Plugin APIs (again)

David Olofson david at olofson.net
Sat Dec 7 20:50:01 UTC 2002


On Sunday 08 December 2002 02.25, John Lazzaro wrote:
> > David Olofson writes:
> >
> > The point I think you're missing is that a "control change" event
> > is *exactly* the same thing as a "voice start" event on the bits
> > and bytes level.
>
> Lossy MIDI filters will prune away two MIDI Control Change commands
> in a row for the same controller value with the same data value,
> apart from controller numbers (like All Notes Off) whose semantics
> have meaning in this case. And the assumption underlying the
> behavior of these filters are present in subtle ways in other MIDI
> gear and usages too. For example, a programming language that
> presents an array with 128 members, holding the last-received (or
> default) value of each MIDI controller, presents an API that
> implicitly does this filtering, no matter how frequently the
> program samples the array.

Yes - but we're not talking about MIDI here. We *may* require that 
events are never lost, and even that it's not legal to send two 
identical events in line to an event port, unless you really mean 
something else than to set a controller to the same value twice.

Anyway, the examples I gave in one of the other posts don't rely on 
this at all. They still go by the controller *values* - for example 
changes from and to 0.

The point I was trying to make was that with an event system (or a 
callback system, for that matter) you don't have to constantly poll a 
number of control ports to see these transitions. You only have to 
check when you actually get a "change" event, since that's the only 
way a control can change it's value.


//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -'
.- M A I A -------------------------------------------------.
|    The Multimedia Application Integration Architecture    |
`----------------------------> http://www.linuxdj.com/maia -'
   --- http://olofson.net --- http://www.reologica.se ---



More information about the Linux-audio-dev mailing list