Author Topic: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")  (Read 7965 times)

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Prewords

Some mystery surround Control Surfaces. Producers of that type of devices have a good reason for that: more mystery means more money. Some Control Surfaces looks like Digital Mixers, and with a bit of "smoke" they can be sold like something equally valuable. The fact is: while controls and the body look the same, instead of preamps and DSPs inside you can find one (cheap) chip with USB/MIDI interface. This chip has near nothing to do, everything your Control Surface does is happening in software within the DAW.

The marked is flooded with cheap MIDI controllers. Some of them have complete documentation what they do. Also DAWs have some support for them, from as simple as "Assign MIDI" to more complex like "ACT MIDI". But all that is more or less transparent for users, they see that the hardware part is "simple".

So hardware producers have started to use a trick: they hide the way the information is sent, put some fancy labels on "dedicated buttons" (hardware is still the same) and call the result "Ultra/Super/Hyper/Human/Logic" Control. Once they have written a nice (sometimes not) peace of software, they claim "Deep/Tight/Special" Integration with DAW. One table with two columns and 20 rows for 10-20 most rated VSTs and they can already write "Auto/Seamless" mapping.

In the following I am going to show how (always!) simple input from Control Surface can produce so "deep integrated" results within DAW. I will go step by step filling "small gap" between "smart" Control Surface speaking "complete/complicated/magical" Mack.. Logic Control Protocol and CakeWalk SONAR DAW.

Please do not understand me wrong. Good Control Surface has its value! Faders, encoders, buttons, displays can be horrible or perfect. The body, layout and design are also important and can be pricey. But the rest... when it comes to what your computer receives from these devices there is no difference between cheapest possible applet on your phone and $Xk surface.

And please do not underestimate the software component. While AZ Controller is "free" ~100kB plug-in with old style interface, it is compiled from ~20000 lines of handwritten lines in C, implementing an interpreter of specially invented for the purpose visual scripting language plus IDE (Integrated Development Environment).  You can imagine what that can cost if developed on commercial basis.
« Last Edit: March 11, 2015, 06:35:03 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #1 on: December 03, 2014, 10:53:39 PM »
Quick start

Insert AZ Controller into the list of Control Surfaces, attach input (and output!) of your MC (compatible) device to it, visit "Options" tab, click on "Tweak current configuration" and select "Mack.. control". Do not forget to remove the original Mack.. Control plug-in(s) from the list.

Go to the "Overview" Tab. In case you see "Device (Online)" there, the plug-in has recognized your controller. You can try to use it and please report any bugs you spot and everything you do not like. And you can skip the rest of this topic.

If you see "Device (Offline)", your device was not recognized as MC. Try to switch off the device and switch it on again. If you still have no luck, check that it is recognized by the original plug-in (unlikely). With other plug-ins it is time to shout "It does not work...". But AZC is fully configurable so most probably you can make it work with your device.

Introduction

I do not have real Logic Control. Neither I have some other compatible device. But thanks to Humatic, everyone with Android phone/tablet can taste how that works. Sure, touch screen is nothing in comparison with well made hardware. But the price is nice and it takes no extra space.

If you want to follow the text and configure AZ Controller (AZC) yourself, please read the manual and ACT MIDI Explained tutorial first. In this text I assume you already know how to define Software State Sets, Hardware and Logical Controls and add Actions with Conditions. There will be step by step but not "click by click" instructions.

I also assume that you have got your Device  (Dev) (TouchDAW or whatever LC/MCU compatible) somehow working with sonar. Solving problems with connections and MIDI configuration in SONAR is not the topic here. In case you already have some other Control Surface (CS) plug-in configured for your Dev, please detach it. Two plug-ins for one device will not work (it sometimes make sense for ACT MIDI/Generic Surface combination, but not for Mack..).

First of all, AZC support complete Logic Control (LC) MIDI specification. It understand what LC "say" and can send everything LC understand. In case you already have AZC in sonar with Dev connected and you press/move/turn controls, you just can see something changing in the "Last MIDI Event". But SONAR keep silence, no fader movements, no transport changes and Dev display is empty.

May be your slowly start to think: "this man tries to fool me, hi DOES NOT support LC! At least "Play" button should work! My device/program speaks Mighty Protocol, it is not plain MIDI!". Sorry to say, but your device is plain MIDI. "Play" button sends "Note 94 with Velocity 127 is pressed". The Mighty Protocol just define that "Note 94 with Velocity 127" is sent when the "Play" button is pressed. No more, no less. Are you confused? I hope not  ;)
« Last Edit: March 11, 2015, 06:48:26 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #2 on: December 04, 2014, 07:33:24 PM »
Initialization

