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.
/* 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.
---------------------------------------------------------------------- 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