-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing latency and parameters dynamically #3
Comments
Good idea. This works well for finding the number of params on the fly. I'm thinking in order to notify the host of a change in latency, tail time, number of busses, and number of parameters I could pass something like this into ...
enum // property types
{
CPLUG_CHANGED_LATENCY,
CPLUG_CHANGED_TAIL_TIME,
CPLUG_CHANGED_NUM_INPUT_BUSSES,
CPLUG_CHANGED_NUM_OUTPUT_BUSSES,
CPLUG_CHANGED_NUM_PARAMS,
};
struct CplugHostContext
{
void (*propertyChanged)(struct CplugHostContext* ctx, uint32_t changedProperty);
// ...
// some other feature?
};
void* createPlugin(struct CplugHostContext*);
...
uint32_t cplug_getParamCount();
... For the user, they simply save the context struct somewhere in their plugin and call the function with a property type. Something like this should work perfectly well in AUv2 and CLAP (so long as hosts support it) Thoughts? |
Sounds good. I think you mean that |
Yep, that's right |
Is there a way to change things that aren't typically changed dynamically? I have two things in mind:
SetLatency()
it calls VST3's IComponentHandler'srestartComponent()
.Now that I think about it I also can't make
CPLUG_NUM_PARAMS
a global variable because different instances of the same host plugin would host different modules with different numbers of parameters, so the number of parameters would have to come from acplug_...
callback that provides the instance pointer, for instance we could replaceCPLUG_NUM_PARAMS
with something likecplug_getParamCount(vst3->userPlugin)
, which could actually even be done as a macro for each plugin format but that would be unwieldy.The text was updated successfully, but these errors were encountered: