feat: integrate Carla plugin host with rack view, fuzzy search, and volume control
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
48
dispatcher.c
48
dispatcher.c
@@ -368,6 +368,54 @@ AppState reducer(AppState state, Action action) {
|
||||
return scene_trigger(state, action.data.midi_scene_launch.scene_index);
|
||||
}
|
||||
|
||||
case ACTION_RACK_ADD_PLUGIN: {
|
||||
int channel = action.data.rack_add_plugin.channel;
|
||||
if (channel >= 0 && channel < MAX_CHANNELS) {
|
||||
carla_add_plugin(&state.carla_host, channel,
|
||||
action.data.rack_add_plugin.uri,
|
||||
action.data.rack_add_plugin.type);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
case ACTION_RACK_REMOVE_PLUGIN: {
|
||||
int channel = action.data.rack_remove_plugin.channel;
|
||||
int plugin_idx = action.data.rack_remove_plugin.plugin_index;
|
||||
if (channel >= 0 && channel < MAX_CHANNELS) {
|
||||
carla_remove_plugin(&state.carla_host, channel, plugin_idx);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
case ACTION_RACK_SET_PARAMETER: {
|
||||
int channel = action.data.rack_set_parameter.channel;
|
||||
int plugin_idx = action.data.rack_set_parameter.plugin_index;
|
||||
int param_idx = action.data.rack_set_parameter.param_index;
|
||||
float value = action.data.rack_set_parameter.value;
|
||||
if (channel >= 0 && channel < MAX_CHANNELS) {
|
||||
carla_set_parameter(&state.carla_host, channel, plugin_idx, param_idx, value);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
case ACTION_RACK_SET_VOLUME: {
|
||||
int channel = action.data.rack_set_volume.channel;
|
||||
float volume = action.data.rack_set_volume.volume;
|
||||
if (channel >= 0 && channel < MAX_CHANNELS) {
|
||||
carla_set_channel_volume(&state.carla_host, channel, volume);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
case ACTION_RACK_BYPASS: {
|
||||
int channel = action.data.rack_bypass.channel;
|
||||
bool bypass = action.data.rack_bypass.bypass;
|
||||
if (channel >= 0 && channel < MAX_CHANNELS) {
|
||||
state.carla_host.channel_racks[channel].bypassed = bypass;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
case ACTION_PROCESS_AUDIO:
|
||||
return state;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user