[gmpi] Re: Decision time: 8.1
- From: Chris Grigg <Chris Grigg <gmpi-public@xxxxxxxxxxxxxx>>
- To: gmpi@xxxxxxxxxxxxx
- Date: Wed, 13 Aug 2003 13:25:17 -0700
Paul said:
this raises a deeper question that should perhaps wait: what happens
if the plugin author wants to offer a choice of:
a) connect this port to a signal to control my output
b) use this knob to control my output
this is not hard to imagine for anyone who has ever used a modular
synth. it throws a wrench in the works, though, because connections
are between ports, not parameters. or are they? etc.
True. But it may be possible to resolve these two models into a
single mechanism, if that's what you want to do. So this doesn't
necessarily have to be an either/or choice at this stage. The rest
of this email shows one way it could be done, perhaps -- so if not
interested, stop reading now.
In other words, forego the usual plug::setParameter() and instead
handle setParameter() as an abstraction of event generation in the
graph object, not as a direct plug-in method. So all plugs would
have to implement a Parameters port (simple if always at the same
port index, though still doable even if it moves around).
So instead of doing this:
thePlug->setParameter( paramIndex, paramValue )
you do this:
theGraph->setParameter( thePlug, paramIndex, paramValue )
which inside the GMPI framework would be defined as something like:
result gmpiGraph::setParameter( gmpiPlug& thePlug, short
paramIndex, BYTE& paramValue ) {
#define kPARAMETER_PORT 0 // Known port index that all
plugs support for parameter setting
#define kEXECUTE_NOW -1 // Token for event time parameter
meaning execute event immediately
sendEventToPlug( thePlug, kPARAMETER_PORT, kEXECUTE_NOW,
makeParamEventData( paramIndex, paramValue ) )
}
This would stuff the generated event at the top of the plug's
parameter event queue, where it'd be executed at the top of the next
plug::process() call. (There would need to be a known queue ordering
rule in case a plug had any parameter setting order dependencies.)
As a side-effect, this approach would time-align the parameter
setting processing with all the other incoming event processing,
which might help simplify things for some plug types.
Again, this is all only if you want to have a single mechanism. Also
not applicable if you feel the need to be able to wiggle the
parameters in between process() calls for some reason...
-- Chris G.
----------------------------------------------------------------------
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: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe
- Follow-Ups:
- [gmpi] Re: Decision time: 8.1
- From: Jeff McClintock
- References:
- [gmpi] Re: Decision time: 8.1
- From: Paul Davis
Other related posts:
- » [gmpi] Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
- » [gmpi] Re: Decision time: 8.1
this raises a deeper question that should perhaps wait: what happens if the plugin author wants to offer a choice of:
a) connect this port to a signal to control my output b) use this knob to control my output
this is not hard to imagine for anyone who has ever used a modular synth. it throws a wrench in the works, though, because connections are between ports, not parameters. or are they? etc.
- [gmpi] Re: Decision time: 8.1
- From: Jeff McClintock
- [gmpi] Re: Decision time: 8.1
- From: Paul Davis