4. Preparing control messages
For the begin we need 6 buttons on your keyboard or on another controller. They must be momentary, not toggle buttons. For strip selection toggle buttons (latching) would be better, but since you don't have this type I designed the patch for momentary buttons.
4.1. Configure 4 buttons (pads) on your keyboard to send Control Change number 85, 86, 87 and 88. (CC 85-88). When pressed they must send a value greater than 0 and when released they must send 0. The MIDI channel does not matter. These are our "Selection Buttons", used to select channelstrips. Finally we can have up to 32 of them.
4.2. Configure 2 additional buttons to send CC 119 and CC 120. Again, only momentary buttons, release sends value 0 and press sends something else. Channel does not matter. You may want to choose two buttons somewhere on your keyboard, not necessarily in the pad area. These buttons are for "All Strips Off" and "Panic" and should always be easily reachable.
----------------------------------------
5. Processing incoming messages
Go to your "Switch" layer, press the 6 buttons on the keyboard. Play some notes, move the pitch- and modulation wheels, step on the sustain pedal if you have one. Everything should be visible in the first monitor object on this layer. If not, check the Logic transport display and the "Click & Ports" layer.
5.1. "switch" messages
5.1.1. Create a new transformer object, connect the first monitor to it, name the transformer "ex CC 85-116" (ex means extract) and configure it as below:
Function: From incoming data take just Control Changes 85-116 (our "select buttons") and spit them out at the upper outlet. Everthing else goes to the lower outlet.
5.1.2. Create a second transformer "only Value >0":
Function: Take only values above 0. Transform the message to a Program Change on channel 16 and take the incoming MIDI number minus 84 as outgoing MIDI value (the number->value routing is set by clicking on the vertical lines between the "Conditions" and "Operations" areas).
5.1.3. Create a third transformer "select & switch":
Function: Let incoming data pass and append a second message, type "Fader" on channel 16 with number 0 and value 1.
5.1.4. Create a Cable Switcher "Select Strip"
In the Inspector, set its Input to "Program, Channel 16, Range 0 32".
5.1.5. Create an Ornament object, name it "off" and make it as small as possible.
5.1.6. Create a Monitor object.
5.1.7. Arrange and cable everything as shown below:
Test the function:
At each press on one of the 4 "Selection Buttons" on your keyboard the Cable Switcher must switch to the appropriate number 1, 2, 3 or 4 and immediately afterwards a message "F 16 0 1" must appear in the right monitor after each press. Other messages like notes, pitchbend or other controllers are not visible in the right monitor.
(I think you are now familiar with the most common transformer settings. In following steps I will only deliver textual descriptions. Please note: I do not call the last two fields "Data Byte 1" and "Data Byte 2" but simply Number and Value.)
5.2. "All Strips Off" and "Panic"messages
5.2.1. Transformer: "ex CC 119 (all strips off)"
Mode: Top Cable
Conditions: Control, number "= 119"
Operations: all thru
Function: CC 119 to upper outlet, other to lower outlet.
5.2.2. Transformer: "send stripoff"
Mode: filter non-matching
Conditions: Control, value "Unequal 0"
Operations: Fader, channel 16, number 0, value 2
Function: If incoming value is greater 0, send Fader 16 0 2, other incoming gets blocked.
5.2.3. Transformer: "ex CC 120 (all notes off)"
Mode: Top Cable
Conditions: Control, number "= 120"
Operations: all thru
Function: incoming CC 120 to upper outlet, other to lower outlet.
5.2.4. Transformer: "bang Panic"
Mode: filter non-matching
Conditions: Control, value "Unequal 0"
Operations: Meta, channel 1, number 99, value 0
Function: If incoming value is greater 0, send a bang to the next object. Other incoming gets blocked.
5.2.5. Create an Ornament object named "to all strips" and make it as small as possible.
5.2.6. Create a Monitor object.
5.2.7. Add all new objects to the existing patch as shown below:
Test the function:
Press your "All Strips Off" button on the keyboard (CC 119), the lower monitor must show "F 16 0 2" for each press and nothing when you release. When you press your "Panic" button (CC 120) the Monitor shows "M 1 99 0" and nothing on release. All other messages like notes, pitchbend etc. are also shown in this Monitor. Only the "Select" buttons do not appear here, because we extracted them already in the first row of the patch.
5.2.8. Fine if it works, but finally we do not send a "bang" message (Meta 1 99 0) to channelstrips for "Panic", this was only for testing. Actually we send note-offs to all channelstrips at once, for all notes on all MIDI channels. We are going to make a SysEx button and let it get banged by the "bang Panic" transformer.
We are now going to create 16x128 note-off messages in a SysEx button and need a plan. The "Note" event in the SysEx button is not very useful for that and we want another message anyway. We'll take the polyphonic aftertouch which is called Poly Pressure or P-Press in Logic. And we want to set a certain sort order to avoid confusion and make the following work easier.
Set Logic to the very first bar (position 1). Create a button, name it "Panic", set it's range to 0 0. Set it's output to "Sysex" and the editor will immediately pop up.
Click on "Create" and then on "Poly Pressure". You get something like this:
1 1 1 1 P-Press 1 E3 0
Scroll the note value to the lowest possible (C-2) and check the other columns. Your line should look like this:
1 1 1 1 P-Press 1
C-2 0
Copy/paste this line and, without deselecting the new line, scroll the
note and the
last digit of the position one step higher (note
C#-2, pos
2). You get the following:
1 1 1 1 P-Press 1 C-2 0
1 1 1
2 P-Press 1
C#-2 0
Look at the highest note and position, select all, copy/paste and without deselecting scroll the
note and
last position digit of the top selected line one step higher than the highest you have (note
D-2, position
3). You get:
1 1 1 1 P-Press 1 C-2 0
1 1 1 2 P-Press 1 C#-2 0
1 1 1
3 P-Press 1
D-2 0
1 1 1
4 P-Press 1
D#-2 0
(Nice, all pasted and still selected lines followed as you scrolled the first of them.)
Got the system? With "select all" - "copy/paste" -> "scroll note ..." - "scroll position ..." you can multiply your rows and and quickly get 128 of them in ascending order. Work slowly and be careful when the octave changes. Stop when you see this in the last line:
1 1 1
127 P-Press
G-8 0
This is the last row for MIDI channel 1, with the highest note available.
We have now one set of all notes but only for channel 1. We got to make 16 channels out of that and continue slightly different:
Select all, copy/paste but now make the
channel and the
first position column one step higher. This gives you another 128 notes with
2 at the first position and for MIDI channel
2.
Repeat the process as before, always with all lines. And always change the
channel and the
first position. After just a few clicks you have all 16 channels.
First line:
1 1 1 1 P-Press
1 C-2 0
Last line:
16 1 1 127 P-Press
16 G8 0
You may need several attempts to get used to the system. Creating 2048 lines in a certain manner can easily go wrong, but fortunately it is pretty fast to do.
5.2.9. As usual, make sure that no line is selected when you close the editor. Then insert the Panic button in your patch:
Test the function:
Press the "Panic" button on your keyboard. The monitor object should show the last note-off data lines (P-Press, channel 16) . If this happens and the tests before were also successful, your input section is ready!
----------------------------------------
I'll stop here and wait.
Please tell me when you finished this part or ran into any problems.