 |
|
|
11-23-2020, 04:42 AM
|
#1
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 9,789
|
Pedal off when midi split
It would be nice to have an option that when you split a midi item that any pedal ons get a pedal off at the end of the split. I get LOTS of sustained midi notes from splitting midi and I have to go back and draw the pedal offs on them all. Any work arounds ?
Is there a way to write a script that makes sure all midi items with 64 Pedal Hold data have an off with each on ?
Before split
After Split
|
|
|
11-23-2020, 09:46 AM
|
#2
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 2,997
|
It seems sustain off should be copied over to end of previous item, then deleting next item, same for note off's.
Shifting of off events to end of previous item.
Not sure if there is already any such or similar script?
|
|
|
11-23-2020, 11:01 AM
|
#3
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 9,789
|
I agree. I wonder if anyone knows how to write a script to do it. Then I could put it in a custom action for splits.
|
|
|
11-26-2020, 06:58 AM
|
#4
|
Human being with feelings
Join Date: Nov 2011
Posts: 41
|
Quote:
Originally Posted by Coachz
I agree. I wonder if anyone knows how to write a script to do it. Then I could put it in a custom action for splits.
|
Here's a script that works for me. It's very crude and it's definitely not fault-proof but it does the trick. It splits the selected item at edit cursor and inserts a CC64 Off message a few pixels before the split point in the left item. It requires SWS and mpl's scripts.
I don't know (yet) if Reaper assigns different ID identifier's for custom actions and user scripts to different users. If that's the case, substitute the parameter in the reaper.NamedCommandLookup() function for the ID which shows up in your action list (MIDI Editor actions) for "mpl_Add CC64 off to channel 0 of active MIDI Editor take".
Code:
-- credits to mpl for his "mpl_Add CC64 off to channel 0 of active MIDI Editor take"
function main()
reaper.Main_OnCommand(40759, 0) -- Item: Split items at edit cursor (select right)
reaper.Main_OnCommand(40006, 0) -- Item: Remove items
reaper.Main_OnCommand(40104, 0) -- View: Move cursor left one pixel
reaper.Main_OnCommand(40104, 0) -- View: Move cursor left one pixel
reaper.Main_OnCommand(40104, 0) -- View: Move cursor left one pixel
selitem = reaper.NamedCommandLookup("_XENAKIOS_SELITEMSUNDEDCURSELTX")
reaper.Main_OnCommand(selitem, 0)
reaper.Main_OnCommand(40153, 0) -- Item: Open in built-in MIDI editor (set default behavior in preferences)
actmidieditor = reaper.MIDIEditor_GetActive()
idofpedaloff = reaper.NamedCommandLookup("_RS7d3c_d030d666f7decf53fd1dee3680ec2d970b916137") -- MIDI Editor: mpl_Add CC64 off to channel 0 of active MIDI Editor take.lua
reaper.MIDIEditor_OnCommand(actmidieditor, idofpedaloff)
reaper.MIDIEditor_OnCommand(actmidieditor, 2) -- File: Close window
reaper.Main_OnCommand(40319, 0) -- Item navigation: Move cursor right to edge of item
reaper.UpdateArrange()
end
script_title = "Script: BenjyO_Split MIDI item at edit cursor and add CC64 Off-message a few pixels before.lua"
reaper.Undo_BeginBlock()
main()
reaper.Undo_EndBlock(script_title, 0)
Hope this helps somehow.
|
|
|
11-26-2020, 07:25 AM
|
#5
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 9,789
|
Quote:
Originally Posted by BenjyO
Here's a script that works for me. It's very crude and it's definitely not fault-proof but it does the trick. It splits the selected item at edit cursor and inserts a CC64 Off message a few pixels before the split point in the left item. It requires SWS and mpl's scripts.
I don't know (yet) if Reaper assigns different ID identifier's for custom actions and user scripts to different users. If that's the case, substitute the parameter in the reaper.NamedCommandLookup() function for the ID which shows up in your action list (MIDI Editor actions) for "mpl_Add CC64 off to channel 0 of active MIDI Editor take".
Code:
-- credits to mpl for his "mpl_Add CC64 off to channel 0 of active MIDI Editor take"
function main()
reaper.Main_OnCommand(40759, 0) -- Item: Split items at edit cursor (select right)
reaper.Main_OnCommand(40006, 0) -- Item: Remove items
reaper.Main_OnCommand(40104, 0) -- View: Move cursor left one pixel
reaper.Main_OnCommand(40104, 0) -- View: Move cursor left one pixel
reaper.Main_OnCommand(40104, 0) -- View: Move cursor left one pixel
selitem = reaper.NamedCommandLookup("_XENAKIOS_SELITEMSUNDEDCURSELTX")
reaper.Main_OnCommand(selitem, 0)
reaper.Main_OnCommand(40153, 0) -- Item: Open in built-in MIDI editor (set default behavior in preferences)
actmidieditor = reaper.MIDIEditor_GetActive()
idofpedaloff = reaper.NamedCommandLookup("_RS7d3c_d030d666f7decf53fd1dee3680ec2d970b916137") -- MIDI Editor: mpl_Add CC64 off to channel 0 of active MIDI Editor take.lua
reaper.MIDIEditor_OnCommand(actmidieditor, idofpedaloff)
reaper.MIDIEditor_OnCommand(actmidieditor, 2) -- File: Close window
reaper.Main_OnCommand(40319, 0) -- Item navigation: Move cursor right to edge of item
reaper.UpdateArrange()
end
script_title = "Script: BenjyO_Split MIDI item at edit cursor and add CC64 Off-message a few pixels before.lua"
reaper.Undo_BeginBlock()
main()
reaper.Undo_EndBlock(script_title, 0)
Hope this helps somehow.
|
Thanks so much. I can't wait to try it. How is it someone as smart as you only has 30 posts?
|
|
|
11-26-2020, 12:57 PM
|
#6
|
Human being with feelings
Join Date: Nov 2011
Posts: 41
|
Quote:
Originally Posted by Coachz
Thanks so much. I can't wait to try it. How is it someone as smart as you only has 30 posts?
|
Say that I'm smart only after you've tried it and it works
I appreciate the compliment though
|
|
|
Thread Tools |
|
Display Modes |
Hybrid 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 07:29 AM.
|