v5.80pre5 - April 22 2018 # MIDI editor: auto-zooming better handles looping # MIDI editor: remove update of arrange edit cursor position when switching contexts [p=1981619] # MIDI editor: when re-opening a MIDI item, auto-scroll if completely out of range (unless anybody objects) [p=1981624]
howdy - closing the midi editor, and then re-opening it results in loss of full-project midi display:
shown here is a midi editor displaying project midi.
i then close the midi editor, and re-open it by clicking another item
issue: only the clicked-on midi opens in midi editor.
note: double clicking another midi item shows all project midi.
Code:
One editor per PROJECT
Behavior for "open..." [open all MIDI in the project]
[X] Make secondary items editable when opened from arrange
[X] Avoid automatically setting MIDI items from other tracks editable
[ ] Active item follow selection changes in arrange
[ ] Selection linked to visibility
[ ] Selection linked to editability
__________________ mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
if i enter a midi item while a project is playing,
my edit cursor/view in midi editor moves to the contents of the item under play cursor. it behaves a little erratically, sometimes opening the item contents as wished, but other times quickly moving to play cursor.
__________________ mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
shown here is a midi editor displaying project midi.
i then close the midi editor, and re-open it by clicking another item
issue: only the clicked-on midi opens in midi editor.
note: double clicking another midi item shows all project midi.
I was thinking it was from the logic in "- MIDI editor: when re-opening a MIDI item, auto-scroll if completely out of range (unless anybody objects)" -- it is mistakenly auto-zooming to an item if the item exists entirely within the left or right 1/8th of the piano roll view, which is a bug (oops).
but now I don't think that was it -- can you send the project my way?
- I still can't understand why closing and reopening the editor makes it lose the zoom we just selected...it's completely counterintuitive as every time I close and reopen I have to zoom again to see what I want to see. I don't have a second monitor that allows me to have an editor always open so it's essential to be able to do that.
- I think the zoom levels of the piano roll and notation editors should be independent from each other (ideally they should be two different editors in my opinion, but that's a different topic)...what I'm experiencing instead is that zooming one reflect on zooming in the other (but actually not all the time and not consistently), and that shouldn't happen in my opinion because they're two very different things and two different ways of looking at the musical material we are working on.
...I understand this second point might be trickier and involve a lot of code, so I would understand if we had to wait a bit longer to see some improvements in this field.
As a side note, I still wish this function was implemented in these prerelease cycles, as it's strictly correlated to the whole "midi editor" workflow you're working on (thanks!) lately: https://forum.cockos.com/showpost.ph...32&postcount=5
Hope this was helpful.
Thanks a lot for your work!
All the best
-t
__________________
MacOS 10.15.7
Mac Pro 6-Core - 64GB ram
Motu M4
As a side note, I still wish this function was implemented in these prerelease cycles, as it's strictly correlated to the whole "midi editor" workflow you're working on (thanks!) lately: https://forum.cockos.com/showpost.ph...32&postcount=5
I have a script that does this...
Code:
local last_take=nil
local every_nth=20 -- don't run 60 times a second
local counter=every_nth
function loop()
if counter>=every_nth then
counter=0
local ame=reaper.MIDIEditor_GetActive()
local mode=reaper.MIDIEditor_GetMode(ame)
if mode > -1 then -- we are in a MIDI editor, -1 if ME not focused
tk=reaper.MIDIEditor_GetTake(ame)
if not reaper.ValidatePtr(tk, 'MediaItem_Take*') then tk=nil end
if last_take~=nil and tk~=nil then
if last_take~=tk then
tr=reaper.GetMediaItemTake_Track(tk)
reaper.SetOnlyTrackSelected(tr)
end
end
last_take=tk
end
end
counter=counter+1
reaper.defer(loop)
end
loop()
It selects the track, so works with "Automatically record-arm when track selected". There's a minor buglet in the Track List where the rec button is not refreshed after the SetOnlyTrackSelected call until the MIDI Editor is next clicked.
local last_take=nil
local every_nth=20 -- don't run 60 times a second
local counter=every_nth
function loop()
if counter>=every_nth then
counter=0
local ame=reaper.MIDIEditor_GetActive()
local mode=reaper.MIDIEditor_GetMode(ame)
if mode > -1 then -- we are in a MIDI editor, -1 if ME not focused
tk=reaper.MIDIEditor_GetTake(ame)
if not reaper.ValidatePtr(tk, 'MediaItem_Take*') then tk=nil end
if last_take~=nil and tk~=nil then
if last_take~=tk then
tr=reaper.GetMediaItemTake_Track(tk)
reaper.SetOnlyTrackSelected(tr)
end
end
last_take=tk
end
end
counter=counter+1
reaper.defer(loop)
end
loop()
It selects the track, so works with "Automatically record-arm when track selected". There's a minor buglet in the Track List where the rec button is not refreshed after the SetOnlyTrackSelected call until the MIDI Editor is next clicked.
Thanks! I will try that!
__________________
MacOS 10.15.7
Mac Pro 6-Core - 64GB ram
Motu M4
Maybe it would be better to automatically scroll to the edit cursor when opening a looped and non-looped MIDI item if an edit cursor is inside a MIDI item? If there is no edit cursor in the looped MIDI item, scroll to the beginning of the looped MIDI item. Auto-view-scroll on playback does not work if you open a looped MIDI item and the edit cursor is not displayed (see GIF).
All the latest additions / fixes regarding MIDI Editor apart (thanks Cockos), i am still scratching my head over things.
For instance this situation:
- I select 2 MIDI Items in Arrange, these 2 are on the same Track.
- Now i open MIDI Editor. (i have set "1 MIDI Editor per Project).
Outcome:
Only 1 MIDI Item is visible in MIDI Editor, showing it's Notes.
Why is this ?!!
I want both MIDI Items to show their Notes in MIDI Editor.
Furthermore, in MIDI Editor, whishful workflow would then be that if i click on a Note or in an empty space of 1 MIDI item, this Item becomes editable right away.
I tried all kinds of different settings in Prefs > MIDI Editor > "when using 1 MIDI Editor per Project" to fix this issue, but to no succes.
Hope to see someone chime in, thank you.
EDIT: Further examination leads to this for me:
When i set "One MIDI Editor per Track" in Prefs ,instead of "One MIDI Editor per Project", i do see all the Notes of both Items in MIDI Editor.
However, still only one MIDI item is editable, the other is non-editiable.
Confusion 2.0
Do you have selection linked to visibility? If not, you should have it.
Quote:
Originally Posted by vanhaze
Furthermore, in MIDI Editor, whishful workflow would then be that if i click on a Note or in an empty space of 1 MIDI item, this Item becomes editable right away.
This is double-click right now, and it's probably preferred because a single click would select a note if the item is editable (but not necessarily change focus from the active item).
Justin, do you think it could be a good idea for double-click to zoom to selection rather than content of the active item, in case multiple items are selected, and you double-click on one of them? I think that could be useful. Perhaps as a second double-click after zoom to content of active item?
I can see this being very useful.
EDIT: Just noticed that MIDI editor action "zoom to selected notes/CC" is absolutely borked. It doesn't take editable and/or visible items into account at all. Also sometimes it zooms to an item that is not active... It should zoom to all selected notes/CCs, across all visible items
EDIT: Just noticed that MIDI editor action "zoom to selected notes/CC" is absolutely borked. It doesn't take editable and/or visible items into account at all. Also sometimes it zooms to an item that is not active... It should zoom to all selected notes/CCs, across all visible items
Justin, do you think it could be a good idea for double-click to zoom to selection rather than content of the active item, in case multiple items are selected, and you double-click on one of them? I think that could be useful. Perhaps as a second double-click after zoom to content of active item?
these should be decisions left to individual users imo, because we all have different screen real estate and many of us have fullscreen midi editors without instant clickable access to arrange.
there's a script floating around called "open ME run ME action" that can be used to create specialized mouse modifier actions including all permutations of zoom (content, selection, etc)
unfortunately, there is no Midi Item mouse modifier (only media items) so you might find yourself entering midi editor on an audio item
__________________ mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
EDIT: Just noticed that MIDI editor action "zoom to selected notes/CC" is absolutely borked. It doesn't take editable and/or visible items into account at all. Also sometimes it zooms to an item that is not active... It should zoom to all selected notes/CCs, across all visible items
Furthermore, in MIDI Editor, whishful workflow would then be that if i click on a Note or in an empty space of 1 MIDI item, this Item becomes editable right away.
Quote:
Originally Posted by EvilDragon
Do you have selection linked to visibility? If not, you should have it.
Noooo that shouldn't be used for that! If you want the old item to remain editable I'd use "link selection to active item", and if you want the old item to become visible but not editable, then I'd use "link selection to editability"...
Instead of having 7-8 options and trying to figure out what should happen with any combination between them, why don't we have three different scenarios with optimized settings?
1) one midi editor per project
2) one ME per track
3) one ME per item
^ a plurality of use cases requires greater granularity than that. some may want to be able have all project midi visible but not editable, or all track midi visible but only selected midi editable, etc etc etc.
__________________ mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
Noooo that shouldn't be used for that! If you want the old item to remain editable I'd use "link selection to active item", and if you want the old item to become visible but not editable, then I'd use "link selection to editability"...
What do you mean by old Item Justin ?!
I mean, i just select 2 MIDI items on same Track in Main, (marqueeing them), then open MIDI Editor with the goal of seeying both MIDI Items's Notes.
I don't get the word "old" in my workflow ..
But..i did find the culprit anyway now:
It seemed that, when i created a fresh new Reaper Project (not based on a Project template), and then tested again, it does work.
I was always testing things in a an empty selfmade Reaper Project Template.
This Template i do have for a very longtime,alot of testing things, importing audio, then always make it completely empty again and saving that.
So my only clue is that this template is being corrupted somehow and so the issue i described earlier with visibility of the 2 midi items in ME occured in this template.
EDIT: Spoke to soon:
When i saved the fresh new Reaper Project, closed Reaper, then opened that Reaper Project, the issue is back.
local last_take=nil
local every_nth=20 -- don't run 60 times a second
local counter=every_nth
function loop()
if counter>=every_nth then
counter=0
local ame=reaper.MIDIEditor_GetActive()
local mode=reaper.MIDIEditor_GetMode(ame)
if mode > -1 then -- we are in a MIDI editor, -1 if ME not focused
tk=reaper.MIDIEditor_GetTake(ame)
if not reaper.ValidatePtr(tk, 'MediaItem_Take*') then tk=nil end
if last_take~=nil and tk~=nil then
if last_take~=tk then
tr=reaper.GetMediaItemTake_Track(tk)
reaper.SetOnlyTrackSelected(tr)
end
end
last_take=tk
end
end
counter=counter+1
reaper.defer(loop)
end
loop()
It selects the track, so works with "Automatically record-arm when track selected". There's a minor buglet in the Track List where the rec button is not refreshed after the SetOnlyTrackSelected call until the MIDI Editor is next clicked.
Thanks for that, yeah it's a bit confusing because as you said there's a "refresh" bug and I always see that the record arm button lights up on the previous track instead of the current...maybe it can be implemented by the developers.
But thank you very much for helping me!
All the best!
__________________
MacOS 10.15.7
Mac Pro 6-Core - 64GB ram
Motu M4
What do you mean by old Item Justin ?!
I mean, i just select 2 MIDI items on same Track in Main, (marqueeing them), then open MIDI Editor with the goal of seeying both MIDI Items's Notes.
I don't get the word "old" in my workflow ..
But..i did find the culprit anyway now:
It seemed that, when i created a fresh new Reaper Project (not based on a Project template), and then tested again, it does work.
I was always testing things in a an empty selfmade Reaper Project Template.
This Template i do have for a very longtime,alot of testing things, importing audio, then always make it completely empty again and saving that.
So my only clue is that this template is being corrupted somehow and so the issue i described earlier with visibility of the 2 midi items in ME occured in this template.
EDIT: Spoke to soon:
When i saved the fresh new Reaper Project, closed Reaper, then opened that Reaper Project, the issue is back.
Thanks vanhaze. Pretty much the same here. I would add that I can load the project and have the editor work seemingly correctly if I make another tab using:
New project tab (ignore default project...something like that anyway)
Then opening the same project that is failing in the original tab. Win7 x64.
Edit: using pre 6
Edit2: soon as I load a windows screen set, it goes back to only opening one of the selected items.
...
Edit2: soon as I load a windows screen set, it goes back to only opening one of the selected items.
That seems to be a factor in bug that causes editor to initially open only one of several selected items. Running the Open action again will open all selected items. Reproduced with 5.81 pre1 on different computer than original report, with freshly saved screenset. It works ok until loading the screenset. This rpp and .ini is from that project/computer. Windows7 x64