Author Topic: Inserting the Cakewalk Now Time within a feedback SysEx message  (Read 1275 times)

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Hello Alexey

I want to create a feedback action which outputs a SysEx message containing the current Cakewalk Now Time when requested by a control action.

Is there anyway for AZ Controller to read the Now time conforming to the SMPTE standard so that I would not have to do external processing?

The four relevant bytes are:

Hours and frame rate
Minutes
Seconds
Frames

The other bytes of the SysEx message would be preset values.

Best regards
Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1703
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #1 on: May 07, 2023, 07:20:51 PM »
At the moment only text form of SMPTE is supported (Text MC SMPTE Action), which can be sent with SysEx then. Contains everything except frame rate.
To sync anything, other methods should be used. Well, when the transport is stopped you can get accurate current value this way.
Are you going to use it for something other then display and in addition work with different frame rates?

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #2 on: May 08, 2023, 10:42:24 AM »
Hi Alexey
Let me first explain the application:

I am putting together a small mobile recording setup with a Laptop PC running Cakewalk and AZ Controller, and a Fostex R8 8-track analogue tape machine which has a MIDI interface with remote control protocol mostly using SysEx messages for tape transport, record arming etc.  The Fostex can also be slave sync'd to Cakewalk using LTC timecode.  I will use this mobile setup mostly to record 'real' drums (I can only record MIDI based drums in my small home studio).

The idea is to record simultaneously to Cakewalk and the Fostex R8, and then integrate the recording with other tracks recorded in the studio.  The final mixdown will be from the R8 (and my Fostex G24S) via my Cakewalk/AZ controlled analogue mixer.

It should be easy to configure an AZ Controller preset to allow Cakewalk to remote control most R8 functions but there is one important function which is the subject of my enquiry to you.

The Fostex R8 had a 'locate to timecode' function which allows the R8 to fast spool and then stop at the received (static) timecode.  In use this means I can move the Cakewalk song pointer to the desired position (to start recording) and then request the R8 to move to the same timecode position.  However this would require a SysEx message from AZ to the following format (I will show the preset bytes in hex):

F0 51 7F 12 18 42 hr mn sc fr 12 F7

hr = hours and frame rate: 0 yy zzzzz (yy = frame rate, zzzzz = hours from 0 to 23)
mn = minutes: 00yyyyyy (yyyyy = minutes from 0 to 59)
sc = seconds: 00yyyyyy (yyyyyy = seconds from 0 to 59)
fr = frames: 000yyyyy (yyyyy = frames from 0 to 29)

I normally run LTC and MTC and 30fps and have no requirement to change this from session to session.

In the studio I take care of this locate function (for my Fostex G24S 24-track machine) as part of the mixer's PIC software but in my mobile setup (with the Fostex R8) I don't want to have the complexity of a PIC for just one remote control function.  That's why I'm asking if you think it is possible to make the static Cakewalk MTC position available, to the desired format, within AZ Controller?

Best regards
Robert



Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1703
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #3 on: May 08, 2023, 08:18:39 PM »
Fine, I can implement that. But can you check what "yy" (so, "frame rate") means for Fostex?
Cakewalk encoding is defined there: https://github.com/Cakewalk/Cakewalk-Control-Surface-SDK/blob/master/Framework2/MfxTime.h
So they support 6 different frame rates, while you mention Fostex use 2 bits, so it supports 4.

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #4 on: May 09, 2023, 11:20:45 AM »
Hi Alexey

The Fostex protocol defines four frame rates using "yy" as follows:

00 = 24 frames/second
01 = 25 frames/second
10 = drop frame (no frame rate quoted)
11 = non-drop frame (no frame rate quoted)

The original official MIDI specification specifies the use of the "yy" bits as follows:

00 = 24 frames/second
01 = 25 frames/second
10 = 30 frames/second (drop frame)
11 = 30 frame/second (non-drop frame)

Whereas the entry for MIDI timecode in Wikipedia quotes:

00 = 24 frames/second
01 = 25 frames/second
10 = 29.97 frames/second (drop frame)
11 = 30 frame/second (non-drop frame)

Next I checked the actual output "yy" bits from the seven frame rates available within the Cakewalk Preferences\Project\Clock menu:

00 = 24 frames/second
00 = 23.976 frames/second
01 = 25 frame/second
10 = 29.97 frames/second (drop frame)
10 = 30 frames/second (drop frame)
11 = 29.97 frames/second (non-drop frame)
11 = 30 frames/second (non-drop frame)

So although the Cakewalk SDK supports six different frame rates, the actual MTC code output by Cakewalk uses only the two "yy" bits with no differentiation between 29.97fps and 30fps rates.  This is identical to the Fostex protocol.

Therefore my suggestion is to implement the AZ Controller 'numeric' MTC in the same way so that it compatible to what Cakewalk outputs and so also compatibility with the Fostex protocol.

Regards
Robert



Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1703
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #5 on: May 09, 2023, 04:36:13 PM »
Please try b422 (test version). It has "Append now time SMPTE" in SysEx Action options. So you need 3 SYSEX Actions, one
with "Start" (put prefix "51 7F 12 18 42" there), next "Append ... SMPTE" and finally "End (and send)" with "12").

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1703
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #6 on: May 09, 2023, 04:37:14 PM »
BTW you can mark the last one with "loop", so you can directly observe final result (select all 3 and press "Play").

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Inserting the Cakewalk Now Time within a feedback SysEx message
« Reply #7 on: May 09, 2023, 09:10:33 PM »
Hi Alexey

I downloaded the test version b422 and the LOCATE function is working correctly with the Fostex Tape Machine.

I also added PLAY and STOP commands (which use preset SysEx messages) and these are also working correctly, so I can PLAY, STOP and LOCATE the Fostex to follow Cakewalk.
It will be possible to add RECORD and Track REC ARM commands in the same way, all using SysEx.

By the way I use a software utility called 'Chameleon' to provide screen based MIDI buttons which sit on top of the Cakewalk GUI.  So I have a button called LOCATE to trigger the Fostex locate function.

Many thanks for taking care of this so quickly.  Let me know if you need me to make any further tests.

Best regards
Robert