How to Send 7-bit Data Bytes for MIDI Song Position Pointer Message?

bluecliff synthesis's icon

Greetings Maxers,

I am trying to control the position of sequencer playback for an Elektron Octatrack, and so I am trying to send MIDI SPP (Song Position Pointer) messages out using [midiout]. I tried a very basic patch that looks like this:

Max Patch
Copy patch and select New From Clipboard in Max.

But nothing was happening. I assume it's because the SPP MIDI message contains 3 bytes that I do not have the proper data type for. The wiki says this:

[The SPP MIDI] message consists of 3 bytes; a status byte (decimal 242, hex 0xF2), followed by two 7-bit data bytes (least significant byte first) forming a 14-bit value which specifies the number of "MIDI beats"

I assume the SPP message didn't effect the Octatrack because the two data bytes weren't of the proper type; but I am not sure how to send two 7-bit data bytes with my SPP midiout message in Max. Any thoughts?

Thanks for any and all help!

Source Audio's icon

I have posted patches for both sending and receiving
Song Position Pointer many times here in the forum.
A search would have listed at least few to use.
Here is simplest variant :

Max Patch
Copy patch and select New From Clipboard in Max.

And a bit of info from another forum post:

For "normal" usage of midi beat clock one needs to send SPP and than start or resume.
By normal I mean that SPP is sent only if clock source stops or pauses and then resumes
or jumps to some other location, like in case of a Loop.
In theory, without stop or pause, one would only need to send SPP and slave should
jump to next 16th note, but SPP would need to be sent very precise,
exactly shortly after last tick in a bar or measure.
That is because SPP position gets executed on next tick.
Official sequence in case of a loop is:
tick        Stop    SPP            Continue        tick
248        252        242 32 0 251            248

for example to restart loop at bar 3 of 4/4 measure (32nd 16 note)

bluecliff synthesis's icon

This was extremely helpful. Thank you. For those interested, here is a patch that follows the tick-stop-spp-continue-tick order given above:

Max Patch
Copy patch and select New From Clipboard in Max.