Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 08-14-2019, 02:08 PM   #1
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default Split Multiple midi notes with one click

Hi, the title says it all I think. When I select multiple notes all in the midi editor that are all playing together and split one of them using the 'split note at mouse cursor' mouse modifier, only the note I'm clicking on actually splits, none of the others do.

I find it cumbersome having to click to align the edit cursors, then reselect all the notes, then fire off appropriate split command, especially if splitting at both ends of a note, the mouse modifier + click method is much better for me, but I can't find a way to get it working with all the selected notes, very frustrating when editing chords.

Any ideas? I'm on the latest version, using Hydra theme.

Cheers
Joe90 is offline   Reply With Quote
Old 08-15-2019, 12:19 AM   #2
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Yeah, Edit: Split notes at mouse cursor only splits the note(s) that are directly underneath the mouse cursor.

If you don't want to manually position the edit cursor for using Edit: Split notes, try using a Custom Action (https://www.reaper.fm/videos.php#15Evzb7rWCo) containing these two Actions:
Code:
View: Move edit cursor to mouse cursor
Edit: Split notes
Another version could look like this:
Code:
View: Move edit cursor to mouse cursor
Script: sr_Select notes under edit cursor.lua
Edit: Split notes
Or if you want to keep only the (left or) right note part selected after a split:
Code:
View: Move edit cursor to mouse cursor
Script: sr_Select notes under edit cursor.lua
Script: me2beats_Split notes (select right).lua
The sr_Select notes under edit cursor.lua Action is available in the Stevie Scripts Repo in ReaPack: https://reapack.com/repos
And the Script: me2beats_Split notes (select left).lua and Script: me2beats_Split notes (select right).lua ones in the me2beats Scripts Repo.


There are also a couple of other MIDI Editor and note Actions available in ReaPack which might be interesting, in general.
__________________
ReaLauncher

Last edited by solger; 08-15-2019 at 01:08 AM.
solger is offline   Reply With Quote
Old 08-16-2019, 10:32 PM   #3
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

Thank you for your help... however the first suggestion has the same issue when assigned to a mouse click (even without modifiers) - it only cuts the note I'm clicking on.

The other two automatically select ALL notes and cut them. So I still don't have a way to click and cut the notes that are selected, which seems very surprising for such a flexible and full featured program!

I know people will say click then use a shortcut, but click and cutting directly on the note by holding a modifier is much faster than moving the edit cursor and the using a shortcut, unless you hit the shortcut before clicking, and then hold it for subsequent clicks, which puts you at risk of cutting things accidentally.
Joe90 is offline   Reply With Quote
Old 08-17-2019, 07:15 AM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

don't know if this helps but... you can
select the notes you want to split...
and use split notes to grid
but first you'd have to choose the grid size that would work for your desires...

after that you can change it back....

you could make a custom action to do that IF you knew the grid size you wanted during the split...

or someone who is good with lua could make a script that would let you enter the grid size when the script runs...
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 08-17-2019, 09:51 AM   #5
Dex
Human being with feelings
 
Join Date: Sep 2017
Posts: 518
Default

I don't think this does exactly what you want, but look for the script "Split selected notes into equal parts" by MPL in ReaPack. It works on all selected notes, and might do something you find useful.
Dex is offline   Reply With Quote
Old 08-17-2019, 01:54 PM   #6
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by Joe90 View Post
... So I still don't have a way to click and cut the notes that are selected ...
Can you attach a screenshot of an example which shows which of the notes in a MIDI item are selected and how you want them to be split, exactly?
Maybe this way other possible options might come into mind.
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 08-17-2019, 03:36 PM   #7
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

Thanks everyone for your suggestions - much appreciated.

Here is a gif I've made of the cubase scissor modifier so you can see what I mean.

https://giphy.com/gifs/Rlrl0W0szZQJYMLoMn/html5

Notice that if no notes are selected it just cuts the one I click on, if I select the note then cut it auto selects to the right, if it's not pre selected it doesn't.

