|
|
|
07-01-2016, 02:44 AM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
MIDI editor: Fast, native action to remove redundant CCs [DONE in scripts!]
REAPER lacks a built-in function to remove redundant CCs. This issue regularly pops up on this forum (for example, Multi-part MIDI CC editing woes) as well as on other forums (for example on KVR, What makes a DAW's midi editor good?).
spk77 as well as myself have written EEL or Lua scripts to remove redundant CCs ( here and here). The problem is that these scripts are very, very slow when analyzing large numbers of CCs. The problem is discussed in the thread MIDI resolution adjustments possible?. I have tried various tricks to improve the speed, but no luck.
This basic functionality need not be so slow, as demonstrated by DarkStar's Jesusonic FX Remove Redundant CCs, which can analyze an entire song's CCs in an eyeblink. In the time that it takes for the Lua scripts to analyse a single CC lane, the user can go through the entire process of 1) adding the JS script as a take FX, 2) run "Apply take/track FX as a new take (MIDI output)", 3) delete the original take and 4) open the new take in the MIDI editor.
It seems to me that, to get a proper Remove Redundancies action for the MIDI editor, Cockos will need to code a native version.
Last edited by juliansader; 11-16-2016 at 06:34 PM.
|
|
|
07-01-2016, 05:15 AM
|
#2
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,681
|
+1
But given that the Lua script is based on my JS FX script, why would it be that much slower?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
07-01-2016, 05:26 AM
|
#3
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
OMFG YES.
Better yet, have it work automatically - just don't allow drawing same consecutive CC values. Or when recording CCs - same thing.
We have it for recording automation... so why not CCs as well?
|
|
|
07-01-2016, 05:50 AM
|
#4
|
Human being with feelings
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
|
Quote:
Originally Posted by EvilDragon
OMFG YES.
Better yet, have it work automatically - just don't allow drawing same consecutive CC values. Or when recording CCs - same thing.
We have it for recording automation... so why not CCs as well?
|
I've been thinking about this for a while now, that would be ideal. An auto-throttle like it prevents you from dupe CC values or at the very least one quick native way to wipe 'em out!
__________________
47.8% of statistics are made up.
|
|
|
07-01-2016, 06:17 AM
|
#5
|
Human being with feelings
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 22,754
|
+1 and some! One of the things I have been missing all along.
__________________
Ici on parles Franglais
|
|
|
07-01-2016, 07:01 AM
|
#6
|
Human being with feelings
Join Date: Aug 2015
Posts: 3,672
|
Quote:
Originally Posted by EvilDragon
just don't allow drawing same consecutive CC values. Or when recording CCs - same thing.
|
as option. i need the ability to draw/record in the same consecutive ccs for other midi software that needs them, where ccs are behaving as mode switchers, status updates, etc rather than conventional "control changes"
|
|
|
07-01-2016, 07:29 AM
|
#7
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
You'd still be able to do that by inserting individual CCs. What I'm talking about would only affect mouse DRAG actions (so, drawing linear ramps, etc.)
|
|
|
07-01-2016, 08:25 AM
|
#8
|
Human being with feelings
Join Date: Jan 2010
Location: Kalispell
Posts: 14,759
|
Quote:
Originally Posted by EvilDragon
Better yet, have it work automatically - just don't allow drawing same consecutive CC values. Or when recording CCs - same thing.
|
There's one big problem with this ED.
When I add CCs, like CC7-volume, I'll draw in the CCs freehand for a section of notes. Sometimes I'll try to draw in what I think it should be, and sometimes I'll just draw in a straight bunch of CCs. Either way, I'm probably going to have to reshape it, using shift drag.
If redundant CCs are automatically eliminated, I could very well end up without enough CCs to edit.
The only way around this is if CCs were actually drawn with shift drag. If I remember correctly, I think that's the way Sonar did it.
|
|
|
07-01-2016, 09:37 AM
|
#9
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
Yes, exactly, shift+drag is what I'd do in that case, which draws CCs without snap by default. So it'd just overwrite the CCs with a new (CC-thinned and dupe-removed) stream.
|
|
|
07-01-2016, 11:55 AM
|
#10
|
Human being with feelings
Join Date: Jan 2010
Location: Kalispell
Posts: 14,759
|
Quote:
Originally Posted by EvilDragon
Yes, exactly, shift+drag is what I'd do in that case, which draws CCs without snap by default. So it'd just overwrite the CCs with a new (CC-thinned and dupe-removed) stream.
|
Hi ED, are you saying you can draw CCs with Shift-Left-Drag?
Or do you mean that would have to be incorporated?
I can't do that and I can't find a mouse modifier that will do that?
|
|
|
07-01-2016, 12:10 PM
|
#11
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Tod
Hi ED, are you saying you can draw CCs with Shift-Left-Drag?
Or do you mean that would have to be incorporated?
I can't do that and I can't find a mouse modifier that will do that?
|
ED is referring to the "Draw/edit CC events ignoring snap and selection" behavior, which can be linked to the shift+leftdrag modifier.
|
|
|
07-01-2016, 12:17 PM
|
#12
|
Human being with feelings
Join Date: Jan 2010
Location: Kalispell
Posts: 14,759
|
Quote:
Originally Posted by juliansader
ED is referring to the "Draw/edit CC events ignoring snap and selection" behavior, which can be linked to the shift+leftdrag modifier.
|
Thanks Julian, but I think that's just going to do what Left-Drag does now, I don't think it's going to ramp them which is important.
|
|
|
07-01-2016, 01:12 PM
|
#13
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by DarkStar
+1
But given that the Lua script is based on my JS FX script, why would it be that much slower?
|
It is actually spk77's EEL script that is based on the JS script, but I think that it is only loosely based, since the EEL script first finds all the redundancies without deleting them, and then asks user confirmation before proceeding to deletion, whereas the JS FX seems to delete/block redundant CCs one-by-one in realtime as it receives them.
In the Lua script, finding the redundant CCs is quick, but deleting them is painfully slow. Even just moving them out of the way with MIDI_SetNote (and NoSort=true) is very slow. It is this critical slow part that differs between the EEL/Lua scripts and the JS script.
I am not familiar with JS scripting, so I do not know how your script deletes or stops the redundant CCs, but I guess that REAPER's rendering of new MIDI in the arrange view is somehow much faster than re-indexing existing MIDI in the MIDI editor.
Quote:
Originally Posted by Tod
If redundant CCs are automatically eliminated, I could very well end up without enough CCs to edit.
|
Indeed. It would be great if redundant CCs could be eliminated automatically, but it must be optional, similar to the "Correct overlapping notes while editing" option that can be switched on or off.
Quote:
Originally Posted by Tod
Thanks Julian, but I think that's just going to do what Left-Drag does now, I don't think it's going to ramp them which is important.
|
Alas, yes, REAPER does not have a modifier that draws new CCs while ramping (which is why I had to write the Draw ramp script).
|
|
|
07-01-2016, 01:41 PM
|
#14
|
Human being with feelings
Join Date: Jan 2010
Location: Kalispell
Posts: 14,759
|
Quote:
Originally Posted by juliansader
Alas, yes, REAPER does not have a modifier that draws new CCs while ramping (which is why I had to write the Draw ramp script).
|
Alright Julian, very interesting and I'll take a look at this. It's looks rather complicated but I'll give it a try when I get some time.
|
|
|
11-16-2016, 06:34 PM
|
#15
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
I finally figured out how to make Lua MIDI scripts as fast as native functions!
New versions of the Remove Redundant CCs scripts have been uploaded to ReaPack:
js_Remove redundant CCs (from selected events in lane under mouse).lua
js_Remove redundant CCs (from selected events in last clicked lane).lua
js_Remove redundant CCs.lua
(Please let me know if there are any bugs.)
|
|
|
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 04:48 PM.
|