LC protocol is bidirectional. It defines some "greeting ceremony" procedure. I can only speculate for what it is good, but let say the intention was to let the device know we understand with what we are working and check that the device is there (and not just to show respect to the producer of the device and make everything incompatible). Some devices (like TouchDAW) do not require this procedure, but I still prefer to do this for the first guessed reason: we can be sure the device is connected and ready (quite important for TouchDAW since it is just an applet communicating throw network).

MC preset has the initialization described here. But you can try to configure it yourself (starting from empty preset) to get the idea how it works.

Important: AZC needs  "Hello" in any case. The device ID specified there is used in all other LC commands.

If you follow the tutorial with TouchDAW, after it is started you can see some messages incoming (Note 24/25) (in the Last MIDI Event). Just wait till there is no more changes.

Dialogs in AZC are configured throw Control/Monitor combinations and may be the most hard to understand feature of the plug-in. You can read "once more how it works" at the end of this post to see what we try to achieve. First we define:
  • Software State Set (in the Option Tab), lets call it "Device" with the following states (in the order of definition, so "Offline" is the last defined): "Online" (rename "Default" to it) and "Offline". Go to the Overview Tab and set "Offline" as the current state (I will not repeat that, but you should do this every time you define new Software Set, to set as current the state which is default on plug-in/preset reload).
  • One hardware controls: "Hello". Leave the type "Unknown" (we change it later to "System")

The initialization dialog has (up to) 4 steps:
  • Hello from AZC.
    • In the Hardware Tab select "Hello" HW Control and press "Attach". That will create new HW Context and Logical Control.
    • Then go to the Logic Tab and select that control "((None)) Hello :" (most probably it is already selected).
    • Now add "New" Action and configure it as "Monitor" "Timer" "Once", add Condition "Device":"Offline". We set it to "Once" to avoid it triggering till we are ready.
    • Switch to the Feedback Tab and add (to "Hello :  : Timer")  Action "Prod. spec. send" (Product Specific Send) "LC/MC/C4 Hello" "MCU"
    Keeping this Action selected, press "Play". Watch "Last MIDI Event". Do you see "MCU EHLO" here? If not, your device is either not connected or it is not in MCU (compatible) mode or its ID is different. Try select different IDs instead of MCU (LC, etc) and every time press "Play". In case you could not get "EHLO", there is no reason to continue. Try to solve that (checking routing, configuration in SONAR and device, etc.).
  • Ehlo from Dev ("EHLO" is not a typo...). If you see it, device has recognized us and we have recognized the device. But we are not done yet.
  • Connect.
    • Switch to the Hardware Tab and "Assign MIDI" (EHLO) to the "Hello" Control.
    • In the Logic Tab, add Action "Prod. spec. send" "LC/MC Connect" (do NOT press "Play" yet). BUM! Original SONAR plug-in does not send it. Actual version of TouchDAW, while accept it and reply correctly will no longer reply on any Hello/Connect till restarted. So, add this Action only in case your Dev need it.
    • Add new Action  "Set State" "Device" "Online".
    • Select Timer Action and move it on top (with "Up" button). So in the Action List you should have now " 'Device:Offline' - Timer", "Device -> Online" and as the last "LC/MC Connect" (if you define it).
    • Now select "LC/MC Connect" (if your have it) and press "Play".
  • Confirm. If your decide to send "Connect", you done all right and the device is really LC/MCU compatible, you should see "Confirm" in the Last MIDI event. There can be other messages coming quickly (the last version of TouchDAW send many of them). Or there can be no messages at all.  Most important, you should see no "Error" (let me know in case it is there, that means I have calculated "Connect" incorrectly). The last operation:
    • In "((... EHLO)) Hello:" change "Monitor" "Timer" from "Once" to "Slow"
Save AZC preset, close sonar and switch off the device (exit TouchDAW). Now start everything as usual, so turn on surface, start sonar and load/create project.
You should see "Device" "Online" in the Overview Tab within a second. Try to set it to "Offline" and check that it goes to "Online" again. Change Hardware Control Type for "Hello" (in the Options Tab) to "System" (do not forget to press "Save"...). We have "programmed" the greeting dialog!