Also note that whilst it cuts the note that's under the cursor on click, selected or not, it also cuts all selected notes under the cursor and does the same auto selection to the right. The auto selection would be nice, but it's not my main focus here, I mainly just want a mouse modifier I can click that will allow me these same cutting functions.

It's funny, I've used this tool for years but it's only now that I'm having to describe it in detail that I'm realising how subtly complex it actually is.

First time making a gif, so if there are issues with the link then just let me know.

Cheers!
Joe90 is offline   Reply With Quote
Old 08-18-2019, 10:47 AM   #8
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

so that is the cubase tool... OK

but you first posted what seemed to be a different request...

namely to split all selected notes...

now lets say the notes are not all vertically aligned as in a chord... but are here and there along the MIDI Item...
and say you want to split notes 1, and 4 and 7 and 10 but not the others...

Then what does that tool do for you?

PS: To get something similar with reaper you can use the me2beats script for MIDI Ed., "Script: me2beats_split notes (select right).lua


...he also has a select left script...
You can get these via Reapack if you add the me2beats directory to it...

To use it freely, just turn off Snap in the MIDI Editor so you can freely position the edit cursor
select the note you want to split, put the cursor where you want to split and run that script..

It will split multiple selected notes and you can assign a hot key to it...so a key press runs the action

You can go further with a custom action like this:

Custom action name: Select notes under cursor and split select Right
Script: Lokasenna_Unselect all MIDI notes in selected items.lua
Script: sr_Select notes under edit cursor.lua
Script: me2beats_Split notes (select right).lua

so you just have to turn Snap off and put the cursor where you want it and run that custom action
If you don't yet have those actions, Reapack is your friend!
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva

Last edited by hopi; 08-18-2019 at 11:22 AM.
hopi is offline   Reply With Quote
Old 08-18-2019, 05:13 PM   #9
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

Quote:
Originally Posted by hopi View Post
so that is the cubase tool... OK

but you first posted what seemed to be a different request...

namely to split all selected notes...
Thanks Hopi. You're correct, the thread name could have been worded more accurately... I didn't realise how subtly complex this tool was until I started really having to describe it in detail. But if you check my initial post I do (kind of) clarify the function, it should only cut the note you click on, unless it is a part of a selection and others are also selected, then it cuts them too in the same spot. It is a Cubase thing, but it's also how S1 does it, and I believe Logic too... not saying that makes it right, but it definitely seems faster to me.


Quote:
Originally Posted by hopi View Post
now lets say the notes are not all vertically aligned as in a chord... but are here and there along the MIDI Item...
and say you want to split notes 1, and 4 and 7 and 10 but not the others...

Then what does that tool do for you?

In this scenario it would cut only the notes you have selected, so you select (click or marquee) notes 1, 4 and 7, then click on any of the selected notes once with the modifier on, and only the selected notes are cut in the spot you clicked. Or you could hold the modifier down and do three quick snips. I'm confused why it would make a difference whether they are aligned or not? As long as the selected note crosses into the spot in time where you are cutting, it will be cut.

This is slower in Reaper because you have to move the edit cursor first then hit the split shortcut. If you hold down split then put your mouse where you want to cut, it is less precise and you run the risk of making accidental splits. Plus (and this is admittedly more personal) splitting with a click feels much more 'solid' to me, it's quite a destructive action (easily repairable I know) and it feels more suited to a click then a shortcut to me. I'm aware that is personal opinion though and I'm sure others will disagree.


Quote:
Originally Posted by hopi View Post
PS: To get something similar with reaper you can use the me2beats script for MIDI Ed., "Script: me2beats_split notes (select right).lua


...he also has a select left script...
You can get these via Reapack if you add the me2beats directory to it...

To use it freely, just turn off Snap in the MIDI Editor so you can freely position the edit cursor
select the note you want to split, put the cursor where you want to split and run that script..

It will split multiple selected notes and you can assign a hot key to it...so a key press runs the action

You can go further with a custom action like this:

Custom action name: Select notes under cursor and split select Right
Script: Lokasenna_Unselect all MIDI notes in selected items.lua
Script: sr_Select notes under edit cursor.lua
Script: me2beats_Split notes (select right).lua

