Jump to content

How to position play head using Control Assignment?


Stew MacLean

Recommended Posts

Hi,

I have been experimenting with positioning the play head by using a control assignment with:

Class=Global Parameter=Playhead (Beats) Part=Bar Value Change=BF 6B Lo7 Format=Sign Magnitude Mode=Relative.

I test this by using sendmidi command: (a command line utility for sending midi):

sendmidi dev 'IAC Driver OverDriveIn' hex raw BF 6B 10

This works fine to jump 16 bars. However, if I change it to Direct mode, it jumps to -8 1 1 1, regardless of the value I send it. I also can't get it to use the Hi7 value either.

There is a related post here: https://music.stackexchange.com/questions/122779/how-can-i-get-logic-pro-to-obey-song-position-pointer-messages/122947#122947 to which I've replied, and thought I'd ask here for help.

Thanks!

Stew

 

Link to comment
Share on other sites

2 hours ago, polanoid said:

I guess no one ever tried this because the usual control surfaces don't provide any means to enter an absolute song position.

Not sure what you mean here - you can control playhead position from control surfaces, and can therefore control this via MIDI - I'm sure I answered a similar controller assignment issue relating to controlling the playhead here in the past.

You won't be able to use a "direct" 7-bit value for the playhead position as that's not the data format Logic expects for the playhead position. Try and search for the previous thread for the details, I can't remember the exact controller messages involved offhand...

Edited by des99
Link to comment
Share on other sites

16 minutes ago, des99 said:

Not sure what you mean here - you can control playhead position from control surfaces, and can therefore control this via MIDI - I'm sure I answered a similar controller assignment issue relating to this in the past.

You won't be able to use a "direct" 7-bit value for the playhead position as that's not the data format Logic expects for the playhead position. Try and search for the previous thread for the details, I can't remember the exact controller messages involved offhand...

That's what I meant by absolute (as opposed to relative) song position.

If I can relatively change the position by beats, bars, whatever, I should also be able to change the absolute position. So, a value of 127 for the direct/absolute position in bars (format = unsigned) should take me to position 118 1 1 1 (as the minimum clock I can reach seems to be -8 1 1 1).

I see no reason why this should not work.

Edited by polanoid
  • Like 1
Link to comment
Share on other sites

So the OP wants to create buttons that jump the playhead to particular positions, rather than just have a control to move the playhead back/forward?

If this is not possible (or is buggy) via controller assignments, which is I guess what you're saying having looked into it (as I haven't tried it), then the alternative I could suggest is to create markers in the project at the positions you want, and use the various goto marker commands to take the playhead there via MIDI commands...

Edited by des99
Link to comment
Share on other sites

Just now, David Nahmani said:

Perhaps a macro could be made in Keyboard Maestro along with the "Go To Position" key command?

That would also be another solution, yes..

You might also be able to relocate Logic using MTC, SPP or MMC MIDI commands too...

  • Like 1
Link to comment
Share on other sites

Wow, a lot has happened while I've been sleeping on the other side of the world (New Zealand). Thanks all for your replies.

@polinoid "That's what I meant by absolute (as opposed to relative) song position."  Spot on! Using the principal of just changing one thing at a time, if it works using a mode of Relative, then it should work using a mode of absolute/Direct - it doesn't.

@des99 And, as you say, most controllers use relative positioning and/or markers, so this is not a common use case. I don't want to create markers, as they're not relevant for my purposes. I've also figured out how to use Lo7 and Hi7. The sendmidi utility only sends three bytes, and I was sending four, so it wasn't picking up the last one. Also figured out how to get negative values as well. FYI, you send 1 byte/8 bits, but it ignores the leftmost one and uses the other 7.

@David Not sure what Keyboard Maestro is, but sounds like it brings up the Go To Position dialog and auto enters the values. Too clunky for my purposes. 

Re: MTC, MMS, and SPP. I have tried using the standard midi Song Position Pointer, but this does not work in Logic for some reason. MMC needs to be enabled by the user under midi synch settings, which I want to avoid. 

A possible clunky work around is to use a command that positions the playhead at a known position (if it exists), and then use relative locate with the absolute offset - to be explored...

If any of you are able to confirm my findings, that would be very much appreciated.

Cheers,

BTW, I'm using Monterey 12.0.1 on a M1 Mini, with 10.7.0 Logic.

 

 

  • Like 1
Link to comment
Share on other sites

10 hours ago, Stew MacLean said:

The sendmidi utility only sends three bytes

I think sendmidi will send as many bytes as you tell it to, but when Logic receives a standard MIDI message like e.g. a control change, it will parse it as a three byte message and interpret the fourth byte as the start of the next message

Link to comment
Share on other sites

11 hours ago, Stew MacLean said:

work around is to use a command that positions the playhead at a known position (if it exists), and then use relative locate with the absolute offset - to be explored...

Well there's the "Go to beginning" key command (therefore also accessible via Controller Assignments), so if you keep your song start positions at 1 1 1 1, as many people on this forum seem to recommend anyway, that will take you to a known position...

Edited by polanoid
Link to comment
Share on other sites

Good points! Still getting my head around all this. Took me back to the manual:

For messages containing only a Lo7 placeholder, the value is treated as 7 bit. For messages containing both a Lo7 and Hi7 placeholder, the value is treated as 14 bit. The order of Lo7 and Hi7 is honored, and there may be constant bytes in between. This allows you to define Control Change LSB and MSB portions. For example, B0 08 Hi7 B0 28 Lo7 indicates a 14-bit message.

Note: When you enter multiple MIDI messages, always enter each message completely, being sure to repeat the status byte, even if it’s the same. 

So does this mean that the assignment will be mapped to two successive midi messages from which the value is extracted from the Lo7 and Hi7?

B0 08 Hi7

B0 28 Lo7

Go To Beginning was what I had in mind. If I'm receiving suitable feedback, then I could potentially calibrate the beginning position?

Some experimentation is required!

 

Link to comment
Share on other sites

14 hours ago, Stew MacLean said:

@David Not sure what Keyboard Maestro is, but sounds like it brings up the Go To Position dialog and auto enters the values. Too clunky for my purposes. 

https://www.keyboardmaestro.com/main/

Yes it would allow you to create macros that can be commanded with any simple MIDI events that locate the playhead to any bar number you want, so for example one MIDI event would locate the playhead to bar 9, another to bar 18, another to bar 27, etc. 

I suppose the clunky part is that you would see the Go To Position being displayed and auto-filled before the playhead moves, I'm not sure exactly how quick that would be. 

Link to comment
Share on other sites

17 minutes ago, Stew MacLean said:

So does this mean that the assignment will be mapped to two successive midi messages from which the value is extracted from the Lo7 and Hi7?

Yes, it means two successive MIDI messages will carry the combined 14-bit signal, extracted by Logic in the manner you document.

Link to comment
Share on other sites

@David - thanks for the link, but it's "Too clunky in here" :)

@des99 - That's good. I can create my own "signatures" that are unique.

FYI, I'm porting a software controller that I wrote using VisualWorks Smalltalk, but for various reasons I'm having to move from OSC to midi and to Pharo Smalltalk. "Just" need to reimplement an old midi interface to a midi library to get the plumbing working! Your feedback is very much appreciated...

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...