Once more how it works. We have "Timer" which "Slow"ly (every 1 second) send "Hello" in case our "Device" is "Offline". In case Dev reply with "Ehlo" we remember that in "Device" "Onlice" state (so, we no longer send "Hello") and possibly send "Connect" (once). Sound simple when written in words, is not it?  ;)

If at some point you want "renegotiate" (your device was temporarily off but you do not want restart SONAR/ reload AZC preset), you can just put "Device" into "Offline" again. In case you follow corresponding recommendations below, that will update the device (send Hello, set Displays, Rings, Faders and LEDs).

If you still think why you need all that... Just imagine your have got some device with unusual imagination how the initialization should be done. What you can do with "normal" SONAR plug-in? You can write into Forum, submit bug report, fill "Wishes" and hope for the best. With AZC you just fix it yourself within a minute and then happily use your device. And the same for any aspect which is buggy or does not work as you want.
« Last Edit: March 11, 2015, 06:52:56 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #3 on: December 05, 2014, 09:39:51 PM »
Time display

If you do not have special Time display you obviously can skip this part (except the last "Monitor reset" "All" Action). Please note I assume you work with preset from the previous post and you see "Device" "Online" in the Overview Tab ("Hello" was sent):
  • We define HW Control "Time" with "System" type.
  • Define (Attach) Logical control to it.
  • It's Action list is just "Monitor" "Timer" "Once" (again to avoid it during following steps). Set "Device: Online" conditions (we do not want it trigger till the device is there)
  • In the Feedback for the Timer (it will be "Time : : timer") we add 2 Actions
  • Set the first one (from top) to "Text" "Fixed" and type "123456" into the value field. Press "Play" (to set current value)
  • Set the second (and the last) one to "Prod. spec. send" "LC/MC Time display" "Update" "SysEx". Press "Play"
Do you see 123456 on your display? If not (on TouchDAW for example), change "SysEx" to "MIDI". Press "Play" again. Still no luck? Your device is not LC/MC compatible... As with everything else, you can inform me to find some solution.

If you see the numbers, change "Text" from "Fixed" to "Time" "MC MBT" "No format" "Replace". Then go back to the Logic Tab and activate the timer (change "Once" to "Fast"/"Ultra"). You should immediately see the real time on display. Try to change current time in SONAR (play for example). You should see it works as expected.

There are some limitations for now: MBT time in 2 formats is supported. SMPTE and/or other formats can be added on request.

The last "touch". I like to have 2 actions from Time monitor ("Text/Time" and "Time display") also at the end of my "(EHLO) Hello" action list (right after "Device -> Online"). With one small change: in the "Time display" action, instead of "Update" set "Set". That will send the whole time on any "reconnect". The first variant (inside Monitor) just send updates to whatever it think already there. This saves quite some MIDI traffic (especially in "Ultra" speed) and I prefer to explicitly send the whole time once (or on reinitialization).

And since we are here... I also add "Monitor reset" "All" to the end of "Hello" Action List. As with Time display, that should resend all indication (display, LED) to the Dev on reconnect (in assumption we define it with monitors, as I am going to explain in the corresponding sections later).
« Last Edit: December 14, 2014, 10:33:25 AM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #4 on: December 14, 2014, 10:26:40 AM »
Buttons with LEDs.

All buttons of LC use the same simple rules:
  • "Note X ON, Velocity 127" is reported to the DAW once the button is pressed
  • "Note X ON, Velocity 0" is reported to the DAW once the button is depressed
  • "Note X ON, Velocity 127" transfered to LC ask corresponding LED to light
  • "Note X ON, Velocity 0" transfered to LC ask corresponding LED to switch off
  • "Note X ON, Velocity 1...126" transfered to LC ask corresponding LED to blick
Several notes:
  • All MIDI events are "Note ON". "Note OFF" is not recognized
  • There is no "internal logic" between the button and LED. It is up to the DAW (plug-in) to decide what and how to indicate
  • There is absolutely no difference between buttons across the surface, the only difference between "Mute" and "Play" is the note number in communication messages

