AZ Controller plug-in for Cakewalk SONAR > Tutorials

Stop, Undo, Rec...

(1/3) > >>

azslow3:
Note: AZController v0.4r2b300 or later is required

From http://forum.cakewalk.com/FindPost/3359293.

Functionality:

* if you "Play" or in "Stop", it starts recording
* if you "Rec", is stop recording, undo (recorded material) and start recording again
Installation:

* Follow Quick start tutorial
* Using Cakewalk Plug-in Manager from Sonar Utilities menu import attached preset (inside the manager, "Control Surfaces"/"AZ Controller"/"Import..."/Select the file/"Ok")
* Assign some button to "TheButton" control in the "Hardware" Tab (check Quick start how to do this, you just need select the control, press your button and "Assign MIDI"). Do NOT assign anything to "_Delete" control! It is already assigned and it must be assigned that way.
Explanation:
Do not do anything if we are already in progress of deletion ("Busy"). Check the state of Transport and in case of "Play" or "Stop" we ask Sonar to start recording ("Final" Action). The only other Transport state is Rec, so other Actions are executed only if you are already recording:

* Indicate that we are "Busy". So in case we press the button second time "too fast", we do not interfere with current sequence.

* Ask sonar to "Stop" (recording)
* Arm timer to be execute "in 5 cycles" (5/13 of a second). Sonar needs some time to "finish" recording and form new clip. If we "Undo" too fast, Sonar can undo something else...
In the timer we trigger "loop"ed MIDI event (arbitrary not used by out real hardware). Why we do so can take many pages to explain. In short, we want "Undo"/"Start recording" be executed the same way as with "special virtual button" assign to it. That is a kind of "crash protection" which is extremely easy to trigger during AZController configuration in case we allow such operations inside timers...

In "_Delete" control (I use underscores to indicate for myself they are not "real") we check that we are "Busy" (see "Possible improvement"), do "Undo" and immediately start recording again.

Possible improvement
At some point you may be satisfied with recorded result, but the button continue delete/recording. It is possible to modify the preset to finally stop recording. We duplicated the first action (with "Busy:Yes" - Undefined, final). The first we change to "Busy:Yes - Command Stop" (uncheck final!), the second to "Busy:Yes -> Set state, Busy -> No, final". Also we need to set "Reset timer" to something like 1 or 2 seconds.

The result: if we press the button again within specified in timer period (1-2 sec), "Busy" is still yes. So, we trigger "Stop" and "Busy -> No". And so we will not undelete/record again. At that time the timer is already armed, so we need "Busy" check at the beginning of "_Delete" control.

We can also change the preset for reverse operation, if we "double press" we undo/record and if we just press once ww stop. If our button produce "release" MIDI event, we can use "long press"/"short press" for the same result.

Let me know if you want modified preset with one of this (or another) proposal implementation.

EDIT: 1.02.16, moved one action in preset to make following instructions in this thread working.

Hatstand:
Hi Alexey, I wanted to incorporate this logic into my existing preset but I am confused about the controls
such as 'Transport:Stop'-Command Record
I can see Command Record but not the Transport part
Also in your preset the _DeleteTimer control has an assigned note value but TheButton does Not
could you perhaps post the steps to add this to an existing preset?

Regards
Hatstand

azslow3:
Merging presets is in long term plans... so you should do the manually.

Open AZCtrl window and select preset you are going to modify. Close UI of the first instance (important!).
Insert second instance of AZCtrl.  Open window for the second instance and select my example preset. Close this window(important!).
Open first window (with your preset). Notice the preset name IS CHANGED. Type new preset name and press save.
Open second window (with example preset). FROM THAT MOMENT AND TILL YOU CLOSE SECOND WINDOW do NOT save preset!
There is nasty bug in Sonar which mess presets when you have more than one instance of the same plug-in...

So, now you can see example preset and modify your own.

Start with state "Busy" definition (Options tab), after defining manually set it to "No" (Overview tab)
Add hardware controls "_DeleteTimer" and "TheButton" (Option tab), notice the type for both ("System" and "Pad").
"Attach" Logical controls to both Hardware controls (Hardware tab). You can "Assign MIDI" to "TheButton" to the button on your controller you are going to use. Do not yet assign MIDI to "_DeleteTimer", it is special.

Switch to the Logic tab.
Start coping "_DeleteTimer". In example preset select each Action and reproduce is in your preset. Notice "Final" flag, other settings (like "Timer" "Once", and "Action condition" ("Busy:No") for the first action. Not all settings are shown in the Actions list, like "Once" for timer, but they should be set correctly.

Switch to the Feedback tab.
Select "_DeleteTimer : : Timer". Reproduce the same parameters for "MIDI" Action. Notice "loop" flag.
After setting all parameters, press "Play". You should see the message in the "Last MIDI event".
Now switch to Hardware tab and "Assign MIDI" to "_DeleteTimer" control.

Switch to the Logic tab again.
Copy "TheButton" actions. Notice "Final" flag and Action Conditions (for "Busy:Yes", "Transport:Stop" and "Transport:Play". The "Transport" is a system state, tracked by plug-in itself. You can not "Set" it as you do with "Set State" Action, but you can use it in conditions.

CLOSE SECOND WINDOW. Then (and only then!) press "Save preset" in the first one.


All that sounds a bit complicated, but each sentence is just 2-5 mouse clicks. Typing all this text took more time than creating the example... In fact typing both messages took ~20 minutes while configuring from scratch with testing was 2-3  :)

So in case you do not get desired result or do not want do all that yourself,  attach your original preset and I will make required modifications.

Hatstand:
Hi there, I have set mine up but have a couple of issues.
Firstly using "Play" to pick up the midi note on the feedback tab doesn't do anything for me, so I cannot assign the delete timer note.
also the logic I have applied to the button (I have called it StopUndoRec) does not pick up Transport Stop or Transport Play.
I have attached my preset for you to look at.
Regards

azslow3:
Strange... Please check that you are using the latest version of the plug-in.
I have fixed the definition, see the attachment.

EDIT: 1.02.16 Correct file uploaded

Navigation

[0] Message Index

[#] Next page

Go to full version