Effects/SASL/Dynamic instr MIDI easedropping ...

From: John Lazzaro (lazzaro@cs.berkeley.edu)
Date: Thu Apr 27 2000 - 15:06:56 EDT


Hi everyone,

        Been spending the last few days implementing some
"popular requests" people have made for sfront (already
implemented are printf()'s with rate semantics based on
argument rate, C pre-processor support w/ SAOL error
message line-numbering, and input_bus support for querying
for inchannels and srate from the audio device/file if
these parameters aren't set explicity ... all coming in
sfront 0.59 in a few weeks).

        Also on this list is a problem most people who use
the real-time low-latency linux stuff for music apps have
complained about: its natural to want effects instruments
(and perhaps SASL and dynamic instrs too) to "easedrop"
on a MIDI channel, using the MIDIctrl[]/MIDIbend/MIDItouch
standard names. The standard doesn't seem to mandate that
these return 0 for instrs with preset numbers that are
not launched via the MIDI method, so there seems to be
some space to implement easedropping.

        Basically, there are two ways I can think of to
implement this:

[1] The instr that wants to easedrop has a preset number
in its definition. If a MIDI channel selects this preset
number, than all instances with that preset number get
to see what's up on MIDIctrl[]/MIDIbend/MIDItouch for
that channel, even if the instance wasn't launched by
a MIDI NoteOn, but rather a SASL line, dyn instr statement,
or effects.

This has the advantage that it really introduces no new
syntax, and only adds a behavior (changing the values of
MIDIctrl[]/MIDIbend/MIDItouch in the non MIDI NoteOn
instances) that is currently undefined.

[2] All of [1], but in addition, instrs can have negative
preset numbers. In this case, it easedrops on the
MIDIctrl[]/MIDIbend/MIDItouch of the MIDI channel bound
to the absolute value of its preset number. However,
MIDI NoteOn's launch the instr with the positive preset
number.

This has the disadvantage that it introduces a syntax
thats incompatible with MP4-SA -- negative preset numbers.
So sfront's MP4 writer would probably delete the preset
field for these instruments, maintaining a syntactically
compatible bitstream. The one advantage it has, is if
you have a controller keyboard that only puts out data
on one MIDI channel at a time (including sliders, ect),
you can still control effects, simply by having one
big instr do all the effects, and assigning to it the
whole range of negative preset numbers. It feels like
such a hack though, that I'm reticent to implement it
unless there's a great need for it from the community.

        So in short the question is, are there people
out there who really need the functionality of [2]? Or
is [1] sufficient?

                                                --jl

P.S. Finally, I should note there is a wholly compatible
way of solving this problem -- have the instances created
by NoteOn's write selected controller values to global
variables, which effects and SASL instances can read. The
major issues with this approach is

[1] Only works when NoteOn instances exist -- this is a
particular problem for hardware that can't generate NoteOn's
at all, like some mixing consoles, and isn't all that great
in the general keyboard case either.

[2] Might have some performance issues, for heavy controller
use ...



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:39 EST