Possible to get this script to work in midi editor?
Is it possible to make this script
Amagalma: place play cursor into view (when playing) or center edit cursor (when stopped).eel
work in the midi editor as well?
Here's the script itself:
// @description amagalma_Place play cursor into view (when playing) or Center edit cursor (when stopped)
// @author amagalma
// @version 1.0
// @about
// # If playing: positions the play cursor at the first sixth of the arrange view
// # If stopped: centers the edit cursor at the middle of the arrange view, if possible
state = GetPlayStateEx( 0 );
GetSet_ArrangeView2( 0, 0, 0, 0, start, end );
wide = end - start;
state & 1 == 1 || state & 4 == 4 ? (
cursor = GetPlayPosition();
extension_api("BR_SetArrangeView", 0, cursor - wide/6, cursor + wide*5/6 );
) : (
cursor = GetCursorPosition();
extension_api("BR_SetArrangeView", 0, cursor - wide/6, cursor + wide/2 );
);
function NoUndo()(abs(0)); defer("NoUndo()");
It moves the edit cursor to the first 6th of the arrange view which I'd love to also have when using a midi editor full screen......
|