*** From: David Olofson <david(a)olofson.net>
This jives
EXACTLY ives with what I have been saying, though I
characterized it as:
VOICE_INIT(vvid) -> synth gets a virtual voice, start init-latch
window VOICE_SETs -> init-latched events
VOICE_ON(vvid) -> synth (optionally) makes it a real voice (end
init-window)
Well, then that conflict is resolved - provided synths are note
*required* to take VOICE_ON if they care only about "real" controls.
:-)
Uggh. Why is this so hard? If you don't get a VOICE_ON, you don't go. It
is a flag from the sequencer that says "I am done sending init events". If
you don't have any init events, then who cares? It means the synth can now
start making sound for this voice. Think of it as releasing the latch.
For example, your average synth will have a VELOCITY
and a DAMPING
(or something) control pair, corresponding to MIDI NoteOn and NoteOff
velocity, respectively. You could basically set both right after
allocating a voice/VVID, as the only requirement is that the right
values are in place when they should be latched.
OK, I'll buy that. So the way to end a voice is:
SEND(release-latched controls)
VOICE_OFF(vvid) /* latches control values */
It means that a control can not be both release-latched and continuous.
Perhaps that is good. Are there init-latched controls that can also be
continuous that are not purely continuous?
I'd been assuming that init-latched, continuous, and release-latched were
not mutually exclusive..but maybe they should be.
So again, I advocate over-verbosity as less evil than over-terseness.
/* if a plugin is voiced, it has a VOICE control */
VOICE(vvid, VOICE_INIT) // start init-latch window
// send init events
VOICE(vvid, VOICE_ON)
// run, send events, whatever
VOICE(vvid, VOICE_RELEASE) // start release phase
// send release events
VOICE(vvid, VOICE_OFF)
I like the fact that you are forced to declare the fact that you want to use
a VVID. If you have no init and no release controls:
VOICE(vvid, VOICE_INIT)
VOICE(vvid, VOICE_ON)
// run, send events, whatever
VOICE(vvid, VOICE_OFF)
I could even be convinced that VOICE_RELEASE is superfluous, but I (kind of)
like how release mirrors init.
We're close on this one, I can smell it!