On Thu, Dec 01, 2005 at 01:53:50PM +1300, Jeff McClintock wrote: > >We (XAP folk) had previously > >described it like this: > > > ....... The plugin notifies the host > >that VVID(v) is now in state VVID_DONE. > > Hi, > This is *far* too complicated. Any system requiring the plugin send > info back upsteam is flawed. I disagree - it's very simple. The only thing the plugin has to do is tell the host when's release phase is done, and you know - even that is not needed. see below > What is the mistake in the following *super* simple VVID allocation scheme? > > KEYBOARD controllers: > Assign each key a unique voice ID. > > - uses a finite number of voice-IDs > - Host has no active role in physical voice allocation. > - voice ID's are only re-used to play the same note a second (or third) > time, never to play an unrelated note. I want to be able to play C4 8 times at the same timestamp, and control the per-voice parameters of each instance independantly. A slightly modified VVID state machine could be simple enough: All VVIDs start in state VVID_NULL (non-existant). The host tells the plugin to allocate VVID(v). VVID(v) is now in state VVID_IDLE. -> The host can send events to VVID(v) in preparation to turn that voice on. -> The plugin is not generating sound for this voice. The host activates VVID(v). VVID(v) is now in state VVID_ACTIVE. -> The plugin allocates a real voice for VVID(v). -> The host can send events to VVID(v) to modify it's continuous per-voice controls. The host stops VVID(v). VVID(v) is now in state VVID_RELEASE. -> The host can send events to VVID(v) to modify it's continuous per-voice controls. The host tells the plugin to deallocate VVID(v). The VVID is in state VVID_NULL (non-existant). -> The host can no longer send events to VVID(v). Notice the lack of any plugin->host communication. The allocate/deallocate process is a way for the host to indicate it's interest in a VVID. Once the host deallocates that VVID, it is saying "I will not send any more events for this VVID". If the plugin is still playing the actual voice associated with VVID(v), it can continue to play it, and no more events will be delivered for it. In fact, the deallocate is not really NEEDED. If you allocate a VVID that is already allocated, you can consider that a de-allocation. IF we went with this model, this would be a decisionof cleanliness and convenience. Tim ---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission. Archive: //www.freelists.org/archives/gmpi Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe