Author Topic: Dectecting Cakewalk Punch In and Punch Out actions  (Read 1854 times)

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Dectecting Cakewalk Punch In and Punch Out actions
« on: December 02, 2021, 10:58:27 AM »
Hello Alexey

First to tell you that my Cakewalk/AZ controlled analogue mixer is completed and all major functions working well, including control of my Fostex G24S tape machine.  Many thanks for the fantastic help you have given in making this possible.  The AZ Controller is ... amazing!

I have one big challenge remaining which I would please ask for you help with:

The Fostex machine can be put in and out of record while the machine is playing, so punch in and punch out record is possible.

However;

Although I can set a monitor action in AZ Controller to detect when the Cakewalk 'AutoPunch' button has been pressed, I cannot find a way to detect when Cakewalk actually goes in and out of record during a Cakewalk AutoPunch recording.  This is what I need your help to solve.

To summarise what I can see at the moment:

1. I press the Cakewalk 'AutoPunch' button (I can detect this using an AZ state monitor)

2. I set an Auto Punch time region on the Cakewalk time ruler (I cannot detect this region using AZ)

3. I position the Cakewalk 'Now Time' to before the start of the Auto Punch region (I can detect this 'Now Time in my PIC).

4. I press Cakewalk RECORD button (I can detect this using an AZ state monitor) and Cakewalk starts to PLAY.

5. The Cakewalk transport reaches the start of the AutoPunch time region and Cakewalk starts recording - THIS IS WHAT I NEED TO DETECT

6.  The Cakewalk transport reaches the end of the AutoPunch time region and Cakewalk stops recording - I NEED TO DETECT THIS AS WELL

Could you please check if there are any flags available within the Cakewalk API to indicate the ACTUAL start and ending of a Punch In record.  This is what I need to be able to drop the Fostex Tape Machine in and out of Record at the correct time points.

Punch Recording is a really important function for Tape recording.  I would so much appreciate your help to find a solution.

Best regards

Robert


Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1573
Re: Dectecting Cakewalk Punch In and Punch Out actions
« Reply #1 on: December 02, 2021, 12:19:11 PM »
Hi Robert.

May be you remember our discussion that Control Surfaces have no access to Real Time engine of Cakewalk, so "Now time" you get from AZ Controller is only approximation of  Cakewalk engine position.

There is recently added function, "Function" "Current time" "In punch". So the action succeed/failing depending from "Now time" to "Punch region" relation. Can be used to set some State and monitor it (originally requested to modify LED color for REC button on controller). Note it doesn't check "AutoPunch", "Record" status, not even the region is empty (start == end). So it should be used with care when really steering hardware.

Cakewalk can expose absolute numbers for punch/loop regions. But currently in AZ Controller there is just a possibility to get M:B time for them. I can add other formats (f.e. seconds) if required.

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Re: Dectecting Cakewalk Punch In and Punch Out actions
« Reply #2 on: December 02, 2021, 06:36:28 PM »
Hi Alexey

Thanks for getting back to me so quickly.  This is a big issue for me so I'm worrying about it a lot!

I already have monitor outputs for "AutoPunch" and "Record" status.  These get passed to my PIC and get stored.

I can see the "Function" "Current time" "In Punch" and I can see "Function" "Current time" "On Punch in".

Also you say, 'Cakewalk can expose absolute numbers for punch/loop regions'.

So I think maybe there are two possibilities:

1.
If we can test for "Function" "Current time" "In Punch" succeed/fail depending upon relationship to  "Now time" and "Punch region", then it may be possible to generate a Monitor output which reflects whether Cakewalk is currently within the Punch region or not.  Is this what you are suggesting?

2.
If I can get the absolute times for the punch in region start and end points, then I may be able to pass these to the Fostex Tape machine via MIDI SYSEX (The Fostex has programmable punch in/out).  I would need the times in H:M:S:F format to convert into SYSEX messages to the Fostex.

At this time, I think it is best to explore both options and see which can work.

So please:

For option 1:
Could you help me to create the action relationship please.  This is not something I have ever done before in AZ Controller.

For option 2
Could you tell me how to access the absolute numbers (times) for the punch region please.

Alexey, I really appreciate your help with this.

Regards

Robert



Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Re: Dectecting Cakewalk Punch In and Punch Out actions
« Reply #3 on: December 03, 2021, 05:00:28 PM »
Hello Alexey

I have another update on the two options discussed in our earlier posts.

1. I tried adding the action "Function" "Current time" "In Punch" to my RECORD preset but I can't find the correct way to monitor its state.  Can you help with that please.

2. I have had success in controlling the Fostex machine's punch in and punch out using MIDI SYSEX messages from my PIC.  I included test "punch in" and "punch out" times from my PIC in the standard MTC time format.  This worked just fine.  So if you are able to provide the Cakewalk "punch in" and punch out" times in the MTC format (means hours, minutes, seconds and frames), then I can get these from AZ controller to the PIC via MIDI and combine with the other instructions to send on to the Fostex via MIDI.

So hopefully with your assistance I can get both methods working and then decide which is the best for my application.

Best regards

Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1573
Re: Dectecting Cakewalk Punch In and Punch Out actions
« Reply #4 on: December 03, 2021, 06:40:20 PM »
For 1.
Create new Software State Set "InPunch" with state "No" and "Yes".
In some (dedicated) control, actions are:
Set State "InPunch" "No"
Function Current Time InPunch
LastAction:Failed  Set State "InPunch" "Yes"
Monitor State "InPunch".

Inside feedback for the monitor you can use "InPunch", probably with Transport:Record and Punch Active conditions.

For 2.
That I have to code first...

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Re: Dectecting Cakewalk Punch In and Punch Out actions
« Reply #5 on: December 04, 2021, 10:43:21 PM »
Hi Alexey

Thanks for your further help with the Punch Recording.
Today I worked on Option 1 with the new Software Set and some additions to my PIC code.
I got the Punch Recording on the Fostex being controlled from Cakewalk/AZ Controller.
I am going to do some tests to see how close the recording timing on the Fostex is compared to the timing points set in Cakewalk.  This is important for some critical punch ins.

If you are able to do the coding for the MTC format absolute punch in numbers, I would be grateful.  This will provide more accurate timing between the two systems.

Best regards

Robert