- } else {
- warning << string_compose (
- _("Generic MIDI control: controllable %1 not found in session (ignored)"),
- id) << endmsg;
+ if ((prop = (*niter)->property ("id")) != 0) {
+
+ ID id = prop->value ();
+ Controllable* c = Controllable::by_id (id);
+
+ if (c) {
+ MIDIControllable* mc = new MIDIControllable (this, *_input_port->parser(), *c, false);
+
+ if (mc->set_state (**niter, version) == 0) {
+ controllables.push_back (mc);
+ }
+
+ } else {
+ warning << string_compose (
+ _("Generic MIDI control: controllable %1 not found in session (ignored)"),
+ id) << endmsg;
+ }
+ }