mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Generic MIDI: add ToggleRecEnable action, and change all maps to use that instead of separate rec-enable, rec-disable, which didnt work
This commit is contained in:
parent
368be3585e
commit
ddb362fe17
13 changed files with 21 additions and 19 deletions
|
|
@ -374,7 +374,7 @@ MIDIControllable::midi_sense_controller (Parser &, EventTwoBytes *msg)
|
|||
|
||||
}
|
||||
} else {
|
||||
if (msg->value > 64.0f) {
|
||||
if ( msg->value > 0x40 ) {
|
||||
controllable->set_value (1, Controllable::NoGroup);
|
||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Midi CC %1 value 1 %2\n", (int) msg->controller_number, current_uri()));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ MIDIFunction::setup (GenericMidiControlProtocol& ui, const std::string& invokabl
|
|||
_function = TransportEnd;
|
||||
} else if (strcasecmp (_invokable_name.c_str(), "loop-toggle") == 0) {
|
||||
_function = TransportLoopToggle;
|
||||
} else if (strcasecmp (_invokable_name.c_str(), "toggle-rec-enable") == 0) {
|
||||
_function = TransportRecordToggle;
|
||||
} else if (strcasecmp (_invokable_name.c_str(), "rec-enable") == 0) {
|
||||
_function = TransportRecordEnable;
|
||||
} else if (strcasecmp (_invokable_name.c_str(), "rec-disable") == 0) {
|
||||
|
|
@ -146,6 +148,11 @@ MIDIFunction::execute ()
|
|||
DEBUG_TRACE (DEBUG::GenericMidi, "Function: loop_toggle\n");
|
||||
break;
|
||||
|
||||
case TransportRecordToggle:
|
||||
_ui->rec_enable_toggle ();
|
||||
DEBUG_TRACE (DEBUG::GenericMidi, "Function: toggle_record_enable\n");
|
||||
break;
|
||||
|
||||
case TransportRecordEnable:
|
||||
_ui->set_record_enable (true);
|
||||
DEBUG_TRACE (DEBUG::GenericMidi, "Function: set_record_enable = true\n");
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class MIDIFunction : public MIDIInvokable
|
|||
TransportStart,
|
||||
TransportEnd,
|
||||
TransportLoopToggle,
|
||||
TransportRecordToggle,
|
||||
TransportRecordEnable,
|
||||
TransportRecordDisable,
|
||||
/* 1 argument functions: RID */
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<DeviceInfo bank-size="9" motorized="no" threshold="15"/>
|
||||
|
||||
<!-- Transport Controls -->
|
||||
<Binding msg="B0 2c 7f" function="rec-enable"/>
|
||||
<Binding msg="B0 2c 7f" function="toggle-rec-enable"/>
|
||||
<Binding msg="B0 2d 7f" function="transport-roll"/>
|
||||
<Binding msg="B0 2e 7f" function="transport-stop"/>
|
||||
<Binding msg="B0 2f 7f" function="transport-start"/>
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
|
||||
<DeviceInfo bank-size="8"/>
|
||||
|
||||
<Binding msg="B0 2d 7f" function="rec-enable"/>
|
||||
<Binding msg="B0 2d 00" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="41" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="42" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="43" function="transport-start"/>
|
||||
<Binding channel="1" ctl="44" function="transport-end"/>
|
||||
<Binding channel="1" ctl="44" function="transport-end"/>
|
||||
<Binding channel="1" ctl="45" function="toggle-rec-enable"/>
|
||||
<Binding channel="1" ctl="46" function="loop-toggle"/>
|
||||
<Binding msg="B0 3c 7f" action="Editor/add-location-from-playhead"/>
|
||||
<Binding msg="B0 3d 7f" action="Editor/jump-backward-to-mark"/>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,11 @@
|
|||
|
||||
<DeviceInfo bank-size="7"/>
|
||||
|
||||
<Binding msg="B0 2d 7f" function="rec-enable"/>
|
||||
<Binding msg="B0 2d 00" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="41" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="42" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="43" function="transport-start"/>
|
||||
<Binding channel="1" ctl="44" function="transport-end"/>
|
||||
<Binding channel="1" ctl="45" function="toggle-rec-enable"/>
|
||||
<Binding channel="1" ctl="46" function="loop-toggle"/>
|
||||
<Binding msg="B0 3c 7f" action="Editor/add-location-from-playhead"/>
|
||||
<Binding msg="B0 3d 7f" action="Editor/jump-backward-to-mark"/>
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
<Binding channel="1" ctl="22" function="transport-end"/>
|
||||
<Binding channel="1" ctl="23" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="24" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="25" function="rec-enable"/>
|
||||
<Binding channel="1" ctl="25" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="25" function="toggle-rec-enable"/>
|
||||
|
||||
<!-- Potentiometers: -->
|
||||
<!-- I decided to map the 8 pots as track fader controls. They have a -->
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@
|
|||
<Binding channel="1" ctl="23" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="24" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="20" function="loop-toggle"/>
|
||||
<Binding channel="1" ctl="25" function="rec-enable"/>
|
||||
<Binding channel="1" ctl="25" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="25" function="toggle-rec-enable"/>
|
||||
|
||||
|
||||
</ArdourMIDIBindings>
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
<Binding channel="1" ctl="114" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="115" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="116" function="loop-toggle"/>
|
||||
<Binding channel="1" ctl="117" function="rec-enable"/>
|
||||
<Binding channel="1" ctl="117" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="117" function="toggle-rec-enable"/>
|
||||
|
||||
<!-- Gain controls. Faders are mapped to faders. -->
|
||||
|
||||
|
|
@ -41,4 +40,4 @@
|
|||
<!-- Status buttons are mapped to mute toggles. -->
|
||||
<!-- Apparently Solo toggle only works when Automap is used. Sad but true. -->
|
||||
|
||||
</ArdourMIDIBindings>
|
||||
</ArdourMIDIBindings>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
<Binding channel="1" ctl="114" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="115" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="116" function="loop-toggle"/>
|
||||
<Binding channel="1" ctl="117" function="rec-enable"/>
|
||||
<Binding channel="1" ctl="117" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="117" function="toggle-rec-enable"/>
|
||||
|
||||
<!-- Gain controls. Faders are mapped to faders. -->
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<Binding channel="1" note="86" function="transport-start"/> <!-- FF -->
|
||||
<Binding channel="1" note="87" function="transport-end"/> <!-- STOP -->
|
||||
<Binding channel="1" note="88" function="transport-roll"/> <!-- PLAY -->
|
||||
<Binding channel="1" note="89" function="rec-enable"/> <!-- REC -->
|
||||
<Binding channel="1" note="89" function="toggle-rec-enable"/> <!-- REC -->
|
||||
|
||||
</ArdourMIDIBindings>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
<Binding channel="1" ctl="22" function="transport-end"/>
|
||||
<Binding channel="1" ctl="23" function="transport-stop"/>
|
||||
<Binding channel="1" ctl="24" function="transport-roll"/>
|
||||
<Binding channel="1" ctl="25" function="rec-enable"/>
|
||||
<Binding channel="1" ctl="25" function="rec-disable"/>
|
||||
<Binding channel="1" ctl="25" function="toggle-rec-enable"/>
|
||||
|
||||
<Binding channel="1" ctl="91" uri="/route/gain B1"/>
|
||||
<Binding channel="1" ctl="93" uri="/route/gain B2"/>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<!-- one -->
|
||||
<Binding channel="1" note="40" action="Editor/track-record-enable-toggle"/>
|
||||
<!-- Two -->
|
||||
<Binding channel="1" note="41" function="rec-enable"/>
|
||||
<Binding channel="1" note="41" function="toggle-rec-enable"/>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue