Hi, I've made a tiny script that should open a midi item (also when changing it inside the midi editor) and zoom to its content.
so with the help of
jrk I'm at this point now
Code:
if reaper.GetExtState("Main", "runstate") == "running" then
reaper.SetExtState("Main", "runstate", "stopped", false)
end
last_take = -1;
reaper.Main_OnCommand(40153, 0) -- Item: Open in built-in MIDI editor
function Main()
this_take = reaper.MIDIEditor_GetTake( reaper.MIDIEditor_GetActive() )
if this_take ~= last_take then
reaper.MIDIEditor_OnCommand(reaper.MIDIEditor_GetActive(), 40214) -- unselect all
reaper.MIDIEditor_OnCommand(reaper.MIDIEditor_GetActive(), 40466) -- View: Zoom to content
this_take = last_take
end
reaper.defer(Main)
end
Main()
reaper.SetExtState("Main", "runstate", "running", false)
It does what it's meant to do, BUT here's what's happening now (uploading a video....)