summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/surfaces/generic_midi/midicontrollable.cc2
-rw-r--r--libs/surfaces/generic_midi/midifunction.cc7
-rw-r--r--libs/surfaces/generic_midi/midifunction.h1
-rw-r--r--midi_maps/Korg_nanoKONTROL.map2
-rw-r--r--midi_maps/Korg_nanoKONTROL2.map4
-rw-r--r--midi_maps/Korg_nanoKONTROL2_With_Master.map3
-rw-r--r--midi_maps/M-Audio_Axiom25.map3
-rw-r--r--midi_maps/M-Audio_Axiom61.map3
-rw-r--r--midi_maps/Novation Impulse 49.map5
-rw-r--r--midi_maps/Novation_Impulse61.map3
-rw-r--r--midi_maps/Roland_SI-24.map2
-rw-r--r--midi_maps/m-audio_oxygen8v2.map3
-rw-r--r--midi_maps/midikb_wiimote.map2
13 files changed, 21 insertions, 19 deletions
diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc
index 8945463e97..b036a9d30f 100644
--- a/libs/surfaces/generic_midi/midicontrollable.cc
+++ b/libs/surfaces/generic_midi/midicontrollable.cc
@@ -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 {
diff --git a/libs/surfaces/generic_midi/midifunction.cc b/libs/surfaces/generic_midi/midifunction.cc
index e9e875b702..1f3535f22c 100644
--- a/libs/surfaces/generic_midi/midifunction.cc
+++ b/libs/surfaces/generic_midi/midifunction.cc
@@ -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");
diff --git a/libs/surfaces/generic_midi/midifunction.h b/libs/surfaces/generic_midi/midifunction.h
index 948775c843..12340174d4 100644
--- a/libs/surfaces/generic_midi/midifunction.h
+++ b/libs/surfaces/generic_midi/midifunction.h
@@ -50,6 +50,7 @@ class MIDIFunction : public MIDIInvokable
TransportStart,
TransportEnd,
TransportLoopToggle,
+ TransportRecordToggle,
TransportRecordEnable,
TransportRecordDisable,
/* 1 argument functions: RID */
diff --git a/midi_maps/Korg_nanoKONTROL.map b/midi_maps/Korg_nanoKONTROL.map
index 05308a1b0f..f0af7fc581 100644
--- a/midi_maps/Korg_nanoKONTROL.map
+++ b/midi_maps/Korg_nanoKONTROL.map
@@ -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"/>
diff --git a/midi_maps/Korg_nanoKONTROL2.map b/midi_maps/Korg_nanoKONTROL2.map
index 7f85945e90..f1c11566b0 100644
--- a/midi_maps/Korg_nanoKONTROL2.map
+++ b/midi_maps/Korg_nanoKONTROL2.map
@@ -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"/>
diff --git a/midi_maps/Korg_nanoKONTROL2_With_Master.map b/midi_maps/Korg_nanoKONTROL2_With_Master.map
index adf8ee72cd..1217ca9b25 100644
--- a/midi_maps/Korg_nanoKONTROL2_With_Master.map
+++ b/midi_maps/Korg_nanoKONTROL2_With_Master.map
@@ -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"/>
diff --git a/midi_maps/M-Audio_Axiom25.map b/midi_maps/M-Audio_Axiom25.map
index 2c7bbe4f76..001f7b1a00 100644
--- a/midi_maps/M-Audio_Axiom25.map
+++ b/midi_maps/M-Audio_Axiom25.map
@@ -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 -->
diff --git a/midi_maps/M-Audio_Axiom61.map b/midi_maps/M-Audio_Axiom61.map
index 734a8d6cb9..7945870d55 100644
--- a/midi_maps/M-Audio_Axiom61.map
+++ b/midi_maps/M-Audio_Axiom61.map
@@ -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>
diff --git a/midi_maps/Novation Impulse 49.map b/midi_maps/Novation Impulse 49.map
index a6a10f3a6a..234991e41b 100644
--- a/midi_maps/Novation Impulse 49.map
+++ b/midi_maps/Novation Impulse 49.map
@@ -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> \ No newline at end of file
+</ArdourMIDIBindings>
diff --git a/midi_maps/Novation_Impulse61.map b/midi_maps/Novation_Impulse61.map
index 516167d071..78e0d4c548 100644
--- a/midi_maps/Novation_Impulse61.map
+++ b/midi_maps/Novation_Impulse61.map
@@ -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. -->
diff --git a/midi_maps/Roland_SI-24.map b/midi_maps/Roland_SI-24.map
index db783eba96..40aa03a486 100644
--- a/midi_maps/Roland_SI-24.map
+++ b/midi_maps/Roland_SI-24.map
@@ -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>
diff --git a/midi_maps/m-audio_oxygen8v2.map b/midi_maps/m-audio_oxygen8v2.map
index b1b8afc35e..549276b426 100644
--- a/midi_maps/m-audio_oxygen8v2.map
+++ b/midi_maps/m-audio_oxygen8v2.map
@@ -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"/>
diff --git a/midi_maps/midikb_wiimote.map b/midi_maps/midikb_wiimote.map
index 61b3fd0fc9..8c0c3b866e 100644
--- a/midi_maps/midikb_wiimote.map
+++ b/midi_maps/midikb_wiimote.map
@@ -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"/>