To work with LC buttons and LEDs, we are going to take the following approach:
  • We define buttons as "Pad" Hardware Control Type, so "Note ON Velocity 0" will be recognized as "Note":"OFF"
  • We define one Hardware Context/Logical Control for each button
  • In the Logic List for the button we define Monitor to work with LED. The Monitor type is the parameter dependent. For buttons attached to the plug-in internal states (transport, context, etc), that will be state monitor. For other parameters (mute, solo, etc.) that should be Parameter Value monitor.
  • In the Monitor Action List with send back either 0 or 127, depending on the parameter condition. We you "<Use Ctrl MIDI>" MIDI message to avoid manual definition every time.
  • We define reaction on "Pressed" (Note:On) and "Depressed" (Note:Off) signal from Dev

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #5 on: December 14, 2014, 11:37:13 AM »
Modifier buttons.

On real device, there are "Shift" "Alt" "Ctrl" (and some more) modifiers buttons. And these buttons are technically the same as all other. In TouchDAW, "Shift" and "Alt" are internal keys not transmitted to the DAW. But many "Buttons" send some combinations of the original LC mod plus other button. For example, "|<" button in TouchDAW send "Mod_85 On","<< on" when pressed and "<< off","Mod_85 Off" once depressed. Since that happens instantly, you can not see what is going on in the "Last MIDI Event" (you see the last message only there). Use separate MIDI monitoring (or just record MIDI track and then check the event list in SONAR).

I name modifiers by codes they generate: "Mod_85", "Mod_70", etc. In preset, they are called M1...M4.

The Transport view of TouchDAW make use of 4 modifier keys. The first modifier definition:
  • We add Hardware Control "Mod_70" type "System"
  • We add Software State Set "Mod_70" (yes, the same name, but that does not matter) with 2 state: "On" (renamed "Default") and "Off" added (so, the last defined and so default on preset reload. Do not forget to set in in the Overview Tab right after definition, I have promised no longer remind you, but well... that was really the last time).
  • In TouchDAW, press Shift and then press/release "|<" button. You should see "Ch:1 N:70 Value:0". On real devices, try to find the key (check "Alt", "Ctrl", etc. till you find it). Assign and attach that code to the "Mod_70" Control
  • In the Action List for "Mod_70", add 3 actions (in the order you should see them in the list):
  • "Monitor" "Monitor state" "Mon_70" with "Device: Online" condition
  • "Set state" "Mod_70" "Off" with "Note:Off" condition
  • "Set state" "Mod_70" "On" with "Note:On" condition
In the Overview Tab check that it works: "Mon_70" state should be "On" during the time the button is pressed and "Off" otherwise.

In the Feedback action list for "Mod_70 : : State monitor", add one action:
  • "MIDI" "<Use Ctrl MIDI>" value "Value" "Send 0 as ON".  I use a "trick" here: the state is mapped to value in state monitor. Since we have 2 states in the Set, corresponding values are going to be 0 and 127. Exactly what we need (the feature was made with such use case in mind).
I can not check the result since I do not have the button as dedicated.

We repeat the whole definition (new control, state set, action list and monitor list) for other 4 modifiers:
  • "Mod_73". TouchDAW button to use: Alt + "F1" in the function panel (or other Alt action)
  • "Mod_84". TouchDAW button to use: Shift + "_/^"
  • "Mod_85". TouchDAW button to use: "|<"
  • "Mod_87". TouchDAW button to use: "_/^"

« Last Edit: March 11, 2015, 06:56:33 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #6 on: December 14, 2014, 12:20:20 PM »
Transport. Part I.

The origin is the Transport view of TouchDAW.

I describe corresponding Actions, I skip Hardware Control definition and Logical Control assignment/attachment.

"Stop" (Note 93):
  • "Device:Online" - Monitor "Monitor state" "Transport". The Feedback Actions (the set has 3 states, indirect value mapping is not working):
    • "Transport:Rec" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON"
    • "Transport:Stop" - MIDI "<Use Ctrl MIDI>" "127"
    • "Transport:Play" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON"
  • Command "Stop"

"Play" (Note 94):
  • "Device:Online" - Monitor "Monitor state" "Transport". The Feedback Actions:
    • "Transport:Rec" - MIDI "<Use Ctrl MIDI>" "127"
    • "Transport:Stop" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON"
    • "Transport:Play" - MIDI "<Use Ctrl MIDI>" "127"
  • Command "Play/Pause"

"Rec" (Note 95):
  • "Device:Online" - Monitor "Monitor state" "Transport". The Feedback Actions:
    • "Transport:Rec" - MIDI "<Use Ctrl MIDI>" "127"
    • "Transport:Stop" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON"
    • "Transport:Play" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON"
  • Command "Record"

