Thread: Notation API
View Single Post
Old 06-02-2017, 12:29 AM   #33
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by reddiesel41264 View Post
Digging up an old thread but it seems like the appropriate place for my question - what should I put for bytestr in the reaper.MIDI_InsertTextSysexEvt function in order to insert a dynamic marking?

Thanks
The API help is bit incomplete:
Quote:
Lua: boolean reaper.MIDI_InsertTextSysexEvt(MediaItem_Take take, boolean selected, boolean muted, number ppqpos, integer type, string bytestr)

Insert a new MIDI text or sysex event. Allowable types are -1:sysex (msg should not include bounding F0..F7), 1-7:MIDI text event types.
REAPER uses a non-standard "type" for its notation text events, namely 0x0F, which is not mentioned in the help.

To find the appropriate bytestr for a notation text event, insert the notation the usual way, and then View -> Raw MIDI data.

In the case of the dynamic marker fff, for example, the code would be:
Code:
reaper.MIDI_InsertTextSysexEvt(take, selected, muted, ppqpos, 0x0F, "TRAC dynamic fff")
juliansader is offline   Reply With Quote