|
|
|
01-01-2019, 11:56 PM
|
#1
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Step sequencing: How do you fix errors quickly?
I'm pretty fast at step sequencing using one hand on my midi keyboard and my other on the computer keyboard...until I make a mistake. Then I have to move to the mouse to delete the mistake (I can't just hit delete because step sequencing keeps *all* notes entered selected - hitting delete would delete everything, not just the last note or chord) and then move the record arrow back a step to set myself up to try again. It would be nice if I could create a custom action to do all of that and bind it to something like the backspace key. Anyone have any tips?
|
|
|
01-02-2019, 03:36 AM
|
#2
|
Human being with feelings
Join Date: Feb 2018
Posts: 121
|
I'm not sure and am not at my computer to check first, but have you taken a look thru the reaPack repositories? Type "previous midi note" in the actions list and/or reaPack filter input and I'd imagine there's something already there.
|
|
|
01-02-2019, 07:50 AM
|
#3
|
Human being with feelings
Join Date: Dec 2014
Posts: 371
|
Does undo not work in this scenario?
|
|
|
01-02-2019, 11:57 AM
|
#4
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Quote:
Originally Posted by preferred.nomenclature
Does undo not work in this scenario?
|
No. You have to hit undo once for each note in the chord, and undo does not move the edit cursor back. You have to do that separately.
Quote:
I'm not sure and am not at my computer to check first, but have you taken a look thru the reaPack repositories? Type "previous midi note" in the actions list and/or reaPack filter input and I'd imagine there's something already there.
|
I already did this and none of them helped.
The only thing I've managed to do so far is assign the following extremely dangerous workaround to a hotkey:
Custom action
Navigate: Move edit cursor left by grid
Script: spk77_Select all MIDI notes and events right of cursor
Edit: Delete notes
|
|
|
01-11-2019, 01:34 AM
|
#5
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Any other thoughts on this?
|
|
|
01-11-2019, 05:18 AM
|
#6
|
Human being with feelings
Join Date: Dec 2014
Posts: 371
|
What’s dangerous about your custom action, is it that there might be notes to the right which you don’t want to delete?
|
|
|
01-11-2019, 01:46 PM
|
#7
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Quote:
Originally Posted by preferred.nomenclature
What’s dangerous about your custom action, is it that there might be notes to the right which you don’t want to delete?
|
Yes, exactly.
|
|
|
01-11-2019, 02:00 PM
|
#8
|
Human being with feelings
Join Date: Dec 2014
Posts: 371
|
So replacing "Select all notes right of cursor" with a "Deselect all notes left of cursor" would pretty much do the trick right?
|
|
|
01-11-2019, 09:43 PM
|
#9
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Quote:
Originally Posted by preferred.nomenclature
So replacing "Select all notes right of cursor" with a "Deselect all notes left of cursor" would pretty much do the trick right?
|
Yes it would.
Unfortunately that's not a built in function and I cannot find anything like that in ReaPack or with a google search. Anyone want to code it up?
I looked at spk77's script "spk77_Select all MIDI notes and events right of cursor" and it looks like the way it works is first it unselects everything and then it selects everything to the right of the cursor, so it is not easily modified to deselect notes.
|
|
|
01-12-2019, 08:33 AM
|
#10
|
Human being with feelings
Join Date: Dec 2014
Posts: 371
|
Not sure how soon I’ll get around to it but I can give it a shot
|
|
|
01-12-2019, 08:44 AM
|
#11
|
Human being with feelings
Join Date: Dec 2014
Posts: 371
|
On my phone but I just took a look at the spk script, if you delete the line deselecting all notes, change every instance of start >= cursor_ppq_pos to end <= cursor_ppq_pos and every instance of (take, i, 1 to (take, i , 0 that oughta do it I think.
|
|
|
01-20-2019, 08:31 PM
|
#12
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Quote:
Originally Posted by preferred.nomenclature
On my phone but I just took a look at the spk script, if you delete the line deselecting all notes, change every instance of start >= cursor_ppq_pos to end <= cursor_ppq_pos and every instance of (take, i, 1 to (take, i , 0 that oughta do it I think.
|
Finally got around to trying this out.
This works. Thank you!
I can program in python but I have no idea how .eel scripting works and I don't know the Reaper API so you've been a gigantic help.
I ended up creating scripts based on your advice, which I called "Deselect all notes and events left of edit cursor" and "Deselect all notes and events right of edit cursor."
Then I made the following custom action and assigned it to Backspace:
Deselect all notes and events right of edit cursor
Navigate: Move edit cursor left by grid
Deselect all notes and events left of cursor
Edit: Delete notes
This should be pretty solid!
|
|
|
01-26-2019, 01:08 AM
|
#13
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
Found an issue, obvious in retrospect: This only allows for one backspace.
Maybe if I stored all the selected notes in an array before the third step and then re-selected them after the fourth step. I guess in order to do that the third and forth step would need to be combined into one script.
|
|
|
01-26-2019, 06:21 AM
|
#14
|
Human being with feelings
Join Date: Dec 2014
Posts: 371
|
I think a combo action of...
Navigate: Move edit cursor left by grid
Script: (Dex) Delete selected notes at edit cursor
... would be the most straightforward way to implement this. I bet you can figure out how to write the script by looking at other MIDI scripts that do things with notes at the edit cursor. I recommend sticking with Lua as it’s “built-in”, but Reaper does have a Python API as well. There are Reaper Syntax higlighting packages for Sublime Text and VSCode that are super helpful too.
https://www.reaper.fm/sdk/reascript/reascripthelp.html
|
|
|
01-27-2019, 11:56 AM
|
#15
|
Human being with feelings
Join Date: Sep 2017
Posts: 518
|
That works. I decided to write it in eel. I wish there were a bit more documentation and I had some trouble figuring out what the basic control structure syntax was but in the end I figured it out. Here it is:
Script: (Dex) Delete selected notes at edit cursor.eel
Code:
function Main()
local(take, cursor_ppq_position, notes, ccs, sysex, i, countleft, coutnupto, sel, muted, start, end, chan, pitch, vel, out)
(
(take = MIDIEditor_GetTake(MIDIEditor_GetActive())) ? (
MIDI_sort(take);
cursor_ppq_position = MIDI_GetPPQPosFromProjTime(take, GetCursorPosition());
notes = MIDI_CountEvts(take,notes,ccs,sysex);
i=0;
countleft=0;
countupto=0;
loop(notes,
MIDI_GetNote(take, i, sel, muted, start, end, chan, pitch, vel);
start < cursor_ppq_position ?
(
countleft += 1;
);
start <= cursor_ppq_position ?
(
countupto +=1;
);
i+=1;
);
//ShowConsoleMsg( sprintf(#out,"%d %d %d ;",i,countleft,countupto));
//MIDI_DeleteNote updates remaining note indexes too
i=0;
loop(countupto-countleft,
MIDI_GetNote(take, countleft+i, sel, muted, start, end, chan, pitch, vel);
//ShowConsoleMsg( sprintf(#out,"%d !",sel));
sel ? (
MIDI_DeleteNote(take, countleft+i);
)
:
(
i+=1;
);
);
MIDI_sort(take);
);
Undo_OnStateChange("Delete selected notes at cursor");
);
main();
|
|
|
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 06:30 PM.
|