[gmpi] Re: 3.11 topic: Dynamic plugin structure

  • From: Chris Grigg <gmpi-public@xxxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Thu, 29 Apr 2004 10:40:04 -0700

Tim said, to David:

 > Chris said:
 > > Minor point: There's more room for transcription errors in the one
 > big literal string table you suggest, whereas this approach
 > actually enforces the plug structure in the param names table.

Yeah, another good point.

red herring. You store internally an array of params for each 'module'. When you want to load a new module you insert copies of those strings. I think the right answer may be a hybrid of the two.

If you reference the lists via ptr, then you're right, there's no issue, but that's what I was saying too. My point was if you -don't- reference the lists via ptr, and just type all the params into a big string array, you can make mistakes. Which is not a red herring, it's a response to examples given here of doing exactly that.



/* internal */
static char *master_params[] = {
        "gain", "pan", NULL
};
static char *channel_params[] = {
        "osc/shape", "osc/octave", "filter/cutoff", "filter/resonance",
        NULL
};

/* exposed somehow */
char **all_params[] {
        master_params,
        channel_params,
        channel_params,
        channel_params,
};

This results in a synth with 4 channels (well, master + 3 channels,
assuming master is always 0).  It doesn't need to have 3 or 4 paralell
interlinked arrays.

Really though, a channel might have more info than just parameters.  How
about IOs?  Any meta data?  Better perhaps to just call it an array of
channels?  We can then define a channel as some structure encapsulating it
all.

It would make sense to spec a standard structs for parameter description. The param descr struct would hold the channel/slot, param name (in /-format), the param's data type, any hints or other metadata, etc. The plug could construct a list or array of same, possibly organized by slot/channel (though I'm not sure an explicit representation of channels is needed since it's implicit in the ), and pass it to the host as part of a config operation.


I'm not sure about channels. Do channels specify their own independent I/O ports/pins/queues, or is it the plug's job to connect the pins to the channels? We don't know yet. (There may be creative cases where those connections being dynamic is part of the plug's unique character.) If each channel has its own pins, then a channel descr struct makes more sense.

-- 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: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: