I wrote script for adding notes with velocity 127.
PHP Code:
velocity = 127
midieditor = reaper.MIDIEditor_GetActive()
take = reaper.MIDIEditor_GetTake(midieditor)
reaper.MIDIEditor_OnCommand(midieditor, 40001)
windowOut, segmentOut, detailsOut = reaper.BR_GetMouseCursorContext()
identifier, inlineEditorOut, noteRowOut, ccLaneOut, ccLaneValOut, ccLaneIdOut = reaper.BR_GetMouseCursorContext_MIDI()
position_temp = reaper.BR_GetMouseCursorContext_Position()
position = reaper.SnapToGrid(0, position_temp)
retval, notecntOut, ccevtcntOut, textsyxevtcntOut = reaper.MIDI_CountEvts(take)
for i = 1, notecntOut do
retval, selectedOut, mutedOut, startppqposOut, endppqposOut, chanOut, pitchOut, velOut = reaper.MIDI_GetNote(take, i-1)
note_position = reaper.MIDI_GetProjTimeFromPPQPos(take, startppqposOut)
if note_position == position and pitchOut == noteRowOut then
reaper.MIDI_SetNote(take, i-1, selectedOut, mutedOut, startppqposOut, endppqposOut, chanOut, pitchOut, velocity, false)
end
end
reaper.MIDI_Sort(take)
When I put this as an action to Mouse modifiers/MIDI Piano roll/left click, it moves edit cursor.