My understanding of VVID's is that the sequencer puts one complete,
continuous note on a particular VVID. The sequencer only reuses a VVID once
it has ended any previous notes on that VVID. The sequencer can allocate a
large number of VVIDs so that it never has to make a voice stealing decision
on its end (and so we don't have to make roundtrips). This large allocation
means that the plugin should never try to allocate a significant sized
structure for each VVID. Instead, the plugin should match VVIDs to actual
voices as incoming voice-on messages are received until all actual voices
are used. After all voices are in use, the plugin has to decide whether to
steal voices from ongoing notes or deny voice-on events. Voice stealing
decisions are properly made by the plugin. This is the case even if the
sequencer knows how many actual voices there are because the plugin has much
more intimate knowledge of the nature of the voices: their amplitude, timbre
etc.
My underlying assumptions are:
-a single object resides in each channel, be it a piano a gong or whatever,
there is one in the channel
-HOWEVER, that single object may be polyphonic; the piano may be able to
sound multiple notes concurrently, the gong may be able to sound two quick
strokes in succession which overlap in their duration.
-DEFINITION: We call the facility for making ONE of those sounds a voice.
-DEFINITION: the individual voices produce finite periods of sound which we
call notes. A note is the sound that a voice makes between a Voice-On event
and a Voice-Off event (provided that the voice is not reappropriated in the
middle to make a different note)
-HOWEVER- there is no rule that a note has any pitch or velocity or any
other particular parameter, it is just that the Voice-On tells the voice to
start making sound and the Voice-Off tells the voice to stop making sound.
-ALSO HOWEVER- the entity which sends voice-on and off messages may not
directly refer to the object's voices. Instead, the event sender puts
separate notes on separate Virtual Voice IDs to indicate what it desires the
voices to do. This differential is in place because sequencers typically
send more concurrent notes than the plugin has actual voices for AND the
plugin is better suited to decide how to allocate those scarce resources. In
other words, it is the role of the plugin to decide whether or not to steal
a voice for a new note and which voice to steal. So the sequencer sends out
notes in fantasy-land VVID notation where they never ever have to overlap,
and the plugin decides how best to play those notes using the limited number
of voices it has.
As I see it, the procedure for using a voice via a particular VVID is as
follows (note that all events mentioned are assumed to have a particular
VVID):
(1)send voice-on event at timestamp X. This indicates a note is to start.
(2)send parameter-set events also at timestamp X, these are guaranteed to
follow the voice-on event even though they have the same timestamp because
the event ordering specifies it. These parameter-set events are to be
considered voice initializers should the plugin support such a concept,
otherwise they are the first regular events to effect this note.
(3)send parameter-set events at later times to modify the note as it
progresses.
(4)send voice-off event at later time to end the note and free the voice.
When the plugin reads the voice-on event at timestamp X it decides whether
to allocate a voice or not. If it has an initialization routine for voice-on
events, then the plugin must read through the remaining events with
timestamp X to get initialization arguments. The plugin must delay actually
initializing the voice until it has read the other events at the same
timestamp as the voice-on event. If the plugin doesn't do any special
initialization procedures then it doesn't have to worry about this because
the events concurrent with the voice-on event can just be applied in the
same manner as later param-set events.
--jacob robbins:..... soundtank..........
_________________________________________________________________
Protect your PC - get
McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963