so you just have to turn Snap off and put the cursor where you want it and run that custom action
If you don't yet have those actions, Reapack is your friend!
Unfortunately not, this is why I'm here. The me2beats script ONLY cuts the note you click on, regardless of which notes are selected, although when you remove it from the modifier and assign to a straight keypress, it DOES cut all notes, but it cuts them all, regardless of which one you click on... feel free to try it, maybe I'm doing something wrong. The second script you suggested seems like it would ignore my note selection before clicking to cut, and just cut all notes under the cursor?

Interestingly, I've got this working perfectly when cutting ITEMS in the arrange page, and it works great. Hold down the modifier and click on an item and it cuts in line with mouse cursor, following snap if on, cutting all the items I have pre selected and then auto selecting to the right of only those items, if none are selected and I click with modifier it just cuts what I click.

If this is not clear then please let me know and I'll make some more gifs.

Sorry to keep on about this, I'm only hammering on because this program is so insanely flexible it is surprising to me that this basic function might not be possible.

EDIT: just playing around with this some more - I feel like the key to the issue is in the selection, if I have multiple notes selected then I modifier-click one of them to cut them, Reaper re selects the note when I click, and therefore clears the other selected notes (just as it would when clicking on a note without a modifier). IMO it should respect the previous selection when clicking with a modifier. I just tried changing the left click function in the midi note section from 'select note' to 'no op' but it still selects notes, I'm thinking this might be something that can't be disabled. If someone does figure it out and makes a script for 'split selected notes at mouse cursor, select right' I would be eternally grateful.

Last edited by Joe90; 08-18-2019 at 05:38 PM.
Joe90 is offline   Reply With Quote
Old 08-18-2019, 06:36 PM   #10
cjewellstudios
Human being with feelings
 
Join Date: Sep 2017
Posts: 998
Default

There's a tool in Julian's scripts that maybe will work for you. Solger linked it above but there is a TON of info to sift through so it's possible you missed it.

https://forum.cockos.com/showpost.ph...07&postcount=8

Post #8 specifically shows what it can do.
cjewellstudios is offline   Reply With Quote
Old 08-19-2019, 10:02 AM   #11
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

Joe90.... OK so here is more:

Make the custom action that I have posted... name it what you want

Now add it to a MIDI Editor toolbar

when you rt clk on that in the toolbar it 'arms' that action

so again, be sure snap is set to OFF and just clk on the note you want to split

you don't have to select the note first
if there are stacked notes like in a chord it will split them all

remember to rt clk the toolbar icon [text icon] to unarm it when you are done using it
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 08-19-2019, 08:31 PM   #12
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

Hi Hopi, The custom action you suggested combines actions from the main list and the midi editor list, and as far as I can tell they are exclusive to their own section and can't be combined? Perhaps I'm missing something.

However - using the toolbar method with one of the other midi split actions I'd previously created with all of your help actually works, and gives me a scissor tool that works exactly as I described, so thank you for pointing me in that direction.

Now I just need a way to assign the right click arming of that button to a keyboard shortcut. I've done some browsing and apparently it's possible since a recent update, but I can't get it working here. There's an action for 'arm next action' and 'toggle arm of next action'. However when I assign this to a shortcut it just fires off the actual action that's assigned, it doesn't 'arm' the cursor. I also tried 'toolbar: press active toolbar button 'x'' but again it just fired off the shortcut, didn't arm the tool. Also tried an action called 'run script that is armed in toolbar' but that didn't seem to do anything.

cjewelstudios - I did see that, thanks. It's a cool tool, it's just not what I'm looking for.
Joe90 is offline   Reply With Quote
Old 09-22-2019, 02:39 AM   #13
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

The action "Edit: Split notes" by itself should do the trick: As far as I can tell, if it is assigned to a mouse modifier, it automatically moves the edit cursor to the mouse and then only splits selected notes, so you can link it to Alt+click in the MIDI Note or MIDI Piano Roll contexts.
juliansader is offline   Reply With Quote
Old 09-22-2019, 03:21 AM   #14
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

