|
|
|
05-22-2019, 11:36 AM
|
#1
|
Human being with feelings
Join Date: May 2018
Posts: 71
|
rule based MIDI editing / selection
Are there general tools for MIDI editing that allow arbitrary editing, or at least selection based on note characteristics?
For example things like:
* Select all notes less than 1/32 in length
* Set all velocities below 22 to 35 (for selected notes)
* select all notes below C3 with velocities larger than 70
* quantise all notes above A4 with durations less than 1/16
you get the idea.
I'm not looking for custom actions to do these things but rather some sort of control panel that allows such rules to be set on the fly and applied.
I'm open minded about the best way to achieve this, but at the moment I can't see any way to achieve these sorts of edits short of scripted custom actions for each one, which only makes sense for stuff that you do repeatedly.
|
|
|
05-22-2019, 12:55 PM
|
#2
|
Human being with feelings
Join Date: Nov 2007
Location: Lucas, TX, USA (via Luleå, Sweden)
Posts: 2,009
|
Much of what you're asking for can be achieved with the MIDI filter.
See page 231 of the current User Guide : https://www.reaper.fm/userguide/Reap...Guide5977g.pdf
__________________
Best Regards, Ernie "lunker" Lundqvist
BDSM (Bad Dog Studio Musicians)
Windows 10 running on Z390 + i7-8700
|
|
|
05-22-2019, 01:46 PM
|
#3
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by halfshavedyaks
I'm not looking for custom actions to do these things but rather some sort of control panel that allows such rules to be set on the fly and applied.
I'm open minded about the best way to achieve this, but at the moment I can't see any way to achieve these sorts of edits short of scripted custom actions for each one, which only makes sense for stuff that you do repeatedly.
|
Basic scripting is a bit more complex than Cubase's Logical Editor, for example, but once you have a little 10-line template script, is is just as fast to use as a control panel (and more powerful) -- and you don't need a new script for each action. The template script simply iterates through all notes and changes them, depending on some criteria.
* Instead of opening the control panel, open REAPER's script IDE (and you can keep it open in one corner of the screen).
* Instead of entering values in the panel, simply enter/replace the same values in the template script.
* Instead of clicking "OK" on the panel, click "Run" on the script IDE.
Want to select all notes with velocity below 22? Simply type "vel<22" and run. Want to select notes below C3 with velocities larger than 70? Type "pitch>60 and vel>70" and run.
|
|
|
05-22-2019, 04:23 PM
|
#4
|
Human being with feelings
Join Date: May 2018
Posts: 71
|
Quote:
Originally Posted by lunker
|
you are quite right - most of it can - I haven't done any serious midi in reaper for a long time and I'd forgotten it.
|
|
|
05-22-2019, 04:37 PM
|
#5
|
Human being with feelings
Join Date: May 2018
Posts: 71
|
Quote:
Originally Posted by juliansader
Basic scripting is a bit more complex than Cubase's Logical Editor, for example, but once you have a little 10-line template script, is is just as fast to use as a control panel (and more powerful) -- and you don't need a new script for each action. The template script simply iterates through all notes and changes them, depending on some criteria.
|
do you have such a template script? sounds like it would be a good start on scripting as well as useful in itself.
|
|
|
06-16-2019, 03:45 AM
|
#6
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Sorry, I forgot a bit about this thread. Here is an example of a script:
Code:
take = reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive())
item = reaper.GetMediaItemTake_Item(take)
reaper.MIDI_DisableSort(take)
countTotal, countNotes, countCCs, countSysex = reaper.MIDI_CountEvts(take)
for i = 0, countNotes-1 do
noteOK, selected, muted, startTick, endTick, channel, pitch, velocity = reaper.MIDI_GetNote(take, i)
-- CHANGE THESE LINES
if pitch > 60 then
selected = true
else
selected = false
end
-- UP TO HERE
reaper.MIDI_SetNote(take, i, selected, muted, startTick, endTick, channel, pitch, velocity, true)
end
reaper.MIDI_Sort(take)
reaper.Undo_OnStateChange_Item(0, "Logical editor: notes", item)
|
|
|
06-17-2019, 11:20 AM
|
#7
|
Human being with feelings
Join Date: May 2018
Posts: 71
|
thanks! that looks pretty useful. I will try it when i get some time.
examples of how to change events rather than just select them would also be useful, though doubtless that's in the scripting documentation somewhere.
|
|
|
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 07:25 AM.
|