summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Delta.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index c3d4e458..f1acbdc2 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -209,6 +209,12 @@ Delta::pre_process()
} else if ((block = dynamic_cast<BlockImpl*>(_object))) {
if (key == uris.midi_binding && value == uris.patch_wildcard) {
op = SpecialType::CONTROL_BINDING; // Internal block learn
+ } else if (key == uris.ingen_enabled) {
+ if (value.type() == uris.forge.Bool) {
+ op = SpecialType::ENABLE;
+ } else {
+ _status = Status::BAD_VALUE_TYPE;
+ }
}
}
@@ -316,13 +322,17 @@ Delta::execute(ProcessContext& context)
}
break;
case SpecialType::ENABLE:
- if (value.get<int32_t>()) {
- if (_compiled_graph) {
- _graph->set_compiled_graph(_compiled_graph);
+ if (_graph) {
+ if (value.get<int32_t>()) {
+ if (_compiled_graph) {
+ _graph->set_compiled_graph(_compiled_graph);
+ }
+ _graph->enable();
+ } else {
+ _graph->disable(context);
}
- _graph->enable();
- } else {
- _graph->disable(context);
+ } else if (block) {
+ block->set_enabled(value.get<int32_t>());
}
break;
case SpecialType::POLYPHONIC: {