I can so relate to that. The issue is, that Reaper does not intelligently differentiate between selected notes and non selected notes.

The workflow would be the following:

- if notes are selected under the mouse cursor, split only the selected notes
- if there is no note selection under the mouse, split ALL notes under the mouse

@Julian, thats the reason why I requested (some months ago) your split/trim notes script to be split up in single scripts, so we can assign them to different shortcuts for faster workflow.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 09-22-2019 at 03:26 AM.
_Stevie_ is offline   Reply With Quote
Old 09-22-2019, 03:22 AM   #15
lucor
Human being with feelings
 
Join Date: Jan 2016
Posts: 65
Default

Coming from Cubase I also struggled with this. The best solution I found is to assign "Edit: Split notes" under "Mouse Modifiers -> MIDI Piano Roll" to Alt + Left Click.
The trick then is that you then have to click the 'background' instead of the note itself to make it work. Took a bit of getting used to but works great for me.
Attached Images
File Type: gif Splitting Notes.gif (32.0 KB, 162 views)
lucor is offline   Reply With Quote
Old 09-22-2019, 03:37 AM   #16
lucor
Human being with feelings
 
Join Date: Jan 2016
Posts: 65
Default

What I'm still missing from the way how this works in Cubase is that in Cubase it automatically deselects the left part of the split chord/notes while in REAPER everything stays selected.
I guess if you had an action that "deselects all selected notes that are left of the cursor", one could make a custom action with "Edit: Split Notes" and the deselection action and assign that to the mouse modifier instead. But I haven't yet found an action that does something like this.
lucor is offline   Reply With Quote
Old 09-22-2019, 05:11 AM   #17
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by lucor View Post
Coming from Cubase I also struggled with this. The best solution I found is to assign "Edit: Split notes" under "Mouse Modifiers -> MIDI Piano Roll" to Alt + Left Click.
The trick then is that you then have to click the 'background' instead of the note itself to make it work. Took a bit of getting used to but works great for me.
If you assign it to the "MIDI Note" context too, you can run it by clicking on a note.
juliansader is offline   Reply With Quote
Old 09-22-2019, 05:14 AM   #18
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by _Stevie_ View Post
I can so relate to that. The issue is, that Reaper does not intelligently differentiate between selected notes and non selected notes.

The workflow would be the following:
- if notes are selected under the mouse cursor, split only the selected notes
- if there is no note selection under the mouse, split ALL notes under the mouse
This is exactly how the "Split notes" action works! If *no* notes are selected, it splits all of them. If any are selected, it splits only the selected ones.
juliansader is offline   Reply With Quote
Old 09-22-2019, 05:16 AM   #19
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

LOL, you are right, thanks!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 09-22-2019, 05:23 AM   #20
lucor
Human being with feelings
 
Join Date: Jan 2016
Posts: 65
Default

Quote:
Originally Posted by juliansader View Post
If you assign it to the "MIDI Note" context too, you can run it by clicking on a note.
I tried that, but if I click on the note directly it will only split that note, not all of them.
lucor is offline   Reply With Quote
Old 09-23-2019, 04:30 AM   #21
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

Quote:
Originally Posted by lucor View Post
Coming from Cubase I also struggled with this. The best solution I found is to assign "Edit: Split notes" under "Mouse Modifiers -> MIDI Piano Roll" to Alt + Left Click.
The trick then is that you then have to click the 'background' instead of the note itself to make it work. Took a bit of getting used to but works great for me.
Lucor you legend. This works a treat - as you said it takes some getting used to, but that's not a problem - I understand that different DAW's require different approaches and that's fine, it's only when one approach is slowing me down that it becomes an inconvenience. Once you do get used to this method it's just as quick as Cubase - quicker even, as you don't need to move the cursor over to a note first. I absolutely would never have thought of this method - so thank you.

