 |
|
|
09-18-2023, 11:15 AM
|
#1
|
Human being with feelings
Join Date: Nov 2022
Posts: 8
|
Selecting MIDI items containing a note under edit cursor
Hey!
I'm looking for an action that would do something along the lines of this script:
https://forums.cockos.com/showthread.php?t=212275
...but would only select the MIDI items under the edit cursor that contain a note at the location of the edit cursor.
Is that possible? I included a piece of Paint art to illustrate what I mean :P
Thanks !
|
|
|
09-18-2023, 04:47 PM
|
#2
|
Human being with feelings
Join Date: Oct 2018
Posts: 156
|
not exactly what you requested, however perhaps you'll be able to make some headway with this one...
Script: BirdBird_Select notes aligned with mouse (Vertical).lua
the command works within the midi editor (haven't tried from tcp)
if you don't see this command in the action list, make sure you have midi selected (top right of action list window)
if you still don't see it, you may need to install via reapack.
hth. cheers.
|
|
|
09-18-2023, 06:28 PM
|
#3
|
Human being with feelings
Join Date: Jan 2019
Location: China
Posts: 558
|
It shouldn't be difficult to implement this using scripts, but I'm a bit curious about what functionality is being implemented?
|
|
|
09-18-2023, 06:55 PM
|
#4
|
Human being with feelings
Join Date: Jan 2019
Location: China
Posts: 558
|
Create a new script in the action list and paste the following code.
Code:
CursorPos = reaper.GetCursorPosition()
reaper.SelectAllMediaItems(0, false)
itemidx = 0
item = reaper.GetMediaItem(0, itemidx)
while item do
take = reaper.GetTake(item, 0)
if reaper.TakeIsMIDI(take) then
reaper.MIDI_DisableSort(take)
noteidx = 0
retval, notecnt, ccevtcnt, textsyxevtcnt = reaper.MIDI_CountEvts(take)
PPQPos = reaper.MIDI_GetPPQPosFromProjTime(take, CursorPos)
while noteidx < notecnt do
retval, selected, muted, startppqpos, endppqpos, chan, pitch, vel = reaper.MIDI_GetNote(take, noteidx)
if startppqpos <= PPQPos and endppqpos > PPQPos then
reaper.SetMediaItemSelected(item, true)
break
end
noteidx = noteidx + 1
end
reaper.MIDI_Sort(take)
end
itemidx = itemidx + 1
item = reaper.GetMediaItem(0, itemidx)
end
|
|
|
09-18-2023, 07:22 PM
|
#5
|
Human being with feelings
Join Date: Nov 2022
Posts: 8
|
Wow, looking forward to trying this out tomorrow morning!
It's to help me manage working with a fairly large orchestral template, working with a single MIDI editor view showing multiple tracks/items at the same time. Sometimes I have sections with only a few instruments playing out of a complete orchestral template, and it can be hard to identify which notes shown are from which track/instrument - especially when there are doublings (overlapping notes from different tracks/instruments). If I can select from a specific location, from the currently shown track/items only the ones with notes under the cursor, that would leave me with only the used instruments selected and I figure it becomes a viable workflow to identify what's going on in a specific section of the piece.
Thanks boolin and dangguidan! I should get back here with some news about the results tomorrow.
|
|
|
09-19-2023, 04:26 AM
|
#6
|
Human being with feelings
Join Date: Aug 2015
Posts: 3,600
|
excellent script request, this will be so useful on big projects, especially when we come back to them after a long time away...thanks to both requester and implementer
|
|
|
09-19-2023, 07:45 AM
|
#7
|
Human being with feelings
Join Date: Nov 2022
Posts: 8
|
Well, holy crap. This is a game-changer. I've yet to spend serious time working with it, but at first glance this seems like it does exactly what I was talking about. Thank you SO MUCH dangguidan! I'll have a look at the rest of your script repository, too.
|
|
|
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 08:34 AM.
|