"Loop" (Note 89):
  • "Device:Online" - Monitor "Monitor state" "Loop". The Feedback Actions:
    • - MIDI "<Use Ctrl MIDI>" "Value" "Send 0 as ON".
  • Function "Transport" "Loop Toggle"

"Scrub" (Note 101):
  • "Device:Online" - Monitor "Monitor state" "Scrub". The Feedback Actions:
    • - MIDI "<Use Ctrl MIDI>" "Value" "Send 0 as ON".
  • Function "Transport" "Scrub Toggle"

"Jog" "Rotary" (CC 60):
  • "Scrub:Off" - Jog "Endless" "1" "Beat"
  • "Scrub:On" - Jog "Endless" "100" "Tick"
That is what I like at the moment. I do not think that jogger settings are good for everyone.
« Last Edit: December 14, 2014, 02:55:23 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #7 on: December 14, 2014, 03:50:51 PM »
Transport. Part II.

Real LC Rewind and Fast Forward buttons can be used with modifiers. In TouchDAW there are several buttons representing such combinations, but the logic still should be encoded into the 2 buttons Action Lists, taking modifiers into account. Both lists are almost identical, so I describe the list for "Rewind" and mention the difference for "Fast Forward".

"Rewind" (Note 91) and "FF" (Note 92)
  • "Device:Online" - Monitor "Monitor  state" "FastMove" with Feedback Actions:
    • "FastMove:Off" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON"
    • "FastMove:FastForward" - MIDI "<Use Ctrl MIDI>" "0" "Send 0 as ON" ("127" for "FF")
    • "FastMove:Rewind" - MIDI "<Use Ctrl MIDI>" "127" "Send 0 as ON" ("0" for "FF")
  • "Mod_87:Off", "Mod_85:Off", "Mod_84:Off", "Mod_70:Off" - Function "Transport" "Rewind On" ("FFWD On"). With the next Action, it defines normal rewind operation. Note that we should check explicitly that no modifiers are pressed.
  • "FastMove:Rewind", "Note:Off" - Function "Transport" "Rewind Off" ("FFWD Off" and FastForward in Condition). We do not check modifiers here. In case we press "Mon_70" after we have pressed "Rewind" but before we have released it, such check will fail and rewind will not be stopped
  • "Mod_87:Off", "Mod_85:Off", "Mod_84:On", "Mod_70:On" - Command "<Menu>" "Project | Insert Marker" (FF has no that action). Note that 2 modifiers are set to "On" in Conditions.
  • "Mod_87:Off", "Mod_85:Off", "Mod_84:On", "Mod_70:Off" - Command "Previous marker" ("Next Marker")
  • "Mod_87:Off", "Mod_85:On", "Mod_84:Off", "Mod_70:Off" - Function "Transport" "GoTo Loop In" ("GoTo Loop Out")
  • "Mod_87:On", "Mod_85:Off", "Mod_84:Off", "Mod_70:Off" - Function "Transport" "GoTo AutoPunch In" ("GoTo AutoPunch Out")
  • "Mod_87:Off", "Mod_85:Off", "Mod_84:Off", "Mod_70:On" - Command "RTZ" ("Go to the time of the last event")
« Last Edit: December 15, 2014, 07:58:21 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #8 on: December 15, 2014, 09:04:30 PM »
Navigation/Zoom

As it is presented on TouchDAW Transport view, navigation keys have 2 modes: normal, when they imitate PC keyboard arrows and Zoom, when keys do vertical/horizontal zoom in/out.

Zoom button (Note 100). We should predefine "Zoom" software state set with "On" and "Off" states ("Off" should be the default). The Action List :
  • "Device:Online" - Monitor "Monitor state" "Zoom". Feedback Action:
    • MIDI "<Use Ctrl MIDI>" "Value" "Send 0 as ON"
  • Set state "Zoom" "<Next state>" "Loop"

Up/Down/Left/Right (Note 96/97/98/99). We create "Pad"s with that names and Action Lists:
  • "Zoom:Off" -  Keyboard "Up" ("Down"/"Left"/"Right")
  • "Zoom:On" -  Command "Zoom Out All Tracks - Vertical" ("Zoom In All Tracks - Vertial"/ "Zoom Out Horizontal" / "Zoom In Horizontal")