Allow me to repay the favour - you can assign your note split modifier to the script 'me2beats_Split notes (select right).lua'. It will then work like Cubase, leaving only the right hand notes selected. I just tested it with your splitting method and it works pretty well - If you have earlier notes selected that aren't in the split area then it won't unselect those when it selects the next notes, but if you only have the notes selected that you are actually splitting, then it works perfectly, and that small issue hasn't affected the functionality for me. I also have a custom action that does the same when splitting items in the arrange window. I've attached a pic if you're interested. You can also modify that to ignore snap and assign that to another modifier, very useful... speaking of which -

The only thing that would make the midi split perfect now is if I could make a copy of the same split note modifier but ignoring snap. I tried a custom action but there is no 'ignore snap' or 'snap off' in the midi editor shortcuts for me to combine. Does anyone know if there's a simple tweak I can make to the me2beats script above to have it ignore snap?

Julian - Thank you, that was actually the first thing I tried IIRC, and as lucor said it only ever acts on the note you click on - the note selection seems to reset on click like Stevie mentioned, which I guess is understandable behaviour. I wonder how difficult it would be for the devs to make it possible for a modifier to override this behaviour though. As I said, I have the same same set of split modifier shortcuts set up for the main arrange window, and it all works as expected (only splits selected items at mouse cursor point, follows snap if on, selects right after splitting), so I'd hope it wouldn't be too tricky... having said that Stevie says your suggestion worked for him too, so maybe Lucor and I are doing something wrong?

For instance - say we're using alt-click as a split modifier, but also assigning alt-drag to certain other functions, then maybe the alt-drag function could be doing something to override the alt-click before it happens, resetting the selection and causing our issue... just a thought. Is it definitely working as described for you guys? Or is the note selection resetting on click?
Attached Images
File Type: png item split select right.png (18.7 KB, 169 views)
Joe90 is offline   Reply With Quote
Old 09-23-2019, 06:08 AM   #22
lucor
Human being with feelings
 
Join Date: Jan 2016
Posts: 65
Default

Quote:
Originally Posted by Joe90 View Post
Allow me to repay the favour
Ohhh, me2beats' scripts completely went past me, hence why I missed that script. There seem to be a lot of gems in there, and "Split Notes (Select Right)" works perfectly for me! Thank you!
lucor is offline   Reply With Quote
Old 09-23-2019, 06:32 AM   #23
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by Joe90 View Post
Julian - Thank you, that was actually the first thing I tried IIRC, and as lucor said it only ever acts on the note you click on - the note selection seems to reset on click like Stevie mentioned, which I guess is understandable behaviour. I wonder how difficult it would be for the devs to make it possible for a modifier to override this behaviour though.
Strange that it doesn't work for you and Lucor. Here on my system, it doesn't change selection, and affects all notes (depending on whether they are selected). I checked on the newest dev version as well as the standard release version, Windows and Linux, and both worked fine. I wonder if you have some customized mouse modifiers that may be interfering with this one? (It has been reported before that some of REAPER's mouse modifiers interfere with each other.)
juliansader is offline   Reply With Quote
Old 09-25-2019, 03:06 PM   #24
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

Quote:
Originally Posted by juliansader View Post
Strange that it doesn't work for you and Lucor. Here on my system, it doesn't change selection, and affects all notes (depending on whether they are selected). I checked on the newest dev version as well as the standard release version, Windows and Linux, and both worked fine. I wonder if you have some customized mouse modifiers that may be interfering with this one? (It has been reported before that some of REAPER's mouse modifiers interfere with each other.)
That is strange... when I get some downtime I'll experiment and see if I can figure it out. I get the same behaviour on the latest version and the dev version too... I also think it's probably a different modifier assigned to the same key causing interference.
Joe90 is offline   Reply With Quote
Old 10-31-2019, 07:21 PM   #25
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 853
Default

I'm back bumping this thread as I've realised recently when using this script 'me2beats_Split notes (select right).lua' for splitting notes across multiple midi parts, it is not splitting them all, only the 'top' layer of notes (i.e whatever was last selected when you opened the multiple midi parts). The standard 'split notes' function works correctly, but I really prefer the 'select right' behaviour when splitting, it feels much more intuitive to me.

Anyone know if there's a tweak I can make to this script so it works on all selected midi parts, or if me2beats is still active on this forum?

Thanks.
Joe90 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.