Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

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: 12,096
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 offline   Reply With Quote
Old 05-19-2017, 08:10 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
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: 12,096
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 offline   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 06:20 AM.


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