« Last Edit: December 15, 2014, 09:35:30 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #9 on: December 16, 2014, 10:14:25 PM »
Commands and functions

Original LC has quite some number of labeled not strip/transport related buttons. In TouchDAW some of them are exposed directly, other throw menu. The action list for such controls consist of one Action, so I just list all controls I have defined so far in one table:
  • "Audio Tr" (62) (from menu Shift+Diskette in Transport View) - Command "Insert | Audio track"
  • "MIDI Tr" (63) (from menu Shift+Diskette in Transport View) - Command "Insert | MIDI track"
  • "Edit" (65) (in Transport View) - Command "Resizes and zooms tracks to see entire project"
  • "Enter" (66) (from menu Shift+Diskette in Transport View) - Keyboard "Enter"
  • "Cancel" (67) (from menu Shift+Diskette in Transport View) - Keyboard "Cancel"
  • "Save" (79) (from menu Shift+Diskette in Transport View) - Command "File | Save"
  • "Undo" (82) (from menu Shift+Diskette in Transport View) - Command "Edit | Undo"
  • "Redo" (83) (from menu Shift+Diskette in Transport View) - Command "Edit | Redo"


Function buttons F1...F8 (54...61) produce different effect when used with modifiers, so there can be many Actions per function key: without modifier, with Shift, with Alt and with Shift+Alt and so on. In the original plug-in, the reaction without modifier is configurable and the rest is hard coded. So, "Mod_70"+"F" have some effect and "F" buttons can be used as numeric keyboard. For the case without modifiers, we should explicitly use the condition "Mod_70:Off", "Mod_73:Off", etc. For the case with modifiers, appropriate state check should be changed to "On". I omit complete condition specification for each function action for clarity, but do not forget to put them in case you follow this tutorial:
  • F1 : Command "Views | Browser" : +Mod_70 Command "Edit | Cut"
  • F2 : Command "Views | Loop construction" : +Mod_70 Command "Edit | Copy"
  • F3 : Command "Views | Console View" : +Mod_70 Command "Edit | Paste"
  • F4 : Command "Views | Event List" : +Mod_70 Command "Edit | Delete"
  • F5 : Command "Views | Piano Roll View" : +Mod_70 Keyboard "Space"
  • F6 : Command "Views | Video" : +Mod_70  should imitate "Alt", not implemented in AZC
  • F7 : Command "Views | Staff View" :  +Mod_70 Keyboard "Tab"
  • F8 : Command "Views | Lyrics" :  +Mod_70 Keyboard "BackSpace"
« Last Edit: December 17, 2014, 07:12:00 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #10 on: December 19, 2014, 08:21:46 PM »
Modes

Channel controls (buttons, faders, encoders) have mode dependent functionality. In AZC, Mode is represented by Software State. So we should define these before configuring channel controls.
« Last Edit: December 20, 2014, 09:46:03 AM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #11 on: December 19, 2014, 09:03:39 PM »
Faders

Controls.
LC Faders are in general touch sensitive. So we need 2 Hardware/Logical Controls per fader. I call them "Fader 1" (type "Slider") and "F1 Touch" (type "System"). We need 8 such pairs. If we predefine all that Hardware Controls, assignment in the Hardware Tab can be done with the following procedure:
  • Move the fader and release. The last event will be "Touch released" (Note 104 for the "Fader 1").
  • So we select "F1 Touch" and Assign/Attach
  • If we move the same fader again, the Touch is no longer shown (since it has assigned "System" type). And we see "Ch:1 PB" event.
  • Which we can Assign/Attach "Fader 1" without keeping the finder on the fader

I have defined also "Master" fader ("Ch:9 PB"). It has no touch function in TouchDaw.

Touch control Actions.
For each slider touch control, we need 2 Actions:
  • "Note:On" - Touch "Touch" "Fader X"
  • "Note:Off" - Touch "Release" "Fader X"
Where X is 1 to 8. The plug-in will automatically determine which parameter should be touched based on other settings.

Fader Actions.
First we define complete logic for one slider. That is simplified version of what the original plug-in allows, check the preset for complete implementation. The Actions are listed as they should appear in the Action List:
  • Strip "Track" "<First in WAI>" add "+0" "Volume" (for other faders set "+1", "+2", etc.)
  • Monitor "Monitor parameter name" "Slow" with Feedback Actions:
    • Text "Param. name" "Origin name" "Abbr. to 6" "Replace"
    • Prod. spec. send "LC/MC/C4 LCD" "LC/MC" "0" ("7", "14", etc. for other faders)
    • Display row "1" column "1" ("2"..."8" for other faders)
  • Value "Direct" "Liner" "Manual touch"
  • Monitor "Monitor parameter value" "Ultra" with the following Feedback List:
    • MIDI "<Use Ctrl MIDI>" "Value"
