# Reaper users: How do you deal with multiple parts?



## Rasmus Hartvig (Aug 14, 2017)

I'm in the process of migrating from Cubase to Reaper, and apart from a few things it's mostly a very pleasant process.

One thing, however, bugs me to no end. I Cubase I would often have a bunch of MIDI parts, say one part per section of the strings, that I would edit together in the same piano roll window. When doing that it was easy to have a hotkey that would cycle between making each of the 5 open parts active.

In Reaper it seems that this is not possible. When opening multiple parts in the MIDI editor, you have to rely on the MIDI track list for switching, but that always contains all the tracks of the project, and I've found no easy way to just cycle between the parts I've selected, making each one active while the others are visible.

How do you guys deal with this? I find it almost unusable in an orchestral context, but would love to go "all Reaper".


----------



## Jaybee (Aug 14, 2017)

Two caveats before you read my reply.

1) Reaper is possible of a lot of different routes to various needs and solutions via actions, macros combining various actions (e.g. the Cycle Action Editor) and full-blown Scripting. 

2) I'm not an expert on any of these but a lot is possible  

Here's what I currently do to see/manipulate/switch between multiple midi tracks in the Midi Editor. First I'll select the items I want to see side by side then I press 'E' as the hotkey to launch the editor. Once the editor is open I can see the tracks on which I have selected items highlighted in the Track List panel (see image below). Only their midi is visible (hence the eye icon). we still see all the tracks (I don't know if a way to hide them automatically in the midi edirtor) but their midi only shows if highlighted. Again, I have my Midi Editor set to show this Track List panel all the time (click 'Contents' from top bar menu > Track List). 






The Midi Editor is now showing midi from all three selected items (I would say 'tracks' but it's the _Item _on the track that needs to be selected unless you double click the track itself to select all items). The last item I selected here was on the Horns track so this track's item is currently the 'target for inserting events' i.e. it has focus. 

To move between the other two highlighted tracks (CSS Basses & ONE Spicc) and make those the focussed track/item simply click the icon that the red arrow is pointing at on those tracks. All three will remain visible but the focus will shift to the last-clicked track/item. 

Does that help?


----------



## Rasmus Hartvig (Aug 14, 2017)

Thanks for your input @Jaybee 

Your described method is what I'm doing now, but it annoys med to have to move the mouse and hit a tiny click target every time I want to switch the active part. Hence my burning wish for a way to cycle between them with a key 

I did actually look into a scripting solution recently, but the API doesn't have functions to access to the midi track list. And it's not currently possible only show tracks in the list that the open items are on. 
Oh well... The developers might one day stumble upon my feature request and decide that it's useful. One can dream...


----------



## InLight-Tone (Aug 15, 2017)

Rasmus Hartvig said:


> Thanks for your input @Jaybee
> 
> Your described method is what I'm doing now, but it annoys med to have to move the mouse and hit a tiny click target every time I want to switch the active part. Hence my burning wish for a way to cycle between them with a key
> 
> ...


I just switched from Cubase a month ago as well, and really love the customization and extensibility of Reaper. Wish I had looked at it a bit sooner. Let's hope your feature request is heard...


----------



## Jaybee (Aug 15, 2017)

Rasmus Hartvig said:


> Thanks for your input @Jaybee
> 
> Your described method is what I'm doing now, but it annoys med to have to move the mouse and hit a tiny click target every time I want to switch the active part. Hence my burning wish for a way to cycle between them with a key
> 
> ...



I'll have a look for it and give it a vote. Every little helps! This is one of those things you'd think would be an easy fix but if it's not covered in the API I guess it's outside the scope of the scripters on the Reaper forum (lots of very helpful people if there's something achievable but not actually a script yet!).


----------



## tack (Aug 15, 2017)

Rasmus Hartvig said:


> How do you guys deal with this? I find it almost unusable in an orchestral context, but would love to go "all Reaper".


Here's how I solve this problem.

I have this simple script in the Main context called "Activate next selected item in MIDI editor.lua" which I bind to the Tab key:


```
function main()
    local hwnd = reaper.MIDIEditor_GetActive()
    if not hwnd then
        reaper.Main_OnCommandEx(40109, 0, 0)
    else
        reaper.MIDIEditor_OnCommand(hwnd, 40500)
    end
end

main()
```

Then in the MIDI Editor context, I add the Tab key to the "Misc: Pass through key to main window" action.

What this does: if the MIDI editor is closed and I'm in the arrange view, I can select some MIDI items across tracks (which I generally do by right-click dragging a box around them) and when I hit tab, it opens up the MIDI Editor. Inside the MIDI editor, it triggers the "Activate next visible MIDI item" action which allows me to cycle through the selected items.

But ultimately I think the actions you're primarily interested in are the MIDI Editor's Activate next visible MIDI item and (if you like) Activate previous visible MIDI item.


----------



## tack (Aug 15, 2017)

I should mention: this cycles between items, but if you have multiple items open on a track, it will cycle through the items on the same track before moving onto the next track. Personally I'd prefer a depth first traversal as opposed to breadth first, so to speak. There we do run into API limitations.



Rasmus Hartvig said:


> The developers might one day stumble upon my feature request and decide that it's useful.


I'd strongly recommend you not hold your breath. 

Feature requests, even trivial ones, or even trivial fixes for irritating minor bugs, will go unanswered for many, many years. Some simple bugs that would probably take me an hour to fix if I had access to the source code (and that's not even knowing the code base) are almost a decade old.

If you find a bug with a feature currently in active development, or you find a regression introduced by a new release, there's an excellent chance it'll get fixed. Otherwise, there's a good chance it _won't_ get fixed.


----------



## d.healey (Aug 15, 2017)

tack said:


> if I had access to the source code...


One day I hope


----------



## pmcrockett (Aug 15, 2017)

Are you familiar with the "Activate next MIDI track" and "Activate previous MIDI track" actions? These give the depth traversal that tack refers to. Still doesn't solve the problem of constraining activation to a set of particular tracks, but I'm reasonably sure this can be done through scripting. I've written similar code dealing with piano roll view state management for my own use, so I may take a crack at this if I get a spare moment.


----------



## Jaybee (Aug 16, 2017)

pmcrockett said:


> Are you familiar with the "Activate next MIDI track" and "Activate previous MIDI track" actions? These give the depth traversal that tack refers to. Still doesn't solve the problem of constraining activation to a set of particular tracks, but I'm reasonably sure this can be done through scripting. I've written similar code dealing with piano roll view state management for my own use, so I may take a crack at this if I get a spare moment.



I think we have a winner. I hadn't seen these two 'Activate' actions before so went to try them and right next to them in the list is:

Activate next _visible _MIDI item (bound to Alt + N by default) and hey presto, that cycles just the selected visible tracks in the MIDI Editor!


----------



## Rasmus Hartvig (Aug 16, 2017)

@tack Neat. Thanks for the script! Yeah, after spending some more time looking for solutions I found the "Activate next visible MIDI item". It gets me the closest to what I need, but I agree that depth first would be preferable.
And I hear you about the feature requests. Reaper is great in so many ways, but I feel that the devs are squandering the opportunity to have it be the strongest contender in the MIDI area. Maybe better / deeper API access is the best we can hope for.

@pmcrockett Just found it yesterday. Massive upgrade from having a key bound to "Activate next MIDI item"


----------



## tack (Aug 16, 2017)

pmcrockett said:


> Are you familiar with the "Activate next MIDI track" and "Activate previous MIDI track" actions? These give the depth traversal that tack refers to.


But these actions don't limit the cycling to only the tracks that have selected items -- any visible track with a MIDI item can get activated even if you haven't selected an item on that track. So for the workflow of selecting specific items and cycling over them in the MIDI editor, the activate next/previous visible MIDI item still seems to be the best bet.


----------



## pmcrockett (Aug 16, 2017)

tack said:


> But these actions don't limit the cycling to only the tracks that have selected items -- any visible track with a MIDI item can get activated even if you haven't selected an item on that track. So for the workflow of selecting specific items and cycling over them in the MIDI editor, the activate next/previous visible MIDI item still seems to be the best bet.


Ah, I see what you're getting at. The scripting workaround to jump only among tracks containing selections would involve calling "Activate next MIDI track," checking which track is active through the API function that returns that info, checking whether that track contains a selected item (or fits whatever other criteria you might want to use), and doing it all again if it doesn't. I have a script that syncs MIDI editor track visibility to what's visible in a Lemur control screen, and this is basically how I do it in that script.


----------



## tack (Aug 16, 2017)

Yeah, makes sense. I've done similar kludges as well. PreventUIRefresh() has been quite useful.


----------



## meradium (Jul 17, 2018)

tack said:


> Here's how I solve this problem.
> 
> I have this simple script in the Main context called "Activate next selected item in MIDI editor.lua" which I bind to the Tab key:
> 
> ...



Simply great! Thank you for sharing!


----------

