Go Back   Cockos Incorporated Forums > REAPER Forums > JSFX and ReaScript Discussion

Reply
 
Thread Tools Display Modes
Old 05-17-2017, 10:35 AM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 6,957
Default (REQ) MIDI editor: 'Intelligent' toggle mute notes (under mouse) (DONE)

I imagine this script doing the following:

- If notes selected: toggle mute state (there's a native action for this)
- If no notes selected: toggle mute state for note under mouse

Is there something similar already or any takers for this maybe ?

Last edited by nofish; 05-20-2017 at 02:55 PM.
nofish is online now   Reply With Quote
Old 05-19-2017, 08:10 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 1,592
Default

Quote:
Originally Posted by nofish View Post
- If notes selected: toggle mute state (there's a native action for this)
I think you could use:
Code:
integer reaper.MIDI_EnumSelNotes(MediaItem_Take take, integer noteidx)

Returns the index of the next selected MIDI note after noteidx (-1 if there are no more selected events).
then run the action if that proves at least one note selected.

else:
Quote:
Originally Posted by nofish View Post
- If no notes selected: toggle mute state for note under mouse
Lokasenna has "delete note under mouse cursor" that could be modified, I think. I'm pretty sure there was another one floating around "select note under mouse cursor." But I don't know where it is.
FnA is offline   Reply With Quote
Old 05-20-2017, 02:54 PM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 6,957
Default

Thanks, with these hints it wasn't too hard to do.
Just using the shortcut key assigned to the script:



Available in my ReaPack repo.

edit:
In its current version this script shouldn't be used on overlapping notes (as these might get unintentionally extended).

Last edited by nofish; 05-21-2017 at 01:12 PM.
nofish is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.