For the "Master" I use the same actions, but change Strip "Master" "First" "+0".
« Last Edit: March 11, 2015, 06:59:41 PM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #12 on: December 20, 2014, 09:42:11 AM »
Encoders

LC and TouchDAW have 8 endless encoders. I define them as "VPot 1"..."VPot 8" and assign/attach to the corresponding MIDI (CC 16 .. CC 23). Please note that unlike sliders and buttons, LC waits for specific MIDI messages to highlight rings correctly.

The Action List:
  • Strip "Track" "<First in WAI>" add "+0"  "Pan" ( "+1"... "+7" for other encoders)
  • Monitor "Monitor parameter name" "Normal" with Feedback actions:
    • Text "Param. name" "Parameter" "Abbt. to 6" "Replace
    • Prod. spec. send "LC/MC/C4 LCD" "LC/MC" "56" ("63", "70", etc. for other encoders)
    • Display Row "2" Column "1" ("2"..."8" for other encoders)
  • Value "Endless" "MIDI"
  • Monitor "Monitor parameter value" "Ultra" with Feedback actions:
    • Prod. spec. send "LC/MC/C4 VPot" "1" "Dot" "Value" ("2".."8", etc. for other encoders)
    • Text "Param. value" "Abbr. to 6" "Replace"
    • Prod. spec. send "LC/MC/C4 LCD" "LC/MC" "0" ("7", "14", etc. for other encoders)
    • Display Row "1" Column "1" ("2"..."8" for other encoders)
    • Monitor reset "Fader 1 : : Parameter Name Monitor" "in 2 seconds" ("Fader 2..." and so on for other encoders)
    The last 4 Actions do the following: when the parameter is changed, we show the value on the display (where the strip name normally is). And we ask "Fader 1" monitor to redraw the name in 2 seconds. Note that if the monitor is called many times (we continuously change the value) the time to draw the strip name is "shifted" every change. So it will not trigger 2 seconds after the initial change, but in 2 seconds after the last change.
    The value is going to be displayed also in case we do the change in DAW. If that is not desired, we could move that 3 actions into Logical List for VPot.
« Last Edit: December 20, 2014, 11:23:42 AM by azslow3 »

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #13 on: December 20, 2014, 09:47:33 AM »
Select buttons

There is 8 "Select" buttons, one for each strip. TouchDaw does not have them directly, but they are "pressed" by "left" and "right" navigation buttons in the "TouchDAW" view (till current strip is not 1 and 8, in this case TouchDAW send "Previous/Next Bank"). While theoretically LC support Multi select, I have not found a possibility to select strips from CS API. We configure Select as Highlight (Focus), and only one strip can be focused. Original plug-in support "hidden" select mode, in which selected strip is not highlighted  in SONAR. That looks a bit confusing for me, so I want that selecting on surface and in SONAR is always in sync (withing one strip type... SONAR actually has "current" track and "current" bus, which can be set independently).

We define 8 "Sel 1"... "Sel 8" "Pad" type hardware controls and Assign/Attach proper MIDI to then (Note 24 ... Note 31).

The Action list for each of them:
  • Strip "Track" "<First in WAI>" "+0" Select "Current" (for "Sel 2"... "Sel 8" set "+1"..."+7")
  • Monitor "Monitor parameter value" "Fast" with Feedback actions:
    • MIDI "<Use Ctrl MIDI>" "Value" "Send 0 as ON"

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1214
Re: TouchDAW with AZ Controller (or "Mack.. Logic Control explained")
« Reply #14 on: March 11, 2015, 07:10:13 PM »
Other controls

There are other buttons, for channels and in the general section. I do not want take too much of your time to describe everything. In the preset, you can see what all that controls do. I have written everything up to this point before I have start to write the preset. But the preset is much more complicated then ACT MIDI one, so I just stop there.

Conclusion

As you could see, there is no magic in how to make such presets. And there is no magic in MC devices. But as with presets in complicated Synts, the evil is in details. It takes quite some time to program complicated logic which works as you like.