|
|
|
10-04-2019, 03:04 PM
|
#1
|
Human being with feelings
Join Date: May 2016
Posts: 681
|
'smart' cut of midi items possible?
Hi,
Is it possible to read out the positon of the cursor in an item and the length of Midi notes left and right from the cursor in a script? I asked myself if it is possible to write a 'smart' cut function for midi items, deleting the small chunks left and right of the cursor (see attached pict)?
|
|
|
10-04-2019, 04:06 PM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
yes it is possible. You can get midi content of midi item independant of the contect (arrange view, midi editor etc)
|
|
|
10-05-2019, 01:08 AM
|
#3
|
Human being with feelings
Join Date: May 2016
Posts: 681
|
Quote:
Originally Posted by X-Raym
yes it is possible. You can get midi content of midi item independant of the contect (arrange view, midi editor etc)
|
Thanks for your answer!
So it would be possible to write a script which compares the length right and left of the cursor and delete the side which is shorter. Or delete one side if it falls under a certain length threshold or a certain percentage.
I'am willing to give a little bounty if someone is interested in writing such a script..
edit:
Before someone start working on that, in the german-speaking part of the forum solger delivered a script which does what I'am looking for
https://forum.cockos.com/showthread.php?t=225694 (in combination with other scripts)
Last edited by o_e; 10-05-2019 at 02:37 AM.
|
|
|
10-16-2019, 12:37 PM
|
#4
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
The first version of the Smart split MIDI item script bundle is now up on ReaPack.
After install the following scripts will be available in the [Main] sections of the Action List: - Script: solger_Smart split MIDI item (trim left note parts at cursor).lua
- Script: solger_Smart split MIDI item (trim right note parts at cursor).lua
- Script: solger_Smart split MIDI item (trim shorter note parts at cursor).lua
The threshold length value determining which (of the left, right or shorter) note parts will be trimmed can be adjusted inside the scripts via the noteLength und noteMultiplier parameters - by default all notes are trimmed.
|
|
|
10-16-2019, 04:47 PM
|
#5
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by solger
The first version of the Smart split MIDI item script bundle is now up on ReaPack.
After install the following scripts will be available in the [Main] sections of the Action List: - Script: solger_Smart split MIDI item (trim left note parts at cursor).lua
- Script: solger_Smart split MIDI item (trim right note parts at cursor).lua
- Script: solger_Smart split MIDI item (trim shorter note parts at cursor).lua
The threshold length value determining which (of the left, right or shorter) note parts will be trimmed can be adjusted inside the scripts via the noteLength und noteMultiplier parameters - by default all notes are trimmed.
|
Very nice Solger!!
I'm wondering if you could make it so that it doesn't open the MIDI Editor? The functionality is great but when splitting items in the arrange window, I don't want to be forced into the MIDI Editor. Is that possible?
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
10-17-2019, 12:30 PM
|
#6
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Quote:
Originally Posted by Thonex
I'm wondering if you could make it so that it doesn't open the MIDI Editor? The functionality is great but when splitting items in the arrange window, I don't want to be forced into the MIDI Editor. Is that possible?
|
Currently it's necessary for the script to work (correctly).
Not sure if it's possible otherwise, but I haven't had time yet to dig into this deeper since I wanted to get version 1.0 ready for release first
Last edited by solger; 10-17-2019 at 01:00 PM.
|
|
|
10-17-2019, 09:57 PM
|
#7
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by solger
Currently it's necessary for the script to work (correctly).
Not sure if it's possible otherwise, but I haven't had time yet to dig into this deeper since I wanted to get version 1.0 ready for release first
|
I totally get it may be necessary to have it open in order to call ME script commands, but maybe there's a way to (at the end of the script) : Get Active MIDI Focus and Close Active Window or similar or simply use the "Script: Archie_MidiEditor; Close Midi Editor.lua" .
Just brainstorming.
Thanks.
Cheers,
Andrew K
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
10-18-2019, 11:37 PM
|
#8
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Quote:
Originally Posted by Thonex
... but maybe there's a way to (at the end of the script) : Get Active MIDI Focus and Close Active Window or similar or simply use the "Script: Archie_MidiEditor; Close Midi Editor.lua" .
|
Thanks for the hint. I'll check out the 'close midi editor' script.
|
|
|
10-19-2019, 11:00 AM
|
#9
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Updated version 2.0 is now available
|
|
|
10-19-2019, 12:17 PM
|
#10
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by solger
Updated version 2.0 is now available
|
Ooooh... promised wife I'd clear out the garage... but tomorrow I'll give it a shot!! Thanks so much Solger!!
Cheers,
Andrew K
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
07-26-2020, 09:16 PM
|
#11
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
I will have a look at this... but a REALLY smart splitter would move the end of the left item to the right of the red-outlined notes-offs, and the beginning of the right item to the left of the red note-ons. That way the performance would be UNCHANGED by the split.
You would need some sort of preference to set just how far before or after the split-point to move things, of course (based on how far on top of the beat you like to play...)
|
|
|
07-28-2020, 12:30 AM
|
#12
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Quote:
Originally Posted by woodslanding
I will have a look at this... but a REALLY smart splitter would move the end of the left item to the right of the red-outlined notes-offs, and the beginning of the right item to the left of the red note-ons. That way the performance would be UNCHANGED by the split.
You would need some sort of preference to set just how far before or after the split-point to move things, of course (based on how far on top of the beat you like to play...)
|
Just to clarify to what you're referring to: can you please post screenshots showing a before-after (split) example.
|
|
|
07-31-2020, 09:17 PM
|
#13
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
Here you go. I did some more thinking about this, and concluded that, while notes ever so slightly before the beat should be included in the right item, any notes begun before the split, no matter how long, need to be included in the left item.
I think the correct amount to include notes before the split in the post-splitpoint item is 1/2 of the current quantize value... i.e., if you were to quantize them, they would move to the split point.
Screenshot below....
|
|
|
07-31-2020, 09:32 PM
|
#14
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
One more thing:
I think all other control events in the overlap zone could just go in the post-split item. (All bets off with MPE--That would be a much gnarlier script.)
I'm trying to decide if a sus-off (cc#64) should be treated as a note-off... i.e. if the sus pedal is down before the split, should the pedal release event be included in the left item??
Well, it's probably not crucial.... I imagine there are reasons to do it either way.
|
|
|
08-03-2020, 09:08 AM
|
#15
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Thanks for the screenshot and info.
At the moment I'm mainly busy with work. So I don't know yet when I have time to take a closer look at this.
I'll post here as soon as I have any info or updates.
|
|
|
08-03-2020, 01:08 PM
|
#16
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
of course, no hurry no worry.... be nice, but not at the top of my wishlist by any means
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:33 AM.
|