ReaScript API

Generated by REAPER v5.0-dev


REAPER provides an API (advanced programming interface) for users and third parties to create extended functionality. API functions can be called from a compiled C/C++ dynamic library that is loaded by REAPER, or at run-time by user-created ReaScripts that can be written using REAPER's own editor.

ReaScripts can be written in EEL, a specialized language that is also used to write JSFX; Lua, a popular scripting language; or Python, another scripting language. EEL and Lua are embedded within REAPER and require no additional downloads or settings. Python must be downloaded and installed separately, and enabled in REAPER preferences.

Learn more about ReaScript: http://www.cockos.com/reaper/sdk/reascript/reascript.php.

View: [all] [C/C++] [EEL] [Lua] [Python]


ReaScript/EEL API

ReaScript/EEL scripts can call API functions using functionname().

Parameters that return information are effectively passed by reference, not value. If an API returns a string value, it will usually be as the first parameter.

Examples:
// function returning a single (scalar) value:
sec = parse_timestr("1:12");

// function returning information in the first parameter (function returns void):
GetProjectPath(#string);

// lower volume of track 3 by half:
tr = GetTrack(0, 2);
GetTrackUIVolPan(tr, vol, pan);
SetMediaTrackInfo_Value(tr, "D_VOL", vol*0.5);

ReaScript/EEL can import functions from other reascripts using @import filename.eel -- note that only the file's functions will be imported, normal code in that file will not be executed.

In addition to the standard API functions, Reascript/EEL also has these built-in functions available:

abs     fgets     gfx_drawnumber     gfx_setcursor     rand     strcpy_from    
acos     floor     gfx_drawstr     gfx_setfont     runloop     strcpy_substr    
asin     fopen     gfx_getchar     gfx_setimgdim     sign     stricmp    
atan     fprintf     gfx_getfont     gfx_setpixel     sin     strlen    
atan2     fread     gfx_getimgdim     gfx_showmenu     sleep     strncat    
atexit     freembuf     gfx_getpixel     gfx_transformblit     sprintf     strncmp    
ceil     fseek     gfx_gradrect     gfx_triangle     sqr     strncpy    
convolve_c     ftell     gfx_init     gfx_update     sqrt     strnicmp    
cos     fwrite     gfx_line     ifft     stack_exch     tan    
defer     get_action_context     gfx_lineto     invsqrt     stack_peek     tcp_close    
eval     gfx VARIABLES     gfx_loadimg     log     stack_pop     tcp_connect    
exp     gfx_arc     gfx_measurechar     log10     stack_push     tcp_listen    
extension_api     gfx_blit     gfx_measurestr     loop     str_delsub     tcp_listen_end    
fclose     gfx_blit     gfx_muladdrect     match     str_getchar     tcp_recv    
feof     gfx_blitext     gfx_printf     matchi     str_insert     tcp_send    
fflush     gfx_blurto     gfx_quit     max     str_setchar     tcp_set_block    
fft     gfx_circle     gfx_rect     memcpy     str_setlen     time    
fft_ipermute     gfx_deltablit     gfx_rectto     memset     strcat     time_precise    
fft_permute     gfx_dock     gfx_roundrect     min     strcmp     while    
fgetc     gfx_drawchar     gfx_set     printf     strcpy    


ReaScript/Lua API

ReaScript/Lua scripts can call API functions using reaper.functionname().

Some functions return multiple values. In many cases, some function parameters are ignored, especially when similarly named parameters are present in the returned values.

Examples:
-- function returning a single (scalar) value:
sec = reaper.parse_timestr("1:12")

-- function with an ignored (dummy) parameter:
path = reaper.GetProjectPath("")

-- lower volume of track 3 by half:
tr = reaper.GetTrack(0, 2)
ok, vol, pan = reaper.GetTrackUIVolPan(tr, 0, 0)
reaper.SetMediaTrackInfo_Value(tr, "D_VOL", vol*0.5)

ReaScript/Lua can import functions from other ReaScripts using require. If the files are not being found, it is probably a path problem (remember that lua paths are wildcard patterns, not just directory listings, see details here).

In addition to the standard API functions, Reascript/Lua also has these built-in functions available:

atexit     gfx.circle     gfx.getpixel     gfx.printf     gfx.setpixel     {reaper.array}.copy    
defer     gfx.deltablit     gfx.gradrect     gfx.quit     gfx.showmenu     {reaper.array}.fft    
get_action_context     gfx.dock     gfx.init     gfx.rect     gfx.transformblit     {reaper.array}.get_alloc    
gfx VARIABLES     gfx.drawchar     gfx.line     gfx.rectto     gfx.triangle     {reaper.array}.ifft    
gfx.arc     gfx.drawnumber     gfx.lineto     gfx.roundrect     gfx.update     {reaper.array}.multiply    
gfx.blit     gfx.drawstr     gfx.loadimg     gfx.set     new_array     {reaper.array}.resize    
gfx.blit     gfx.getchar     gfx.measurechar     gfx.setcursor     runloop     {reaper.array}.table    
gfx.blitext     gfx.getfont     gfx.measurestr     gfx.setfont     {reaper.array}.clear    
gfx.blurto     gfx.getimgdim     gfx.muladdrect     gfx.setimgdim     {reaper.array}.convolve    


ReaScript/Python API

python34.dll is installed.


ReaScript/Python requires a recent version of Python installed on this machine. Python is available from multiple sources as a free download. After installing Python, REAPER may detect the Python dynamic library automatically. If not, you can enter the path in the ReaScript preferences page, at Options/Preferences/Plug-Ins/ReaScript.

ReaScript/Python scripts can call API functions using RPR_functionname().

All parameters are passed by value, not reference. API functions that cannot return information in the parameter list will return a single value. API functions that can return any information in the parameter list will return a list of values; The first value in the list will be the function return value (unless the function is declared to return void).

Examples:
# function returning a single (scalar) value:
sec = RPR_parse_timestr("1:12")

# function returning information in the first parameter (function returns void):
(str) = RPR_GetProjectPath("", 512)

# lower volume of track 3 by half (RPR_GetTrackUIVolPan returns Bool):
tr = RPR_GetTrack(0, 2)
(ok, tr, vol, pan) = RPR_GetTrackUIVolPan(tr, 0, 0)
# this also works, if you only care about one of the returned values:
vol = RPR_GetTrackUIVolPan(tr, 0, 0)[2]
RPR_SetMediaTrackInfo_Value(tr, "D_VOL", vol*0.5)

You can create and save modules of useful functions that you can import into other ReaScripts. For example, if you create a file called reascript_utility.py that contains the function helpful_function(), you can import that file into any Python ReaScript with the line:
import reascript_utility
and call the function by using:
reascript_utility.helpful_function()

Note that ReaScripts must explicitly import the REAPER python module, even if the script is imported into another ReaScript:
from reaper_python import *

In addition to the standard API functions, Reascript/Python also has these built-in functions available:

atexit     defer     runloop    


API Function List

AddMediaItemToTrack     GetCurrentProjectInLoadSave     GetTrackState     SelectProjectInstance    
AddProjectMarker     GetCursorContext     GetTrackStateChunk     SetActiveTake    
AddProjectMarker2     GetCursorContext2     GetTrackUIMute     SetAutomationMode    
AddTakeToMediaItem     GetCursorPosition     GetTrackUIPan     SetCurrentBPM    
AddTempoTimeSigMarker     GetCursorPositionEx     GetTrackUIVolPan     SetCursorContext    
adjustZoom     GetDisplayedMediaItemColor     GetUserFileNameForRead     SetEditCurPos    
AnyTrackSolo     GetDisplayedMediaItemColor2     GetUserInputs     SetEditCurPos2    
APITest     GetEnvelopeName     GoToMarker     SetEnvelopePoint    
ApplyNudge     GetEnvelopePoint     GoToRegion     SetEnvelopeStateChunk    
Audio_IsPreBuffer     GetEnvelopePointByTime     GR_SelectColor     SetExtState    
Audio_IsRunning     GetEnvelopeScalingMode     GSC_mainwnd     SetGlobalAutomationOverride    
AudioAccessorValidateState     GetEnvelopeStateChunk     guidToString     SetItemStateChunk    
BypassFxAllTracks     GetExePath     HasExtState     SetMasterTrackVisibility    
ClearAllRecArmed     GetExtState     HasTrackMIDIPrograms     SetMediaItemInfo_Value    
ClearPeakCache     GetFocusedFX     HasTrackMIDIProgramsEx     SetMediaItemLength    
CountEnvelopePoints     GetFreeDiskSpaceForRecordPath     Help_Set     SetMediaItemPosition    
CountMediaItems     GetFXEnvelope     HiresPeaksFromSource     SetMediaItemSelected    
CountProjectMarkers     GetGlobalAutomationOverride     image_resolve_fn     SetMediaItemTake_Source    
CountSelectedMediaItems     GetHZoomLevel     InsertEnvelopePoint     SetMediaItemTakeInfo_Value    
CountSelectedTracks     GetInputChannelName     InsertMedia     SetMediaTrackInfo_Value    
CountTakeEnvelopes     GetInputOutputLatency     InsertMediaSection     SetMixerScroll    
CountTakes     GetItemEditingTime2     InsertTrackAtIndex     SetMouseModifier    
CountTCPFXParms     GetItemProjectContext     IsMediaExtension     SetOnlyTrackSelected    
CountTempoTimeSigMarkers     GetItemStateChunk     IsMediaItemSelected     SetProjectMarker    
CountTrackEnvelopes     GetLastMarkerAndCurRegion     IsTrackSelected     SetProjectMarker2    
CountTrackMediaItems     GetLastTouchedFX     IsTrackVisible     SetProjectMarker3    
CountTracks     GetLastTouchedTrack     LICE_ClipLine     SetProjectMarker4    
CreateNewMIDIItemInProj     GetMainHwnd     Loop_OnArrow     SetProjectMarkerByIndex    
CreateTakeAudioAccessor     GetMasterMuteSoloFlags     Main_OnCommand     SetProjectMarkerByIndex2    
CreateTrackAudioAccessor     GetMasterTrack     Main_OnCommandEx     SetProjExtState    
CSurf_FlushUndo     GetMasterTrackVisibility     Main_openProject     SetRegionRenderMatrix    
CSurf_GetTouchState     GetMaxMidiInputs     Main_SaveProject     SetTakeStretchMarker    
CSurf_GoEnd     GetMaxMidiOutputs     Main_UpdateLoopInfo     SetTempoTimeSigMarker    
CSurf_GoStart     GetMediaItem     MarkProjectDirty     SetToggleCommandState    
CSurf_NumTracks     GetMediaItem_Track     MarkTrackItemsDirty     SetTrackAutomationMode    
CSurf_OnArrow     GetMediaItemInfo_Value     Master_GetPlayRate     SetTrackColor    
CSurf_OnFwd     GetMediaItemNumTakes     Master_GetPlayRateAtTime     SetTrackMIDINoteName    
CSurf_OnFXChange     GetMediaItemTake     Master_GetTempo     SetTrackMIDINoteNameEx    
CSurf_OnInputMonitorChange     GetMediaItemTake_Item     Master_NormalizePlayRate     SetTrackSelected    
CSurf_OnInputMonitorChangeEx     GetMediaItemTake_Source     Master_NormalizeTempo     SetTrackSendUIPan    
CSurf_OnMuteChange     GetMediaItemTake_Track     MB     SetTrackSendUIVol    
CSurf_OnMuteChangeEx     GetMediaItemTakeByGUID     MediaItemDescendsFromTrack     SetTrackStateChunk    
CSurf_OnPanChange     GetMediaItemTakeInfo_Value     MIDI_CountEvts     ShowActionList    
CSurf_OnPanChangeEx     GetMediaItemTrack     MIDI_DeleteCC     ShowConsoleMsg    
CSurf_OnPause     GetMediaSourceFileName     MIDI_DeleteEvt     ShowMessageBox    
CSurf_OnPlay     GetMediaSourceLength     MIDI_DeleteNote     SLIDER2DB    
CSurf_OnPlayRateChange     GetMediaSourceNumChannels     MIDI_DeleteTextSysexEvt     SnapToGrid    
CSurf_OnRecArmChange     GetMediaSourceSampleRate     MIDI_EnumSelCC     SoloAllTracks    
CSurf_OnRecArmChangeEx     GetMediaSourceType     MIDI_EnumSelEvts     Splash_GetWnd    
CSurf_OnRecord     GetMediaTrackInfo_Value     MIDI_EnumSelNotes     SplitMediaItem    
CSurf_OnRecvPanChange     GetMIDIInputName     MIDI_EnumSelTextSysexEvts     stringToGuid    
CSurf_OnRecvVolumeChange     GetMIDIOutputName     MIDI_GetCC     StuffMIDIMessage    
CSurf_OnRew     GetMixerScroll     MIDI_GetEvt     TakeIsMIDI    
CSurf_OnRewFwd     GetMouseModifier     MIDI_GetGrid     time_precise    
CSurf_OnScroll     GetNumAudioInputs     MIDI_GetHash     TimeMap2_beatsToTime    
CSurf_OnSelectedChange     GetNumAudioOutputs     MIDI_GetNote     TimeMap2_GetDividedBpmAtTime    
CSurf_OnSendPanChange     GetNumMIDIInputs     MIDI_GetPPQPos_EndOfMeasure     TimeMap2_GetNextChangeTime    
CSurf_OnSendVolumeChange     GetNumMIDIOutputs     MIDI_GetPPQPos_StartOfMeasure     TimeMap2_QNToTime    
CSurf_OnSoloChange     GetNumTracks     MIDI_GetPPQPosFromProjQN     TimeMap2_timeToBeats    
CSurf_OnSoloChangeEx     GetOS     MIDI_GetPPQPosFromProjTime     TimeMap2_timeToQN    
CSurf_OnStop     GetOutputChannelName     MIDI_GetProjQNFromPPQPos     TimeMap_curFrameRate    
CSurf_OnTempoChange     GetOutputLatency     MIDI_GetProjTimeFromPPQPos     TimeMap_GetDividedBpmAtTime    
CSurf_OnTrackSelection     GetParentTrack     MIDI_GetScale     TimeMap_GetMeasureInfo    
CSurf_OnVolumeChange     GetPeakFileName     MIDI_GetTextSysexEvt     TimeMap_GetMetronomePattern    
CSurf_OnVolumeChangeEx     GetPeakFileNameEx     MIDI_GetTrackHash     TimeMap_GetTimeSigAtTime    
CSurf_OnWidthChange     GetPeakFileNameEx2     MIDI_InsertCC     TimeMap_QNToMeasures    
CSurf_OnWidthChangeEx     GetPlayPosition     MIDI_InsertEvt     TimeMap_QNToTime    
CSurf_OnZoom     GetPlayPosition2     MIDI_InsertNote     TimeMap_QNToTime_abs    
CSurf_ResetAllCachedVolPanStates     GetPlayPosition2Ex     MIDI_InsertTextSysexEvt     TimeMap_timeToQN    
CSurf_ScrubAmt     GetPlayPositionEx     midi_reinit     TimeMap_timeToQN_abs    
CSurf_SetAutoMode     GetPlayState     MIDI_SelectAll     ToggleTrackSendUIMute    
CSurf_SetPlayState     GetPlayStateEx     MIDI_SetCC     Track_GetPeakHoldDB    
CSurf_SetRepeatState     GetProjectPath     MIDI_SetEvt     Track_GetPeakInfo    
CSurf_SetSurfaceMute     GetProjectPathEx     MIDI_SetItemExtents     TrackCtl_SetToolTip    
CSurf_SetSurfacePan     GetProjectStateChangeCount     MIDI_SetNote     TrackFX_EndParamEdit    
CSurf_SetSurfaceRecArm     GetProjectTimeSignature     MIDI_SetTextSysexEvt     TrackFX_FormatParamValue    
CSurf_SetSurfaceSelected     GetProjectTimeSignature2     MIDI_Sort     TrackFX_FormatParamValueNormalized    
CSurf_SetSurfaceSolo     GetProjExtState     MIDIEditor_GetActive     TrackFX_GetByName    
CSurf_SetSurfaceVolume     GetResourcePath     MIDIEditor_GetMode     TrackFX_GetChainVisible    
CSurf_SetTrackListChange     GetSelectedEnvelope     MIDIEditor_GetSetting_int     TrackFX_GetCount    
CSurf_TrackFromID     GetSelectedMediaItem     MIDIEditor_GetSetting_str     TrackFX_GetEnabled    
CSurf_TrackToID     GetSelectedTrack     MIDIEditor_GetTake     TrackFX_GetEQ    
DB2SLIDER     GetSelectedTrackEnvelope     MIDIEditor_LastFocused_OnCommand     TrackFX_GetEQBandEnabled    
DeleteEnvelopePointRange     GetSet_ArrangeView2     MIDIEditor_OnCommand     TrackFX_GetEQParam    
DeleteExtState     GetSet_LoopTimeRange     mkpanstr     TrackFX_GetFloatingWindow    
DeleteProjectMarker     GetSet_LoopTimeRange2     mkvolpanstr     TrackFX_GetFormattedParamValue    
DeleteProjectMarkerByIndex     GetSetEnvelopeState     mkvolstr     TrackFX_GetFXGUID    
DeleteTakeStretchMarkers     GetSetEnvelopeState2     MoveEditCursor     TrackFX_GetFXName    
DeleteTempoTimeSigMarker     GetSetItemState     MoveMediaItemToTrack     TrackFX_GetInstrument    
DeleteTrack     GetSetItemState2     MuteAllTracks     TrackFX_GetNumParams    
DeleteTrackMediaItem     GetSetMediaItemTakeInfo_String     my_getViewport     TrackFX_GetOpen    
DestroyAudioAccessor     GetSetMediaTrackInfo_String     NamedCommandLookup     TrackFX_GetParam    
Dock_UpdateDockID     GetSetRepeat     OnPauseButton     TrackFX_GetParameterStepSizes    
DockIsChildOfDock     GetSetRepeatEx     OnPauseButtonEx     TrackFX_GetParamEx    
DockWindowActivate     GetSetTrackState     OnPlayButton     TrackFX_GetParamName    
DockWindowAdd     GetSetTrackState2     OnPlayButtonEx     TrackFX_GetParamNormalized    
DockWindowAddEx     GetSubProjectFromSource     OnStopButton     TrackFX_GetPreset    
DockWindowRefresh     GetTake     OnStopButtonEx     TrackFX_GetPresetIndex    
DockWindowRefreshForHWND     GetTakeEnvelope     OscLocalMessageToHost     TrackFX_NavigatePresets    
DockWindowRemove     GetTakeEnvelopeByName     parse_timestr     TrackFX_SetEnabled    
EditTempoTimeSigMarker     GetTakeName     parse_timestr_len     TrackFX_SetEQBandEnabled    
EnsureNotCompletelyOffscreen     GetTakeNumStretchMarkers     parse_timestr_pos     TrackFX_SetEQParam    
EnumPitchShiftModes     GetTakeStretchMarker     parsepanstr     TrackFX_SetOpen    
EnumPitchShiftSubModes     GetTCPFXParm     PCM_Sink_Enum     TrackFX_SetParam    
EnumProjectMarkers     GetTempoMatchPlayRate     PCM_Sink_GetExtension     TrackFX_SetParamNormalized    
EnumProjectMarkers2     GetTempoTimeSigMarker     PCM_Sink_ShowConfig     TrackFX_SetPreset    
EnumProjectMarkers3     GetToggleCommandState     PCM_Source_CreateFromFile     TrackFX_SetPresetByIndex    
EnumProjects     GetToggleCommandStateEx     PCM_Source_CreateFromFileEx     TrackFX_Show    
EnumProjExtState     GetTooltipWindow     PCM_Source_CreateFromType     TrackList_AdjustWindows    
EnumRegionRenderMatrix     GetTrack     PCM_Source_Destroy     TrackList_UpdateAllExternalSurfaces    
EnumTrackMIDIProgramNames     GetTrackAutomationMode     PCM_Source_GetSectionInfo     Undo_BeginBlock    
EnumTrackMIDIProgramNamesEx     GetTrackColor     plugin_getFilterList     Undo_BeginBlock2    
Envelope_Evaluate     GetTrackDepth     plugin_getImportableProjectFilterList     Undo_CanRedo2    
Envelope_SortPoints     GetTrackEnvelope     PluginWantsAlwaysRunFx     Undo_CanUndo2    
file_exists     GetTrackEnvelopeByName     PreventUIRefresh     Undo_DoRedo2    
FindTempoTimeSigMarker     GetTrackGUID     ReaScriptError     Undo_DoUndo2    
format_timestr     GetTrackMediaItem     RecursiveCreateDirectory     Undo_EndBlock    
format_timestr_len     GetTrackMIDINoteName     RefreshToolbar     Undo_EndBlock2    
format_timestr_pos     GetTrackMIDINoteNameEx     RefreshToolbar2     Undo_OnStateChange    
genGuid     GetTrackMIDINoteRange     relative_fn     Undo_OnStateChange2    
get_ini_file     GetTrackNumMediaItems     RenderFileSection     Undo_OnStateChange_Item    
GetActiveTake     GetTrackNumSends     Resample_EnumModes     Undo_OnStateChangeEx    
GetAppVersion     GetTrackReceiveName     resolve_fn     Undo_OnStateChangeEx2    
GetAudioAccessorEndTime     GetTrackReceiveUIMute     resolve_fn2     UpdateArrange    
GetAudioAccessorHash     GetTrackReceiveUIVolPan     ReverseNamedCommandLookup     UpdateItemInProject    
GetAudioAccessorSamples     GetTrackSendName     ScaleFromEnvelopeMode     UpdateTimeline    
GetAudioAccessorStartTime     GetTrackSendUIMute     ScaleToEnvelopeMode     ValidatePtr    
GetConfigWantsDock     GetTrackSendUIVolPan     SelectAllMediaItems     ViewPrefs    




C: MediaItem* AddMediaItemToTrack(MediaTrack* tr)

EEL: MediaItem AddMediaItemToTrack(MediaTrack tr)

Lua: MediaItem reaper.AddMediaItemToTrack(MediaTrack tr)

Python: MediaItem RPR_AddMediaItemToTrack(MediaTrack tr)

creates a new media item.



C: int AddProjectMarker(ReaProject* proj, bool isrgn, double pos, double rgnend, const char* name, int wantidx)

EEL: int AddProjectMarker(ReaProject proj, bool isrgn, pos, rgnend, "name", int wantidx)

Lua: integer reaper.AddProjectMarker(ReaProject proj, boolean isrgn, number pos, number rgnend, string name, integer wantidx)

Python: Int RPR_AddProjectMarker(ReaProject proj, Boolean isrgn, Float pos, Float rgnend, String name, Int wantidx)

Returns the index of the created marker/region, or -1 on failure. Supply wantidx>=0 if you want a particular index number, but you'll get a different index number a region and wantidx is already in use.



C: int AddProjectMarker2(ReaProject* proj, bool isrgn, double pos, double rgnend, const char* name, int wantidx, int color)

EEL: int AddProjectMarker2(ReaProject proj, bool isrgn, pos, rgnend, "name", int wantidx, int color)

Lua: integer reaper.AddProjectMarker2(ReaProject proj, boolean isrgn, number pos, number rgnend, string name, integer wantidx, integer color)

Python: Int RPR_AddProjectMarker2(ReaProject proj, Boolean isrgn, Float pos, Float rgnend, String name, Int wantidx, Int color)

Returns the index of the created marker/region, or -1 on failure. Supply wantidx>=0 if you want a particular index number, but you'll get a different index number a region and wantidx is already in use. color should be 0 or RGB(x,y,z)|0x1000000



C: MediaItem_Take* AddTakeToMediaItem(MediaItem* item)

EEL: MediaItem_Take AddTakeToMediaItem(MediaItem item)

Lua: MediaItem_Take reaper.AddTakeToMediaItem(MediaItem item)

Python: MediaItem_Take RPR_AddTakeToMediaItem(MediaItem item)

creates a new take in an item



C: bool AddTempoTimeSigMarker(ReaProject* proj, double timepos, double bpm, int timesig_num, int timesig_denom, bool lineartempochange)

EEL: bool AddTempoTimeSigMarker(ReaProject proj, timepos, bpm, int timesig_num, int timesig_denom, bool lineartempochange)

Lua: boolean reaper.AddTempoTimeSigMarker(ReaProject proj, number timepos, number bpm, integer timesig_num, integer timesig_denom, boolean lineartempochange)

Python: Boolean RPR_AddTempoTimeSigMarker(ReaProject proj, Float timepos, Float bpm, Int timesig_num, Int timesig_denom, Boolean lineartempochange)

Deprecated. Use SetTempoTimeSigMarker with ptidx=-1.



C: void adjustZoom(double amt, int forceset, bool doupd, int centermode)

EEL: adjustZoom(amt, int forceset, bool doupd, int centermode)

Lua: reaper.adjustZoom(number amt, integer forceset, boolean doupd, integer centermode)

Python: RPR_adjustZoom(Float amt, Int forceset, Boolean doupd, Int centermode)

forceset=0,doupd=true,centermode=-1 for default



C: bool AnyTrackSolo(ReaProject* proj)

EEL: bool AnyTrackSolo(ReaProject proj)

Lua: boolean reaper.AnyTrackSolo(ReaProject proj)

Python: Boolean RPR_AnyTrackSolo(ReaProject proj)



C: void APITest()

EEL: APITest()

Lua: reaper.APITest()

Python: RPR_APITest()



C: bool ApplyNudge(ReaProject* project, int nudgeflag, int nudgewhat, int nudgeunits, double value, bool reverse, int copies)

EEL: bool ApplyNudge(ReaProject project, int nudgeflag, int nudgewhat, int nudgeunits, value, bool reverse, int copies)

Lua: boolean reaper.ApplyNudge(ReaProject project, integer nudgeflag, integer nudgewhat, integer nudgeunits, number value, boolean reverse, integer copies)

Python: Boolean RPR_ApplyNudge(ReaProject project, Int nudgeflag, Int nudgewhat, Int nudgeunits, Float value, Boolean reverse, Int copies)

nudgeflag: &1=set to value (otherwise nudge by value), &2=snap
nudgewhat: 0=position, 1=left trim, 2=left edge, 3=right edge, 4=contents, 5=duplicate, 6=edit cursor
nudgeunit: 0=ms, 1=seconds, 2=grid, 3=256th notes, ..., 15=whole notes, 16=measures.beats (1.15 = 1 measure + 1.5 beats), 17=samples, 18=frames, 19=pixels, 20=item lengths, 21=item selections
value: amount to nudge by, or value to set to
reverse: in nudge mode, nudges left (otherwise ignored)
copies: in nudge duplicate mode, number of copies (otherwise ignored)



C: int Audio_IsPreBuffer()

EEL: int Audio_IsPreBuffer()

Lua: integer reaper.Audio_IsPreBuffer()

Python: Int RPR_Audio_IsPreBuffer()

is in pre-buffer? threadsafe



C: int Audio_IsRunning()

EEL: int Audio_IsRunning()

Lua: integer reaper.Audio_IsRunning()

Python: Int RPR_Audio_IsRunning()

is audio running at all? threadsafe



C: bool AudioAccessorValidateState(AudioAccessor* accessor)

EEL: bool AudioAccessorValidateState(AudioAccessor accessor)

Lua: boolean reaper.AudioAccessorValidateState(AudioAccessor accessor)

Python: Boolean RPR_AudioAccessorValidateState(AudioAccessor accessor)

Validates the current state of the audio accessor -- must ONLY call this from the main thread. Returns true if the state changed.



C: void BypassFxAllTracks(int bypass)

EEL: BypassFxAllTracks(int bypass)

Lua: reaper.BypassFxAllTracks(integer bypass)

Python: RPR_BypassFxAllTracks(Int bypass)

-1 = bypass all if not all bypassed,otherwise unbypass all



C: void ClearAllRecArmed()

EEL: ClearAllRecArmed()

Lua: reaper.ClearAllRecArmed()

Python: RPR_ClearAllRecArmed()



C: void ClearPeakCache()

EEL: ClearPeakCache()

Lua: reaper.ClearPeakCache()

Python: RPR_ClearPeakCache()

resets the global peak caches



C: int CountEnvelopePoints(TrackEnvelope* envelope)

EEL: int CountEnvelopePoints(TrackEnvelope envelope)

Lua: integer reaper.CountEnvelopePoints(TrackEnvelope envelope)

Python: Int RPR_CountEnvelopePoints(TrackEnvelope envelope)

Returns the number of points in the envelope.



C: int CountMediaItems(ReaProject* proj)

EEL: int CountMediaItems(ReaProject proj)

Lua: integer reaper.CountMediaItems(ReaProject proj)

Python: Int RPR_CountMediaItems(ReaProject proj)

count the number of items in the project (proj=0 for active project)



C: int CountProjectMarkers(ReaProject* proj, int* num_markersOut, int* num_regionsOut)

EEL: int CountProjectMarkers(ReaProject proj, int &num_markersOut, int &num_regionsOut)

Lua: integer retval, number num_markersOut, number num_regionsOut reaper.CountProjectMarkers(ReaProject proj)

Python: (Int retval, ReaProject proj, Int num_markersOut, Int num_regionsOut) = RPR_CountProjectMarkers(proj, num_markersOut, num_regionsOut)

num_markersOut and num_regionsOut may be NULL.



C: int CountSelectedMediaItems(ReaProject* proj)

EEL: int CountSelectedMediaItems(ReaProject proj)

Lua: integer reaper.CountSelectedMediaItems(ReaProject proj)

Python: Int RPR_CountSelectedMediaItems(ReaProject proj)

count the number of selected items in the project (proj=0 for active project)



C: int CountSelectedTracks(ReaProject* proj)

EEL: int CountSelectedTracks(ReaProject proj)

Lua: integer reaper.CountSelectedTracks(ReaProject proj)

Python: Int RPR_CountSelectedTracks(ReaProject proj)

count the number of selected tracks in the project (proj=0 for active project)



C: int CountTakeEnvelopes(MediaItem_Take* take)

EEL: int CountTakeEnvelopes(MediaItem_Take take)

Lua: integer reaper.CountTakeEnvelopes(MediaItem_Take take)

Python: Int RPR_CountTakeEnvelopes(MediaItem_Take take)

See GetTakeEnvelope



C: int CountTakes(MediaItem* item)

EEL: int CountTakes(MediaItem item)

Lua: integer reaper.CountTakes(MediaItem item)

Python: Int RPR_CountTakes(MediaItem item)

count the number of takes in the item



C: int CountTCPFXParms(ReaProject* project, MediaTrack* track)

EEL: int CountTCPFXParms(ReaProject project, MediaTrack track)

Lua: integer reaper.CountTCPFXParms(ReaProject project, MediaTrack track)

Python: Int RPR_CountTCPFXParms(ReaProject project, MediaTrack track)

Count the number of FX parameter knobs displayed on the track control panel.



C: int CountTempoTimeSigMarkers(ReaProject* proj)

EEL: int CountTempoTimeSigMarkers(ReaProject proj)

Lua: integer reaper.CountTempoTimeSigMarkers(ReaProject proj)

Python: Int RPR_CountTempoTimeSigMarkers(ReaProject proj)

Count the number of tempo/time signature markers in the project. See GetTempoTimeSigMarker, SetTempoTimeSigMarker, AddTempoTimeSigMarker.



C: int CountTrackEnvelopes(MediaTrack* track)

EEL: int CountTrackEnvelopes(MediaTrack track)

Lua: integer reaper.CountTrackEnvelopes(MediaTrack track)

Python: Int RPR_CountTrackEnvelopes(MediaTrack track)

see GetTrackEnvelope



C: int CountTrackMediaItems(MediaTrack* track)

EEL: int CountTrackMediaItems(MediaTrack track)

Lua: integer reaper.CountTrackMediaItems(MediaTrack track)

Python: Int RPR_CountTrackMediaItems(MediaTrack track)

count the number of items in the track



C: int CountTracks(ReaProject* proj)

EEL: int CountTracks(ReaProject proj)

Lua: integer reaper.CountTracks(ReaProject proj)

Python: Int RPR_CountTracks(ReaProject proj)

count the number of tracks in the project (proj=0 for active project)



C: MediaItem* CreateNewMIDIItemInProj(MediaTrack* track, double starttime, double endtime, const bool* qnInOptional)

EEL: MediaItem CreateNewMIDIItemInProj(MediaTrack track, starttime, endtime, optional bool qnInOptional)

Lua: MediaItem reaper.CreateNewMIDIItemInProj(MediaTrack track, number starttime, number endtime, optional boolean qnInOptional)

Python: MediaItem RPR_CreateNewMIDIItemInProj(MediaTrack track, Float starttime, Float endtime, const bool qnInOptional)

Create a new MIDI media item, containing no MIDI events. Time is in seconds unless qn is set.



C: AudioAccessor* CreateTakeAudioAccessor(MediaItem_Take* take)

EEL: AudioAccessor CreateTakeAudioAccessor(MediaItem_Take take)

Lua: AudioAccessor reaper.CreateTakeAudioAccessor(MediaItem_Take take)

Python: AudioAccessor RPR_CreateTakeAudioAccessor(MediaItem_Take take)

Create an audio accessor object for this take. Must only call from the main thread. See CreateTrackAudioAccessor, DestroyAudioAccessor, GetAudioAccessorHash, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.



C: AudioAccessor* CreateTrackAudioAccessor(MediaTrack* track)

EEL: AudioAccessor CreateTrackAudioAccessor(MediaTrack track)

Lua: AudioAccessor reaper.CreateTrackAudioAccessor(MediaTrack track)

Python: AudioAccessor RPR_CreateTrackAudioAccessor(MediaTrack track)

Create an audio accessor object for this track. Must only call from the main thread. See CreateTakeAudioAccessor, DestroyAudioAccessor, GetAudioAccessorHash, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.



C: void CSurf_FlushUndo(bool force)

EEL: CSurf_FlushUndo(bool force)

Lua: reaper.CSurf_FlushUndo(boolean force)

Python: RPR_CSurf_FlushUndo(Boolean force)

call this to force flushing of the undo states after using CSurf_On*Change()



C: bool CSurf_GetTouchState(MediaTrack* trackid, int isPan)

EEL: bool CSurf_GetTouchState(MediaTrack trackid, int isPan)

Lua: boolean reaper.CSurf_GetTouchState(MediaTrack trackid, integer isPan)

Python: Boolean RPR_CSurf_GetTouchState(MediaTrack trackid, Int isPan)



C: void CSurf_GoEnd()

EEL: CSurf_GoEnd()

Lua: reaper.CSurf_GoEnd()

Python: RPR_CSurf_GoEnd()



C: void CSurf_GoStart()

EEL: CSurf_GoStart()

Lua: reaper.CSurf_GoStart()

Python: RPR_CSurf_GoStart()



C: int CSurf_NumTracks(bool mcpView)

EEL: int CSurf_NumTracks(bool mcpView)

Lua: integer reaper.CSurf_NumTracks(boolean mcpView)

Python: Int RPR_CSurf_NumTracks(Boolean mcpView)



C: void CSurf_OnArrow(int whichdir, bool wantzoom)

EEL: CSurf_OnArrow(int whichdir, bool wantzoom)

Lua: reaper.CSurf_OnArrow(integer whichdir, boolean wantzoom)

Python: RPR_CSurf_OnArrow(Int whichdir, Boolean wantzoom)



C: void CSurf_OnFwd(int seekplay)

EEL: CSurf_OnFwd(int seekplay)

Lua: reaper.CSurf_OnFwd(integer seekplay)

Python: RPR_CSurf_OnFwd(Int seekplay)



C: bool CSurf_OnFXChange(MediaTrack* trackid, int en)

EEL: bool CSurf_OnFXChange(MediaTrack trackid, int en)

Lua: boolean reaper.CSurf_OnFXChange(MediaTrack trackid, integer en)

Python: Boolean RPR_CSurf_OnFXChange(MediaTrack trackid, Int en)



C: int CSurf_OnInputMonitorChange(MediaTrack* trackid, int monitor)

EEL: int CSurf_OnInputMonitorChange(MediaTrack trackid, int monitor)

Lua: integer reaper.CSurf_OnInputMonitorChange(MediaTrack trackid, integer monitor)

Python: Int RPR_CSurf_OnInputMonitorChange(MediaTrack trackid, Int monitor)



C: int CSurf_OnInputMonitorChangeEx(MediaTrack* trackid, int monitor, bool allowgang)

EEL: int CSurf_OnInputMonitorChangeEx(MediaTrack trackid, int monitor, bool allowgang)

Lua: integer reaper.CSurf_OnInputMonitorChangeEx(MediaTrack trackid, integer monitor, boolean allowgang)

Python: Int RPR_CSurf_OnInputMonitorChangeEx(MediaTrack trackid, Int monitor, Boolean allowgang)



C: bool CSurf_OnMuteChange(MediaTrack* trackid, int mute)

EEL: bool CSurf_OnMuteChange(MediaTrack trackid, int mute)

Lua: boolean reaper.CSurf_OnMuteChange(MediaTrack trackid, integer mute)

Python: Boolean RPR_CSurf_OnMuteChange(MediaTrack trackid, Int mute)



C: bool CSurf_OnMuteChangeEx(MediaTrack* trackid, int mute, bool allowgang)

EEL: bool CSurf_OnMuteChangeEx(MediaTrack trackid, int mute, bool allowgang)

Lua: boolean reaper.CSurf_OnMuteChangeEx(MediaTrack trackid, integer mute, boolean allowgang)

Python: Boolean RPR_CSurf_OnMuteChangeEx(MediaTrack trackid, Int mute, Boolean allowgang)



C: double CSurf_OnPanChange(MediaTrack* trackid, double pan, bool relative)

EEL: double CSurf_OnPanChange(MediaTrack trackid, pan, bool relative)

Lua: number reaper.CSurf_OnPanChange(MediaTrack trackid, number pan, boolean relative)

Python: Float RPR_CSurf_OnPanChange(MediaTrack trackid, Float pan, Boolean relative)



C: double CSurf_OnPanChangeEx(MediaTrack* trackid, double pan, bool relative, bool allowGang)

EEL: double CSurf_OnPanChangeEx(MediaTrack trackid, pan, bool relative, bool allowGang)

Lua: number reaper.CSurf_OnPanChangeEx(MediaTrack trackid, number pan, boolean relative, boolean allowGang)

Python: Float RPR_CSurf_OnPanChangeEx(MediaTrack trackid, Float pan, Boolean relative, Boolean allowGang)



C: void CSurf_OnPause()

EEL: CSurf_OnPause()

Lua: reaper.CSurf_OnPause()

Python: RPR_CSurf_OnPause()



C: void CSurf_OnPlay()

EEL: CSurf_OnPlay()

Lua: reaper.CSurf_OnPlay()

Python: RPR_CSurf_OnPlay()



C: void CSurf_OnPlayRateChange(double playrate)

EEL: CSurf_OnPlayRateChange(playrate)

Lua: reaper.CSurf_OnPlayRateChange(number playrate)

Python: RPR_CSurf_OnPlayRateChange(Float playrate)



C: bool CSurf_OnRecArmChange(MediaTrack* trackid, int recarm)

EEL: bool CSurf_OnRecArmChange(MediaTrack trackid, int recarm)

Lua: boolean reaper.CSurf_OnRecArmChange(MediaTrack trackid, integer recarm)

Python: Boolean RPR_CSurf_OnRecArmChange(MediaTrack trackid, Int recarm)



C: bool CSurf_OnRecArmChangeEx(MediaTrack* trackid, int recarm, bool allowgang)

EEL: bool CSurf_OnRecArmChangeEx(MediaTrack trackid, int recarm, bool allowgang)

Lua: boolean reaper.CSurf_OnRecArmChangeEx(MediaTrack trackid, integer recarm, boolean allowgang)

Python: Boolean RPR_CSurf_OnRecArmChangeEx(MediaTrack trackid, Int recarm, Boolean allowgang)



C: void CSurf_OnRecord()

EEL: CSurf_OnRecord()

Lua: reaper.CSurf_OnRecord()

Python: RPR_CSurf_OnRecord()



C: double CSurf_OnRecvPanChange(MediaTrack* trackid, int recv_index, double pan, bool relative)

EEL: double CSurf_OnRecvPanChange(MediaTrack trackid, int recv_index, pan, bool relative)

Lua: number reaper.CSurf_OnRecvPanChange(MediaTrack trackid, integer recv_index, number pan, boolean relative)

Python: Float RPR_CSurf_OnRecvPanChange(MediaTrack trackid, Int recv_index, Float pan, Boolean relative)



C: double CSurf_OnRecvVolumeChange(MediaTrack* trackid, int recv_index, double volume, bool relative)

EEL: double CSurf_OnRecvVolumeChange(MediaTrack trackid, int recv_index, volume, bool relative)

Lua: number reaper.CSurf_OnRecvVolumeChange(MediaTrack trackid, integer recv_index, number volume, boolean relative)

Python: Float RPR_CSurf_OnRecvVolumeChange(MediaTrack trackid, Int recv_index, Float volume, Boolean relative)



C: void CSurf_OnRew(int seekplay)

EEL: CSurf_OnRew(int seekplay)

Lua: reaper.CSurf_OnRew(integer seekplay)

Python: RPR_CSurf_OnRew(Int seekplay)



C: void CSurf_OnRewFwd(int seekplay, int dir)

EEL: CSurf_OnRewFwd(int seekplay, int dir)

Lua: reaper.CSurf_OnRewFwd(integer seekplay, integer dir)

Python: RPR_CSurf_OnRewFwd(Int seekplay, Int dir)



C: void CSurf_OnScroll(int xdir, int ydir)

EEL: CSurf_OnScroll(int xdir, int ydir)

Lua: reaper.CSurf_OnScroll(integer xdir, integer ydir)

Python: RPR_CSurf_OnScroll(Int xdir, Int ydir)



C: bool CSurf_OnSelectedChange(MediaTrack* trackid, int selected)

EEL: bool CSurf_OnSelectedChange(MediaTrack trackid, int selected)

Lua: boolean reaper.CSurf_OnSelectedChange(MediaTrack trackid, integer selected)

Python: Boolean RPR_CSurf_OnSelectedChange(MediaTrack trackid, Int selected)



C: double CSurf_OnSendPanChange(MediaTrack* trackid, int send_index, double pan, bool relative)

EEL: double CSurf_OnSendPanChange(MediaTrack trackid, int send_index, pan, bool relative)

Lua: number reaper.CSurf_OnSendPanChange(MediaTrack trackid, integer send_index, number pan, boolean relative)

Python: Float RPR_CSurf_OnSendPanChange(MediaTrack trackid, Int send_index, Float pan, Boolean relative)



C: double CSurf_OnSendVolumeChange(MediaTrack* trackid, int send_index, double volume, bool relative)

EEL: double CSurf_OnSendVolumeChange(MediaTrack trackid, int send_index, volume, bool relative)

Lua: number reaper.CSurf_OnSendVolumeChange(MediaTrack trackid, integer send_index, number volume, boolean relative)

Python: Float RPR_CSurf_OnSendVolumeChange(MediaTrack trackid, Int send_index, Float volume, Boolean relative)



C: bool CSurf_OnSoloChange(MediaTrack* trackid, int solo)

EEL: bool CSurf_OnSoloChange(MediaTrack trackid, int solo)

Lua: boolean reaper.CSurf_OnSoloChange(MediaTrack trackid, integer solo)

Python: Boolean RPR_CSurf_OnSoloChange(MediaTrack trackid, Int solo)



C: bool CSurf_OnSoloChangeEx(MediaTrack* trackid, int solo, bool allowgang)

EEL: bool CSurf_OnSoloChangeEx(MediaTrack trackid, int solo, bool allowgang)

Lua: boolean reaper.CSurf_OnSoloChangeEx(MediaTrack trackid, integer solo, boolean allowgang)

Python: Boolean RPR_CSurf_OnSoloChangeEx(MediaTrack trackid, Int solo, Boolean allowgang)



C: void CSurf_OnStop()

EEL: CSurf_OnStop()

Lua: reaper.CSurf_OnStop()

Python: RPR_CSurf_OnStop()



C: void CSurf_OnTempoChange(double bpm)

EEL: CSurf_OnTempoChange(bpm)

Lua: reaper.CSurf_OnTempoChange(number bpm)

Python: RPR_CSurf_OnTempoChange(Float bpm)



C: void CSurf_OnTrackSelection(MediaTrack* trackid)

EEL: CSurf_OnTrackSelection(MediaTrack trackid)

Lua: reaper.CSurf_OnTrackSelection(MediaTrack trackid)

Python: RPR_CSurf_OnTrackSelection(MediaTrack trackid)



C: double CSurf_OnVolumeChange(MediaTrack* trackid, double volume, bool relative)

EEL: double CSurf_OnVolumeChange(MediaTrack trackid, volume, bool relative)

Lua: number reaper.CSurf_OnVolumeChange(MediaTrack trackid, number volume, boolean relative)

Python: Float RPR_CSurf_OnVolumeChange(MediaTrack trackid, Float volume, Boolean relative)



C: double CSurf_OnVolumeChangeEx(MediaTrack* trackid, double volume, bool relative, bool allowGang)

EEL: double CSurf_OnVolumeChangeEx(MediaTrack trackid, volume, bool relative, bool allowGang)

Lua: number reaper.CSurf_OnVolumeChangeEx(MediaTrack trackid, number volume, boolean relative, boolean allowGang)

Python: Float RPR_CSurf_OnVolumeChangeEx(MediaTrack trackid, Float volume, Boolean relative, Boolean allowGang)



C: double CSurf_OnWidthChange(MediaTrack* trackid, double width, bool relative)

EEL: double CSurf_OnWidthChange(MediaTrack trackid, width, bool relative)

Lua: number reaper.CSurf_OnWidthChange(MediaTrack trackid, number width, boolean relative)

Python: Float RPR_CSurf_OnWidthChange(MediaTrack trackid, Float width, Boolean relative)



C: double CSurf_OnWidthChangeEx(MediaTrack* trackid, double width, bool relative, bool allowGang)

EEL: double CSurf_OnWidthChangeEx(MediaTrack trackid, width, bool relative, bool allowGang)

Lua: number reaper.CSurf_OnWidthChangeEx(MediaTrack trackid, number width, boolean relative, boolean allowGang)

Python: Float RPR_CSurf_OnWidthChangeEx(MediaTrack trackid, Float width, Boolean relative, Boolean allowGang)



C: void CSurf_OnZoom(int xdir, int ydir)

EEL: CSurf_OnZoom(int xdir, int ydir)

Lua: reaper.CSurf_OnZoom(integer xdir, integer ydir)

Python: RPR_CSurf_OnZoom(Int xdir, Int ydir)



C: void CSurf_ResetAllCachedVolPanStates()

EEL: CSurf_ResetAllCachedVolPanStates()

Lua: reaper.CSurf_ResetAllCachedVolPanStates()

Python: RPR_CSurf_ResetAllCachedVolPanStates()



C: void CSurf_ScrubAmt(double amt)

EEL: CSurf_ScrubAmt(amt)

Lua: reaper.CSurf_ScrubAmt(number amt)

Python: RPR_CSurf_ScrubAmt(Float amt)



C: void CSurf_SetAutoMode(int mode, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetAutoMode(int mode, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetAutoMode(integer mode, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetAutoMode(Int mode, IReaperControlSurface ignoresurf)



C: void CSurf_SetPlayState(bool play, bool pause, bool rec, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetPlayState(bool play, bool pause, bool rec, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetPlayState(boolean play, boolean pause, boolean rec, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetPlayState(Boolean play, Boolean pause, Boolean rec, IReaperControlSurface ignoresurf)



C: void CSurf_SetRepeatState(bool rep, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetRepeatState(bool rep, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetRepeatState(boolean rep, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetRepeatState(Boolean rep, IReaperControlSurface ignoresurf)



C: void CSurf_SetSurfaceMute(MediaTrack* trackid, bool mute, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetSurfaceMute(MediaTrack trackid, bool mute, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetSurfaceMute(MediaTrack trackid, boolean mute, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetSurfaceMute(MediaTrack trackid, Boolean mute, IReaperControlSurface ignoresurf)



C: void CSurf_SetSurfacePan(MediaTrack* trackid, double pan, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetSurfacePan(MediaTrack trackid, pan, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetSurfacePan(MediaTrack trackid, number pan, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetSurfacePan(MediaTrack trackid, Float pan, IReaperControlSurface ignoresurf)



C: void CSurf_SetSurfaceRecArm(MediaTrack* trackid, bool recarm, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetSurfaceRecArm(MediaTrack trackid, bool recarm, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetSurfaceRecArm(MediaTrack trackid, boolean recarm, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetSurfaceRecArm(MediaTrack trackid, Boolean recarm, IReaperControlSurface ignoresurf)



C: void CSurf_SetSurfaceSelected(MediaTrack* trackid, bool selected, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetSurfaceSelected(MediaTrack trackid, bool selected, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetSurfaceSelected(MediaTrack trackid, boolean selected, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetSurfaceSelected(MediaTrack trackid, Boolean selected, IReaperControlSurface ignoresurf)



C: void CSurf_SetSurfaceSolo(MediaTrack* trackid, bool solo, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetSurfaceSolo(MediaTrack trackid, bool solo, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetSurfaceSolo(MediaTrack trackid, boolean solo, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetSurfaceSolo(MediaTrack trackid, Boolean solo, IReaperControlSurface ignoresurf)



C: void CSurf_SetSurfaceVolume(MediaTrack* trackid, double volume, IReaperControlSurface* ignoresurf)

EEL: CSurf_SetSurfaceVolume(MediaTrack trackid, volume, IReaperControlSurface ignoresurf)

Lua: reaper.CSurf_SetSurfaceVolume(MediaTrack trackid, number volume, IReaperControlSurface ignoresurf)

Python: RPR_CSurf_SetSurfaceVolume(MediaTrack trackid, Float volume, IReaperControlSurface ignoresurf)



C: void CSurf_SetTrackListChange()

EEL: CSurf_SetTrackListChange()

Lua: reaper.CSurf_SetTrackListChange()

Python: RPR_CSurf_SetTrackListChange()



C: MediaTrack* CSurf_TrackFromID(int idx, bool mcpView)

EEL: MediaTrack CSurf_TrackFromID(int idx, bool mcpView)

Lua: MediaTrack reaper.CSurf_TrackFromID(integer idx, boolean mcpView)

Python: MediaTrack RPR_CSurf_TrackFromID(Int idx, Boolean mcpView)



C: int CSurf_TrackToID(MediaTrack* track, bool mcpView)

EEL: int CSurf_TrackToID(MediaTrack track, bool mcpView)

Lua: integer reaper.CSurf_TrackToID(MediaTrack track, boolean mcpView)

Python: Int RPR_CSurf_TrackToID(MediaTrack track, Boolean mcpView)



C: double DB2SLIDER(double x)

EEL: double DB2SLIDER(x)

Lua: number reaper.DB2SLIDER(number x)

Python: Float RPR_DB2SLIDER(Float x)



C: bool DeleteEnvelopePointRange(TrackEnvelope* envelope, double time_start, double time_end)

EEL: bool DeleteEnvelopePointRange(TrackEnvelope envelope, time_start, time_end)

Lua: boolean reaper.DeleteEnvelopePointRange(TrackEnvelope envelope, number time_start, number time_end)

Python: Boolean RPR_DeleteEnvelopePointRange(TrackEnvelope envelope, Float time_start, Float time_end)

Delete a range of envelope points.



C: void DeleteExtState(const char* section, const char* key, bool persist)

EEL: DeleteExtState("section", "key", bool persist)

Lua: reaper.DeleteExtState(string section, string key, boolean persist)

Python: RPR_DeleteExtState(String section, String key, Boolean persist)

Delete the extended state value for a specific section and key. persist=true means the value should remain deleted the next time REAPER is opened. See SetExtState, GetExtState, HasExtState.



C: bool DeleteProjectMarker(ReaProject* proj, int markrgnindexnumber, bool isrgn)

EEL: bool DeleteProjectMarker(ReaProject proj, int markrgnindexnumber, bool isrgn)

Lua: boolean reaper.DeleteProjectMarker(ReaProject proj, integer markrgnindexnumber, boolean isrgn)

Python: Boolean RPR_DeleteProjectMarker(ReaProject proj, Int markrgnindexnumber, Boolean isrgn)

Delete a marker. proj==NULL for the active project.



C: bool DeleteProjectMarkerByIndex(ReaProject* proj, int markrgnidx)

EEL: bool DeleteProjectMarkerByIndex(ReaProject proj, int markrgnidx)

Lua: boolean reaper.DeleteProjectMarkerByIndex(ReaProject proj, integer markrgnidx)

Python: Boolean RPR_DeleteProjectMarkerByIndex(ReaProject proj, Int markrgnidx)

Differs from DeleteProjectMarker only in that markrgnidx is 0 for the first marker/region, 1 for the next, etc (see EnumProjectMarkers3), rather than representing the displayed marker/region ID number (see SetProjectMarker4).



C: int DeleteTakeStretchMarkers(MediaItem_Take* take, int idx, const int* countInOptional)

EEL: int DeleteTakeStretchMarkers(MediaItem_Take take, int idx, optional int countInOptional)

Lua: integer reaper.DeleteTakeStretchMarkers(MediaItem_Take take, integer idx, optional number countInOptional)

Python: Int RPR_DeleteTakeStretchMarkers(MediaItem_Take take, Int idx, const int countInOptional)

Deletes one or more stretch markers. Returns number of stretch markers deleted.



C: bool DeleteTempoTimeSigMarker(ReaProject* project, int markerindex)

EEL: bool DeleteTempoTimeSigMarker(ReaProject project, int markerindex)

Lua: boolean reaper.DeleteTempoTimeSigMarker(ReaProject project, integer markerindex)

Python: Boolean RPR_DeleteTempoTimeSigMarker(ReaProject project, Int markerindex)

Delete a tempo/time signature marker.



C: void DeleteTrack(MediaTrack* tr)

EEL: DeleteTrack(MediaTrack tr)

Lua: reaper.DeleteTrack(MediaTrack tr)

Python: RPR_DeleteTrack(MediaTrack tr)

deletes a track



C: bool DeleteTrackMediaItem(MediaTrack* tr, MediaItem* it)

EEL: bool DeleteTrackMediaItem(MediaTrack tr, MediaItem it)

Lua: boolean reaper.DeleteTrackMediaItem(MediaTrack tr, MediaItem it)

Python: Boolean RPR_DeleteTrackMediaItem(MediaTrack tr, MediaItem it)



C: void DestroyAudioAccessor(AudioAccessor* accessor)

EEL: DestroyAudioAccessor(AudioAccessor accessor)

Lua: reaper.DestroyAudioAccessor(AudioAccessor accessor)

Python: RPR_DestroyAudioAccessor(AudioAccessor accessor)

Destroy an audio accessor. Must only call from the main thread. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, GetAudioAccessorHash, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.



C: void Dock_UpdateDockID(const char* ident_str, int whichDock)

EEL: Dock_UpdateDockID("ident_str", int whichDock)

Lua: reaper.Dock_UpdateDockID(string ident_str, integer whichDock)

Python: RPR_Dock_UpdateDockID(String ident_str, Int whichDock)

updates preference for docker window ident_str to be in dock whichDock on next open



C: int DockIsChildOfDock(HWND hwnd, bool* isFloatingDockerOut)

EEL: int DockIsChildOfDock(HWND hwnd, bool &isFloatingDockerOut)

Lua: integer retval, boolean isFloatingDockerOut reaper.DockIsChildOfDock(HWND hwnd)

Python: (Int retval, HWND hwnd, Boolean isFloatingDockerOut) = RPR_DockIsChildOfDock(hwnd, isFloatingDockerOut)

returns dock index that contains hwnd, or -1



C: void DockWindowActivate(HWND hwnd)

EEL: DockWindowActivate(HWND hwnd)

Lua: reaper.DockWindowActivate(HWND hwnd)

Python: RPR_DockWindowActivate(HWND hwnd)



C: void DockWindowAdd(HWND hwnd, const char* name, int pos, bool allowShow)

EEL: DockWindowAdd(HWND hwnd, "name", int pos, bool allowShow)

Lua: reaper.DockWindowAdd(HWND hwnd, string name, integer pos, boolean allowShow)

Python: RPR_DockWindowAdd(HWND hwnd, String name, Int pos, Boolean allowShow)



C: void DockWindowAddEx(HWND hwnd, const char* name, const char* identstr, bool allowShow)

EEL: DockWindowAddEx(HWND hwnd, "name", "identstr", bool allowShow)

Lua: reaper.DockWindowAddEx(HWND hwnd, string name, string identstr, boolean allowShow)

Python: RPR_DockWindowAddEx(HWND hwnd, String name, String identstr, Boolean allowShow)



C: void DockWindowRefresh()

EEL: DockWindowRefresh()

Lua: reaper.DockWindowRefresh()

Python: RPR_DockWindowRefresh()



C: void DockWindowRefreshForHWND(HWND hwnd)

EEL: DockWindowRefreshForHWND(HWND hwnd)

Lua: reaper.DockWindowRefreshForHWND(HWND hwnd)

Python: RPR_DockWindowRefreshForHWND(HWND hwnd)



C: void DockWindowRemove(HWND hwnd)

EEL: DockWindowRemove(HWND hwnd)

Lua: reaper.DockWindowRemove(HWND hwnd)

Python: RPR_DockWindowRemove(HWND hwnd)



C: bool EditTempoTimeSigMarker(ReaProject* project, int markerindex)

EEL: bool EditTempoTimeSigMarker(ReaProject project, int markerindex)

Lua: boolean reaper.EditTempoTimeSigMarker(ReaProject project, integer markerindex)

Python: Boolean RPR_EditTempoTimeSigMarker(ReaProject project, Int markerindex)

Open the tempo/time signature marker editor dialog.



C: void EnsureNotCompletelyOffscreen(RECT* rOut)

EEL: EnsureNotCompletelyOffscreen(int &rOut.left, int &rOut.top, int &rOut.right, int &rOut.bot)

Lua: numberrOut.left, numberrOut.top, numberrOut.right, numberrOut.bot reaper.EnsureNotCompletelyOffscreen()

Python: RPR_EnsureNotCompletelyOffscreen(RECT rOut)

call with a saved window rect for your window and it'll correct any positioning info.



C: bool EnumPitchShiftModes(int mode, const char** strOut)

EEL: bool EnumPitchShiftModes(int mode, #strOut)

Lua: boolean retval, string strOut reaper.EnumPitchShiftModes(integer mode)

Python: Boolean RPR_EnumPitchShiftModes(Int mode, String strOut)

Start querying modes at 0, returns FALSE when no more modes possible, sets strOut to NULL if a mode is currently unsupported



C: const char* EnumPitchShiftSubModes(int mode, int submode)

EEL: bool EnumPitchShiftSubModes(#retval, int mode, int submode)

Lua: string reaper.EnumPitchShiftSubModes(integer mode, integer submode)

Python: String RPR_EnumPitchShiftSubModes(Int mode, Int submode)

Returns submode name, or NULL



C: int EnumProjectMarkers(int idx, bool* isrgnOut, double* posOut, double* rgnendOut, const char** nameOut, int* markrgnindexnumberOut)

EEL: int EnumProjectMarkers(int idx, bool &isrgnOut, &posOut, &rgnendOut, #nameOut, int &markrgnindexnumberOut)

Lua: integer retval, boolean isrgnOut, number posOut, number rgnendOut, string nameOut, number markrgnindexnumberOut reaper.EnumProjectMarkers(integer idx)

Python: (Int retval, Int idx, Boolean isrgnOut, Float posOut, Float rgnendOut, String nameOut, Int markrgnindexnumberOut) = RPR_EnumProjectMarkers(idx, isrgnOut, posOut, rgnendOut, nameOut, markrgnindexnumberOut)



C: int EnumProjectMarkers2(ReaProject* proj, int idx, bool* isrgnOut, double* posOut, double* rgnendOut, const char** nameOut, int* markrgnindexnumberOut)

EEL: int EnumProjectMarkers2(ReaProject proj, int idx, bool &isrgnOut, &posOut, &rgnendOut, #nameOut, int &markrgnindexnumberOut)

Lua: integer retval, boolean isrgnOut, number posOut, number rgnendOut, string nameOut, number markrgnindexnumberOut reaper.EnumProjectMarkers2(ReaProject proj, integer idx)

Python: (Int retval, ReaProject proj, Int idx, Boolean isrgnOut, Float posOut, Float rgnendOut, String nameOut, Int markrgnindexnumberOut) = RPR_EnumProjectMarkers2(proj, idx, isrgnOut, posOut, rgnendOut, nameOut, markrgnindexnumberOut)



C: int EnumProjectMarkers3(ReaProject* proj, int idx, bool* isrgnOut, double* posOut, double* rgnendOut, const char** nameOut, int* markrgnindexnumberOut, int* colorOut)

EEL: int EnumProjectMarkers3(ReaProject proj, int idx, bool &isrgnOut, &posOut, &rgnendOut, #nameOut, int &markrgnindexnumberOut, int &colorOut)

Lua: integer retval, boolean isrgnOut, number posOut, number rgnendOut, string nameOut, number markrgnindexnumberOut, number colorOut reaper.EnumProjectMarkers3(ReaProject proj, integer idx)

Python: (Int retval, ReaProject proj, Int idx, Boolean isrgnOut, Float posOut, Float rgnendOut, String nameOut, Int markrgnindexnumberOut, Int colorOut) = RPR_EnumProjectMarkers3(proj, idx, isrgnOut, posOut, rgnendOut, nameOut, markrgnindexnumberOut, colorOut)



C: ReaProject* EnumProjects(int idx, char* projfn, int projfn_sz)

EEL: ReaProject EnumProjects(int idx, #projfn)

Lua: ReaProject retval, string projfn reaper.EnumProjects(integer idx, string projfn)

Python: (ReaProject retval, Int idx, String projfn, Int projfn_sz) = RPR_EnumProjects(idx, projfn, projfn_sz)

idx=-1 for current project,projfn can be NULL if not interested in filename. use idx 0x40000000 for currently rendering project, if any.



C: bool EnumProjExtState(ReaProject* proj, const char* extname, int idx, char* keyOutOptional, int keyOutOptional_sz, char* valOutOptional, int valOutOptional_sz)

EEL: bool EnumProjExtState(ReaProject proj, "extname", int idx, optional #keyOutOptional, optional #valOutOptional)

Lua: boolean retval, optional string keyOutOptional, optional string valOutOptional reaper.EnumProjExtState(ReaProject proj, string extname, integer idx)

Python: (Boolean retval, ReaProject proj, String extname, Int idx, String keyOutOptional, Int keyOutOptional_sz, String valOutOptional, Int valOutOptional_sz) = RPR_EnumProjExtState(proj, extname, idx, keyOutOptional, keyOutOptional_sz, valOutOptional, valOutOptional_sz)

Enumerate the data stored with the project for a specific extname. Returns false when there is no more data. See SetProjExtState, GetProjExtState.



C: MediaTrack* EnumRegionRenderMatrix(ReaProject* proj, int regionindex, int rendertrack)

EEL: MediaTrack EnumRegionRenderMatrix(ReaProject proj, int regionindex, int rendertrack)

Lua: MediaTrack reaper.EnumRegionRenderMatrix(ReaProject proj, integer regionindex, integer rendertrack)

Python: MediaTrack RPR_EnumRegionRenderMatrix(ReaProject proj, Int regionindex, Int rendertrack)

Enumerate which tracks will be rendered within this region when using the region render matrix. When called with rendertrack==0, the function returns the first track that will be rendered (which may be the master track); rendertrack==1 will return the next track rendered, and so on. The function returns NULL when there are no more tracks that will be rendered within this region.



C: bool EnumTrackMIDIProgramNames(int track, int programNumber, char* programName, int programName_sz)

EEL: bool EnumTrackMIDIProgramNames(int track, int programNumber, #programName)

Lua: boolean retval, string programName reaper.EnumTrackMIDIProgramNames(integer track, integer programNumber, string programName)

Python: (Boolean retval, Int track, Int programNumber, String programName, Int programName_sz) = RPR_EnumTrackMIDIProgramNames(track, programNumber, programName, programName_sz)

returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated



C: bool EnumTrackMIDIProgramNamesEx(ReaProject* proj, MediaTrack* track, int programNumber, char* programName, int programName_sz)

EEL: bool EnumTrackMIDIProgramNamesEx(ReaProject proj, MediaTrack track, int programNumber, #programName)

Lua: boolean retval, string programName reaper.EnumTrackMIDIProgramNamesEx(ReaProject proj, MediaTrack track, integer programNumber, string programName)

Python: (Boolean retval, ReaProject proj, MediaTrack track, Int programNumber, String programName, Int programName_sz) = RPR_EnumTrackMIDIProgramNamesEx(proj, track, programNumber, programName, programName_sz)

returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated



C: int Envelope_Evaluate(TrackEnvelope* envelope, double time, double samplerate, int samplesRequested, double* valueOutOptional, double* dVdSOutOptional, double* ddVdSOutOptional, double* dddVdSOutOptional)

EEL: int Envelope_Evaluate(TrackEnvelope envelope, time, samplerate, int samplesRequested, optional &valueOutOptional, optional &dVdSOutOptional, optional &ddVdSOutOptional, optional &dddVdSOutOptional)

Lua: integer retval, optional number valueOutOptional, optional number dVdSOutOptional, optional number ddVdSOutOptional, optional number dddVdSOutOptional reaper.Envelope_Evaluate(TrackEnvelope envelope, number time, number samplerate, integer samplesRequested)

Python: (Int retval, TrackEnvelope envelope, Float time, Float samplerate, Int samplesRequested, Float valueOutOptional, Float dVdSOutOptional, Float ddVdSOutOptional, Float dddVdSOutOptional) = RPR_Envelope_Evaluate(envelope, time, samplerate, samplesRequested, valueOutOptional, dVdSOutOptional, ddVdSOutOptional, dddVdSOutOptional)

Get the effective envelope value at a given time position. samplesRequested is how long the caller expects until the next call to Envelope_Evaluate (often, the buffer block size). The return value is how many samples beyond that time position that the returned values are valid. dVdS is the change in value per sample (first derivative), ddVdS is the seond derivative, dddVdS is the third derivative. See GetEnvelopeScalingMode.



C: bool Envelope_SortPoints(TrackEnvelope* envelope)

EEL: bool Envelope_SortPoints(TrackEnvelope envelope)

Lua: boolean reaper.Envelope_SortPoints(TrackEnvelope envelope)

Python: Boolean RPR_Envelope_SortPoints(TrackEnvelope envelope)

Sort envelope points by time. See SetEnvelopePoint, InsertEnvelopePoint.



C: bool file_exists(const char* path)

EEL: bool file_exists("path")

Lua: boolean reaper.file_exists(string path)

Python: Boolean RPR_file_exists(String path)

returns true if path points to a valid, readable file



C: int FindTempoTimeSigMarker(ReaProject* project, double time)

EEL: int FindTempoTimeSigMarker(ReaProject project, time)

Lua: integer reaper.FindTempoTimeSigMarker(ReaProject project, number time)

Python: Int RPR_FindTempoTimeSigMarker(ReaProject project, Float time)

Find the tempo/time signature marker that falls at or before this time position (the marker that is in effect as of this time position).



C: void format_timestr(double tpos, char* buf, int buf_sz)

EEL: format_timestr(tpos, #buf)

Lua: string buf reaper.format_timestr(number tpos, string buf)

Python: (Float tpos, String buf, Int buf_sz) = RPR_format_timestr(tpos, buf, buf_sz)

time formatting mode overrides: -1=proj default.
0=time
1=measures.beats + time
2=measures.beats
3=seconds
4=samples
5=h:m:s:f



C: void format_timestr_len(double tpos, char* buf, int buf_sz, double offset, int modeoverride)

EEL: format_timestr_len(tpos, #buf, offset, int modeoverride)

Lua: string buf reaper.format_timestr_len(number tpos, string buf, number offset, integer modeoverride)

Python: (Float tpos, String buf, Int buf_sz, Float offset, Int modeoverride) = RPR_format_timestr_len(tpos, buf, buf_sz, offset, modeoverride)

time formatting mode overrides: -1=proj default.
0=time
1=measures.beats + time
2=measures.beats
3=seconds
4=samples
5=h:m:s:f
offset is start of where the length will be calculated from



C: void format_timestr_pos(double tpos, char* buf, int buf_sz, int modeoverride)

EEL: format_timestr_pos(tpos, #buf, int modeoverride)

Lua: string buf reaper.format_timestr_pos(number tpos, string buf, integer modeoverride)

Python: (Float tpos, String buf, Int buf_sz, Int modeoverride) = RPR_format_timestr_pos(tpos, buf, buf_sz, modeoverride)

time formatting mode overrides: -1=proj default.
0=time
1=measures.beats + time
2=measures.beats
3=seconds
4=samples
5=h:m:s:f



C: void genGuid(GUID* g)

EEL: genGuid(#gGUID)

Lua: string gGUID reaper.genGuid(string gGUID)

Python: RPR_genGuid(GUID g)



C: const char* get_ini_file()

EEL: bool get_ini_file(#retval)

Lua: string reaper.get_ini_file()

Python: String RPR_get_ini_file()



C: MediaItem_Take* GetActiveTake(MediaItem* item)

EEL: MediaItem_Take GetActiveTake(MediaItem item)

Lua: MediaItem_Take reaper.GetActiveTake(MediaItem item)

Python: MediaItem_Take RPR_GetActiveTake(MediaItem item)

get the active take in this item



C: const char* GetAppVersion()

EEL: bool GetAppVersion(#retval)

Lua: string reaper.GetAppVersion()

Python: String RPR_GetAppVersion()



C: double GetAudioAccessorEndTime(AudioAccessor* accessor)

EEL: double GetAudioAccessorEndTime(AudioAccessor accessor)

Lua: number reaper.GetAudioAccessorEndTime(AudioAccessor accessor)

Python: Float RPR_GetAudioAccessorEndTime(AudioAccessor accessor)

Get the end time of the audio that can be returned from this accessor. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, GetAudioAccessorHash, GetAudioAccessorStartTime, GetAudioAccessorSamples.



C: void GetAudioAccessorHash(AudioAccessor* accessor, char* hashNeed128)

EEL: GetAudioAccessorHash(AudioAccessor accessor, #hashNeed128)

Lua: string hashNeed128 reaper.GetAudioAccessorHash(AudioAccessor accessor, string hashNeed128)

Python: (AudioAccessor accessor, String hashNeed128) = RPR_GetAudioAccessorHash(accessor, hashNeed128)

Get a short hash string (128 chars or less) that will change only if the underlying samples change. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.



C: int GetAudioAccessorSamples(AudioAccessor* accessor, int samplerate, int numchannels, double starttime_sec, int numsamplesperchannel, double* samplebuffer)

EEL: int GetAudioAccessorSamples(AudioAccessor accessor, int samplerate, int numchannels, starttime_sec, int numsamplesperchannel, buffer_ptr samplebuffer)

Lua: integer reaper.GetAudioAccessorSamples(AudioAccessor accessor, integer samplerate, integer numchannels, number starttime_sec, integer numsamplesperchannel, reaper.array samplebuffer)

Python: (Int retval, AudioAccessor accessor, Int samplerate, Int numchannels, Float starttime_sec, Int numsamplesperchannel, Float samplebuffer) = RPR_GetAudioAccessorSamples(accessor, samplerate, numchannels, starttime_sec, numsamplesperchannel, samplebuffer)

Get a block of samples from the audio accessor. Samples are extracted immediately pre-FX, and returned interleaved (first sample of first channel, first sample of second channel...). Returns 0 if no audio, 1 if audio, -1 on error. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, GetAudioAccessorHash, GetAudioAccessorStartTime, GetAudioAccessorEndTime.

This function has special handling in Python, and only returns two objects, the API function return value, and the sample buffer. Example usage:

tr = RPR_GetTrack(0, 0)
aa = RPR_CreateTrackAudioAccessor(tr)
buf = list([0]*2*1024) # 2 channels, 1024 samples each, initialized to zero
pos = 0.0
(ret, buf) = GetAudioAccessorSamples(aa, 44100, 2, pos, 1024, buf)
# buf now holds the first 2*1024 audio samples from the track.
# typically GetAudioAccessorSamples() would be called within a loop, increasing pos each time.




C: double GetAudioAccessorStartTime(AudioAccessor* accessor)

EEL: double GetAudioAccessorStartTime(AudioAccessor accessor)

Lua: number reaper.GetAudioAccessorStartTime(AudioAccessor accessor)

Python: Float RPR_GetAudioAccessorStartTime(AudioAccessor accessor)

Get the start time of the audio that can be returned from this accessor. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, GetAudioAccessorHash, GetAudioAccessorEndTime, GetAudioAccessorSamples.



C: int GetConfigWantsDock(const char* ident_str)

EEL: int GetConfigWantsDock("ident_str")

Lua: integer reaper.GetConfigWantsDock(string ident_str)

Python: Int RPR_GetConfigWantsDock(String ident_str)

gets the dock ID desired by ident_str, if any



C: ReaProject* GetCurrentProjectInLoadSave()

EEL: ReaProject GetCurrentProjectInLoadSave()

Lua: ReaProject reaper.GetCurrentProjectInLoadSave()

Python: ReaProject RPR_GetCurrentProjectInLoadSave()

returns current project if in load/save (usually only used from project_config_extension_t)



C: int GetCursorContext()

EEL: int GetCursorContext()

Lua: integer reaper.GetCursorContext()

Python: Int RPR_GetCursorContext()

return the current cursor context: 0 if track panels, 1 if items, 2 if envelopes, otherwise unknown



C: int GetCursorContext2(bool want_last_valid)

EEL: int GetCursorContext2(bool want_last_valid)

Lua: integer reaper.GetCursorContext2(boolean want_last_valid)

Python: Int RPR_GetCursorContext2(Boolean want_last_valid)

0 if track panels, 1 if items, 2 if envelopes, otherwise unknown (unlikely when want_last_valid is true)



C: double GetCursorPosition()

EEL: double GetCursorPosition()

Lua: number reaper.GetCursorPosition()

Python: Float RPR_GetCursorPosition()

edit cursor position



C: double GetCursorPositionEx(ReaProject* proj)

EEL: double GetCursorPositionEx(ReaProject proj)

Lua: number reaper.GetCursorPositionEx(ReaProject proj)

Python: Float RPR_GetCursorPositionEx(ReaProject proj)

edit cursor position



C: int GetDisplayedMediaItemColor(MediaItem* item)

EEL: int GetDisplayedMediaItemColor(MediaItem item)

Lua: integer reaper.GetDisplayedMediaItemColor(MediaItem item)

Python: Int RPR_GetDisplayedMediaItemColor(MediaItem item)

returns the custom take, item, or track color that is used (according to the user preference) to color the media item. The color is returned as 0x01RRGGBB, so a return of zero means "no color", not black.



C: int GetDisplayedMediaItemColor2(MediaItem* item, MediaItem_Take* take)

EEL: int GetDisplayedMediaItemColor2(MediaItem item, MediaItem_Take take)

Lua: integer reaper.GetDisplayedMediaItemColor2(MediaItem item, MediaItem_Take take)

Python: Int RPR_GetDisplayedMediaItemColor2(MediaItem item, MediaItem_Take take)

returns the custom take, item, or track color that is used (according to the user preference) to color the media item. The color is returned as 0x01RRGGBB, so a return of zero means "no color", not black.



C: bool GetEnvelopeName(TrackEnvelope* env, char* buf, int buf_sz)

EEL: bool GetEnvelopeName(TrackEnvelope env, #buf)

Lua: boolean retval, string buf reaper.GetEnvelopeName(TrackEnvelope env, string buf)

Python: (Boolean retval, TrackEnvelope env, String buf, Int buf_sz) = RPR_GetEnvelopeName(env, buf, buf_sz)



C: bool GetEnvelopePoint(TrackEnvelope* envelope, int ptidx, double* timeOutOptional, double* valueOutOptional, int* shapeOutOptional, double* tensionOutOptional, bool* selectedOutOptional)

EEL: bool GetEnvelopePoint(TrackEnvelope envelope, int ptidx, optional &timeOutOptional, optional &valueOutOptional, optional int &shapeOutOptional, optional &tensionOutOptional, optional bool &selectedOutOptional)

Lua: boolean retval, optional number timeOutOptional, optional number valueOutOptional, optional number shapeOutOptional, optional number tensionOutOptional, optional boolean selectedOutOptional reaper.GetEnvelopePoint(TrackEnvelope envelope, integer ptidx)

Python: (Boolean retval, TrackEnvelope envelope, Int ptidx, Float timeOutOptional, Float valueOutOptional, Int shapeOutOptional, Float tensionOutOptional, Boolean selectedOutOptional) = RPR_GetEnvelopePoint(envelope, ptidx, timeOutOptional, valueOutOptional, shapeOutOptional, tensionOutOptional, selectedOutOptional)

Get the attributes of an envelope point. See GetEnvelopePointByTime, SetEnvelopePoint.



C: int GetEnvelopePointByTime(TrackEnvelope* envelope, double time)

EEL: int GetEnvelopePointByTime(TrackEnvelope envelope, time)

Lua: integer reaper.GetEnvelopePointByTime(TrackEnvelope envelope, number time)

Python: Int RPR_GetEnvelopePointByTime(TrackEnvelope envelope, Float time)

Returns the envelope point at or immediately prior to the given time position. See GetEnvelopePoint, SetEnvelopePoint, Envelope_Evaluate.



C: int GetEnvelopeScalingMode(TrackEnvelope* env)

EEL: int GetEnvelopeScalingMode(TrackEnvelope env)

Lua: integer reaper.GetEnvelopeScalingMode(TrackEnvelope env)

Python: Int RPR_GetEnvelopeScalingMode(TrackEnvelope env)

Returns the envelope scaling mode: 0=no scaling, 1=fader scaling. All API functions deal with raw envelope point values, to convert raw from/to scaled values see ScaleFromEnvelopeMode, ScaleToEnvelopeMode.



C: bool GetEnvelopeStateChunk(TrackEnvelope* env, char* strNeedBig, int strNeedBig_sz, bool isundoOptional)

EEL: bool GetEnvelopeStateChunk(TrackEnvelope env, #strNeedBig, bool isundoOptional)

Lua: boolean retval, string strNeedBig reaper.GetEnvelopeStateChunk(TrackEnvelope env, string strNeedBig, boolean isundoOptional)

Python: (Boolean retval, TrackEnvelope env, String strNeedBig, Int strNeedBig_sz, Boolean isundoOptional) = RPR_GetEnvelopeStateChunk(env, strNeedBig, strNeedBig_sz, isundoOptional)

Gets the RPPXML state of an envelope, returns true if successful. Undo flag is a performance/caching hint.



C: const char* GetExePath()

EEL: bool GetExePath(#retval)

Lua: string reaper.GetExePath()

Python: String RPR_GetExePath()

returns path of REAPER.exe (not including EXE), i.e. C:\Program Files\REAPER



C: const char* GetExtState(const char* section, const char* key)

EEL: bool GetExtState(#retval, "section", "key")

Lua: string reaper.GetExtState(string section, string key)

Python: String RPR_GetExtState(String section, String key)

Get the extended state value for a specific section and key. See SetExtState, DeleteExtState, HasExtState.



C: int GetFocusedFX(int* tracknumberOut, int* itemnumberOut, int* fxnumberOut)

EEL: int GetFocusedFX(int &tracknumberOut, int &itemnumberOut, int &fxnumberOut)

Lua: integer retval, number tracknumberOut, number itemnumberOut, number fxnumberOut reaper.GetFocusedFX()

Python: (Int retval, Int tracknumberOut, Int itemnumberOut, Int fxnumberOut) = RPR_GetFocusedFX(tracknumberOut, itemnumberOut, fxnumberOut)

Returns 1 if a track FX window has focus, 2 if an item FX window has focus, 0 if no FX window has focus. tracknumber==0 means the master track, 1 means track 1, etc. itemnumber and fxnumber are zero-based. See GetLastTouchedFX.



C: int GetFreeDiskSpaceForRecordPath(ReaProject* proj, int pathidx)

EEL: int GetFreeDiskSpaceForRecordPath(ReaProject proj, int pathidx)

Lua: integer reaper.GetFreeDiskSpaceForRecordPath(ReaProject proj, integer pathidx)

Python: Int RPR_GetFreeDiskSpaceForRecordPath(ReaProject proj, Int pathidx)

returns free disk space in megabytes, pathIdx 0 for normal, 1 for alternate.



C: TrackEnvelope* GetFXEnvelope(MediaTrack* track, int fxindex, int parameterindex, bool create)

EEL: TrackEnvelope GetFXEnvelope(MediaTrack track, int fxindex, int parameterindex, bool create)

Lua: TrackEnvelope reaper.GetFXEnvelope(MediaTrack track, integer fxindex, integer parameterindex, boolean create)

Python: TrackEnvelope RPR_GetFXEnvelope(MediaTrack track, Int fxindex, Int parameterindex, Boolean create)

Returns the FX parameter envelope. If the envelope does not exist and create=true, the envelope will be created.



C: int GetGlobalAutomationOverride()

EEL: int GetGlobalAutomationOverride()

Lua: integer reaper.GetGlobalAutomationOverride()

Python: Int RPR_GetGlobalAutomationOverride()

return -1=no override, 0=trim/read, 1=read, 2=touch, 3=write, 4=latch, 5=bypass



C: double GetHZoomLevel()

EEL: double GetHZoomLevel()

Lua: number reaper.GetHZoomLevel()

Python: Float RPR_GetHZoomLevel()

returns pixels/second



C: const char* GetInputChannelName(int channelIndex)

EEL: bool GetInputChannelName(#retval, int channelIndex)

Lua: string reaper.GetInputChannelName(integer channelIndex)

Python: String RPR_GetInputChannelName(Int channelIndex)



C: void GetInputOutputLatency(int* inputlatencyOut, int* outputLatencyOut)

EEL: GetInputOutputLatency(int &inputlatencyOut, int &outputLatencyOut)

Lua: number inputlatencyOut retval, number outputLatencyOut reaper.GetInputOutputLatency()

Python: (Int inputlatencyOut, Int outputLatencyOut) = RPR_GetInputOutputLatency(inputlatencyOut, outputLatencyOut)

Gets the audio device input/output latency in samples



C: double GetItemEditingTime2(PCM_source** which_itemOut, int* flagsOut)

EEL: double GetItemEditingTime2(PCM_source &which_itemOut, int &flagsOut)

Lua: number, PCM_source which_itemOut, number flagsOut reaper.GetItemEditingTime2()

Python: (Float retval, PCM_source* which_itemOut, Int flagsOut) = RPR_GetItemEditingTime2(which_itemOut, flagsOut)

returns time of relevant edit, set which_item to the pcm_source (if applicable), flags (if specified) will be set to 1 for edge resizing, 2 for fade change, 4 for item move



C: ReaProject* GetItemProjectContext(MediaItem* item)

EEL: ReaProject GetItemProjectContext(MediaItem item)

Lua: ReaProject reaper.GetItemProjectContext(MediaItem item)

Python: ReaProject RPR_GetItemProjectContext(MediaItem item)



C: bool GetItemStateChunk(MediaItem* item, char* strNeedBig, int strNeedBig_sz, bool isundoOptional)

EEL: bool GetItemStateChunk(MediaItem item, #strNeedBig, bool isundoOptional)

Lua: boolean retval, string strNeedBig reaper.GetItemStateChunk(MediaItem item, string strNeedBig, boolean isundoOptional)

Python: (Boolean retval, MediaItem item, String strNeedBig, Int strNeedBig_sz, Boolean isundoOptional) = RPR_GetItemStateChunk(item, strNeedBig, strNeedBig_sz, isundoOptional)

Gets the RPPXML state of an item, returns true if successful. Undo flag is a performance/caching hint.



C: void GetLastMarkerAndCurRegion(ReaProject* proj, double time, int* markeridxOut, int* regionidxOut)

EEL: GetLastMarkerAndCurRegion(ReaProject proj, time, int &markeridxOut, int &regionidxOut)

Lua: number markeridxOut retval, number regionidxOut reaper.GetLastMarkerAndCurRegion(ReaProject proj, number time)

Python: (ReaProject proj, Float time, Int markeridxOut, Int regionidxOut) = RPR_GetLastMarkerAndCurRegion(proj, time, markeridxOut, regionidxOut)

Get the last project marker before time, and/or the project region that includes time. markeridx and regionidx are returned not necessarily as the displayed marker/region index, but as the index that can be passed to EnumProjectMarkers. Either or both of markeridx and regionidx may be NULL. See EnumProjectMarkers.



C: bool GetLastTouchedFX(int* tracknumberOut, int* fxnumberOut, int* paramnumberOut)

EEL: bool GetLastTouchedFX(int &tracknumberOut, int &fxnumberOut, int &paramnumberOut)

Lua: boolean retval, number tracknumberOut, number fxnumberOut, number paramnumberOut reaper.GetLastTouchedFX()

Python: (Boolean retval, Int tracknumberOut, Int fxnumberOut, Int paramnumberOut) = RPR_GetLastTouchedFX(tracknumberOut, fxnumberOut, paramnumberOut)

Returns true if the last touched FX parameter is valid, false otherwise. tracknumber==0 means the master track, 1 means track 1, etc. fxnumber and paramnumber are zero-based. See GetFocusedFX.



C: MediaTrack* GetLastTouchedTrack()

EEL: MediaTrack GetLastTouchedTrack()

Lua: MediaTrack reaper.GetLastTouchedTrack()

Python: MediaTrack RPR_GetLastTouchedTrack()



C: HWND GetMainHwnd()

EEL: HWND GetMainHwnd()

Lua: HWND reaper.GetMainHwnd()

Python: HWND RPR_GetMainHwnd()



C: int GetMasterMuteSoloFlags()

EEL: int GetMasterMuteSoloFlags()

Lua: integer reaper.GetMasterMuteSoloFlags()

Python: Int RPR_GetMasterMuteSoloFlags()

&1=master mute,&2=master solo. This is deprecated as you can just query the master track as well.



C: MediaTrack* GetMasterTrack(ReaProject* proj)

EEL: MediaTrack GetMasterTrack(ReaProject proj)

Lua: MediaTrack reaper.GetMasterTrack(ReaProject proj)

Python: MediaTrack RPR_GetMasterTrack(ReaProject proj)



C: int GetMasterTrackVisibility()

EEL: int GetMasterTrackVisibility()

Lua: integer reaper.GetMasterTrackVisibility()

Python: Int RPR_GetMasterTrackVisibility()

returns &1 if the master track is visible in the TCP, &2 if visible in the mixer. See SetMasterTrackVisibility.



C: int GetMaxMidiInputs()

EEL: int GetMaxMidiInputs()

Lua: integer reaper.GetMaxMidiInputs()

Python: Int RPR_GetMaxMidiInputs()

returns max dev for midi inputs/outputs



C: int GetMaxMidiOutputs()

EEL: int GetMaxMidiOutputs()

Lua: integer reaper.GetMaxMidiOutputs()

Python: Int RPR_GetMaxMidiOutputs()



C: MediaItem* GetMediaItem(ReaProject* proj, int itemidx)

EEL: MediaItem GetMediaItem(ReaProject proj, int itemidx)

Lua: MediaItem reaper.GetMediaItem(ReaProject proj, integer itemidx)

Python: MediaItem RPR_GetMediaItem(ReaProject proj, Int itemidx)

get an item from a project by item count (zero-based) (proj=0 for active project)



C: MediaTrack* GetMediaItem_Track(MediaItem* item)

EEL: MediaTrack GetMediaItem_Track(MediaItem item)

Lua: MediaTrack reaper.GetMediaItem_Track(MediaItem item)

Python: MediaTrack RPR_GetMediaItem_Track(MediaItem item)

Get parent track of media item



C: double GetMediaItemInfo_Value(MediaItem* item, const char* parmname)

EEL: double GetMediaItemInfo_Value(MediaItem item, "parmname")

Lua: number reaper.GetMediaItemInfo_Value(MediaItem item, string parmname)

Python: Float RPR_GetMediaItemInfo_Value(MediaItem item, String parmname)

Get media item numerical-value attributes.
B_MUTE : bool * to muted state
B_LOOPSRC : bool * to loop source
B_ALLTAKESPLAY : bool * to all takes play
B_UISEL : bool * to ui selected
C_BEATATTACHMODE : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsosonly
C_LOCK : char * to one char of lock flags (&1 is locked, currently)
D_VOL : double * of item volume (volume bar)
D_POSITION : double * of item position (seconds)
D_LENGTH : double * of item length (seconds)
D_SNAPOFFSET : double * of item snap offset (seconds)
D_FADEINLEN : double * of item fade in length (manual, seconds)
D_FADEOUTLEN : double * of item fade out length (manual, seconds)
D_FADEINLEN_AUTO : double * of item autofade in length (seconds, -1 for no autofade set)
D_FADEOUTLEN_AUTO : double * of item autofade out length (seconds, -1 for no autofade set)
C_FADEINSHAPE : int * to fadein shape, 0=linear, ...
C_FADEOUTSHAPE : int * to fadeout shape
I_GROUPID : int * to group ID (0 = no group)
I_LASTY : int * to last y position in track (readonly)
I_LASTH : int * to last height in track (readonly)
I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
I_CURTAKE : int * to active take
IP_ITEMNUMBER : int, item number within the track (read-only, returns the item number directly)
F_FREEMODE_Y : float * to free mode y position (0..1)
F_FREEMODE_H : float * to free mode height (0..1)



C: int GetMediaItemNumTakes(MediaItem* item)

EEL: int GetMediaItemNumTakes(MediaItem item)

Lua: integer reaper.GetMediaItemNumTakes(MediaItem item)

Python: Int RPR_GetMediaItemNumTakes(MediaItem item)



C: MediaItem_Take* GetMediaItemTake(MediaItem* item, int tk)

EEL: MediaItem_Take GetMediaItemTake(MediaItem item, int tk)

Lua: MediaItem_Take reaper.GetMediaItemTake(MediaItem item, integer tk)

Python: MediaItem_Take RPR_GetMediaItemTake(MediaItem item, Int tk)



C: MediaItem* GetMediaItemTake_Item(MediaItem_Take* take)

EEL: MediaItem GetMediaItemTake_Item(MediaItem_Take take)

Lua: MediaItem reaper.GetMediaItemTake_Item(MediaItem_Take take)

Python: MediaItem RPR_GetMediaItemTake_Item(MediaItem_Take take)

Get parent item of media item take



C: PCM_source* GetMediaItemTake_Source(MediaItem_Take* take)

EEL: PCM_source GetMediaItemTake_Source(MediaItem_Take take)

Lua: PCM_source reaper.GetMediaItemTake_Source(MediaItem_Take take)

Python: PCM_source RPR_GetMediaItemTake_Source(MediaItem_Take take)

Get media source of media item take



C: MediaTrack* GetMediaItemTake_Track(MediaItem_Take* take)

EEL: MediaTrack GetMediaItemTake_Track(MediaItem_Take take)

Lua: MediaTrack reaper.GetMediaItemTake_Track(MediaItem_Take take)

Python: MediaTrack RPR_GetMediaItemTake_Track(MediaItem_Take take)

Get parent track of media item take



C: MediaItem_Take* GetMediaItemTakeByGUID(ReaProject* project, const GUID* guid)

EEL: MediaItem_Take GetMediaItemTakeByGUID(ReaProject project, "guidGUID")

Lua: MediaItem_Take reaper.GetMediaItemTakeByGUID(ReaProject project, string guidGUID)

Python: MediaItem_Take RPR_GetMediaItemTakeByGUID(ReaProject project, const GUID guid)



C: double GetMediaItemTakeInfo_Value(MediaItem_Take* take, const char* parmname)

EEL: double GetMediaItemTakeInfo_Value(MediaItem_Take take, "parmname")

Lua: number reaper.GetMediaItemTakeInfo_Value(MediaItem_Take take, string parmname)

Python: Float RPR_GetMediaItemTakeInfo_Value(MediaItem_Take take, String parmname)

Get media item take numerical-value attributes.
D_STARTOFFS : double *, start offset in take of item
D_VOL : double *, take volume
D_PAN : double *, take pan
D_PANLAW : double *, take pan law (-1.0=default, 0.5=-6dB, 1.0=+0dB, etc)
D_PLAYRATE : double *, take playrate (1.0=normal, 2.0=doublespeed, etc)
D_PITCH : double *, take pitch adjust (in semitones, 0.0=normal, +12 = one octave up, etc)
B_PPITCH, bool *, preserve pitch when changing rate
I_CHANMODE, int *, channel mode (0=normal, 1=revstereo, 2=downmix, 3=l, 4=r)
I_PITCHMODE, int *, pitch shifter mode, -1=proj default, otherwise high word=shifter low word = parameter
I_CUSTOMCOLOR : int *, custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
IP_TAKENUMBER : int, take number within the item (read-only, returns the take number directly)



C: MediaTrack* GetMediaItemTrack(MediaItem* item)

EEL: MediaTrack GetMediaItemTrack(MediaItem item)

Lua: MediaTrack reaper.GetMediaItemTrack(MediaItem item)

Python: MediaTrack RPR_GetMediaItemTrack(MediaItem item)



C: void GetMediaSourceFileName(PCM_source* source, char* filenamebuf, int filenamebuf_sz)

EEL: GetMediaSourceFileName(PCM_source source, #filenamebuf)

Lua: string filenamebuf reaper.GetMediaSourceFileName(PCM_source source, string filenamebuf)

Python: (PCM_source source, String filenamebuf, Int filenamebuf_sz) = RPR_GetMediaSourceFileName(source, filenamebuf, filenamebuf_sz)

Copies the media source filename to typebuf. Note that in-project MIDI media sources have no associated filename.



C: double GetMediaSourceLength(PCM_source* source, bool* lengthIsQNOut)

EEL: double GetMediaSourceLength(PCM_source source, bool &lengthIsQNOut)

Lua: number retval, boolean lengthIsQNOut reaper.GetMediaSourceLength(PCM_source source)

Python: (Float retval, PCM_source source, Boolean lengthIsQNOut) = RPR_GetMediaSourceLength(source, lengthIsQNOut)

Returns the length of the source media. If the media source is beat-based, the length will be in quarter notes, otherwise it will be in seconds.



C: int GetMediaSourceNumChannels(PCM_source* source)

EEL: int GetMediaSourceNumChannels(PCM_source source)

Lua: integer reaper.GetMediaSourceNumChannels(PCM_source source)

Python: Int RPR_GetMediaSourceNumChannels(PCM_source source)

Returns the number of channels in the source media.



C: int GetMediaSourceSampleRate(PCM_source* source)

EEL: int GetMediaSourceSampleRate(PCM_source source)

Lua: integer reaper.GetMediaSourceSampleRate(PCM_source source)

Python: Int RPR_GetMediaSourceSampleRate(PCM_source source)

Returns the sample rate. MIDI source media will return zero.



C: void GetMediaSourceType(PCM_source* source, char* typebuf, int typebuf_sz)

EEL: GetMediaSourceType(PCM_source source, #typebuf)

Lua: string typebuf reaper.GetMediaSourceType(PCM_source source, string typebuf)

Python: (PCM_source source, String typebuf, Int typebuf_sz) = RPR_GetMediaSourceType(source, typebuf, typebuf_sz)

copies the media source type ("WAV", "MIDI", etc) to typebuf



C: double GetMediaTrackInfo_Value(MediaTrack* tr, const char* parmname)

EEL: double GetMediaTrackInfo_Value(MediaTrack tr, "parmname")

Lua: number reaper.GetMediaTrackInfo_Value(MediaTrack tr, string parmname)

Python: Float RPR_GetMediaTrackInfo_Value(MediaTrack tr, String parmname)

Get track numerical-value attributes.
B_MUTE : bool * : mute flag
B_PHASE : bool * : invert track phase
IP_TRACKNUMBER : int : track number (returns zero if not found, -1 for master track) (read-only, returns the int directly)
I_SOLO : int * : 0=not soloed, 1=solo, 2=soloed in place
I_FXEN : int * : 0=fx bypassed, nonzero = fx active
I_RECARM : int * : 0=not record armed, 1=record armed
I_RECINPUT : int * : record input. <0 = no input, 0..n = mono hardware input, 512+n = rearoute input, 1024 set for stereo input pair. 4096 set for MIDI input, if set, then low 5 bits represent channel (0=all, 1-16=only chan), then next 5 bits represent physical input (63=all, 62=VKB)
I_RECMODE : int * : record mode (0=input, 1=stereo out, 2=none, 3=stereo out w/latcomp, 4=midi output, 5=mono out, 6=mono out w/ lat comp, 7=midi overdub, 8=midi replace
I_RECMON : int * : record monitor (0=off, 1=normal, 2=not when playing (tapestyle))
I_RECMONITEMS : int * : monitor items while recording (0=off, 1=on)
I_AUTOMODE : int * : track automation mode (0=trim/off, 1=read, 2=touch, 3=write, 4=latch
I_NCHAN : int * : number of track channels, must be 2-64, even
I_SELECTED : int * : track selected? 0 or 1
I_WNDH : int * : current TCP window height (Read-only)
I_FOLDERDEPTH : int * : folder depth change (0=normal, 1=track is a folder parent, -1=track is the last in the innermost folder, -2=track is the last in the innermost and next-innermost folders, etc
I_FOLDERCOMPACT : int * : folder compacting (only valid on folders), 0=normal, 1=small, 2=tiny children
I_MIDIHWOUT : int * : track midi hardware output index (<0 for disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31))
I_PERFFLAGS : int * : track perf flags (&1=no media buffering, &2=no anticipative FX)
I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
I_HEIGHTOVERRIDE : int * : custom height override for TCP window. 0 for none, otherwise size in pixels
D_VOL : double * : trim volume of track (0 (-inf)..1 (+0dB) .. 2 (+6dB) etc ..)
D_PAN : double * : trim pan of track (-1..1)
D_WIDTH : double * : width of track (-1..1)
D_DUALPANL : double * : dualpan position 1 (-1..1), only if I_PANMODE==6
D_DUALPANR : double * : dualpan position 2 (-1..1), only if I_PANMODE==6
I_PANMODE : int * : pan mode (0 = classic 3.x, 3=new balance, 5=stereo pan, 6 = dual pan)
D_PANLAW : double * : pan law of track. <0 for project default, 1.0 for +0dB, etc
P_ENV : read only, returns TrackEnvelope *, setNewValue= B_SHOWINMIXER : bool * : show track panel in mixer -- do not use on master
B_SHOWINTCP : bool * : show track panel in tcp -- do not use on master
B_MAINSEND : bool * : track sends audio to parent
B_FREEMODE : bool * : track free-mode enabled (requires UpdateTimeline() after changing etc)
C_BEATATTACHMODE : char * : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsposonly
F_MCP_FXSEND_SCALE : float * : scale of fx+send area in MCP (0.0=smallest allowed, 1=max allowed)
F_MCP_SENDRGN_SCALE : float * : scale of send area as proportion of the fx+send total area (0=min allow, 1=max)



C: bool GetMIDIInputName(int dev, char* nameout, int nameout_sz)

EEL: bool GetMIDIInputName(int dev, #nameout)

Lua: boolean retval, string nameout reaper.GetMIDIInputName(integer dev, string nameout)

Python: (Boolean retval, Int dev, String nameout, Int nameout_sz) = RPR_GetMIDIInputName(dev, nameout, nameout_sz)

returns true if device present



C: bool GetMIDIOutputName(int dev, char* nameout, int nameout_sz)

EEL: bool GetMIDIOutputName(int dev, #nameout)

Lua: boolean retval, string nameout reaper.GetMIDIOutputName(integer dev, string nameout)

Python: (Boolean retval, Int dev, String nameout, Int nameout_sz) = RPR_GetMIDIOutputName(dev, nameout, nameout_sz)

returns true if device present



C: MediaTrack* GetMixerScroll()

EEL: MediaTrack GetMixerScroll()

Lua: MediaTrack reaper.GetMixerScroll()

Python: MediaTrack RPR_GetMixerScroll()

Get the leftmost track visible in the mixer



C: void GetMouseModifier(const char* context, int modifier_flag, char* action, int action_sz)

EEL: GetMouseModifier("context", int modifier_flag, #action)

Lua: string action reaper.GetMouseModifier(string context, integer modifier_flag, string action)

Python: (String context, Int modifier_flag, String action, Int action_sz) = RPR_GetMouseModifier(context, modifier_flag, action, action_sz)

Get the current mouse modifier assignment for a specific modifier key assignment, in a specific context.
action will be filled in with the command ID number for a built-in mouse modifier
or built-in REAPER command ID, or the custom action ID string.
See SetMouseModifier for more information.



C: int GetNumAudioInputs()

EEL: int GetNumAudioInputs()

Lua: integer reaper.GetNumAudioInputs()

Python: Int RPR_GetNumAudioInputs()

Return number of normal audio hardware inputs available



C: int GetNumAudioOutputs()

EEL: int GetNumAudioOutputs()

Lua: integer reaper.GetNumAudioOutputs()

Python: Int RPR_GetNumAudioOutputs()

Return number of normal audio hardware outputs available



C: int GetNumMIDIInputs()

EEL: int GetNumMIDIInputs()

Lua: integer reaper.GetNumMIDIInputs()

Python: Int RPR_GetNumMIDIInputs()

returns max number of real midi hardware inputs



C: int GetNumMIDIOutputs()

EEL: int GetNumMIDIOutputs()

Lua: integer reaper.GetNumMIDIOutputs()

Python: Int RPR_GetNumMIDIOutputs()

returns max number of real midi hardware outputs



C: int GetNumTracks()

EEL: int GetNumTracks()

Lua: integer reaper.GetNumTracks()

Python: Int RPR_GetNumTracks()



C: const char* GetOS()

EEL: bool GetOS(#retval)

Lua: string reaper.GetOS()

Python: String RPR_GetOS()

Returns "Win32", "Win64", "OSX32", "OSX64", or "Other".



C: const char* GetOutputChannelName(int channelIndex)

EEL: bool GetOutputChannelName(#retval, int channelIndex)

Lua: string reaper.GetOutputChannelName(integer channelIndex)

Python: String RPR_GetOutputChannelName(Int channelIndex)



C: double GetOutputLatency()

EEL: double GetOutputLatency()

Lua: number reaper.GetOutputLatency()

Python: Float RPR_GetOutputLatency()

returns output latency in seconds



C: MediaTrack* GetParentTrack(MediaTrack* track)

EEL: MediaTrack GetParentTrack(MediaTrack track)

Lua: MediaTrack reaper.GetParentTrack(MediaTrack track)

Python: MediaTrack RPR_GetParentTrack(MediaTrack track)



C: void GetPeakFileName(const char* fn, char* buf, int buf_sz)

EEL: GetPeakFileName("fn", #buf)

Lua: string buf reaper.GetPeakFileName(string fn, string buf)

Python: (String fn, String buf, Int buf_sz) = RPR_GetPeakFileName(fn, buf, buf_sz)

get the peak file name for a given file (can be either filename.reapeaks,or a hashed filename in another path)



C: void GetPeakFileNameEx(const char* fn, char* buf, int buf_sz, bool forWrite)

EEL: GetPeakFileNameEx("fn", #buf, bool forWrite)

Lua: string buf reaper.GetPeakFileNameEx(string fn, string buf, boolean forWrite)

Python: (String fn, String buf, Int buf_sz, Boolean forWrite) = RPR_GetPeakFileNameEx(fn, buf, buf_sz, forWrite)

get the peak file name for a given file (can be either filename.reapeaks,or a hashed filename in another path)



C: void GetPeakFileNameEx2(const char* fn, char* buf, int buf_sz, bool forWrite, const char* peaksfileextension)

EEL: GetPeakFileNameEx2("fn", #buf, bool forWrite, "peaksfileextension")

Lua: string buf reaper.GetPeakFileNameEx2(string fn, string buf, boolean forWrite, string peaksfileextension)

Python: (String fn, String buf, Int buf_sz, Boolean forWrite, String peaksfileextension) = RPR_GetPeakFileNameEx2(fn, buf, buf_sz, forWrite, peaksfileextension)

Like GetPeakFileNameEx, but you can specify peaksfileextension such as ".reapeaks"



C: double GetPlayPosition()

EEL: double GetPlayPosition()

Lua: number reaper.GetPlayPosition()

Python: Float RPR_GetPlayPosition()

returns latency-compensated actual-what-you-hear position



C: double GetPlayPosition2()

EEL: double GetPlayPosition2()

Lua: number reaper.GetPlayPosition2()

Python: Float RPR_GetPlayPosition2()

returns position of next audio block being processed



C: double GetPlayPosition2Ex(ReaProject* proj)

EEL: double GetPlayPosition2Ex(ReaProject proj)

Lua: number reaper.GetPlayPosition2Ex(ReaProject proj)

Python: Float RPR_GetPlayPosition2Ex(ReaProject proj)

returns position of next audio block being processed



C: double GetPlayPositionEx(ReaProject* proj)

EEL: double GetPlayPositionEx(ReaProject proj)

Lua: number reaper.GetPlayPositionEx(ReaProject proj)

Python: Float RPR_GetPlayPositionEx(ReaProject proj)

returns latency-compensated actual-what-you-hear position



C: int GetPlayState()

EEL: int GetPlayState()

Lua: integer reaper.GetPlayState()

Python: Int RPR_GetPlayState()

&1=playing,&2=pause,&=4 is recording



C: int GetPlayStateEx(ReaProject* proj)

EEL: int GetPlayStateEx(ReaProject proj)

Lua: integer reaper.GetPlayStateEx(ReaProject proj)

Python: Int RPR_GetPlayStateEx(ReaProject proj)

&1=playing,&2=pause,&=4 is recording



C: void GetProjectPath(char* buf, int buf_sz)

EEL: GetProjectPath(#buf)

Lua: string buf reaper.GetProjectPath(string buf)

Python: (String buf, Int buf_sz) = RPR_GetProjectPath(buf, buf_sz)



C: void GetProjectPathEx(ReaProject* proj, char* buf, int buf_sz)

EEL: GetProjectPathEx(ReaProject proj, #buf)

Lua: string buf reaper.GetProjectPathEx(ReaProject proj, string buf)

Python: (ReaProject proj, String buf, Int buf_sz) = RPR_GetProjectPathEx(proj, buf, buf_sz)



C: int GetProjectStateChangeCount(ReaProject* proj)

EEL: int GetProjectStateChangeCount(ReaProject proj)

Lua: integer reaper.GetProjectStateChangeCount(ReaProject proj)

Python: Int RPR_GetProjectStateChangeCount(ReaProject proj)

returns an integer that changes when the project state changes



C: void GetProjectTimeSignature(double* bpmOut, double* bpiOut)

EEL: GetProjectTimeSignature(&bpmOut, &bpiOut)

Lua: number bpmOut retval, number bpiOut reaper.GetProjectTimeSignature()

Python: (Float bpmOut, Float bpiOut) = RPR_GetProjectTimeSignature(bpmOut, bpiOut)

deprecated



C: void GetProjectTimeSignature2(ReaProject* proj, double* bpmOut, double* bpiOut)

EEL: GetProjectTimeSignature2(ReaProject proj, &bpmOut, &bpiOut)

Lua: number bpmOut retval, number bpiOut reaper.GetProjectTimeSignature2(ReaProject proj)

Python: (ReaProject proj, Float bpmOut, Float bpiOut) = RPR_GetProjectTimeSignature2(proj, bpmOut, bpiOut)

Gets basic time signature (beats per minute, numerator of time signature in bpi)
this does not reflect tempo envelopes but is purely what is set in the project settings.



C: int GetProjExtState(ReaProject* proj, const char* extname, const char* key, char* valOutNeedBig, int valOutNeedBig_sz)

EEL: int GetProjExtState(ReaProject proj, "extname", "key", #valOutNeedBig)

Lua: integer retval, string valOutNeedBig reaper.GetProjExtState(ReaProject proj, string extname, string key)

Python: (Int retval, ReaProject proj, String extname, String key, String valOutNeedBig, Int valOutNeedBig_sz) = RPR_GetProjExtState(proj, extname, key, valOutNeedBig, valOutNeedBig_sz)

Get the value previously associated with this extname and key, the last time the project was saved. See SetProjExtState, EnumProjExtState.



C: const char* GetResourcePath()

EEL: bool GetResourcePath(#retval)

Lua: string reaper.GetResourcePath()

Python: String RPR_GetResourcePath()

returns path where ini files are stored, other things are in subdirectories.



C: TrackEnvelope* GetSelectedEnvelope(ReaProject* proj)

EEL: TrackEnvelope GetSelectedEnvelope(ReaProject proj)

Lua: TrackEnvelope reaper.GetSelectedEnvelope(ReaProject proj)

Python: TrackEnvelope RPR_GetSelectedEnvelope(ReaProject proj)

get the currently selected envelope, returns 0 if no envelope is selected



C: MediaItem* GetSelectedMediaItem(ReaProject* proj, int selitem)

EEL: MediaItem GetSelectedMediaItem(ReaProject proj, int selitem)

Lua: MediaItem reaper.GetSelectedMediaItem(ReaProject proj, integer selitem)

Python: MediaItem RPR_GetSelectedMediaItem(ReaProject proj, Int selitem)

get a selected item by selected item count (zero-based) (proj=0 for active project)



C: MediaTrack* GetSelectedTrack(ReaProject* proj, int seltrackidx)

EEL: MediaTrack GetSelectedTrack(ReaProject proj, int seltrackidx)

Lua: MediaTrack reaper.GetSelectedTrack(ReaProject proj, integer seltrackidx)

Python: MediaTrack RPR_GetSelectedTrack(ReaProject proj, Int seltrackidx)

get a selected track from a project by selected track count (zero-based) (proj=0 for active project)



C: TrackEnvelope* GetSelectedTrackEnvelope(ReaProject* proj)

EEL: TrackEnvelope GetSelectedTrackEnvelope(ReaProject proj)

Lua: TrackEnvelope reaper.GetSelectedTrackEnvelope(ReaProject proj)

Python: TrackEnvelope RPR_GetSelectedTrackEnvelope(ReaProject proj)

get the currently selected track envelope, returns 0 if no envelope is selected



C: void GetSet_ArrangeView2(ReaProject* proj, bool isSet, int screen_x_start, int screen_x_end, double* start_timeOut, double* end_timeOut)

EEL: GetSet_ArrangeView2(ReaProject proj, bool isSet, int screen_x_start, int screen_x_end, &start_timeOut, &end_timeOut)

Lua: number start_timeOut retval, number end_timeOut reaper.GetSet_ArrangeView2(ReaProject proj, boolean isSet, integer screen_x_start, integer screen_x_end)

Python: (ReaProject proj, Boolean isSet, Int screen_x_start, Int screen_x_end, Float start_timeOut, Float end_timeOut) = RPR_GetSet_ArrangeView2(proj, isSet, screen_x_start, screen_x_end, start_timeOut, end_timeOut)



C: void GetSet_LoopTimeRange(bool isSet, bool isLoop, double* startOut, double* endOut, bool allowautoseek)

EEL: GetSet_LoopTimeRange(bool isSet, bool isLoop, &startOut, &endOut, bool allowautoseek)

Lua: number startOut retval, number endOut reaper.GetSet_LoopTimeRange(boolean isSet, boolean isLoop, number startOut, number endOut, boolean allowautoseek)

Python: (Boolean isSet, Boolean isLoop, Float startOut, Float endOut, Boolean allowautoseek) = RPR_GetSet_LoopTimeRange(isSet, isLoop, startOut, endOut, allowautoseek)



C: void GetSet_LoopTimeRange2(ReaProject* proj, bool isSet, bool isLoop, double* startOut, double* endOut, bool allowautoseek)

EEL: GetSet_LoopTimeRange2(ReaProject proj, bool isSet, bool isLoop, &startOut, &endOut, bool allowautoseek)

Lua: number startOut retval, number endOut reaper.GetSet_LoopTimeRange2(ReaProject proj, boolean isSet, boolean isLoop, number startOut, number endOut, boolean allowautoseek)

Python: (ReaProject proj, Boolean isSet, Boolean isLoop, Float startOut, Float endOut, Boolean allowautoseek) = RPR_GetSet_LoopTimeRange2(proj, isSet, isLoop, startOut, endOut, allowautoseek)



C: bool GetSetEnvelopeState(TrackEnvelope* env, char* str, int str_sz)

EEL: bool GetSetEnvelopeState(TrackEnvelope env, #str)

Lua: boolean retval, string str reaper.GetSetEnvelopeState(TrackEnvelope env, string str)

Python: (Boolean retval, TrackEnvelope env, String str, Int str_sz) = RPR_GetSetEnvelopeState(env, str, str_sz)

deprecated -- see SetEnvelopeStateChunk, GetEnvelopeStateChunk



C: bool GetSetEnvelopeState2(TrackEnvelope* env, char* str, int str_sz, bool isundo)

EEL: bool GetSetEnvelopeState2(TrackEnvelope env, #str, bool isundo)

Lua: boolean retval, string str reaper.GetSetEnvelopeState2(TrackEnvelope env, string str, boolean isundo)

Python: (Boolean retval, TrackEnvelope env, String str, Int str_sz, Boolean isundo) = RPR_GetSetEnvelopeState2(env, str, str_sz, isundo)

deprecated -- see SetEnvelopeStateChunk, GetEnvelopeStateChunk



C: bool GetSetItemState(MediaItem* item, char* str, int str_sz)

EEL: bool GetSetItemState(MediaItem item, #str)

Lua: boolean retval, string str reaper.GetSetItemState(MediaItem item, string str)

Python: (Boolean retval, MediaItem item, String str, Int str_sz) = RPR_GetSetItemState(item, str, str_sz)

deprecated -- see SetItemStateChunk, GetItemStateChunk



C: bool GetSetItemState2(MediaItem* item, char* str, int str_sz, bool isundo)

EEL: bool GetSetItemState2(MediaItem item, #str, bool isundo)

Lua: boolean retval, string str reaper.GetSetItemState2(MediaItem item, string str, boolean isundo)

Python: (Boolean retval, MediaItem item, String str, Int str_sz, Boolean isundo) = RPR_GetSetItemState2(item, str, str_sz, isundo)

deprecated -- see SetItemStateChunk, GetItemStateChunk



C: bool GetSetMediaItemTakeInfo_String(MediaItem_Take* tk, const char* parmname, char* stringNeedBig, bool setnewvalue)

EEL: bool GetSetMediaItemTakeInfo_String(MediaItem_Take tk, "parmname", #stringNeedBig, bool setnewvalue)

Lua: boolean retval, string stringNeedBig reaper.GetSetMediaItemTakeInfo_String(MediaItem_Take tk, string parmname, string stringNeedBig, boolean setnewvalue)

Python: (Boolean retval, MediaItem_Take tk, String parmname, String stringNeedBig, Boolean setnewvalue) = RPR_GetSetMediaItemTakeInfo_String(tk, parmname, stringNeedBig, setnewvalue)

P_NAME : char * to take name



C: bool GetSetMediaTrackInfo_String(MediaTrack* tr, const char* parmname, char* stringNeedBig, bool setnewvalue)

EEL: bool GetSetMediaTrackInfo_String(MediaTrack tr, "parmname", #stringNeedBig, bool setnewvalue)

Lua: boolean retval, string stringNeedBig reaper.GetSetMediaTrackInfo_String(MediaTrack tr, string parmname, string stringNeedBig, boolean setnewvalue)

Python: (Boolean retval, MediaTrack tr, String parmname, String stringNeedBig, Boolean setnewvalue) = RPR_GetSetMediaTrackInfo_String(tr, parmname, stringNeedBig, setnewvalue)

Get or set track string attributes.
P_NAME : char * : track name (on master returns NULL)




C: int GetSetRepeat(int val)

EEL: int GetSetRepeat(int val)

Lua: integer reaper.GetSetRepeat(integer val)

Python: Int RPR_GetSetRepeat(Int val)

-1 == query,0=clear,1=set,>1=toggle . returns new value



C: int GetSetRepeatEx(ReaProject* proj, int val)

EEL: int GetSetRepeatEx(ReaProject proj, int val)

Lua: integer reaper.GetSetRepeatEx(ReaProject proj, integer val)

Python: Int RPR_GetSetRepeatEx(ReaProject proj, Int val)

-1 == query,0=clear,1=set,>1=toggle . returns new value



C: bool GetSetTrackState(MediaTrack* track, char* str, int str_sz)

EEL: bool GetSetTrackState(MediaTrack track, #str)

Lua: boolean retval, string str reaper.GetSetTrackState(MediaTrack track, string str)

Python: (Boolean retval, MediaTrack track, String str, Int str_sz) = RPR_GetSetTrackState(track, str, str_sz)

deprecated -- see SetTrackStateChunk, GetTrackStateChunk



C: bool GetSetTrackState2(MediaTrack* track, char* str, int str_sz, bool isundo)

EEL: bool GetSetTrackState2(MediaTrack track, #str, bool isundo)

Lua: boolean retval, string str reaper.GetSetTrackState2(MediaTrack track, string str, boolean isundo)

Python: (Boolean retval, MediaTrack track, String str, Int str_sz, Boolean isundo) = RPR_GetSetTrackState2(track, str, str_sz, isundo)

deprecated -- see SetTrackStateChunk, GetTrackStateChunk



C: ReaProject* GetSubProjectFromSource(PCM_source* src)

EEL: ReaProject GetSubProjectFromSource(PCM_source src)

Lua: ReaProject reaper.GetSubProjectFromSource(PCM_source src)

Python: ReaProject RPR_GetSubProjectFromSource(PCM_source src)



C: MediaItem_Take* GetTake(MediaItem* item, int takeidx)

EEL: MediaItem_Take GetTake(MediaItem item, int takeidx)

Lua: MediaItem_Take reaper.GetTake(MediaItem item, integer takeidx)

Python: MediaItem_Take RPR_GetTake(MediaItem item, Int takeidx)

get a take from an item by take count (zero-based)



C: TrackEnvelope* GetTakeEnvelope(MediaItem_Take* take, int envidx)

EEL: TrackEnvelope GetTakeEnvelope(MediaItem_Take take, int envidx)

Lua: TrackEnvelope reaper.GetTakeEnvelope(MediaItem_Take take, integer envidx)

Python: TrackEnvelope RPR_GetTakeEnvelope(MediaItem_Take take, Int envidx)



C: TrackEnvelope* GetTakeEnvelopeByName(MediaItem_Take* take, const char* envname)

EEL: TrackEnvelope GetTakeEnvelopeByName(MediaItem_Take take, "envname")

Lua: TrackEnvelope reaper.GetTakeEnvelopeByName(MediaItem_Take take, string envname)

Python: TrackEnvelope RPR_GetTakeEnvelopeByName(MediaItem_Take take, String envname)



C: const char* GetTakeName(MediaItem_Take* take)

EEL: bool GetTakeName(#retval, MediaItem_Take take)

Lua: string reaper.GetTakeName(MediaItem_Take take)

Python: String RPR_GetTakeName(MediaItem_Take take)

returns NULL if the take is not valid



C: int GetTakeNumStretchMarkers(MediaItem_Take* take)

EEL: int GetTakeNumStretchMarkers(MediaItem_Take take)

Lua: integer reaper.GetTakeNumStretchMarkers(MediaItem_Take take)

Python: Int RPR_GetTakeNumStretchMarkers(MediaItem_Take take)

Returns number of stretch markers in take



C: int GetTakeStretchMarker(MediaItem_Take* take, int idx, double* posOut, double* srcposOutOptional)

EEL: int GetTakeStretchMarker(MediaItem_Take take, int idx, &posOut, optional &srcposOutOptional)

Lua: integer retval, number posOut, optional number srcposOutOptional reaper.GetTakeStretchMarker(MediaItem_Take take, integer idx)

Python: (Int retval, MediaItem_Take take, Int idx, Float posOut, Float srcposOutOptional) = RPR_GetTakeStretchMarker(take, idx, posOut, srcposOutOptional)

Gets information on a stretch marker, idx is 0..n. Returns false if stretch marker not valid. posOut will be set to position in item, srcposOutOptional will be set to source media position. Returns index. if input index is -1, next marker is found using position (or source position if position is -1). If position/source position are used to find marker position, their values are not updated.



C: bool GetTCPFXParm(ReaProject* project, MediaTrack* track, int index, int* fxindexOut, int* parmidxOut)

EEL: bool GetTCPFXParm(ReaProject project, MediaTrack track, int index, int &fxindexOut, int &parmidxOut)

Lua: boolean retval, number fxindexOut, number parmidxOut reaper.GetTCPFXParm(ReaProject project, MediaTrack track, integer index)

Python: (Boolean retval, ReaProject project, MediaTrack track, Int index, Int fxindexOut, Int parmidxOut) = RPR_GetTCPFXParm(project, track, index, fxindexOut, parmidxOut)

Get information about a specific FX parameter knob (see CountTCPFXParms).



C: bool GetTempoMatchPlayRate(PCM_source* source, double srcscale, double position, double mult, double* rateOut, double* targetlenOut)

EEL: bool GetTempoMatchPlayRate(PCM_source source, srcscale, position, mult, &rateOut, &targetlenOut)

Lua: boolean retval, number rateOut, number targetlenOut reaper.GetTempoMatchPlayRate(PCM_source source, number srcscale, number position, number mult)

Python: (Boolean retval, PCM_source source, Float srcscale, Float position, Float mult, Float rateOut, Float targetlenOut) = RPR_GetTempoMatchPlayRate(source, srcscale, position, mult, rateOut, targetlenOut)

finds the playrate and target length to insert this item stretched to a round power-of-2 number of bars, between 1/8 and 256



C: bool GetTempoTimeSigMarker(ReaProject* proj, int ptidx, double* timeposOut, int* measureposOut, double* beatposOut, double* bpmOut, int* timesig_numOut, int* timesig_denomOut, bool* lineartempoOut)

EEL: bool GetTempoTimeSigMarker(ReaProject proj, int ptidx, &timeposOut, int &measureposOut, &beatposOut, &bpmOut, int &timesig_numOut, int &timesig_denomOut, bool &lineartempoOut)

Lua: boolean retval, number timeposOut, number measureposOut, number beatposOut, number bpmOut, number timesig_numOut, number timesig_denomOut, boolean lineartempoOut reaper.GetTempoTimeSigMarker(ReaProject proj, integer ptidx)

Python: (Boolean retval, ReaProject proj, Int ptidx, Float timeposOut, Int measureposOut, Float beatposOut, Float bpmOut, Int timesig_numOut, Int timesig_denomOut, Boolean lineartempoOut) = RPR_GetTempoTimeSigMarker(proj, ptidx, timeposOut, measureposOut, beatposOut, bpmOut, timesig_numOut, timesig_denomOut, lineartempoOut)

Get information about a tempo/time signature marker. See CountTempoTimeSigMarkers, SetTempoTimeSigMarker, AddTempoTimeSigMarker.



C: int GetToggleCommandState(int command_id)

EEL: int GetToggleCommandState(int command_id)

Lua: integer reaper.GetToggleCommandState(integer command_id)

Python: Int RPR_GetToggleCommandState(Int command_id)

See GetToggleCommandStateEx.



C: int GetToggleCommandStateEx(int section_id, int command_id)

EEL: int GetToggleCommandStateEx(int section_id, int command_id)

Lua: integer reaper.GetToggleCommandStateEx(integer section_id, integer command_id)

Python: Int RPR_GetToggleCommandStateEx(Int section_id, Int command_id)

For the main action context, the MIDI editor, or the media explorer, returns the toggle state of the action. 0=off, 1=on, -1=NA because the action does not have on/off states. For the MIDI editor, the action state for the most recently focused window will be returned.



C: HWND GetTooltipWindow()

EEL: HWND GetTooltipWindow()

Lua: HWND reaper.GetTooltipWindow()

Python: HWND RPR_GetTooltipWindow()

gets a tooltip window,in case you want to ask it for font information. Can return NULL.



C: MediaTrack* GetTrack(ReaProject* proj, int trackidx)

EEL: MediaTrack GetTrack(ReaProject proj, int trackidx)

Lua: MediaTrack reaper.GetTrack(ReaProject proj, integer trackidx)

Python: MediaTrack RPR_GetTrack(ReaProject proj, Int trackidx)

get a track from a project by track count (zero-based) (proj=0 for active project)



C: int GetTrackAutomationMode(MediaTrack* tr)

EEL: int GetTrackAutomationMode(MediaTrack tr)

Lua: integer reaper.GetTrackAutomationMode(MediaTrack tr)

Python: Int RPR_GetTrackAutomationMode(MediaTrack tr)

return the track mode, regardless of global override



C: int GetTrackColor(MediaTrack* track)

EEL: int GetTrackColor(MediaTrack track)

Lua: integer reaper.GetTrackColor(MediaTrack track)

Python: Int RPR_GetTrackColor(MediaTrack track)

Returns the track color, as 0x01RRGGBB. Black is returned as 0x01000000, no color setting is returned as 0.



C: int GetTrackDepth(MediaTrack* track)

EEL: int GetTrackDepth(MediaTrack track)

Lua: integer reaper.GetTrackDepth(MediaTrack track)

Python: Int RPR_GetTrackDepth(MediaTrack track)



C: TrackEnvelope* GetTrackEnvelope(MediaTrack* track, int envidx)

EEL: TrackEnvelope GetTrackEnvelope(MediaTrack track, int envidx)

Lua: TrackEnvelope reaper.GetTrackEnvelope(MediaTrack track, integer envidx)

Python: TrackEnvelope RPR_GetTrackEnvelope(MediaTrack track, Int envidx)



C: TrackEnvelope* GetTrackEnvelopeByName(MediaTrack* track, const char* envname)

EEL: TrackEnvelope GetTrackEnvelopeByName(MediaTrack track, "envname")

Lua: TrackEnvelope reaper.GetTrackEnvelopeByName(MediaTrack track, string envname)

Python: TrackEnvelope RPR_GetTrackEnvelopeByName(MediaTrack track, String envname)



C: GUID* GetTrackGUID(MediaTrack* tr)

EEL: bool GetTrackGUID(#retguid, MediaTrack tr)

Lua: string GUID reaper.GetTrackGUID(MediaTrack tr)

Python: GUID RPR_GetTrackGUID(MediaTrack tr)



C: MediaItem* GetTrackMediaItem(MediaTrack* tr, int itemidx)

EEL: MediaItem GetTrackMediaItem(MediaTrack tr, int itemidx)

Lua: MediaItem reaper.GetTrackMediaItem(MediaTrack tr, integer itemidx)

Python: MediaItem RPR_GetTrackMediaItem(MediaTrack tr, Int itemidx)



C: const char* GetTrackMIDINoteName(int track, int note, int chan)

EEL: bool GetTrackMIDINoteName(#retval, int track, int note, int chan)

Lua: string reaper.GetTrackMIDINoteName(integer track, integer note, integer chan)

Python: String RPR_GetTrackMIDINoteName(Int track, Int note, Int chan)



C: const char* GetTrackMIDINoteNameEx(ReaProject* proj, MediaTrack* track, int note, int chan)

EEL: bool GetTrackMIDINoteNameEx(#retval, ReaProject proj, MediaTrack track, int note, int chan)

Lua: string reaper.GetTrackMIDINoteNameEx(ReaProject proj, MediaTrack track, integer note, integer chan)

Python: String RPR_GetTrackMIDINoteNameEx(ReaProject proj, MediaTrack track, Int note, Int chan)



C: void GetTrackMIDINoteRange(ReaProject* proj, MediaTrack* track, int* note_loOut, int* note_hiOut)

EEL: GetTrackMIDINoteRange(ReaProject proj, MediaTrack track, int &note_loOut, int &note_hiOut)

Lua: number note_loOut retval, number note_hiOut reaper.GetTrackMIDINoteRange(ReaProject proj, MediaTrack track)

Python: (ReaProject proj, MediaTrack track, Int note_loOut, Int note_hiOut) = RPR_GetTrackMIDINoteRange(proj, track, note_loOut, note_hiOut)



C: int GetTrackNumMediaItems(MediaTrack* tr)

EEL: int GetTrackNumMediaItems(MediaTrack tr)

Lua: integer reaper.GetTrackNumMediaItems(MediaTrack tr)

Python: Int RPR_GetTrackNumMediaItems(MediaTrack tr)



C: int GetTrackNumSends(MediaTrack* tr, int category)

EEL: int GetTrackNumSends(MediaTrack tr, int category)

Lua: integer reaper.GetTrackNumSends(MediaTrack tr, integer category)

Python: Int RPR_GetTrackNumSends(MediaTrack tr, Int category)

returns number of sends/receives/hardware outputs - category is <0 for receives, 0=sends, >0 for hardware outputs



C: bool GetTrackReceiveName(MediaTrack* track, int recv_index, char* buf, int buf_sz)

EEL: bool GetTrackReceiveName(MediaTrack track, int recv_index, #buf)

Lua: boolean retval, string buf reaper.GetTrackReceiveName(MediaTrack track, integer recv_index, string buf)

Python: (Boolean retval, MediaTrack track, Int recv_index, String buf, Int buf_sz) = RPR_GetTrackReceiveName(track, recv_index, buf, buf_sz)



C: bool GetTrackReceiveUIMute(MediaTrack* track, int recv_index, bool* muteOut)

EEL: bool GetTrackReceiveUIMute(MediaTrack track, int recv_index, bool &muteOut)

Lua: boolean retval, boolean muteOut reaper.GetTrackReceiveUIMute(MediaTrack track, integer recv_index)

Python: (Boolean retval, MediaTrack track, Int recv_index, Boolean muteOut) = RPR_GetTrackReceiveUIMute(track, recv_index, muteOut)



C: bool GetTrackReceiveUIVolPan(MediaTrack* track, int recv_index, double* volumeOut, double* panOut)

EEL: bool GetTrackReceiveUIVolPan(MediaTrack track, int recv_index, &volumeOut, &panOut)

Lua: boolean retval, number volumeOut, number panOut reaper.GetTrackReceiveUIVolPan(MediaTrack track, integer recv_index)

Python: (Boolean retval, MediaTrack track, Int recv_index, Float volumeOut, Float panOut) = RPR_GetTrackReceiveUIVolPan(track, recv_index, volumeOut, panOut)



C: bool GetTrackSendName(MediaTrack* track, int send_index, char* buf, int buf_sz)

EEL: bool GetTrackSendName(MediaTrack track, int send_index, #buf)

Lua: boolean retval, string buf reaper.GetTrackSendName(MediaTrack track, integer send_index, string buf)

Python: (Boolean retval, MediaTrack track, Int send_index, String buf, Int buf_sz) = RPR_GetTrackSendName(track, send_index, buf, buf_sz)



C: bool GetTrackSendUIMute(MediaTrack* track, int send_index, bool* muteOut)

EEL: bool GetTrackSendUIMute(MediaTrack track, int send_index, bool &muteOut)

Lua: boolean retval, boolean muteOut reaper.GetTrackSendUIMute(MediaTrack track, integer send_index)

Python: (Boolean retval, MediaTrack track, Int send_index, Boolean muteOut) = RPR_GetTrackSendUIMute(track, send_index, muteOut)



C: bool GetTrackSendUIVolPan(MediaTrack* track, int send_index, double* volumeOut, double* panOut)

EEL: bool GetTrackSendUIVolPan(MediaTrack track, int send_index, &volumeOut, &panOut)

Lua: boolean retval, number volumeOut, number panOut reaper.GetTrackSendUIVolPan(MediaTrack track, integer send_index)

Python: (Boolean retval, MediaTrack track, Int send_index, Float volumeOut, Float panOut) = RPR_GetTrackSendUIVolPan(track, send_index, volumeOut, panOut)



C: const char* GetTrackState(MediaTrack* track, int* flagsOut)

EEL: bool GetTrackState(#retval, MediaTrack track, int &flagsOut)

Lua: string retval, number flagsOut reaper.GetTrackState(MediaTrack track)

Python: (String retval, MediaTrack track, Int flagsOut) = RPR_GetTrackState(track, flagsOut)

Gets track state, returns track name.
flags will be set to:
&1=folder
&2=selected
&4=has fx enabled
&8=muted
&16=soloed
&32=SIP'd (with &16)
&64=rec armed



C: bool GetTrackStateChunk(MediaTrack* track, char* strNeedBig, int strNeedBig_sz, bool isundoOptional)

EEL: bool GetTrackStateChunk(MediaTrack track, #strNeedBig, bool isundoOptional)

Lua: boolean retval, string strNeedBig reaper.GetTrackStateChunk(MediaTrack track, string strNeedBig, boolean isundoOptional)

Python: (Boolean retval, MediaTrack track, String strNeedBig, Int strNeedBig_sz, Boolean isundoOptional) = RPR_GetTrackStateChunk(track, strNeedBig, strNeedBig_sz, isundoOptional)

Gets the RPPXML state of a track, returns true if successful. Undo flag is a performance/caching hint.



C: bool GetTrackUIMute(MediaTrack* track, bool* muteOut)

EEL: bool GetTrackUIMute(MediaTrack track, bool &muteOut)

Lua: boolean retval, boolean muteOut reaper.GetTrackUIMute(MediaTrack track)

Python: (Boolean retval, MediaTrack track, Boolean muteOut) = RPR_GetTrackUIMute(track, muteOut)



C: bool GetTrackUIPan(MediaTrack* track, double* pan1Out, double* pan2Out, int* panmodeOut)

EEL: bool GetTrackUIPan(MediaTrack track, &pan1Out, &pan2Out, int &panmodeOut)

Lua: boolean retval, number pan1Out, number pan2Out, number panmodeOut reaper.GetTrackUIPan(MediaTrack track)

Python: (Boolean retval, MediaTrack track, Float pan1Out, Float pan2Out, Int panmodeOut) = RPR_GetTrackUIPan(track, pan1Out, pan2Out, panmodeOut)



C: bool GetTrackUIVolPan(MediaTrack* track, double* volumeOut, double* panOut)

EEL: bool GetTrackUIVolPan(MediaTrack track, &volumeOut, &panOut)

Lua: boolean retval, number volumeOut, number panOut reaper.GetTrackUIVolPan(MediaTrack track)

Python: (Boolean retval, MediaTrack track, Float volumeOut, Float panOut) = RPR_GetTrackUIVolPan(track, volumeOut, panOut)



C: bool GetUserFileNameForRead(char* filenameNeed4096, const char* title, const char* defext)

EEL: bool GetUserFileNameForRead(#filenameNeed4096, "title", "defext")

Lua: boolean retval, string filenameNeed4096 reaper.GetUserFileNameForRead(string filenameNeed4096, string title, string defext)

Python: (Boolean retval, String filenameNeed4096, String title, String defext) = RPR_GetUserFileNameForRead(filenameNeed4096, title, defext)

returns true if the user selected a valid file, false if the user canceled the dialog



C: bool GetUserInputs(const char* title, int num_inputs, const char* captions_csv, char* retvals_csv, int retvals_csv_sz)

EEL: bool GetUserInputs("title", int num_inputs, "captions_csv", #retvals_csv)

Lua: boolean retval, string retvals_csv reaper.GetUserInputs(string title, integer num_inputs, string captions_csv, string retvals_csv)

Python: (Boolean retval, String title, Int num_inputs, String captions_csv, String retvals_csv, Int retvals_csv_sz) = RPR_GetUserInputs(title, num_inputs, captions_csv, retvals_csv, retvals_csv_sz)

Get values from the user.
If a caption begins with *, for example "*password", the edit field will not display the input text.
Values are returned as a comma-separated string. Returns false if the user canceled the dialog.



C: void GoToMarker(ReaProject* proj, int marker_index, bool use_timeline_order)

EEL: GoToMarker(ReaProject proj, int marker_index, bool use_timeline_order)

Lua: reaper.GoToMarker(ReaProject proj, integer marker_index, boolean use_timeline_order)

Python: RPR_GoToMarker(ReaProject proj, Int marker_index, Boolean use_timeline_order)

Go to marker. If use_timeline_order==true, marker_index 1 refers to the first marker on the timeline. If use_timeline_order==false, marker_index 1 refers to the first marker with the user-editable index of 1.



C: void GoToRegion(ReaProject* proj, int region_index, bool use_timeline_order)

EEL: GoToRegion(ReaProject proj, int region_index, bool use_timeline_order)

Lua: reaper.GoToRegion(ReaProject proj, integer region_index, boolean use_timeline_order)

Python: RPR_GoToRegion(ReaProject proj, Int region_index, Boolean use_timeline_order)

Seek to region after current region finishes playing (smooth seek). If use_timeline_order==true, region_index 1 refers to the first region on the timeline. If use_timeline_order==false, region_index 1 refers to the first region with the user-editable index of 1.



C: int GR_SelectColor(HWND hwnd, int* colorOut)

EEL: int GR_SelectColor(HWND hwnd, int &colorOut)

Lua: integer retval, number colorOut reaper.GR_SelectColor(HWND hwnd)

Python: (Int retval, HWND hwnd, Int colorOut) = RPR_GR_SelectColor(hwnd, colorOut)

Runs the system color chooser dialog. Returns 0 if the user cancels the dialog.



C: int GSC_mainwnd(int t)

EEL: int GSC_mainwnd(int t)

Lua: integer reaper.GSC_mainwnd(integer t)

Python: Int RPR_GSC_mainwnd(Int t)

this is just like win32 GetSysColor() but can have overrides.



C: void guidToString(const GUID* g, char* destNeed64)

EEL: guidToString("gGUID", #destNeed64)

Lua: string destNeed64 reaper.guidToString(string gGUID, string destNeed64)

Python: (const GUID g, String destNeed64) = RPR_guidToString(g, destNeed64)

dest should be at least 64 chars long to be safe



C: bool HasExtState(const char* section, const char* key)

EEL: bool HasExtState("section", "key")

Lua: boolean reaper.HasExtState(string section, string key)

Python: Boolean RPR_HasExtState(String section, String key)

Returns true if there exists an extended state value for a specific section and key. See SetExtState, GetExtState, DeleteExtState.



C: const char* HasTrackMIDIPrograms(int track)

EEL: bool HasTrackMIDIPrograms(#retval, int track)

Lua: string reaper.HasTrackMIDIPrograms(integer track)

Python: String RPR_HasTrackMIDIPrograms(Int track)

returns name of track plugin that is supplying MIDI programs,or NULL if there is none



C: const char* HasTrackMIDIProgramsEx(ReaProject* proj, MediaTrack* track)

EEL: bool HasTrackMIDIProgramsEx(#retval, ReaProject proj, MediaTrack track)

Lua: string reaper.HasTrackMIDIProgramsEx(ReaProject proj, MediaTrack track)

Python: String RPR_HasTrackMIDIProgramsEx(ReaProject proj, MediaTrack track)

returns name of track plugin that is supplying MIDI programs,or NULL if there is none



C: void Help_Set(const char* helpstring, bool is_temporary_help)

EEL: Help_Set("helpstring", bool is_temporary_help)

Lua: reaper.Help_Set(string helpstring, boolean is_temporary_help)

Python: RPR_Help_Set(String helpstring, Boolean is_temporary_help)



C: void HiresPeaksFromSource(PCM_source* src, PCM_source_peaktransfer_t* block)

EEL: HiresPeaksFromSource(PCM_source src, PCM_source_peaktransfer_t block)

Lua: reaper.HiresPeaksFromSource(PCM_source src, PCM_source_peaktransfer_t block)

Python: RPR_HiresPeaksFromSource(PCM_source src, PCM_source_peaktransfer_t block)



C: void image_resolve_fn(const char* in, char* out, int out_sz)

EEL: image_resolve_fn("in", #out)

Lua: string out reaper.image_resolve_fn(string in, string out)

Python: (String in, String out, Int out_sz) = RPR_image_resolve_fn(in, out, out_sz)



C: bool InsertEnvelopePoint(TrackEnvelope* envelope, double time, double value, int shape, double tension, bool selected, bool* noSortInOptional)

EEL: bool InsertEnvelopePoint(TrackEnvelope envelope, time, value, int shape, tension, bool selected, optional bool noSortInOptional)

Lua: boolean reaper.InsertEnvelopePoint(TrackEnvelope envelope, number time, number value, integer shape, number tension, boolean selected, optional boolean noSortInOptional)

Python: (Boolean retval, TrackEnvelope envelope, Float time, Float value, Int shape, Float tension, Boolean selected, Boolean noSortInOptional) = RPR_InsertEnvelopePoint(envelope, time, value, shape, tension, selected, noSortInOptional)

Insert an envelope point. If setting multiple points at once, set noSort=true, and call Envelope_SortPoints when done. See GetEnvelopePoint, SetEnvelopePoint, GetEnvelopeScalingMode.



C: int InsertMedia(const char* file, int mode)

EEL: int InsertMedia("file", int mode)

Lua: integer reaper.InsertMedia(string file, integer mode)

Python: Int RPR_InsertMedia(String file, Int mode)

mode: 0=add to current track, 1=add new track, 3=add to selected items as takes, &4=stretch/loop to fit time sel, &8=try to match tempo 1x, &16=try to match tempo 0.5x, &32=try to match tempo 2x, &64=don't preserve pitch when matching tempo, &128=no loop/section if startpct/endpct set, &256=force loop regardless of global preference for looping imported items



C: int InsertMediaSection(const char* file, int mode, double startpct, double endpct, double pitchshift)

EEL: int InsertMediaSection("file", int mode, startpct, endpct, pitchshift)

Lua: integer reaper.InsertMediaSection(string file, integer mode, number startpct, number endpct, number pitchshift)

Python: Int RPR_InsertMediaSection(String file, Int mode, Float startpct, Float endpct, Float pitchshift)



C: void InsertTrackAtIndex(int idx, bool wantDefaults)

EEL: InsertTrackAtIndex(int idx, bool wantDefaults)

Lua: reaper.InsertTrackAtIndex(integer idx, boolean wantDefaults)

Python: RPR_InsertTrackAtIndex(Int idx, Boolean wantDefaults)

inserts a track at idx,of course this will be clamped to 0..GetNumTracks(). wantDefaults=TRUE for default envelopes/FX,otherwise no enabled fx/env



C: bool IsMediaExtension(const char* ext, bool wantOthers)

EEL: bool IsMediaExtension("ext", bool wantOthers)

Lua: boolean reaper.IsMediaExtension(string ext, boolean wantOthers)

Python: Boolean RPR_IsMediaExtension(String ext, Boolean wantOthers)



C: bool IsMediaItemSelected(MediaItem* item)

EEL: bool IsMediaItemSelected(MediaItem item)

Lua: boolean reaper.IsMediaItemSelected(MediaItem item)

Python: Boolean RPR_IsMediaItemSelected(MediaItem item)



C: bool IsTrackSelected(MediaTrack* track)

EEL: bool IsTrackSelected(MediaTrack track)

Lua: boolean reaper.IsTrackSelected(MediaTrack track)

Python: Boolean RPR_IsTrackSelected(MediaTrack track)



C: bool IsTrackVisible(MediaTrack* track, bool mixer)

EEL: bool IsTrackVisible(MediaTrack track, bool mixer)

Lua: boolean reaper.IsTrackVisible(MediaTrack track, boolean mixer)

Python: Boolean RPR_IsTrackVisible(MediaTrack track, Boolean mixer)

If mixer==true, returns true if the track is visible in the mixer. If mixer==false, returns true if the track is visible in the track control panel.



C: bool LICE_ClipLine(int* pX1Out, int* pY1Out, int* pX2Out, int* pY2Out, int xLo, int yLo, int xHi, int yHi)

EEL: bool LICE_ClipLine(int &pX1Out, int &pY1Out, int &pX2Out, int &pY2Out, int xLo, int yLo, int xHi, int yHi)

Lua: boolean retval, number pX1Out, number pY1Out, number pX2Out, number pY2Out reaper.LICE_ClipLine(number pX1Out, number pY1Out, number pX2Out, number pY2Out, integer xLo, integer yLo, integer xHi, integer yHi)

Python: (Boolean retval, Int pX1Out, Int pY1Out, Int pX2Out, Int pY2Out, Int xLo, Int yLo, Int xHi, Int yHi) = RPR_LICE_ClipLine(pX1Out, pY1Out, pX2Out, pY2Out, xLo, yLo, xHi, yHi)

Returns false if the line is entirely offscreen.



C: bool Loop_OnArrow(ReaProject* project, int direction)

EEL: bool Loop_OnArrow(ReaProject project, int direction)

Lua: boolean reaper.Loop_OnArrow(ReaProject project, integer direction)

Python: Boolean RPR_Loop_OnArrow(ReaProject project, Int direction)

Move the loop selection left or right. Returns true if snap is enabled.



C: void Main_OnCommand(int command, int flag)

EEL: Main_OnCommand(int command, int flag)

Lua: reaper.Main_OnCommand(integer command, integer flag)

Python: RPR_Main_OnCommand(Int command, Int flag)

See Main_OnCommandEx.



C: void Main_OnCommandEx(int command, int flag, ReaProject* proj)

EEL: Main_OnCommandEx(int command, int flag, ReaProject proj)

Lua: reaper.Main_OnCommandEx(integer command, integer flag, ReaProject proj)

Python: RPR_Main_OnCommandEx(Int command, Int flag, ReaProject proj)

Performs an action belonging to the main action section. To perform non-native actions (ReaScripts, custom or extension plugins' actions) safely, see NamedCommandLookup().



C: void Main_openProject(const char* name)

EEL: Main_openProject("name")

Lua: reaper.Main_openProject(string name)

Python: RPR_Main_openProject(String name)

opens a project. will prompt the user to save, etc.
if you pass a .RTrackTemplate file then it adds that to the project instead.



C: void Main_SaveProject(ReaProject* proj, bool forceSaveAsInOptional)

EEL: Main_SaveProject(ReaProject proj, bool forceSaveAsInOptional)

Lua: reaper.Main_SaveProject(ReaProject proj, boolean forceSaveAsInOptional)

Python: RPR_Main_SaveProject(ReaProject proj, Boolean forceSaveAsInOptional)

Save the project.



C: void Main_UpdateLoopInfo(int ignoremask)

EEL: Main_UpdateLoopInfo(int ignoremask)

Lua: reaper.Main_UpdateLoopInfo(integer ignoremask)

Python: RPR_Main_UpdateLoopInfo(Int ignoremask)



C: void MarkProjectDirty(ReaProject* proj)

EEL: MarkProjectDirty(ReaProject proj)

Lua: reaper.MarkProjectDirty(ReaProject proj)

Python: RPR_MarkProjectDirty(ReaProject proj)

Marks project as dirty (needing save) if undo/prompt to save is enabled in preferences.



C: void MarkTrackItemsDirty(MediaTrack* track, MediaItem* item)

EEL: MarkTrackItemsDirty(MediaTrack track, MediaItem item)

Lua: reaper.MarkTrackItemsDirty(MediaTrack track, MediaItem item)

Python: RPR_MarkTrackItemsDirty(MediaTrack track, MediaItem item)

If track is supplied, item is ignored



C: double Master_GetPlayRate(ReaProject* project)

EEL: double Master_GetPlayRate(ReaProject project)

Lua: number reaper.Master_GetPlayRate(ReaProject project)

Python: Float RPR_Master_GetPlayRate(ReaProject project)



C: double Master_GetPlayRateAtTime(double time_s, ReaProject* proj)

EEL: double Master_GetPlayRateAtTime(time_s, ReaProject proj)

Lua: number reaper.Master_GetPlayRateAtTime(number time_s, ReaProject proj)

Python: Float RPR_Master_GetPlayRateAtTime(Float time_s, ReaProject proj)



C: double Master_GetTempo()

EEL: double Master_GetTempo()

Lua: number reaper.Master_GetTempo()

Python: Float RPR_Master_GetTempo()



C: double Master_NormalizePlayRate(double playrate, bool isnormalized)

EEL: double Master_NormalizePlayRate(playrate, bool isnormalized)

Lua: number reaper.Master_NormalizePlayRate(number playrate, boolean isnormalized)

Python: Float RPR_Master_NormalizePlayRate(Float playrate, Boolean isnormalized)

Convert play rate to/from a value between 0 and 1, representing the position on the project playrate slider.



C: double Master_NormalizeTempo(double bpm, bool isnormalized)

EEL: double Master_NormalizeTempo(bpm, bool isnormalized)

Lua: number reaper.Master_NormalizeTempo(number bpm, boolean isnormalized)

Python: Float RPR_Master_NormalizeTempo(Float bpm, Boolean isnormalized)

Convert the tempo to/from a value between 0 and 1, representing bpm in the range of 40-296 bpm.



C: int MB(const char* msg, const char* title, int type)

EEL: int MB("msg", "title", int type)

Lua: integer reaper.MB(string msg, string title, integer type)

Python: Int RPR_MB(String msg, String title, Int type)

type 0=OK,1=OKCANCEL,2=ABORTRETRYIGNORE,3=YESNOCANCEL,4=YESNO,5=RETRYCANCEL : ret 1=OK,2=CANCEL,3=ABORT,4=RETRY,5=IGNORE,6=YES,7=NO



C: int MediaItemDescendsFromTrack(MediaItem* item, MediaTrack* track)

EEL: int MediaItemDescendsFromTrack(MediaItem item, MediaTrack track)

Lua: integer reaper.MediaItemDescendsFromTrack(MediaItem item, MediaTrack track)

Python: Int RPR_MediaItemDescendsFromTrack(MediaItem item, MediaTrack track)

Returns 1 if the track holds the item, 2 if the track is a folder containing the track that holds the item, etc.



C: int MIDI_CountEvts(MediaItem_Take* take, int* notecntOut, int* ccevtcntOut, int* textsyxevtcntOut)

EEL: int MIDI_CountEvts(MediaItem_Take take, int &notecntOut, int &ccevtcntOut, int &textsyxevtcntOut)

Lua: integer retval, number notecntOut, number ccevtcntOut, number textsyxevtcntOut reaper.MIDI_CountEvts(MediaItem_Take take)

Python: (Int retval, MediaItem_Take take, Int notecntOut, Int ccevtcntOut, Int textsyxevtcntOut) = RPR_MIDI_CountEvts(take, notecntOut, ccevtcntOut, textsyxevtcntOut)

Count the number of notes, CC events, and text/sysex events in a given MIDI item.



C: bool MIDI_DeleteCC(MediaItem_Take* take, int ccidx)

EEL: bool MIDI_DeleteCC(MediaItem_Take take, int ccidx)

Lua: boolean reaper.MIDI_DeleteCC(MediaItem_Take take, integer ccidx)

Python: Boolean RPR_MIDI_DeleteCC(MediaItem_Take take, Int ccidx)

Delete a MIDI CC event.



C: bool MIDI_DeleteEvt(MediaItem_Take* take, int evtidx)

EEL: bool MIDI_DeleteEvt(MediaItem_Take take, int evtidx)

Lua: boolean reaper.MIDI_DeleteEvt(MediaItem_Take take, integer evtidx)

Python: Boolean RPR_MIDI_DeleteEvt(MediaItem_Take take, Int evtidx)

Delete a MIDI event.



C: bool MIDI_DeleteNote(MediaItem_Take* take, int noteidx)

EEL: bool MIDI_DeleteNote(MediaItem_Take take, int noteidx)

Lua: boolean reaper.MIDI_DeleteNote(MediaItem_Take take, integer noteidx)

Python: Boolean RPR_MIDI_DeleteNote(MediaItem_Take take, Int noteidx)

Delete a MIDI note.



C: bool MIDI_DeleteTextSysexEvt(MediaItem_Take* take, int textsyxevtidx)

EEL: bool MIDI_DeleteTextSysexEvt(MediaItem_Take take, int textsyxevtidx)

Lua: boolean reaper.MIDI_DeleteTextSysexEvt(MediaItem_Take take, integer textsyxevtidx)

Python: Boolean RPR_MIDI_DeleteTextSysexEvt(MediaItem_Take take, Int textsyxevtidx)

Delete a MIDI text or sysex event.



C: int MIDI_EnumSelCC(MediaItem_Take* take, int ccidx)

EEL: int MIDI_EnumSelCC(MediaItem_Take take, int ccidx)

Lua: integer reaper.MIDI_EnumSelCC(MediaItem_Take take, integer ccidx)

Python: Int RPR_MIDI_EnumSelCC(MediaItem_Take take, Int ccidx)

Returns the index of the next selected MIDI CC event after ccidx (-1 if there are no more selected events).



C: int MIDI_EnumSelEvts(MediaItem_Take* take, int evtidx)

EEL: int MIDI_EnumSelEvts(MediaItem_Take take, int evtidx)

Lua: integer reaper.MIDI_EnumSelEvts(MediaItem_Take take, integer evtidx)

Python: Int RPR_MIDI_EnumSelEvts(MediaItem_Take take, Int evtidx)

Returns the index of the next selected MIDI event after evtidx (-1 if there are no more selected events).



C: int MIDI_EnumSelNotes(MediaItem_Take* take, int noteidx)

EEL: int MIDI_EnumSelNotes(MediaItem_Take take, int noteidx)

Lua: integer reaper.MIDI_EnumSelNotes(MediaItem_Take take, integer noteidx)

Python: Int RPR_MIDI_EnumSelNotes(MediaItem_Take take, Int noteidx)

Returns the index of the next selected MIDI note after noteidx (-1 if there are no more selected events).



C: int MIDI_EnumSelTextSysexEvts(MediaItem_Take* take, int textsyxidx)

EEL: int MIDI_EnumSelTextSysexEvts(MediaItem_Take take, int textsyxidx)

Lua: integer reaper.MIDI_EnumSelTextSysexEvts(MediaItem_Take take, integer textsyxidx)

Python: Int RPR_MIDI_EnumSelTextSysexEvts(MediaItem_Take take, Int textsyxidx)

Returns the index of the next selected MIDI text/sysex event after textsyxidx (-1 if there are no more selected events).



C: bool MIDI_GetCC(MediaItem_Take* take, int ccidx, bool* selectedOut, bool* mutedOut, double* ppqposOut, int* chanmsgOut, int* chanOut, int* msg2Out, int* msg3Out)

EEL: bool MIDI_GetCC(MediaItem_Take take, int ccidx, bool &selectedOut, bool &mutedOut, &ppqposOut, int &chanmsgOut, int &chanOut, int &msg2Out, int &msg3Out)

Lua: boolean retval, boolean selectedOut, boolean mutedOut, number ppqposOut, number chanmsgOut, number chanOut, number msg2Out, number msg3Out reaper.MIDI_GetCC(MediaItem_Take take, integer ccidx)

Python: (Boolean retval, MediaItem_Take take, Int ccidx, Boolean selectedOut, Boolean mutedOut, Float ppqposOut, Int chanmsgOut, Int chanOut, Int msg2Out, Int msg3Out) = RPR_MIDI_GetCC(take, ccidx, selectedOut, mutedOut, ppqposOut, chanmsgOut, chanOut, msg2Out, msg3Out)

Get MIDI CC event properties.



C: bool MIDI_GetEvt(MediaItem_Take* take, int evtidx, bool* selectedOut, bool* mutedOut, double* ppqposOut, char* msg, int* msg_sz)

EEL: bool MIDI_GetEvt(MediaItem_Take take, int evtidx, bool &selectedOut, bool &mutedOut, &ppqposOut, #msg)

Lua: boolean retval, boolean selectedOut, boolean mutedOut, number ppqposOut, string msg reaper.MIDI_GetEvt(MediaItem_Take take, integer evtidx, boolean selectedOut, boolean mutedOut, number ppqposOut, string msg)

Python: (Boolean retval, MediaItem_Take take, Int evtidx, Boolean selectedOut, Boolean mutedOut, Float ppqposOut, String msg, Int msg_sz) = RPR_MIDI_GetEvt(take, evtidx, selectedOut, mutedOut, ppqposOut, msg, msg_sz)

Get MIDI event properties.



C: double MIDI_GetGrid(MediaItem_Take* take, double* swingOutOptional, double* noteLenOutOptional)

EEL: double MIDI_GetGrid(MediaItem_Take take, optional &swingOutOptional, optional &noteLenOutOptional)

Lua: number retval, optional number swingOutOptional, optional number noteLenOutOptional reaper.MIDI_GetGrid(MediaItem_Take take)

Python: (Float retval, MediaItem_Take take, Float swingOutOptional, Float noteLenOutOptional) = RPR_MIDI_GetGrid(take, swingOutOptional, noteLenOutOptional)

Returns the most recent MIDI editor grid size for this MIDI take, in QN. Swing is between 0 and 1. Note length is 0 if it follows the grid size.



C: bool MIDI_GetHash(MediaItem_Take* take, bool notesonly, char* hash, int hash_sz)

EEL: bool MIDI_GetHash(MediaItem_Take take, bool notesonly, #hash)

Lua: boolean retval, string hash reaper.MIDI_GetHash(MediaItem_Take take, boolean notesonly, string hash)

Python: (Boolean retval, MediaItem_Take take, Boolean notesonly, String hash, Int hash_sz) = RPR_MIDI_GetHash(take, notesonly, hash, hash_sz)

Get a string that only changes when the MIDI data changes. If notesonly==true, then the string changes only when the MIDI notes change. See MIDI_GetTrackHash



C: bool MIDI_GetNote(MediaItem_Take* take, int noteidx, bool* selectedOut, bool* mutedOut, double* startppqposOut, double* endppqposOut, int* chanOut, int* pitchOut, int* velOut)

EEL: bool MIDI_GetNote(MediaItem_Take take, int noteidx, bool &selectedOut, bool &mutedOut, &startppqposOut, &endppqposOut, int &chanOut, int &pitchOut, int &velOut)

Lua: boolean retval, boolean selectedOut, boolean mutedOut, number startppqposOut, number endppqposOut, number chanOut, number pitchOut, number velOut reaper.MIDI_GetNote(MediaItem_Take take, integer noteidx)

Python: (Boolean retval, MediaItem_Take take, Int noteidx, Boolean selectedOut, Boolean mutedOut, Float startppqposOut, Float endppqposOut, Int chanOut, Int pitchOut, Int velOut) = RPR_MIDI_GetNote(take, noteidx, selectedOut, mutedOut, startppqposOut, endppqposOut, chanOut, pitchOut, velOut)

Get MIDI note properties.



C: double MIDI_GetPPQPos_EndOfMeasure(MediaItem_Take* take, double ppqpos)

EEL: double MIDI_GetPPQPos_EndOfMeasure(MediaItem_Take take, ppqpos)

Lua: number reaper.MIDI_GetPPQPos_EndOfMeasure(MediaItem_Take take, number ppqpos)

Python: Float RPR_MIDI_GetPPQPos_EndOfMeasure(MediaItem_Take take, Float ppqpos)

Returns the MIDI tick (ppq) position corresponding to the end of the measure.



C: double MIDI_GetPPQPos_StartOfMeasure(MediaItem_Take* take, double ppqpos)

EEL: double MIDI_GetPPQPos_StartOfMeasure(MediaItem_Take take, ppqpos)

Lua: number reaper.MIDI_GetPPQPos_StartOfMeasure(MediaItem_Take take, number ppqpos)

Python: Float RPR_MIDI_GetPPQPos_StartOfMeasure(MediaItem_Take take, Float ppqpos)

Returns the MIDI tick (ppq) position corresponding to the start of the measure.



C: double MIDI_GetPPQPosFromProjQN(MediaItem_Take* take, double projqn)

EEL: double MIDI_GetPPQPosFromProjQN(MediaItem_Take take, projqn)

Lua: number reaper.MIDI_GetPPQPosFromProjQN(MediaItem_Take take, number projqn)

Python: Float RPR_MIDI_GetPPQPosFromProjQN(MediaItem_Take take, Float projqn)

Returns the MIDI tick (ppq) position corresponding to a specific project time in quarter notes.



C: double MIDI_GetPPQPosFromProjTime(MediaItem_Take* take, double projtime)

EEL: double MIDI_GetPPQPosFromProjTime(MediaItem_Take take, projtime)

Lua: number reaper.MIDI_GetPPQPosFromProjTime(MediaItem_Take take, number projtime)

Python: Float RPR_MIDI_GetPPQPosFromProjTime(MediaItem_Take take, Float projtime)

Returns the MIDI tick (ppq) position corresponding to a specific project time in seconds.



C: double MIDI_GetProjQNFromPPQPos(MediaItem_Take* take, double ppqpos)

EEL: double MIDI_GetProjQNFromPPQPos(MediaItem_Take take, ppqpos)

Lua: number reaper.MIDI_GetProjQNFromPPQPos(MediaItem_Take take, number ppqpos)

Python: Float RPR_MIDI_GetProjQNFromPPQPos(MediaItem_Take take, Float ppqpos)

Returns the project time in quarter notes corresponding to a specific MIDI tick (ppq) position.



C: double MIDI_GetProjTimeFromPPQPos(MediaItem_Take* take, double ppqpos)

EEL: double MIDI_GetProjTimeFromPPQPos(MediaItem_Take take, ppqpos)

Lua: number reaper.MIDI_GetProjTimeFromPPQPos(MediaItem_Take take, number ppqpos)

Python: Float RPR_MIDI_GetProjTimeFromPPQPos(MediaItem_Take take, Float ppqpos)

Returns the project time in seconds corresponding to a specific MIDI tick (ppq) position.



C: bool MIDI_GetScale(MediaItem_Take* take, int* rootOut, int* scaleOut, char* name, int name_sz)

EEL: bool MIDI_GetScale(MediaItem_Take take, int &rootOut, int &scaleOut, #name)

Lua: boolean retval, number rootOut, number scaleOut, string name reaper.MIDI_GetScale(MediaItem_Take take, number rootOut, number scaleOut, string name)

Python: (Boolean retval, MediaItem_Take take, Int rootOut, Int scaleOut, String name, Int name_sz) = RPR_MIDI_GetScale(take, rootOut, scaleOut, name, name_sz)

Get the active scale in the media source, if any. root 0=C, 1=C#, etc. scale &0x1=root, &0x2=minor 2nd, &0x4=major 2nd, &0x8=minor 3rd, &0xF=fourth, etc.



C: bool MIDI_GetTextSysexEvt(MediaItem_Take* take, int textsyxevtidx, bool* selectedOutOptional, bool* mutedOutOptional, double* ppqposOutOptional, int* typeOutOptional, char* msgOptional, int* msgOptional_sz)

EEL: bool MIDI_GetTextSysexEvt(MediaItem_Take take, int textsyxevtidx, optional bool &selectedOutOptional, optional bool &mutedOutOptional, optional &ppqposOutOptional, optional int &typeOutOptional, optional #msgOptional)

Lua: boolean retval, optional boolean selectedOutOptional, optional boolean mutedOutOptional, optional number ppqposOutOptional, optional number typeOutOptional, optional string msgOptional reaper.MIDI_GetTextSysexEvt(MediaItem_Take take, integer textsyxevtidx, optional boolean selectedOutOptional, optional boolean mutedOutOptional, optional number ppqposOutOptional, optional number typeOutOptional, optional string msgOptional)

Python: (Boolean retval, MediaItem_Take take, Int textsyxevtidx, Boolean selectedOutOptional, Boolean mutedOutOptional, Float ppqposOutOptional, Int typeOutOptional, String msgOptional, Int msgOptional_sz) = RPR_MIDI_GetTextSysexEvt(take, textsyxevtidx, selectedOutOptional, mutedOutOptional, ppqposOutOptional, typeOutOptional, msgOptional, msgOptional_sz)

Get MIDI meta-event properties. Allowable types are -1:sysex (msg should not include bounding F0..F7), 1-7:MIDI text event types.



C: bool MIDI_GetTrackHash(MediaTrack* track, bool notesonly, char* hash, int hash_sz)

EEL: bool MIDI_GetTrackHash(MediaTrack track, bool notesonly, #hash)

Lua: boolean retval, string hash reaper.MIDI_GetTrackHash(MediaTrack track, boolean notesonly, string hash)

Python: (Boolean retval, MediaTrack track, Boolean notesonly, String hash, Int hash_sz) = RPR_MIDI_GetTrackHash(track, notesonly, hash, hash_sz)

Get a string that only changes when the MIDI data changes. If notesonly==true, then the string changes only when the MIDI notes change. See MIDI_GetHash



C: bool MIDI_InsertCC(MediaItem_Take* take, bool selected, bool muted, double ppqpos, int chanmsg, int chan, int msg2, int msg3)

EEL: bool MIDI_InsertCC(MediaItem_Take take, bool selected, bool muted, ppqpos, int chanmsg, int chan, int msg2, int msg3)

Lua: boolean reaper.MIDI_InsertCC(MediaItem_Take take, boolean selected, boolean muted, number ppqpos, integer chanmsg, integer chan, integer msg2, integer msg3)

Python: Boolean RPR_MIDI_InsertCC(MediaItem_Take take, Boolean selected, Boolean muted, Float ppqpos, Int chanmsg, Int chan, Int msg2, Int msg3)

Insert a new MIDI CC event.



C: bool MIDI_InsertEvt(MediaItem_Take* take, bool selected, bool muted, double ppqpos, const char* bytestr, int bytestr_sz)

EEL: bool MIDI_InsertEvt(MediaItem_Take take, bool selected, bool muted, ppqpos, "bytestr")

Lua: boolean reaper.MIDI_InsertEvt(MediaItem_Take take, boolean selected, boolean muted, number ppqpos, string bytestr)

Python: Boolean RPR_MIDI_InsertEvt(MediaItem_Take take, Boolean selected, Boolean muted, Float ppqpos, String bytestr, Int bytestr_sz)

Insert a new MIDI event.



C: bool MIDI_InsertNote(MediaItem_Take* take, bool selected, bool muted, double startppqpos, double endppqpos, int chan, int pitch, int vel, const bool* noSortInOptional)

EEL: bool MIDI_InsertNote(MediaItem_Take take, bool selected, bool muted, startppqpos, endppqpos, int chan, int pitch, int vel, optional bool noSortInOptional)

Lua: boolean reaper.MIDI_InsertNote(MediaItem_Take take, boolean selected, boolean muted, number startppqpos, number endppqpos, integer chan, integer pitch, integer vel, optional boolean noSortInOptional)

Python: Boolean RPR_MIDI_InsertNote(MediaItem_Take take, Boolean selected, Boolean muted, Float startppqpos, Float endppqpos, Int chan, Int pitch, Int vel, const bool noSortInOptional)

Insert a new MIDI note. Set noSort if inserting multiple events, then call MIDI_Sort when done.



C: bool MIDI_InsertTextSysexEvt(MediaItem_Take* take, bool selected, bool muted, double ppqpos, int type, const char* bytestr, int bytestr_sz)

EEL: bool MIDI_InsertTextSysexEvt(MediaItem_Take take, bool selected, bool muted, ppqpos, int type, "bytestr")

Lua: boolean reaper.MIDI_InsertTextSysexEvt(MediaItem_Take take, boolean selected, boolean muted, number ppqpos, integer type, string bytestr)

Python: Boolean RPR_MIDI_InsertTextSysexEvt(MediaItem_Take take, Boolean selected, Boolean muted, Float ppqpos, Int type, String bytestr, Int bytestr_sz)

Insert a new MIDI text or sysex event. Allowable types are -1:sysex (msg should include bounding F0..F7), 1-7:MIDI text event types.



C: void midi_reinit()

EEL: midi_reinit()

Lua: reaper.midi_reinit()

Python: RPR_midi_reinit()

Reset all MIDI devices



C: void MIDI_SelectAll(MediaItem_Take* take, bool select)

EEL: MIDI_SelectAll(MediaItem_Take take, bool select)

Lua: reaper.MIDI_SelectAll(MediaItem_Take take, boolean select)

Python: RPR_MIDI_SelectAll(MediaItem_Take take, Boolean select)

Select or deselect all MIDI content.



C: bool MIDI_SetCC(MediaItem_Take* take, int ccidx, const bool* selectedInOptional, const bool* mutedInOptional, const double* ppqposInOptional, const int* chanmsgInOptional, const int* chanInOptional, const int* msg2InOptional, const int* msg3InOptional, const bool* noSortInOptional)

EEL: bool MIDI_SetCC(MediaItem_Take take, int ccidx, optional bool selectedInOptional, optional bool mutedInOptional, optional ppqposInOptional, optional int chanmsgInOptional, optional int chanInOptional, optional int msg2InOptional, optional int msg3InOptional, optional bool noSortInOptional)

Lua: boolean reaper.MIDI_SetCC(MediaItem_Take take, integer ccidx, optional boolean selectedInOptional, optional boolean mutedInOptional, optional number ppqposInOptional, optional number chanmsgInOptional, optional number chanInOptional, optional number msg2InOptional, optional number msg3InOptional, optional boolean noSortInOptional)

Python: Boolean RPR_MIDI_SetCC(MediaItem_Take take, Int ccidx, const bool selectedInOptional, const bool mutedInOptional, const double ppqposInOptional, const int chanmsgInOptional, const int chanInOptional, const int msg2InOptional, const int msg3InOptional, const bool noSortInOptional)

Set MIDI CC event properties. Properties passed as NULL will not be set. set noSort if setting multiple events, then call MIDI_Sort when done.



C: bool MIDI_SetEvt(MediaItem_Take* take, int evtidx, const bool* selectedInOptional, const bool* mutedInOptional, const double* ppqposInOptional, const char* msgOptional, int msgOptional_sz, const bool* noSortInOptional)

EEL: bool MIDI_SetEvt(MediaItem_Take take, int evtidx, optional bool selectedInOptional, optional bool mutedInOptional, optional ppqposInOptional, optional "msgOptional", optional bool noSortInOptional)

Lua: boolean reaper.MIDI_SetEvt(MediaItem_Take take, integer evtidx, optional boolean selectedInOptional, optional boolean mutedInOptional, optional number ppqposInOptional, optional string msgOptional, optional boolean noSortInOptional)

Python: Boolean RPR_MIDI_SetEvt(MediaItem_Take take, Int evtidx, const bool selectedInOptional, const bool mutedInOptional, const double ppqposInOptional, String msgOptional, Int msgOptional_sz, const bool noSortInOptional)

Set MIDI event properties. Properties passed as NULL will not be set. set noSort if setting multiple events, then call MIDI_Sort when done.



C: bool MIDI_SetItemExtents(MediaItem* item, double startQN, double endQN)

EEL: bool MIDI_SetItemExtents(MediaItem item, startQN, endQN)

Lua: boolean reaper.MIDI_SetItemExtents(MediaItem item, number startQN, number endQN)

Python: Boolean RPR_MIDI_SetItemExtents(MediaItem item, Float startQN, Float endQN)

Set the start/end positions of a media item that contains a MIDI take.



C: bool MIDI_SetNote(MediaItem_Take* take, int noteidx, const bool* selectedInOptional, const bool* mutedInOptional, const double* startppqposInOptional, const double* endppqposInOptional, const int* chanInOptional, const int* pitchInOptional, const int* velInOptional, const bool* noSortInOptional)

EEL: bool MIDI_SetNote(MediaItem_Take take, int noteidx, optional bool selectedInOptional, optional bool mutedInOptional, optional startppqposInOptional, optional endppqposInOptional, optional int chanInOptional, optional int pitchInOptional, optional int velInOptional, optional bool noSortInOptional)

Lua: boolean reaper.MIDI_SetNote(MediaItem_Take take, integer noteidx, optional boolean selectedInOptional, optional boolean mutedInOptional, optional number startppqposInOptional, optional number endppqposInOptional, optional number chanInOptional, optional number pitchInOptional, optional number velInOptional, optional boolean noSortInOptional)

Python: Boolean RPR_MIDI_SetNote(MediaItem_Take take, Int noteidx, const bool selectedInOptional, const bool mutedInOptional, const double startppqposInOptional, const double endppqposInOptional, const int chanInOptional, const int pitchInOptional, const int velInOptional, const bool noSortInOptional)

Set MIDI note properties. Properties passed as NULL (or negative values) will not be set. Set noSort if setting multiple events, then call MIDI_Sort when done. Setting multiple note start positions at once is done more safely by deleting and re-inserting the notes.



C: bool MIDI_SetTextSysexEvt(MediaItem_Take* take, int textsyxevtidx, const bool* selectedInOptional, const bool* mutedInOptional, const double* ppqposInOptional, const int* typeInOptional, const char* msgOptional, int msgOptional_sz, const bool* noSortInOptional)

EEL: bool MIDI_SetTextSysexEvt(MediaItem_Take take, int textsyxevtidx, optional bool selectedInOptional, optional bool mutedInOptional, optional ppqposInOptional, optional int typeInOptional, optional "msgOptional", optional bool noSortInOptional)

Lua: boolean reaper.MIDI_SetTextSysexEvt(MediaItem_Take take, integer textsyxevtidx, optional boolean selectedInOptional, optional boolean mutedInOptional, optional number ppqposInOptional, optional number typeInOptional, optional string msgOptional, optional boolean noSortInOptional)

Python: Boolean RPR_MIDI_SetTextSysexEvt(MediaItem_Take take, Int textsyxevtidx, const bool selectedInOptional, const bool mutedInOptional, const double ppqposInOptional, const int typeInOptional, String msgOptional, Int msgOptional_sz, const bool noSortInOptional)

Set MIDI text or sysex event properties. Properties passed as NULL will not be set. Allowable types are -1:sysex (msg should not include bounding F0..F7), 1-7:MIDI text event types. set noSort if setting multiple events, then call MIDI_Sort when done.



C: void MIDI_Sort(MediaItem_Take* take)

EEL: MIDI_Sort(MediaItem_Take take)

Lua: reaper.MIDI_Sort(MediaItem_Take take)

Python: RPR_MIDI_Sort(MediaItem_Take take)

Sort MIDI events after multiple calls to MIDI_SetNote, MIDI_SetCC, etc.



C: HWND MIDIEditor_GetActive()

EEL: HWND MIDIEditor_GetActive()

Lua: HWND reaper.MIDIEditor_GetActive()

Python: HWND RPR_MIDIEditor_GetActive()

get a pointer to the focused MIDI editor window
see MIDIEditor_GetMode, MIDIEditor_OnCommand



C: int MIDIEditor_GetMode(HWND midieditor)

EEL: int MIDIEditor_GetMode(HWND midieditor)

Lua: integer reaper.MIDIEditor_GetMode(HWND midieditor)

Python: Int RPR_MIDIEditor_GetMode(HWND midieditor)

get the mode of a MIDI editor (0=piano roll, 1=event list, -1=invalid editor)
see MIDIEditor_GetActive, MIDIEditor_OnCommand



C: int MIDIEditor_GetSetting_int(HWND midieditor, const char* setting_desc)

EEL: int MIDIEditor_GetSetting_int(HWND midieditor, "setting_desc")

Lua: integer reaper.MIDIEditor_GetSetting_int(HWND midieditor, string setting_desc)

Python: Int RPR_MIDIEditor_GetSetting_int(HWND midieditor, String setting_desc)

Get settings from a MIDI editor. setting_desc can be:
snap_enabled: returns 0 or 1
active_note_row: returns 0-127
last_clicked_cc_lane: returns 0-127=CC, 0x100|(0-31)=14-bit CC, 0x200=velocity, 0x201=pitch, 0x202=program, 0x203=channel pressure, 0x204=bank/program select, 0x205=text, 0x206=sysex, 0x207=off velocity
default_note_vel: returns 0-127
default_note_chan: returns 0-15
default_note_len: returns default length in MIDI ticks
scale_enabled: returns 0-1
scale_root: returns 0-12 (0=C)
if setting_desc is unsupported, the function returns -1.
See MIDIEditor_GetActive, MIDIEditor_GetSetting_str



C: bool MIDIEditor_GetSetting_str(HWND midieditor, const char* setting_desc, char* buf, int buf_sz)

EEL: bool MIDIEditor_GetSetting_str(HWND midieditor, "setting_desc", #buf)

Lua: boolean retval, string buf reaper.MIDIEditor_GetSetting_str(HWND midieditor, string setting_desc, string buf)

Python: (Boolean retval, HWND midieditor, String setting_desc, String buf, Int buf_sz) = RPR_MIDIEditor_GetSetting_str(midieditor, setting_desc, buf, buf_sz)

Get settings from a MIDI editor. setting_desc can be:
last_clicked_cc_lane: returns text description ("velocity", "pitch", etc)
scale: returns the scale record, for example "102034050607" for a major scale
if setting_desc is unsupported, the function returns false.
See MIDIEditor_GetActive, MIDIEditor_GetSetting_int



C: MediaItem_Take* MIDIEditor_GetTake(HWND midieditor)

EEL: MediaItem_Take MIDIEditor_GetTake(HWND midieditor)

Lua: MediaItem_Take reaper.MIDIEditor_GetTake(HWND midieditor)

Python: MediaItem_Take RPR_MIDIEditor_GetTake(HWND midieditor)

get the take that is currently being edited in this MIDI editor



C: bool MIDIEditor_LastFocused_OnCommand(int command_id, bool islistviewcommand)

EEL: bool MIDIEditor_LastFocused_OnCommand(int command_id, bool islistviewcommand)

Lua: boolean reaper.MIDIEditor_LastFocused_OnCommand(integer command_id, boolean islistviewcommand)

Python: Boolean RPR_MIDIEditor_LastFocused_OnCommand(Int command_id, Boolean islistviewcommand)

Send an action command to the last focused MIDI editor. Returns false if there is no MIDI editor open, or if the view mode (piano roll or event list) does not match the input.
see MIDIEditor_OnCommand



C: bool MIDIEditor_OnCommand(HWND midieditor, int command_id)

EEL: bool MIDIEditor_OnCommand(HWND midieditor, int command_id)

Lua: boolean reaper.MIDIEditor_OnCommand(HWND midieditor, integer command_id)

Python: Boolean RPR_MIDIEditor_OnCommand(HWND midieditor, Int command_id)

Send an action command to a MIDI editor. Returns false if the supplied MIDI editor pointer is not valid (not an open MIDI editor).
see MIDIEditor_GetActive, MIDIEditor_LastFocused_OnCommand



C: void mkpanstr(char* strNeed64, double pan)

EEL: mkpanstr(#strNeed64, pan)

Lua: string strNeed64 reaper.mkpanstr(string strNeed64, number pan)

Python: (String strNeed64, Float pan) = RPR_mkpanstr(strNeed64, pan)



C: void mkvolpanstr(char* strNeed64, double vol, double pan)

EEL: mkvolpanstr(#strNeed64, vol, pan)

Lua: string strNeed64 reaper.mkvolpanstr(string strNeed64, number vol, number pan)

Python: (String strNeed64, Float vol, Float pan) = RPR_mkvolpanstr(strNeed64, vol, pan)



C: void mkvolstr(char* strNeed64, double vol)

EEL: mkvolstr(#strNeed64, vol)

Lua: string strNeed64 reaper.mkvolstr(string strNeed64, number vol)

Python: (String strNeed64, Float vol) = RPR_mkvolstr(strNeed64, vol)



C: void MoveEditCursor(double adjamt, bool dosel)

EEL: MoveEditCursor(adjamt, bool dosel)

Lua: reaper.MoveEditCursor(number adjamt, boolean dosel)

Python: RPR_MoveEditCursor(Float adjamt, Boolean dosel)



C: bool MoveMediaItemToTrack(MediaItem* item, MediaTrack* desttr)

EEL: bool MoveMediaItemToTrack(MediaItem item, MediaTrack desttr)

Lua: boolean reaper.MoveMediaItemToTrack(MediaItem item, MediaTrack desttr)

Python: Boolean RPR_MoveMediaItemToTrack(MediaItem item, MediaTrack desttr)

returns TRUE if move succeeded



C: void MuteAllTracks(bool mute)

EEL: MuteAllTracks(bool mute)

Lua: reaper.MuteAllTracks(boolean mute)

Python: RPR_MuteAllTracks(Boolean mute)



C: void my_getViewport(RECT* r, const RECT* sr, bool wantWorkArea)

EEL: my_getViewport(int &r.left, int &r.top, int &r.right, int &r.bot, int sr.left, int sr.top, int sr.right, int sr.bot, bool wantWorkArea)

Lua: reaper.my_getViewport(numberr.left, numberr.top, numberr.right, numberr.bot, number sr.left, number sr.top, number sr.right, number sr.bot, boolean wantWorkArea)

Python: RPR_my_getViewport(RECT r, const RECT sr, Boolean wantWorkArea)



C: int NamedCommandLookup(const char* command_name)

EEL: int NamedCommandLookup("command_name")

Lua: integer reaper.NamedCommandLookup(string command_name)

Python: Int RPR_NamedCommandLookup(String command_name)

Get the command ID number for named command that was registered by an extension such as "_SWS_ABOUT" or "_113088d11ae641c193a2b7ede3041ad5" for a ReaScript or a custom action.



C: void OnPauseButton()

EEL: OnPauseButton()

Lua: reaper.OnPauseButton()

Python: RPR_OnPauseButton()

direct way to simulate pause button hit



C: void OnPauseButtonEx(ReaProject* proj)

EEL: OnPauseButtonEx(ReaProject proj)

Lua: reaper.OnPauseButtonEx(ReaProject proj)

Python: RPR_OnPauseButtonEx(ReaProject proj)

direct way to simulate pause button hit



C: void OnPlayButton()

EEL: OnPlayButton()

Lua: reaper.OnPlayButton()

Python: RPR_OnPlayButton()

direct way to simulate play button hit



C: void OnPlayButtonEx(ReaProject* proj)

EEL: OnPlayButtonEx(ReaProject proj)

Lua: reaper.OnPlayButtonEx(ReaProject proj)

Python: RPR_OnPlayButtonEx(ReaProject proj)

direct way to simulate play button hit



C: void OnStopButton()

EEL: OnStopButton()

Lua: reaper.OnStopButton()

Python: RPR_OnStopButton()

direct way to simulate stop button hit



C: void OnStopButtonEx(ReaProject* proj)

EEL: OnStopButtonEx(ReaProject proj)

Lua: reaper.OnStopButtonEx(ReaProject proj)

Python: RPR_OnStopButtonEx(ReaProject proj)

direct way to simulate stop button hit



C: void OscLocalMessageToHost(const char* message, const double* valueInOptional)

EEL: OscLocalMessageToHost("message", optional valueInOptional)

Lua: reaper.OscLocalMessageToHost(string message, optional number valueInOptional)

Python: RPR_OscLocalMessageToHost(String message, const double valueInOptional)

Send an OSC message directly to REAPER. The value argument may be NULL. The message will be matched against the default OSC patterns. Only supported if control surface support was enabled when installing REAPER.



C: double parse_timestr(const char* buf)

EEL: double parse_timestr("buf")

Lua: number reaper.parse_timestr(string buf)

Python: Float RPR_parse_timestr(String buf)

time formatting mode overrides: -1=proj default.
0=time
1=measures.beats + time
2=measures.beats
3=seconds
4=samples
5=h:m:s:f



C: double parse_timestr_len(const char* buf, double offset, int modeoverride)

EEL: double parse_timestr_len("buf", offset, int modeoverride)

Lua: number reaper.parse_timestr_len(string buf, number offset, integer modeoverride)

Python: Float RPR_parse_timestr_len(String buf, Float offset, Int modeoverride)

time formatting mode overrides: -1=proj default.
0=time
1=measures.beats + time
2=measures.beats
3=seconds
4=samples
5=h:m:s:f



C: double parse_timestr_pos(const char* buf, int modeoverride)

EEL: double parse_timestr_pos("buf", int modeoverride)

Lua: number reaper.parse_timestr_pos(string buf, integer modeoverride)

Python: Float RPR_parse_timestr_pos(String buf, Int modeoverride)

parses time string,modeoverride see above



C: double parsepanstr(const char* str)

EEL: double parsepanstr("str")

Lua: number reaper.parsepanstr(string str)

Python: Float RPR_parsepanstr(String str)



C: unsigned int PCM_Sink_Enum(int idx, const char** descstrOut)

EEL: uint PCM_Sink_Enum(int idx, #descstrOut)

Lua: integer retval, string descstrOut reaper.PCM_Sink_Enum(integer idx)

Python: Unknown RPR_PCM_Sink_Enum(Int idx, String descstrOut)



C: const char* PCM_Sink_GetExtension(const char* data, int data_sz)

EEL: bool PCM_Sink_GetExtension(#retval, "data")

Lua: string reaper.PCM_Sink_GetExtension(string data)

Python: String RPR_PCM_Sink_GetExtension(String data, Int data_sz)



C: HWND PCM_Sink_ShowConfig(const char* cfg, int cfg_sz, HWND hwndParent)

EEL: HWND PCM_Sink_ShowConfig("cfg", HWND hwndParent)

Lua: HWND reaper.PCM_Sink_ShowConfig(string cfg, HWND hwndParent)

Python: HWND RPR_PCM_Sink_ShowConfig(String cfg, Int cfg_sz, HWND hwndParent)



C: PCM_source* PCM_Source_CreateFromFile(const char* filename)

EEL: PCM_source PCM_Source_CreateFromFile("filename")

Lua: PCM_source reaper.PCM_Source_CreateFromFile(string filename)

Python: PCM_source RPR_PCM_Source_CreateFromFile(String filename)



C: PCM_source* PCM_Source_CreateFromFileEx(const char* filename, bool forcenoMidiImp)

EEL: PCM_source PCM_Source_CreateFromFileEx("filename", bool forcenoMidiImp)

Lua: PCM_source reaper.PCM_Source_CreateFromFileEx(string filename, boolean forcenoMidiImp)

Python: PCM_source RPR_PCM_Source_CreateFromFileEx(String filename, Boolean forcenoMidiImp)



C: PCM_source* PCM_Source_CreateFromType(const char* sourcetype)

EEL: PCM_source PCM_Source_CreateFromType("sourcetype")

Lua: PCM_source reaper.PCM_Source_CreateFromType(string sourcetype)

Python: PCM_source RPR_PCM_Source_CreateFromType(String sourcetype)



C: void PCM_Source_Destroy(PCM_source* src)

EEL: PCM_Source_Destroy(PCM_source src)

Lua: reaper.PCM_Source_Destroy(PCM_source src)

Python: RPR_PCM_Source_Destroy(PCM_source src)

Deletes a PCM_source -- be sure that you remove any project reference before deleting a source



C: bool PCM_Source_GetSectionInfo(PCM_source* src, double* offsOut, double* lenOut, bool* revOut)

EEL: bool PCM_Source_GetSectionInfo(PCM_source src, &offsOut, &lenOut, bool &revOut)

Lua: boolean retval, number offsOut, number lenOut, boolean revOut reaper.PCM_Source_GetSectionInfo(PCM_source src)

Python: (Boolean retval, PCM_source src, Float offsOut, Float lenOut, Boolean revOut) = RPR_PCM_Source_GetSectionInfo(src, offsOut, lenOut, revOut)

If a section/reverse block, retrieves offset/len/reverse. return true if success



C: const char* plugin_getFilterList()

EEL: bool plugin_getFilterList(#retval)

Lua: string reaper.plugin_getFilterList()

Python: String RPR_plugin_getFilterList()



C: const char* plugin_getImportableProjectFilterList()

EEL: bool plugin_getImportableProjectFilterList(#retval)

Lua: string reaper.plugin_getImportableProjectFilterList()

Python: String RPR_plugin_getImportableProjectFilterList()



C: void PluginWantsAlwaysRunFx(int amt)

EEL: PluginWantsAlwaysRunFx(int amt)

Lua: reaper.PluginWantsAlwaysRunFx(integer amt)

Python: RPR_PluginWantsAlwaysRunFx(Int amt)



C: void PreventUIRefresh(int prevent_count)

EEL: PreventUIRefresh(int prevent_count)

Lua: reaper.PreventUIRefresh(integer prevent_count)

Python: RPR_PreventUIRefresh(Int prevent_count)

adds prevent_count to the UI refresh prevention state; always add then remove the same amount, or major disfunction will occur



C: void ReaScriptError(const char* errmsg)

EEL: ReaScriptError("errmsg")

Lua: reaper.ReaScriptError(string errmsg)

Python: RPR_ReaScriptError(String errmsg)

Causes REAPER to display the error message after the current ReaScript finishes.



C: int RecursiveCreateDirectory(const char* path, size_t ignored)

EEL: int RecursiveCreateDirectory("path", size_t ignored)

Lua: integer reaper.RecursiveCreateDirectory(string path, integer ignored)

Python: Int RPR_RecursiveCreateDirectory(String path, Unknown ignored)



C: void RefreshToolbar(int command_id)

EEL: RefreshToolbar(int command_id)

Lua: reaper.RefreshToolbar(integer command_id)

Python: RPR_RefreshToolbar(Int command_id)

See RefreshToolbar2.



C: void RefreshToolbar2(int section_id, int command_id)

EEL: RefreshToolbar2(int section_id, int command_id)

Lua: reaper.RefreshToolbar2(integer section_id, integer command_id)

Python: RPR_RefreshToolbar2(Int section_id, Int command_id)

Refresh the toolbar button states of a toggle action.



C: void relative_fn(const char* in, char* out, int out_sz)

EEL: relative_fn("in", #out)

Lua: string out reaper.relative_fn(string in, string out)

Python: (String in, String out, Int out_sz) = RPR_relative_fn(in, out, out_sz)



C: bool RenderFileSection(const char* source_filename, const char* target_filename, double start_percent, double end_percent, double playrate)

EEL: bool RenderFileSection("source_filename", "target_filename", start_percent, end_percent, playrate)

Lua: boolean reaper.RenderFileSection(string source_filename, string target_filename, number start_percent, number end_percent, number playrate)

Python: Boolean RPR_RenderFileSection(String source_filename, String target_filename, Float start_percent, Float end_percent, Float playrate)

Not available while playing back.



C: const char* Resample_EnumModes(int mode)

EEL: bool Resample_EnumModes(#retval, int mode)

Lua: string reaper.Resample_EnumModes(integer mode)

Python: String RPR_Resample_EnumModes(Int mode)



C: void resolve_fn(const char* in, char* out, int out_sz)

EEL: resolve_fn("in", #out)

Lua: string out reaper.resolve_fn(string in, string out)

Python: (String in, String out, Int out_sz) = RPR_resolve_fn(in, out, out_sz)



C: void resolve_fn2(const char* in, char* out, int out_sz, const char* checkSubDirOptional)

EEL: resolve_fn2("in", #out, optional "checkSubDirOptional")

Lua: string out reaper.resolve_fn2(string in, string out, optional string checkSubDirOptional)

Python: (String in, String out, Int out_sz, String checkSubDirOptional) = RPR_resolve_fn2(in, out, out_sz, checkSubDirOptional)



C: const char* ReverseNamedCommandLookup(int command_id)

EEL: bool ReverseNamedCommandLookup(#retval, int command_id)

Lua: string reaper.ReverseNamedCommandLookup(integer command_id)

Python: String RPR_ReverseNamedCommandLookup(Int command_id)

Get the named command for the given command ID. The returned string will not start with '_' (e.g. it will return "SWS_ABOUT"), it will be NULL if command_id is a native action.



C: double ScaleFromEnvelopeMode(int scaling_mode, double val)

EEL: double ScaleFromEnvelopeMode(int scaling_mode, val)

Lua: number reaper.ScaleFromEnvelopeMode(integer scaling_mode, number val)

Python: Float RPR_ScaleFromEnvelopeMode(Int scaling_mode, Float val)

See GetEnvelopeScalingMode.



C: double ScaleToEnvelopeMode(int scaling_mode, double val)

EEL: double ScaleToEnvelopeMode(int scaling_mode, val)

Lua: number reaper.ScaleToEnvelopeMode(integer scaling_mode, number val)

Python: Float RPR_ScaleToEnvelopeMode(Int scaling_mode, Float val)

See GetEnvelopeScalingMode.



C: void SelectAllMediaItems(ReaProject* proj, bool selected)

EEL: SelectAllMediaItems(ReaProject proj, bool selected)

Lua: reaper.SelectAllMediaItems(ReaProject proj, boolean selected)

Python: RPR_SelectAllMediaItems(ReaProject proj, Boolean selected)



C: void SelectProjectInstance(ReaProject* proj)

EEL: SelectProjectInstance(ReaProject proj)

Lua: reaper.SelectProjectInstance(ReaProject proj)

Python: RPR_SelectProjectInstance(ReaProject proj)



C: void SetActiveTake(MediaItem_Take* take)

EEL: SetActiveTake(MediaItem_Take take)

Lua: reaper.SetActiveTake(MediaItem_Take take)

Python: RPR_SetActiveTake(MediaItem_Take take)

set this take active in this media item



C: void SetAutomationMode(int mode, bool onlySel)

EEL: SetAutomationMode(int mode, bool onlySel)

Lua: reaper.SetAutomationMode(integer mode, boolean onlySel)

Python: RPR_SetAutomationMode(Int mode, Boolean onlySel)

sets all or selected tracks to mode.



C: void SetCurrentBPM(ReaProject* __proj, double bpm, bool wantUndo)

EEL: SetCurrentBPM(ReaProject __proj, bpm, bool wantUndo)

Lua: reaper.SetCurrentBPM(ReaProject __proj, number bpm, boolean wantUndo)

Python: RPR_SetCurrentBPM(ReaProject __proj, Float bpm, Boolean wantUndo)

set current BPM in project, set wantUndo=true to add undo point



C: void SetCursorContext(int mode, TrackEnvelope* env)

EEL: SetCursorContext(int mode, TrackEnvelope env)

Lua: reaper.SetCursorContext(integer mode, TrackEnvelope env)

Python: RPR_SetCursorContext(Int mode, TrackEnvelope env)

You must use this to change the focus programmatically. mode=0 to focus track panels, 1 to focus the arrange window, 2 to focus the arrange window and select env (or env==NULL to clear the current track/take envelope selection)



C: void SetEditCurPos(double time, bool moveview, bool seekplay)

EEL: SetEditCurPos(time, bool moveview, bool seekplay)

Lua: reaper.SetEditCurPos(number time, boolean moveview, boolean seekplay)

Python: RPR_SetEditCurPos(Float time, Boolean moveview, Boolean seekplay)



C: void SetEditCurPos2(ReaProject* proj, double time, bool moveview, bool seekplay)

EEL: SetEditCurPos2(ReaProject proj, time, bool moveview, bool seekplay)

Lua: reaper.SetEditCurPos2(ReaProject proj, number time, boolean moveview, boolean seekplay)

Python: RPR_SetEditCurPos2(ReaProject proj, Float time, Boolean moveview, Boolean seekplay)



C: bool SetEnvelopePoint(TrackEnvelope* envelope, int ptidx, double* timeInOptional, double* valueInOptional, int* shapeInOptional, double* tensionInOptional, bool* selectedInOptional, bool* noSortInOptional)

EEL: bool SetEnvelopePoint(TrackEnvelope envelope, int ptidx, optional timeInOptional, optional valueInOptional, optional int shapeInOptional, optional tensionInOptional, optional bool selectedInOptional, optional bool noSortInOptional)

Lua: boolean reaper.SetEnvelopePoint(TrackEnvelope envelope, integer ptidx, optional number timeInOptional, optional number valueInOptional, optional number shapeInOptional, optional number tensionInOptional, optional boolean selectedInOptional, optional boolean noSortInOptional)

Python: (Boolean retval, TrackEnvelope envelope, Int ptidx, Float timeInOptional, Float valueInOptional, Int shapeInOptional, Float tensionInOptional, Boolean selectedInOptional, Boolean noSortInOptional) = RPR_SetEnvelopePoint(envelope, ptidx, timeInOptional, valueInOptional, shapeInOptional, tensionInOptional, selectedInOptional, noSortInOptional)

Set attributes of an envelope point. Values that are not supplied will be ignored. If setting multiple points at once, set noSort=true, and call Envelope_SortPoints when done. See GetEnvelopePoint, InsertEnvelopePoint, GetEnvelopeScalingMode.



C: bool SetEnvelopeStateChunk(TrackEnvelope* env, const char* str, bool isundoOptional)

EEL: bool SetEnvelopeStateChunk(TrackEnvelope env, "str", bool isundoOptional)

Lua: boolean reaper.SetEnvelopeStateChunk(TrackEnvelope env, string str, boolean isundoOptional)

Python: Boolean RPR_SetEnvelopeStateChunk(TrackEnvelope env, String str, Boolean isundoOptional)

Sets the RPPXML state of an envelope, returns true if successful. Undo flag is a performance/caching hint.



C: void SetExtState(const char* section, const char* key, const char* value, bool persist)

EEL: SetExtState("section", "key", "value", bool persist)

Lua: reaper.SetExtState(string section, string key, string value, boolean persist)

Python: RPR_SetExtState(String section, String key, String value, Boolean persist)

Set the extended state value for a specific section and key. persist=true means the value should be stored and reloaded the next time REAPER is opened. See GetExtState, DeleteExtState, HasExtState.



C: void SetGlobalAutomationOverride(int mode)

EEL: SetGlobalAutomationOverride(int mode)

Lua: reaper.SetGlobalAutomationOverride(integer mode)

Python: RPR_SetGlobalAutomationOverride(Int mode)

mode: see GetGlobalAutomationOverride



C: bool SetItemStateChunk(MediaItem* item, const char* str, bool isundoOptional)

EEL: bool SetItemStateChunk(MediaItem item, "str", bool isundoOptional)

Lua: boolean reaper.SetItemStateChunk(MediaItem item, string str, boolean isundoOptional)

Python: Boolean RPR_SetItemStateChunk(MediaItem item, String str, Boolean isundoOptional)

Sets the RPPXML state of an item, returns true if successful. Undo flag is a performance/caching hint.



C: int SetMasterTrackVisibility(int flag)

EEL: int SetMasterTrackVisibility(int flag)

Lua: integer reaper.SetMasterTrackVisibility(integer flag)

Python: Int RPR_SetMasterTrackVisibility(Int flag)

set &1 to show the master track in the TCP, &2 to show in the mixer. Returns the previous visibility state. See GetMasterTrackVisibility.



C: bool SetMediaItemInfo_Value(MediaItem* item, const char* parmname, double newvalue)

EEL: bool SetMediaItemInfo_Value(MediaItem item, "parmname", newvalue)

Lua: boolean reaper.SetMediaItemInfo_Value(MediaItem item, string parmname, number newvalue)

Python: Boolean RPR_SetMediaItemInfo_Value(MediaItem item, String parmname, Float newvalue)

Set media item numerical-value attributes.
B_MUTE : bool * to muted state
B_LOOPSRC : bool * to loop source
B_ALLTAKESPLAY : bool * to all takes play
B_UISEL : bool * to ui selected
C_BEATATTACHMODE : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsosonly
C_LOCK : char * to one char of lock flags (&1 is locked, currently)
D_VOL : double * of item volume (volume bar)
D_POSITION : double * of item position (seconds)
D_LENGTH : double * of item length (seconds)
D_SNAPOFFSET : double * of item snap offset (seconds)
D_FADEINLEN : double * of item fade in length (manual, seconds)
D_FADEOUTLEN : double * of item fade out length (manual, seconds)
D_FADEINLEN_AUTO : double * of item autofade in length (seconds, -1 for no autofade set)
D_FADEOUTLEN_AUTO : double * of item autofade out length (seconds, -1 for no autofade set)
C_FADEINSHAPE : int * to fadein shape, 0=linear, ...
C_FADEOUTSHAPE : int * to fadeout shape
I_GROUPID : int * to group ID (0 = no group)
I_LASTY : int * to last y position in track (readonly)
I_LASTH : int * to last height in track (readonly)
I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
I_CURTAKE : int * to active take
IP_ITEMNUMBER : int, item number within the track (read-only, returns the item number directly)
F_FREEMODE_Y : float * to free mode y position (0..1)
F_FREEMODE_H : float * to free mode height (0..1)



C: bool SetMediaItemLength(MediaItem* item, double length, bool refreshUI)

EEL: bool SetMediaItemLength(MediaItem item, length, bool refreshUI)

Lua: boolean reaper.SetMediaItemLength(MediaItem item, number length, boolean refreshUI)

Python: Boolean RPR_SetMediaItemLength(MediaItem item, Float length, Boolean refreshUI)

Redraws the screen only if refreshUI == true.
See UpdateArrange().



C: bool SetMediaItemPosition(MediaItem* item, double position, bool refreshUI)

EEL: bool SetMediaItemPosition(MediaItem item, position, bool refreshUI)

Lua: boolean reaper.SetMediaItemPosition(MediaItem item, number position, boolean refreshUI)

Python: Boolean RPR_SetMediaItemPosition(MediaItem item, Float position, Boolean refreshUI)

Redraws the screen only if refreshUI == true.
See UpdateArrange().



C: void SetMediaItemSelected(MediaItem* item, bool selected)

EEL: SetMediaItemSelected(MediaItem item, bool selected)

Lua: reaper.SetMediaItemSelected(MediaItem item, boolean selected)

Python: RPR_SetMediaItemSelected(MediaItem item, Boolean selected)



C: bool SetMediaItemTake_Source(MediaItem_Take* take, PCM_source* source)

EEL: bool SetMediaItemTake_Source(MediaItem_Take take, PCM_source source)

Lua: boolean reaper.SetMediaItemTake_Source(MediaItem_Take take, PCM_source source)

Python: Boolean RPR_SetMediaItemTake_Source(MediaItem_Take take, PCM_source source)

Set media source of media item take



C: bool SetMediaItemTakeInfo_Value(MediaItem_Take* take, const char* parmname, double newvalue)

EEL: bool SetMediaItemTakeInfo_Value(MediaItem_Take take, "parmname", newvalue)

Lua: boolean reaper.SetMediaItemTakeInfo_Value(MediaItem_Take take, string parmname, number newvalue)

Python: Boolean RPR_SetMediaItemTakeInfo_Value(MediaItem_Take take, String parmname, Float newvalue)

Set media item take numerical-value attributes.
D_STARTOFFS : double *, start offset in take of item
D_VOL : double *, take volume
D_PAN : double *, take pan
D_PANLAW : double *, take pan law (-1.0=default, 0.5=-6dB, 1.0=+0dB, etc)
D_PLAYRATE : double *, take playrate (1.0=normal, 2.0=doublespeed, etc)
D_PITCH : double *, take pitch adjust (in semitones, 0.0=normal, +12 = one octave up, etc)
B_PPITCH, bool *, preserve pitch when changing rate
I_CHANMODE, int *, channel mode (0=normal, 1=revstereo, 2=downmix, 3=l, 4=r)
I_PITCHMODE, int *, pitch shifter mode, -1=proj default, otherwise high word=shifter low word = parameter
I_CUSTOMCOLOR : int *, custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
IP_TAKENUMBER : int, take number within the item (read-only, returns the take number directly)



C: bool SetMediaTrackInfo_Value(MediaTrack* tr, const char* parmname, double newvalue)

EEL: bool SetMediaTrackInfo_Value(MediaTrack tr, "parmname", newvalue)

Lua: boolean reaper.SetMediaTrackInfo_Value(MediaTrack tr, string parmname, number newvalue)

Python: Boolean RPR_SetMediaTrackInfo_Value(MediaTrack tr, String parmname, Float newvalue)

Set track numerical-value attributes.
B_MUTE : bool * : mute flag
B_PHASE : bool * : invert track phase
IP_TRACKNUMBER : int : track number (returns zero if not found, -1 for master track) (read-only, returns the int directly)
I_SOLO : int * : 0=not soloed, 1=solo, 2=soloed in place
I_FXEN : int * : 0=fx bypassed, nonzero = fx active
I_RECARM : int * : 0=not record armed, 1=record armed
I_RECINPUT : int * : record input. <0 = no input, 0..n = mono hardware input, 512+n = rearoute input, 1024 set for stereo input pair. 4096 set for MIDI input, if set, then low 5 bits represent channel (0=all, 1-16=only chan), then next 5 bits represent physical input (63=all, 62=VKB)
I_RECMODE : int * : record mode (0=input, 1=stereo out, 2=none, 3=stereo out w/latcomp, 4=midi output, 5=mono out, 6=mono out w/ lat comp, 7=midi overdub, 8=midi replace
I_RECMON : int * : record monitor (0=off, 1=normal, 2=not when playing (tapestyle))
I_RECMONITEMS : int * : monitor items while recording (0=off, 1=on)
I_AUTOMODE : int * : track automation mode (0=trim/off, 1=read, 2=touch, 3=write, 4=latch
I_NCHAN : int * : number of track channels, must be 2-64, even
I_SELECTED : int * : track selected? 0 or 1
I_WNDH : int * : current TCP window height (Read-only)
I_FOLDERDEPTH : int * : folder depth change (0=normal, 1=track is a folder parent, -1=track is the last in the innermost folder, -2=track is the last in the innermost and next-innermost folders, etc
I_FOLDERCOMPACT : int * : folder compacting (only valid on folders), 0=normal, 1=small, 2=tiny children
I_MIDIHWOUT : int * : track midi hardware output index (<0 for disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31))
I_PERFFLAGS : int * : track perf flags (&1=no media buffering, &2=no anticipative FX)
I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
I_HEIGHTOVERRIDE : int * : custom height override for TCP window. 0 for none, otherwise size in pixels
D_VOL : double * : trim volume of track (0 (-inf)..1 (+0dB) .. 2 (+6dB) etc ..)
D_PAN : double * : trim pan of track (-1..1)
D_WIDTH : double * : width of track (-1..1)
D_DUALPANL : double * : dualpan position 1 (-1..1), only if I_PANMODE==6
D_DUALPANR : double * : dualpan position 2 (-1..1), only if I_PANMODE==6
I_PANMODE : int * : pan mode (0 = classic 3.x, 3=new balance, 5=stereo pan, 6 = dual pan)
D_PANLAW : double * : pan law of track. <0 for project default, 1.0 for +0dB, etc
P_ENV : read only, returns TrackEnvelope *, setNewValue= B_SHOWINMIXER : bool * : show track panel in mixer -- do not use on master
B_SHOWINTCP : bool * : show track panel in tcp -- do not use on master
B_MAINSEND : bool * : track sends audio to parent
B_FREEMODE : bool * : track free-mode enabled (requires UpdateTimeline() after changing etc)
C_BEATATTACHMODE : char * : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsposonly
F_MCP_FXSEND_SCALE : float * : scale of fx+send area in MCP (0.0=smallest allowed, 1=max allowed)
F_MCP_SENDRGN_SCALE : float * : scale of send area as proportion of the fx+send total area (0=min allow, 1=max)



C: MediaTrack* SetMixerScroll(MediaTrack* leftmosttrack)

EEL: MediaTrack SetMixerScroll(MediaTrack leftmosttrack)

Lua: MediaTrack reaper.SetMixerScroll(MediaTrack leftmosttrack)

Python: MediaTrack RPR_SetMixerScroll(MediaTrack leftmosttrack)

Scroll the mixer so that leftmosttrack is the leftmost visible track. Returns the leftmost track after scrolling, which may be different from the passed-in track if there are not enough tracks to its right.



C: void SetMouseModifier(const char* context, int modifier_flag, const char* action)

EEL: SetMouseModifier("context", int modifier_flag, "action")

Lua: reaper.SetMouseModifier(string context, integer modifier_flag, string action)

Python: RPR_SetMouseModifier(String context, Int modifier_flag, String action)

Set the mouse modifier assignment for a specific modifier key assignment, in a specific context.
Context is a string like "MM_CTX_ITEM". Find these strings by modifying an assignment in
Preferences/Editing/Mouse Modifiers, then looking in reaper-mouse.ini.
Modifier flag is a number from 0 to 15: add 1 for shift, 2 for control, 4 for alt, 8 for win.
(OSX: add 1 for shift, 2 for command, 4 for opt, 8 for control.)
For left-click and double-click contexts, the action can be any built-in command ID number
or any custom action ID string. Find built-in command IDs in the REAPER actions window
(enable "show action IDs" in the context menu), and find custom action ID strings in reaper-kb.ini.
For built-in mouse modifier behaviors, find action IDs (which will be low numbers)
by modifying an assignment in Preferences/Editing/Mouse Modifiers, then looking in reaper-mouse.ini.
Assigning an action of -1 will reset that mouse modifier behavior to factory default.
See GetMouseModifier.




C: void SetOnlyTrackSelected(MediaTrack* track)

EEL: SetOnlyTrackSelected(MediaTrack track)

Lua: reaper.SetOnlyTrackSelected(MediaTrack track)

Python: RPR_SetOnlyTrackSelected(MediaTrack track)

Set exactly one track selected, deselect all others



C: bool SetProjectMarker(int markrgnindexnumber, bool isrgn, double pos, double rgnend, const char* name)

EEL: bool SetProjectMarker(int markrgnindexnumber, bool isrgn, pos, rgnend, "name")

Lua: boolean reaper.SetProjectMarker(integer markrgnindexnumber, boolean isrgn, number pos, number rgnend, string name)

Python: Boolean RPR_SetProjectMarker(Int markrgnindexnumber, Boolean isrgn, Float pos, Float rgnend, String name)



C: bool SetProjectMarker2(ReaProject* proj, int markrgnindexnumber, bool isrgn, double pos, double rgnend, const char* name)

EEL: bool SetProjectMarker2(ReaProject proj, int markrgnindexnumber, bool isrgn, pos, rgnend, "name")

Lua: boolean reaper.SetProjectMarker2(ReaProject proj, integer markrgnindexnumber, boolean isrgn, number pos, number rgnend, string name)

Python: Boolean RPR_SetProjectMarker2(ReaProject proj, Int markrgnindexnumber, Boolean isrgn, Float pos, Float rgnend, String name)



C: bool SetProjectMarker3(ReaProject* proj, int markrgnindexnumber, bool isrgn, double pos, double rgnend, const char* name, int color)

EEL: bool SetProjectMarker3(ReaProject proj, int markrgnindexnumber, bool isrgn, pos, rgnend, "name", int color)

Lua: boolean reaper.SetProjectMarker3(ReaProject proj, integer markrgnindexnumber, boolean isrgn, number pos, number rgnend, string name, integer color)

Python: Boolean RPR_SetProjectMarker3(ReaProject proj, Int markrgnindexnumber, Boolean isrgn, Float pos, Float rgnend, String name, Int color)



C: bool SetProjectMarker4(ReaProject* proj, int markrgnindexnumber, bool isrgn, double pos, double rgnend, const char* name, int color, int flags)

EEL: bool SetProjectMarker4(ReaProject proj, int markrgnindexnumber, bool isrgn, pos, rgnend, "name", int color, int flags)

Lua: boolean reaper.SetProjectMarker4(ReaProject proj, integer markrgnindexnumber, boolean isrgn, number pos, number rgnend, string name, integer color, integer flags)

Python: Boolean RPR_SetProjectMarker4(ReaProject proj, Int markrgnindexnumber, Boolean isrgn, Float pos, Float rgnend, String name, Int color, Int flags)

color should be 0 to not change, or RGB(x,y,z)|0x1000000 to set custom, flags&1 to clear name



C: bool SetProjectMarkerByIndex(ReaProject* proj, int markrgnidx, bool isrgn, double pos, double rgnend, int IDnumber, const char* name, int color)

EEL: bool SetProjectMarkerByIndex(ReaProject proj, int markrgnidx, bool isrgn, pos, rgnend, int IDnumber, "name", int color)

Lua: boolean reaper.SetProjectMarkerByIndex(ReaProject proj, integer markrgnidx, boolean isrgn, number pos, number rgnend, integer IDnumber, string name, integer color)

Python: Boolean RPR_SetProjectMarkerByIndex(ReaProject proj, Int markrgnidx, Boolean isrgn, Float pos, Float rgnend, Int IDnumber, String name, Int color)

See SetProjectMarkerByIndex2.



C: bool SetProjectMarkerByIndex2(ReaProject* proj, int markrgnidx, bool isrgn, double pos, double rgnend, int IDnumber, const char* name, int color, int flags)

EEL: bool SetProjectMarkerByIndex2(ReaProject proj, int markrgnidx, bool isrgn, pos, rgnend, int IDnumber, "name", int color, int flags)

Lua: boolean reaper.SetProjectMarkerByIndex2(ReaProject proj, integer markrgnidx, boolean isrgn, number pos, number rgnend, integer IDnumber, string name, integer color, integer flags)

Python: Boolean RPR_SetProjectMarkerByIndex2(ReaProject proj, Int markrgnidx, Boolean isrgn, Float pos, Float rgnend, Int IDnumber, String name, Int color, Int flags)

Differs from SetProjectMarker4 in that markrgnidx is 0 for the first marker/region, 1 for the next, etc (see EnumProjectMarkers3), rather than representing the displayed marker/region ID number (see SetProjectMarker3). Function will fail if attempting to set a duplicate ID number for a region (duplicate ID numbers for markers are OK). , flags&1 to clear name.



C: int SetProjExtState(ReaProject* proj, const char* extname, const char* key, const char* value)

EEL: int SetProjExtState(ReaProject proj, "extname", "key", "value")

Lua: integer reaper.SetProjExtState(ReaProject proj, string extname, string key, string value)

Python: Int RPR_SetProjExtState(ReaProject proj, String extname, String key, String value)

Save a key/value pair for a specific extension, to be restored the next time this specific project is loaded. Typically extname will be the name of a reascript or extension section. If key is NULL or "", all extended data for that extname will be deleted. If val is NULL or "", the data previously associated with that key will be deleted. Returns the size of the state for this extname. See GetProjExtState, EnumProjExtState.



C: void SetRegionRenderMatrix(ReaProject* proj, int regionindex, MediaTrack* track, int addorremove)

EEL: SetRegionRenderMatrix(ReaProject proj, int regionindex, MediaTrack track, int addorremove)

Lua: reaper.SetRegionRenderMatrix(ReaProject proj, integer regionindex, MediaTrack track, integer addorremove)

Python: RPR_SetRegionRenderMatrix(ReaProject proj, Int regionindex, MediaTrack track, Int addorremove)

Add (addorremove > 0) or remove (addorremove < 0) a track from this region when using the region render matrix.



C: int SetTakeStretchMarker(MediaItem_Take* take, int idx, double pos, const double* srcposInOptional)

EEL: int SetTakeStretchMarker(MediaItem_Take take, int idx, pos, optional srcposInOptional)

Lua: integer reaper.SetTakeStretchMarker(MediaItem_Take take, integer idx, number pos, optional number srcposInOptional)

Python: Int RPR_SetTakeStretchMarker(MediaItem_Take take, Int idx, Float pos, const double srcposInOptional)

Adds or updates a stretch marker. If idx<0, stretch marker will be added. If idx>=0, stretch marker will be updated. When adding, if srcposInOptional is omitted, source position will be auto-calculated. When updating a stretch marker, if srcposInOptional is omitted, srcpos will not be modified. Position/srcposition values will be constrained to nearby stretch markers. Returns index of stretch marker, or -1 if did not insert (or marker already existed at time).



C: bool SetTempoTimeSigMarker(ReaProject* proj, int ptidx, double timepos, int measurepos, double beatpos, double bpm, int timesig_num, int timesig_denom, bool lineartempo)

EEL: bool SetTempoTimeSigMarker(ReaProject proj, int ptidx, timepos, int measurepos, beatpos, bpm, int timesig_num, int timesig_denom, bool lineartempo)

Lua: boolean reaper.SetTempoTimeSigMarker(ReaProject proj, integer ptidx, number timepos, integer measurepos, number beatpos, number bpm, integer timesig_num, integer timesig_denom, boolean lineartempo)

Python: Boolean RPR_SetTempoTimeSigMarker(ReaProject proj, Int ptidx, Float timepos, Int measurepos, Float beatpos, Float bpm, Int timesig_num, Int timesig_denom, Boolean lineartempo)

Set parameters of a tempo/time signature marker. Provide either timepos (with measurepos=-1, beatpos=-1), or measurepos and beatpos (with timepos=-1). If timesig_num and timesig_denom are zero, the previous time signature will be used. ptidx=-1 will insert a new tempo/time signature marker. See CountTempoTimeSigMarkers, GetTempoTimeSigMarker, AddTempoTimeSigMarker.



C: bool SetToggleCommandState(int section_id, int command_id, int state)

EEL: bool SetToggleCommandState(int section_id, int command_id, int state)

Lua: boolean reaper.SetToggleCommandState(integer section_id, integer command_id, integer state)

Python: Boolean RPR_SetToggleCommandState(Int section_id, Int command_id, Int state)

Updates the toggle state of an action, returns true if succeeded. Only ReaScripts can have their toggle states changed programmatically. See RefreshToolbar2.



C: void SetTrackAutomationMode(MediaTrack* tr, int mode)

EEL: SetTrackAutomationMode(MediaTrack tr, int mode)

Lua: reaper.SetTrackAutomationMode(MediaTrack tr, integer mode)

Python: RPR_SetTrackAutomationMode(MediaTrack tr, Int mode)



C: void SetTrackColor(MediaTrack* track, int color)

EEL: SetTrackColor(MediaTrack track, int color)

Lua: reaper.SetTrackColor(MediaTrack track, integer color)

Python: RPR_SetTrackColor(MediaTrack track, Int color)

Set the track color, as 0x00RRGGBB.



C: bool SetTrackMIDINoteName(int track, int note, int chan, const char* name)

EEL: bool SetTrackMIDINoteName(int track, int note, int chan, "name")

Lua: boolean reaper.SetTrackMIDINoteName(integer track, integer note, integer chan, string name)

Python: Boolean RPR_SetTrackMIDINoteName(Int track, Int note, Int chan, String name)

channel < 0 assigns these note names to all channels.



C: bool SetTrackMIDINoteNameEx(ReaProject* proj, MediaTrack* track, int note, int chan, const char* name)

EEL: bool SetTrackMIDINoteNameEx(ReaProject proj, MediaTrack track, int note, int chan, "name")

Lua: boolean reaper.SetTrackMIDINoteNameEx(ReaProject proj, MediaTrack track, integer note, integer chan, string name)

Python: Boolean RPR_SetTrackMIDINoteNameEx(ReaProject proj, MediaTrack track, Int note, Int chan, String name)

channel < 0 assigns these note names to all channels.



C: void SetTrackSelected(MediaTrack* track, bool selected)

EEL: SetTrackSelected(MediaTrack track, bool selected)

Lua: reaper.SetTrackSelected(MediaTrack track, boolean selected)

Python: RPR_SetTrackSelected(MediaTrack track, Boolean selected)



C: bool SetTrackSendUIPan(MediaTrack* track, int send_idx, double pan, int isend)

EEL: bool SetTrackSendUIPan(MediaTrack track, int send_idx, pan, int isend)

Lua: boolean reaper.SetTrackSendUIPan(MediaTrack track, integer send_idx, number pan, integer isend)

Python: Boolean RPR_SetTrackSendUIPan(MediaTrack track, Int send_idx, Float pan, Int isend)

send_idx<0 for receives, isend=1 for end of edit, -1 for an instant edit (such as reset), 0 for normal tweak.



C: bool SetTrackSendUIVol(MediaTrack* track, int send_idx, double vol, int isend)

EEL: bool SetTrackSendUIVol(MediaTrack track, int send_idx, vol, int isend)

Lua: boolean reaper.SetTrackSendUIVol(MediaTrack track, integer send_idx, number vol, integer isend)

Python: Boolean RPR_SetTrackSendUIVol(MediaTrack track, Int send_idx, Float vol, Int isend)

send_idx<0 for receives, isend=1 for end of edit, -1 for an instant edit (such as reset), 0 for normal tweak.



C: bool SetTrackStateChunk(MediaTrack* track, const char* str, bool isundoOptional)

EEL: bool SetTrackStateChunk(MediaTrack track, "str", bool isundoOptional)

Lua: boolean reaper.SetTrackStateChunk(MediaTrack track, string str, boolean isundoOptional)

Python: Boolean RPR_SetTrackStateChunk(MediaTrack track, String str, Boolean isundoOptional)

Sets the RPPXML state of a track, returns true if successful. Undo flag is a performance/caching hint.



C: void ShowActionList(KbdSectionInfo* caller, HWND callerWnd)

EEL: ShowActionList(KbdSectionInfo caller, HWND callerWnd)

Lua: reaper.ShowActionList(KbdSectionInfo caller, HWND callerWnd)

Python: RPR_ShowActionList(KbdSectionInfo caller, HWND callerWnd)



C: void ShowConsoleMsg(const char* msg)

EEL: ShowConsoleMsg("msg")

Lua: reaper.ShowConsoleMsg(string msg)

Python: RPR_ShowConsoleMsg(String msg)

Show a message to the user (also useful for debugging). Send "\n" for newline, "" to clear the console window.



C: int ShowMessageBox(const char* msg, const char* title, int type)

EEL: int ShowMessageBox("msg", "title", int type)

Lua: integer reaper.ShowMessageBox(string msg, string title, integer type)

Python: Int RPR_ShowMessageBox(String msg, String title, Int type)

type 0=OK,1=OKCANCEL,2=ABORTRETRYIGNORE,3=YESNOCANCEL,4=YESNO,5=RETRYCANCEL : ret 1=OK,2=CANCEL,3=ABORT,4=RETRY,5=IGNORE,6=YES,7=NO



C: double SLIDER2DB(double y)

EEL: double SLIDER2DB(y)

Lua: number reaper.SLIDER2DB(number y)

Python: Float RPR_SLIDER2DB(Float y)



C: double SnapToGrid(ReaProject* project, double time_pos)

EEL: double SnapToGrid(ReaProject project, time_pos)

Lua: number reaper.SnapToGrid(ReaProject project, number time_pos)

Python: Float RPR_SnapToGrid(ReaProject project, Float time_pos)



C: void SoloAllTracks(int solo)

EEL: SoloAllTracks(int solo)

Lua: reaper.SoloAllTracks(integer solo)

Python: RPR_SoloAllTracks(Int solo)

solo=2 for SIP



C: HWND Splash_GetWnd()

EEL: HWND Splash_GetWnd()

Lua: HWND reaper.Splash_GetWnd()

Python: HWND RPR_Splash_GetWnd()

gets the splash window, in case you want to display a message over it. Returns NULL when the sphah window is not displayed.



C: MediaItem* SplitMediaItem(MediaItem* item, double position)

EEL: MediaItem SplitMediaItem(MediaItem item, position)

Lua: MediaItem reaper.SplitMediaItem(MediaItem item, number position)

Python: MediaItem RPR_SplitMediaItem(MediaItem item, Float position)

the original item becomes the left-hand split, the function returns the right-hand split (or NULL if the split failed)



C: void stringToGuid(const char* str, GUID* g)

EEL: stringToGuid("str", #gGUID)

Lua: string gGUID reaper.stringToGuid(string str, string gGUID)

Python: RPR_stringToGuid(String str, GUID g)



C: void StuffMIDIMessage(int mode, int msg1, int msg2, int msg3)

EEL: StuffMIDIMessage(int mode, int msg1, int msg2, int msg3)

Lua: reaper.StuffMIDIMessage(integer mode, integer msg1, integer msg2, integer msg3)

Python: RPR_StuffMIDIMessage(Int mode, Int msg1, Int msg2, Int msg3)

Stuffs a 3 byte MIDI message into either the Virtual MIDI Keyboard queue, or the MIDI-as-control input queue. mode=0 for VKB, 1 for control (actions map etc), 2 for VKB-on-current-channel.



C: bool TakeIsMIDI(MediaItem_Take* take)

EEL: bool TakeIsMIDI(MediaItem_Take take)

Lua: boolean reaper.TakeIsMIDI(MediaItem_Take take)

Python: Boolean RPR_TakeIsMIDI(MediaItem_Take take)

Returns true if the active take contains MIDI.



C: double time_precise()

EEL: double time_precise()

Lua: number reaper.time_precise()

Python: Float RPR_time_precise()

Gets a precise system timestamp in seconds



C: double TimeMap2_beatsToTime(ReaProject* proj, double tpos, const int* measuresInOptional)

EEL: double TimeMap2_beatsToTime(ReaProject proj, tpos, optional int measuresInOptional)

Lua: number reaper.TimeMap2_beatsToTime(ReaProject proj, number tpos, optional number measuresInOptional)

Python: Float RPR_TimeMap2_beatsToTime(ReaProject proj, Float tpos, const int measuresInOptional)

convert a beat position (or optionally a beats+measures if measures is non-NULL) to time.



C: double TimeMap2_GetDividedBpmAtTime(ReaProject* proj, double time)

EEL: double TimeMap2_GetDividedBpmAtTime(ReaProject proj, time)

Lua: number reaper.TimeMap2_GetDividedBpmAtTime(ReaProject proj, number time)

Python: Float RPR_TimeMap2_GetDividedBpmAtTime(ReaProject proj, Float time)

get the effective BPM at the time (seconds) position (i.e. 2x in /8 signatures)



C: double TimeMap2_GetNextChangeTime(ReaProject* proj, double time)

EEL: double TimeMap2_GetNextChangeTime(ReaProject proj, time)

Lua: number reaper.TimeMap2_GetNextChangeTime(ReaProject proj, number time)

Python: Float RPR_TimeMap2_GetNextChangeTime(ReaProject proj, Float time)

when does the next time map (tempo or time sig) change occur



C: double TimeMap2_QNToTime(ReaProject* proj, double qn)

EEL: double TimeMap2_QNToTime(ReaProject proj, qn)

Lua: number reaper.TimeMap2_QNToTime(ReaProject proj, number qn)

Python: Float RPR_TimeMap2_QNToTime(ReaProject proj, Float qn)

converts project QN position to time.



C: double TimeMap2_timeToBeats(ReaProject* proj, double tpos, int* measuresOutOptional, int* cmlOutOptional, double* fullbeatsOutOptional, int* cdenomOutOptional)

EEL: double TimeMap2_timeToBeats(ReaProject proj, tpos, optional int &measuresOutOptional, optional int &cmlOutOptional, optional &fullbeatsOutOptional, optional int &cdenomOutOptional)

Lua: number retval, optional number measuresOutOptional, optional number cmlOutOptional, optional number fullbeatsOutOptional, optional number cdenomOutOptional reaper.TimeMap2_timeToBeats(ReaProject proj, number tpos)

Python: (Float retval, ReaProject proj, Float tpos, Int measuresOutOptional, Int cmlOutOptional, Float fullbeatsOutOptional, Int cdenomOutOptional) = RPR_TimeMap2_timeToBeats(proj, tpos, measuresOutOptional, cmlOutOptional, fullbeatsOutOptional, cdenomOutOptional)

convert a time into beats.
if measures is non-NULL, measures will be set to the measure count, return value will be beats since measure.
if cml is non-NULL, will be set to current measure length in beats (i.e. time signature numerator)
if fullbeats is non-NULL, and measures is non-NULL, fullbeats will get the full beat count (same value returned if measures is NULL).
if cdenom is non-NULL, will be set to the current time signature denominator.



C: double TimeMap2_timeToQN(ReaProject* proj, double tpos)

EEL: double TimeMap2_timeToQN(ReaProject proj, tpos)

Lua: number reaper.TimeMap2_timeToQN(ReaProject proj, number tpos)

Python: Float RPR_TimeMap2_timeToQN(ReaProject proj, Float tpos)

converts project time position to QN position.



C: double TimeMap_curFrameRate(ReaProject* proj, bool* dropFrameOutOptional)

EEL: double TimeMap_curFrameRate(ReaProject proj, optional bool &dropFrameOutOptional)

Lua: number retval, optional boolean dropFrameOutOptional reaper.TimeMap_curFrameRate(ReaProject proj)

Python: (Float retval, ReaProject proj, Boolean dropFrameOutOptional) = RPR_TimeMap_curFrameRate(proj, dropFrameOutOptional)

Gets project framerate, and optionally whether it is drop-frame timecode



C: double TimeMap_GetDividedBpmAtTime(double time)

EEL: double TimeMap_GetDividedBpmAtTime(time)

Lua: number reaper.TimeMap_GetDividedBpmAtTime(number time)

Python: Float RPR_TimeMap_GetDividedBpmAtTime(Float time)

get the effective BPM at the time (seconds) position (i.e. 2x in /8 signatures)



C: double TimeMap_GetMeasureInfo(ReaProject* proj, int measure, double* qn_startOut, double* qn_endOut, int* timesig_numOut, int* timesig_denomOut, double* tempoOut)

EEL: double TimeMap_GetMeasureInfo(ReaProject proj, int measure, &qn_startOut, &qn_endOut, int &timesig_numOut, int &timesig_denomOut, &tempoOut)

Lua: number retval, number qn_startOut, number qn_endOut, number timesig_numOut, number timesig_denomOut, number tempoOut reaper.TimeMap_GetMeasureInfo(ReaProject proj, integer measure)

Python: (Float retval, ReaProject proj, Int measure, Float qn_startOut, Float qn_endOut, Int timesig_numOut, Int timesig_denomOut, Float tempoOut) = RPR_TimeMap_GetMeasureInfo(proj, measure, qn_startOut, qn_endOut, timesig_numOut, timesig_denomOut, tempoOut)

Get the QN position and time signature information for the start of a measure. Return the time in seconds of the measure start.



C: int TimeMap_GetMetronomePattern(ReaProject* proj, double time, char* pattern, int pattern_sz)

EEL: int TimeMap_GetMetronomePattern(ReaProject proj, time, #pattern)

Lua: integer retval, string pattern reaper.TimeMap_GetMetronomePattern(ReaProject proj, number time, string pattern)

Python: (Int retval, ReaProject proj, Float time, String pattern, Int pattern_sz) = RPR_TimeMap_GetMetronomePattern(proj, time, pattern, pattern_sz)

Fills in a string representing the active metronome pattern. For example, in a 7/8 measure divided 3+4, the pattern might be "1221222". The length of the string is the time signature numerator, and the function returns the time signature denominator.



C: void TimeMap_GetTimeSigAtTime(ReaProject* proj, double time, int* timesig_numOut, int* timesig_denomOut, double* tempoOut)

EEL: TimeMap_GetTimeSigAtTime(ReaProject proj, time, int &timesig_numOut, int &timesig_denomOut, &tempoOut)

Lua: number timesig_numOut retval, number timesig_denomOut, number tempoOut reaper.TimeMap_GetTimeSigAtTime(ReaProject proj, number time)

Python: (ReaProject proj, Float time, Int timesig_numOut, Int timesig_denomOut, Float tempoOut) = RPR_TimeMap_GetTimeSigAtTime(proj, time, timesig_numOut, timesig_denomOut, tempoOut)

get the effective time signature and tempo



C: int TimeMap_QNToMeasures(ReaProject* proj, double qn, double* qnMeasureStartOutOptional, double* qnMeasureEndOutOptional)

EEL: int TimeMap_QNToMeasures(ReaProject proj, qn, optional &qnMeasureStartOutOptional, optional &qnMeasureEndOutOptional)

Lua: integer retval, optional number qnMeasureStartOutOptional, optional number qnMeasureEndOutOptional reaper.TimeMap_QNToMeasures(ReaProject proj, number qn)

Python: (Int retval, ReaProject proj, Float qn, Float qnMeasureStartOutOptional, Float qnMeasureEndOutOptional) = RPR_TimeMap_QNToMeasures(proj, qn, qnMeasureStartOutOptional, qnMeasureEndOutOptional)

Find which measure the given QN position falls in.



C: double TimeMap_QNToTime(double qn)

EEL: double TimeMap_QNToTime(qn)

Lua: number reaper.TimeMap_QNToTime(number qn)

Python: Float RPR_TimeMap_QNToTime(Float qn)

converts project QN position to time.



C: double TimeMap_QNToTime_abs(ReaProject* proj, double qn)

EEL: double TimeMap_QNToTime_abs(ReaProject proj, qn)

Lua: number reaper.TimeMap_QNToTime_abs(ReaProject proj, number qn)

Python: Float RPR_TimeMap_QNToTime_abs(ReaProject proj, Float qn)

Converts project quarter note count (QN) to time. QN is counted from the start of the project, regardless of any partial measures. See TimeMap2_QNToTime



C: double TimeMap_timeToQN(double tpos)

EEL: double TimeMap_timeToQN(tpos)

Lua: number reaper.TimeMap_timeToQN(number tpos)

Python: Float RPR_TimeMap_timeToQN(Float tpos)

converts project QN position to time.



C: double TimeMap_timeToQN_abs(ReaProject* proj, double tpos)

EEL: double TimeMap_timeToQN_abs(ReaProject proj, tpos)

Lua: number reaper.TimeMap_timeToQN_abs(ReaProject proj, number tpos)

Python: Float RPR_TimeMap_timeToQN_abs(ReaProject proj, Float tpos)

Converts project time position to quarter note count (QN). QN is counted from the start of the project, regardless of any partial measures. See TimeMap2_timeToQN



C: bool ToggleTrackSendUIMute(MediaTrack* track, int send_idx)

EEL: bool ToggleTrackSendUIMute(MediaTrack track, int send_idx)

Lua: boolean reaper.ToggleTrackSendUIMute(MediaTrack track, integer send_idx)

Python: Boolean RPR_ToggleTrackSendUIMute(MediaTrack track, Int send_idx)

send_idx<0 for receives



C: double Track_GetPeakHoldDB(MediaTrack* track, int channel, bool clear)

EEL: double Track_GetPeakHoldDB(MediaTrack track, int channel, bool clear)

Lua: number reaper.Track_GetPeakHoldDB(MediaTrack track, integer channel, boolean clear)

Python: Float RPR_Track_GetPeakHoldDB(MediaTrack track, Int channel, Boolean clear)



C: double Track_GetPeakInfo(MediaTrack* track, int channel)

EEL: double Track_GetPeakInfo(MediaTrack track, int channel)

Lua: number reaper.Track_GetPeakInfo(MediaTrack track, integer channel)

Python: Float RPR_Track_GetPeakInfo(MediaTrack track, Int channel)



C: void TrackCtl_SetToolTip(const char* fmt, int xpos, int ypos, bool topmost)

EEL: TrackCtl_SetToolTip("fmt", int xpos, int ypos, bool topmost)

Lua: reaper.TrackCtl_SetToolTip(string fmt, integer xpos, integer ypos, boolean topmost)

Python: RPR_TrackCtl_SetToolTip(String fmt, Int xpos, Int ypos, Boolean topmost)

displays tooltip at location, or removes if empty string



C: bool TrackFX_EndParamEdit(MediaTrack* track, int fx, int param)

EEL: bool TrackFX_EndParamEdit(MediaTrack track, int fx, int param)

Lua: boolean reaper.TrackFX_EndParamEdit(MediaTrack track, integer fx, integer param)

Python: Boolean RPR_TrackFX_EndParamEdit(MediaTrack track, Int fx, Int param)



C: bool TrackFX_FormatParamValue(MediaTrack* track, int fx, int param, double val, char* buf, int buf_sz)

EEL: bool TrackFX_FormatParamValue(MediaTrack track, int fx, int param, val, #buf)

Lua: boolean retval, string buf reaper.TrackFX_FormatParamValue(MediaTrack track, integer fx, integer param, number val, string buf)

Python: (Boolean retval, MediaTrack track, Int fx, Int param, Float val, String buf, Int buf_sz) = RPR_TrackFX_FormatParamValue(track, fx, param, val, buf, buf_sz)

Note: only works with FX that support Cockos VST extensions.



C: bool TrackFX_FormatParamValueNormalized(MediaTrack* track, int fx, int param, double value, char* buf, int buf_sz)

EEL: bool TrackFX_FormatParamValueNormalized(MediaTrack track, int fx, int param, value, #buf)

Lua: boolean retval, string buf reaper.TrackFX_FormatParamValueNormalized(MediaTrack track, integer fx, integer param, number value, string buf)

Python: (Boolean retval, MediaTrack track, Int fx, Int param, Float value, String buf, Int buf_sz) = RPR_TrackFX_FormatParamValueNormalized(track, fx, param, value, buf, buf_sz)

Note: only works with FX that support Cockos VST extensions.



C: int TrackFX_GetByName(MediaTrack* track, const char* fxname, bool instantiate)

EEL: int TrackFX_GetByName(MediaTrack track, "fxname", bool instantiate)

Lua: integer reaper.TrackFX_GetByName(MediaTrack track, string fxname, boolean instantiate)

Python: Int RPR_TrackFX_GetByName(MediaTrack track, String fxname, Boolean instantiate)

Get the index of the first track FX insert that matches fxname. If the FX is not in the chain and instantiate is true, it will be inserted. See TrackFX_GetInstrument, TrackFX_GetEQ.



C: int TrackFX_GetChainVisible(MediaTrack* track)

EEL: int TrackFX_GetChainVisible(MediaTrack track)

Lua: integer reaper.TrackFX_GetChainVisible(MediaTrack track)

Python: Int RPR_TrackFX_GetChainVisible(MediaTrack track)

returns index of effect visible in chain, or -1 for chain hidden, or -2 for chain visible but no effect selected



C: int TrackFX_GetCount(MediaTrack* track)

EEL: int TrackFX_GetCount(MediaTrack track)

Lua: integer reaper.TrackFX_GetCount(MediaTrack track)

Python: Int RPR_TrackFX_GetCount(MediaTrack track)



C: bool TrackFX_GetEnabled(MediaTrack* track, int fx)

EEL: bool TrackFX_GetEnabled(MediaTrack track, int fx)

Lua: boolean reaper.TrackFX_GetEnabled(MediaTrack track, integer fx)

Python: Boolean RPR_TrackFX_GetEnabled(MediaTrack track, Int fx)

See TrackFX_SetEnabled



C: int TrackFX_GetEQ(MediaTrack* track, bool instantiate)

EEL: int TrackFX_GetEQ(MediaTrack track, bool instantiate)

Lua: integer reaper.TrackFX_GetEQ(MediaTrack track, boolean instantiate)

Python: Int RPR_TrackFX_GetEQ(MediaTrack track, Boolean instantiate)

Get the index of ReaEQ in the track FX chain. If ReaEQ is not in the chain and instantiate is true, it will be inserted. See TrackFX_GetInstrument, TrackFX_GetByName.



C: bool TrackFX_GetEQBandEnabled(MediaTrack* track, int fxidx, int bandtype, int bandidx)

EEL: bool TrackFX_GetEQBandEnabled(MediaTrack track, int fxidx, int bandtype, int bandidx)

Lua: boolean reaper.TrackFX_GetEQBandEnabled(MediaTrack track, integer fxidx, integer bandtype, integer bandidx)

Python: Boolean RPR_TrackFX_GetEQBandEnabled(MediaTrack track, Int fxidx, Int bandtype, Int bandidx)

Returns true if the EQ band is enabled.
Returns false if the band is disabled, or if track/fxidx is not ReaEQ.
Bandtype: 0=lhipass, 1=loshelf, 2=band, 3=notch, 4=hishelf, 5=lopass.
Bandidx: 0=first band matching bandtype, 1=2nd band matching bandtype, etc.
See TrackFX_GetEQ, TrackFX_GetEQParam, TrackFX_SetEQParam, TrackFX_SetEQBandEnabled.



C: bool TrackFX_GetEQParam(MediaTrack* track, int fxidx, int paramidx, int* bandtypeOut, int* bandidxOut, int* paramtypeOut, double* normvalOut)

EEL: bool TrackFX_GetEQParam(MediaTrack track, int fxidx, int paramidx, int &bandtypeOut, int &bandidxOut, int &paramtypeOut, &normvalOut)

Lua: boolean retval, number bandtypeOut, number bandidxOut, number paramtypeOut, number normvalOut reaper.TrackFX_GetEQParam(MediaTrack track, integer fxidx, integer paramidx)

Python: (Boolean retval, MediaTrack track, Int fxidx, Int paramidx, Int bandtypeOut, Int bandidxOut, Int paramtypeOut, Float normvalOut) = RPR_TrackFX_GetEQParam(track, fxidx, paramidx, bandtypeOut, bandidxOut, paramtypeOut, normvalOut)

Returns false if track/fxidx is not ReaEQ.
Bandtype: -1=master gain, 0=lhipass, 1=loshelf, 2=band, 3=notch, 4=hishelf, 5=lopass.
Bandidx (ignored for master gain): 0=first band matching bandtype, 1=2nd band matching bandtype, etc.
Paramtype (ignored for master gain): 0=freq, 1=gain, 2=Q.
See TrackFX_GetEQ, TrackFX_SetEQParam, TrackFX_GetEQBandEnabled, TrackFX_SetEQBandEnabled.



C: HWND TrackFX_GetFloatingWindow(MediaTrack* track, int index)

EEL: HWND TrackFX_GetFloatingWindow(MediaTrack track, int index)

Lua: HWND reaper.TrackFX_GetFloatingWindow(MediaTrack track, integer index)

Python: HWND RPR_TrackFX_GetFloatingWindow(MediaTrack track, Int index)

returns HWND of floating window for effect index, if any



C: bool TrackFX_GetFormattedParamValue(MediaTrack* track, int fx, int param, char* buf, int buf_sz)

EEL: bool TrackFX_GetFormattedParamValue(MediaTrack track, int fx, int param, #buf)

Lua: boolean retval, string buf reaper.TrackFX_GetFormattedParamValue(MediaTrack track, integer fx, integer param, string buf)

Python: (Boolean retval, MediaTrack track, Int fx, Int param, String buf, Int buf_sz) = RPR_TrackFX_GetFormattedParamValue(track, fx, param, buf, buf_sz)



C: GUID* TrackFX_GetFXGUID(MediaTrack* track, int fx)

EEL: bool TrackFX_GetFXGUID(#retguid, MediaTrack track, int fx)

Lua: string GUID reaper.TrackFX_GetFXGUID(MediaTrack track, integer fx)

Python: GUID RPR_TrackFX_GetFXGUID(MediaTrack track, Int fx)



C: bool TrackFX_GetFXName(MediaTrack* track, int fx, char* buf, int buf_sz)

EEL: bool TrackFX_GetFXName(MediaTrack track, int fx, #buf)

Lua: boolean retval, string buf reaper.TrackFX_GetFXName(MediaTrack track, integer fx, string buf)

Python: (Boolean retval, MediaTrack track, Int fx, String buf, Int buf_sz) = RPR_TrackFX_GetFXName(track, fx, buf, buf_sz)



C: int TrackFX_GetInstrument(MediaTrack* track)

EEL: int TrackFX_GetInstrument(MediaTrack track)

Lua: integer reaper.TrackFX_GetInstrument(MediaTrack track)

Python: Int RPR_TrackFX_GetInstrument(MediaTrack track)

Get the index of the first track FX insert that is a virtual instrument, or -1 if none. See TrackFX_GetEQ, TrackFX_GetByName.



C: int TrackFX_GetNumParams(MediaTrack* track, int fx)

EEL: int TrackFX_GetNumParams(MediaTrack track, int fx)

Lua: integer reaper.TrackFX_GetNumParams(MediaTrack track, integer fx)

Python: Int RPR_TrackFX_GetNumParams(MediaTrack track, Int fx)



C: bool TrackFX_GetOpen(MediaTrack* track, int fx)

EEL: bool TrackFX_GetOpen(MediaTrack track, int fx)

Lua: boolean reaper.TrackFX_GetOpen(MediaTrack track, integer fx)

Python: Boolean RPR_TrackFX_GetOpen(MediaTrack track, Int fx)

Returns true if this FX UI is open in the FX chain window or a floating window. See TrackFX_SetOpen



C: double TrackFX_GetParam(MediaTrack* track, int fx, int param, double* minvalOut, double* maxvalOut)

EEL: double TrackFX_GetParam(MediaTrack track, int fx, int param, &minvalOut, &maxvalOut)

Lua: number retval, number minvalOut, number maxvalOut reaper.TrackFX_GetParam(MediaTrack track, integer fx, integer param)

Python: (Float retval, MediaTrack track, Int fx, Int param, Float minvalOut, Float maxvalOut) = RPR_TrackFX_GetParam(track, fx, param, minvalOut, maxvalOut)



C: bool TrackFX_GetParameterStepSizes(MediaTrack* track, int fx, int param, double* stepOut, double* smallstepOut, double* largestepOut, bool* istoggleOut)

EEL: bool TrackFX_GetParameterStepSizes(MediaTrack track, int fx, int param, &stepOut, &smallstepOut, &largestepOut, bool &istoggleOut)

Lua: boolean retval, number stepOut, number smallstepOut, number largestepOut, boolean istoggleOut reaper.TrackFX_GetParameterStepSizes(MediaTrack track, integer fx, integer param)

Python: (Boolean retval, MediaTrack track, Int fx, Int param, Float stepOut, Float smallstepOut, Float largestepOut, Boolean istoggleOut) = RPR_TrackFX_GetParameterStepSizes(track, fx, param, stepOut, smallstepOut, largestepOut, istoggleOut)



C: double TrackFX_GetParamEx(MediaTrack* track, int fx, int param, double* minvalOut, double* maxvalOut, double* midvalOut)

EEL: double TrackFX_GetParamEx(MediaTrack track, int fx, int param, &minvalOut, &maxvalOut, &midvalOut)

Lua: number retval, number minvalOut, number maxvalOut, number midvalOut reaper.TrackFX_GetParamEx(MediaTrack track, integer fx, integer param)

Python: (Float retval, MediaTrack track, Int fx, Int param, Float minvalOut, Float maxvalOut, Float midvalOut) = RPR_TrackFX_GetParamEx(track, fx, param, minvalOut, maxvalOut, midvalOut)



C: bool TrackFX_GetParamName(MediaTrack* track, int fx, int param, char* buf, int buf_sz)

EEL: bool TrackFX_GetParamName(MediaTrack track, int fx, int param, #buf)

Lua: boolean retval, string buf reaper.TrackFX_GetParamName(MediaTrack track, integer fx, integer param, string buf)

Python: (Boolean retval, MediaTrack track, Int fx, Int param, String buf, Int buf_sz) = RPR_TrackFX_GetParamName(track, fx, param, buf, buf_sz)



C: double TrackFX_GetParamNormalized(MediaTrack* track, int fx, int param)

EEL: double TrackFX_GetParamNormalized(MediaTrack track, int fx, int param)

Lua: number reaper.TrackFX_GetParamNormalized(MediaTrack track, integer fx, integer param)

Python: Float RPR_TrackFX_GetParamNormalized(MediaTrack track, Int fx, Int param)



C: bool TrackFX_GetPreset(MediaTrack* track, int fx, char* presetname, int presetname_sz)

EEL: bool TrackFX_GetPreset(MediaTrack track, int fx, #presetname)

Lua: boolean retval, string presetname reaper.TrackFX_GetPreset(MediaTrack track, integer fx, string presetname)

Python: (Boolean retval, MediaTrack track, Int fx, String presetname, Int presetname_sz) = RPR_TrackFX_GetPreset(track, fx, presetname, presetname_sz)

Get the name of the preset currently showing in the REAPER dropdown. Returns false if the current FX parameters do not exactly match the factory preset (in other words, if the user loaded the preset but moved the knobs afterward. See TrackFX_SetPreset



C: int TrackFX_GetPresetIndex(MediaTrack* track, int fx, int* numberOfPresetsOut)

EEL: int TrackFX_GetPresetIndex(MediaTrack track, int fx, int &numberOfPresetsOut)

Lua: integer retval, number numberOfPresetsOut reaper.TrackFX_GetPresetIndex(MediaTrack track, integer fx)

Python: (Int retval, MediaTrack track, Int fx, Int numberOfPresetsOut) = RPR_TrackFX_GetPresetIndex(track, fx, numberOfPresetsOut)

Returns current preset index, or -1 if error. numberOfPresetsOut will be set to total number of presets available. See TrackFX_SetPresetByIndex



C: bool TrackFX_NavigatePresets(MediaTrack* track, int fx, int presetmove)

EEL: bool TrackFX_NavigatePresets(MediaTrack track, int fx, int presetmove)

Lua: boolean reaper.TrackFX_NavigatePresets(MediaTrack track, integer fx, integer presetmove)

Python: Boolean RPR_TrackFX_NavigatePresets(MediaTrack track, Int fx, Int presetmove)

presetmove==1 activates the next preset, presetmove==-1 activates the previous preset, etc.



C: void TrackFX_SetEnabled(MediaTrack* track, int fx, bool enabled)

EEL: TrackFX_SetEnabled(MediaTrack track, int fx, bool enabled)

Lua: reaper.TrackFX_SetEnabled(MediaTrack track, integer fx, boolean enabled)

Python: RPR_TrackFX_SetEnabled(MediaTrack track, Int fx, Boolean enabled)

See TrackFX_GetEnabled



C: bool TrackFX_SetEQBandEnabled(MediaTrack* track, int fxidx, int bandtype, int bandidx, bool enable)

EEL: bool TrackFX_SetEQBandEnabled(MediaTrack track, int fxidx, int bandtype, int bandidx, bool enable)

Lua: boolean reaper.TrackFX_SetEQBandEnabled(MediaTrack track, integer fxidx, integer bandtype, integer bandidx, boolean enable)

Python: Boolean RPR_TrackFX_SetEQBandEnabled(MediaTrack track, Int fxidx, Int bandtype, Int bandidx, Boolean enable)

Enable or disable a ReaEQ band.
Returns false if track/fxidx is not ReaEQ.
Bandtype: 0=lhipass, 1=loshelf, 2=band, 3=notch, 4=hishelf, 5=lopass.
Bandidx: 0=first band matching bandtype, 1=2nd band matching bandtype, etc.
See TrackFX_GetEQ, TrackFX_GetEQParam, TrackFX_SetEQParam, TrackFX_GetEQBandEnabled.



C: bool TrackFX_SetEQParam(MediaTrack* track, int fxidx, int bandtype, int bandidx, int paramtype, double val, bool isnorm)

EEL: bool TrackFX_SetEQParam(MediaTrack track, int fxidx, int bandtype, int bandidx, int paramtype, val, bool isnorm)

Lua: boolean reaper.TrackFX_SetEQParam(MediaTrack track, integer fxidx, integer bandtype, integer bandidx, integer paramtype, number val, boolean isnorm)

Python: Boolean RPR_TrackFX_SetEQParam(MediaTrack track, Int fxidx, Int bandtype, Int bandidx, Int paramtype, Float val, Boolean isnorm)

Returns false if track/fxidx is not ReaEQ. Targets a band matching bandtype.
Bandtype: -1=master gain, 0=lhipass, 1=loshelf, 2=band, 3=notch, 4=hishelf, 5=lopass.
Bandidx (ignored for master gain): 0=target first band matching bandtype, 1=target 2nd band matching bandtype, etc.
Paramtype (ignored for master gain): 0=freq, 1=gain, 2=Q.
See TrackFX_GetEQ, TrackFX_GetEQParam, TrackFX_GetEQBandEnabled, TrackFX_SetEQBandEnabled.



C: void TrackFX_SetOpen(MediaTrack* track, int fx, bool open)

EEL: TrackFX_SetOpen(MediaTrack track, int fx, bool open)

Lua: reaper.TrackFX_SetOpen(MediaTrack track, integer fx, boolean open)

Python: RPR_TrackFX_SetOpen(MediaTrack track, Int fx, Boolean open)

Open this FX UI. See TrackFX_GetOpen



C: bool TrackFX_SetParam(MediaTrack* track, int fx, int param, double val)

EEL: bool TrackFX_SetParam(MediaTrack track, int fx, int param, val)

Lua: boolean reaper.TrackFX_SetParam(MediaTrack track, integer fx, integer param, number val)

Python: Boolean RPR_TrackFX_SetParam(MediaTrack track, Int fx, Int param, Float val)



C: bool TrackFX_SetParamNormalized(MediaTrack* track, int fx, int param, double value)

EEL: bool TrackFX_SetParamNormalized(MediaTrack track, int fx, int param, value)

Lua: boolean reaper.TrackFX_SetParamNormalized(MediaTrack track, integer fx, integer param, number value)

Python: Boolean RPR_TrackFX_SetParamNormalized(MediaTrack track, Int fx, Int param, Float value)



C: bool TrackFX_SetPreset(MediaTrack* track, int fx, const char* presetname)

EEL: bool TrackFX_SetPreset(MediaTrack track, int fx, "presetname")

Lua: boolean reaper.TrackFX_SetPreset(MediaTrack track, integer fx, string presetname)

Python: Boolean RPR_TrackFX_SetPreset(MediaTrack track, Int fx, String presetname)

See TrackFX_GetPreset



C: bool TrackFX_SetPresetByIndex(MediaTrack* track, int fx, int idx)

EEL: bool TrackFX_SetPresetByIndex(MediaTrack track, int fx, int idx)

Lua: boolean reaper.TrackFX_SetPresetByIndex(MediaTrack track, integer fx, integer idx)

Python: Boolean RPR_TrackFX_SetPresetByIndex(MediaTrack track, Int fx, Int idx)

Sets preset idx for fx fx. Returns true on success.See TrackFX_GetPresetIndex



C: void TrackFX_Show(MediaTrack* track, int index, int showFlag)

EEL: TrackFX_Show(MediaTrack track, int index, int showFlag)

Lua: reaper.TrackFX_Show(MediaTrack track, integer index, integer showFlag)

Python: RPR_TrackFX_Show(MediaTrack track, Int index, Int showFlag)

showflag=0 for hidechain, =1 for show chain(index valid), =2 for hide floating window(index valid), =3 for show floating window (index valid)



C: void TrackList_AdjustWindows(bool isMinor)

EEL: TrackList_AdjustWindows(bool isMinor)

Lua: reaper.TrackList_AdjustWindows(boolean isMinor)

Python: RPR_TrackList_AdjustWindows(Boolean isMinor)



C: void TrackList_UpdateAllExternalSurfaces()

EEL: TrackList_UpdateAllExternalSurfaces()

Lua: reaper.TrackList_UpdateAllExternalSurfaces()

Python: RPR_TrackList_UpdateAllExternalSurfaces()



C: void Undo_BeginBlock()

EEL: Undo_BeginBlock()

Lua: reaper.Undo_BeginBlock()

Python: RPR_Undo_BeginBlock()

call to start a new block



C: void Undo_BeginBlock2(ReaProject* proj)

EEL: Undo_BeginBlock2(ReaProject proj)

Lua: reaper.Undo_BeginBlock2(ReaProject proj)

Python: RPR_Undo_BeginBlock2(ReaProject proj)

call to start a new block



C: const char* Undo_CanRedo2(ReaProject* proj)

EEL: bool Undo_CanRedo2(#retval, ReaProject proj)

Lua: string reaper.Undo_CanRedo2(ReaProject proj)

Python: String RPR_Undo_CanRedo2(ReaProject proj)

returns string of next action,if able,NULL if not



C: const char* Undo_CanUndo2(ReaProject* proj)

EEL: bool Undo_CanUndo2(#retval, ReaProject proj)

Lua: string reaper.Undo_CanUndo2(ReaProject proj)

Python: String RPR_Undo_CanUndo2(ReaProject proj)

returns string of last action,if able,NULL if not



C: int Undo_DoRedo2(ReaProject* proj)

EEL: int Undo_DoRedo2(ReaProject proj)

Lua: integer reaper.Undo_DoRedo2(ReaProject proj)

Python: Int RPR_Undo_DoRedo2(ReaProject proj)

nonzero if success



C: int Undo_DoUndo2(ReaProject* proj)

EEL: int Undo_DoUndo2(ReaProject proj)

Lua: integer reaper.Undo_DoUndo2(ReaProject proj)

Python: Int RPR_Undo_DoUndo2(ReaProject proj)

nonzero if success



C: void Undo_EndBlock(const char* descchange, int extraflags)

EEL: Undo_EndBlock("descchange", int extraflags)

Lua: reaper.Undo_EndBlock(string descchange, integer extraflags)

Python: RPR_Undo_EndBlock(String descchange, Int extraflags)

call to end the block,with extra flags if any,and a description



C: void Undo_EndBlock2(ReaProject* proj, const char* descchange, int extraflags)

EEL: Undo_EndBlock2(ReaProject proj, "descchange", int extraflags)

Lua: reaper.Undo_EndBlock2(ReaProject proj, string descchange, integer extraflags)

Python: RPR_Undo_EndBlock2(ReaProject proj, String descchange, Int extraflags)

call to end the block,with extra flags if any,and a description



C: void Undo_OnStateChange(const char* descchange)

EEL: Undo_OnStateChange("descchange")

Lua: reaper.Undo_OnStateChange(string descchange)

Python: RPR_Undo_OnStateChange(String descchange)

limited state change to items



C: void Undo_OnStateChange2(ReaProject* proj, const char* descchange)

EEL: Undo_OnStateChange2(ReaProject proj, "descchange")

Lua: reaper.Undo_OnStateChange2(ReaProject proj, string descchange)

Python: RPR_Undo_OnStateChange2(ReaProject proj, String descchange)

limited state change to items



C: void Undo_OnStateChange_Item(ReaProject* proj, const char* name, MediaItem* item)

EEL: Undo_OnStateChange_Item(ReaProject proj, "name", MediaItem item)

Lua: reaper.Undo_OnStateChange_Item(ReaProject proj, string name, MediaItem item)

Python: RPR_Undo_OnStateChange_Item(ReaProject proj, String name, MediaItem item)



C: void Undo_OnStateChangeEx(const char* descchange, int whichStates, int trackparm)

EEL: Undo_OnStateChangeEx("descchange", int whichStates, int trackparm)

Lua: reaper.Undo_OnStateChangeEx(string descchange, integer whichStates, integer trackparm)

Python: RPR_Undo_OnStateChangeEx(String descchange, Int whichStates, Int trackparm)

trackparm=-1 by default,or if updating one fx chain,you can specify track index



C: void Undo_OnStateChangeEx2(ReaProject* proj, const char* descchange, int whichStates, int trackparm)

EEL: Undo_OnStateChangeEx2(ReaProject proj, "descchange", int whichStates, int trackparm)

Lua: reaper.Undo_OnStateChangeEx2(ReaProject proj, string descchange, integer whichStates, integer trackparm)

Python: RPR_Undo_OnStateChangeEx2(ReaProject proj, String descchange, Int whichStates, Int trackparm)

trackparm=-1 by default,or if updating one fx chain,you can specify track index



C: void UpdateArrange()

EEL: UpdateArrange()

Lua: reaper.UpdateArrange()

Python: RPR_UpdateArrange()

Redraw the arrange view



C: void UpdateItemInProject(MediaItem* item)

EEL: UpdateItemInProject(MediaItem item)

Lua: reaper.UpdateItemInProject(MediaItem item)

Python: RPR_UpdateItemInProject(MediaItem item)



C: void UpdateTimeline()

EEL: UpdateTimeline()

Lua: reaper.UpdateTimeline()

Python: RPR_UpdateTimeline()

Redraw the arrange view and ruler



C: bool ValidatePtr(void* pointer, const char* ctypename)

EEL: bool ValidatePtr(void* pointer, "ctypename")

Lua: boolean reaper.ValidatePtr(identifier pointer, string ctypename)

Python: Boolean RPR_ValidatePtr(void pointer, String ctypename)

returns true if the pointer is a valid object of the right type



C: void ViewPrefs(int page, const char* pageByName)

EEL: ViewPrefs(int page, "pageByName")

Lua: reaper.ViewPrefs(integer page, string pageByName)

Python: RPR_ViewPrefs(Int page, String pageByName)

Opens the prefs to a page, use pageByName if page is 0.





ReaScript/EEL Built-in Function List



EEL: abs(value)

Returns the absolute value of the parameter.



EEL: acos(value)

Returns the arc cosine of the value specified (return value is in radians). If the parameter is not between -1.0 and 1.0 inclusive, the return value is undefined.



EEL: asin(value)

Returns the arc sine of the value specified (return value is in radians). If the parameter is not between -1.0 and 1.0 inclusive, the return value is undefined.



EEL: atan(value)

Returns the arc tangent of the value specified (return value is in radians). If the parameter is not between -1.0 and 1.0 inclusive, the return value is undefined.



EEL: atan2(numerator,denominator)

Returns the arc tangent of the numerator divided by the denominator, allowing the denominator to be 0, and using their signs to produce a more meaningful result.



EEL: atexit("code")

Adds code to be executed when the script finishes or is ended by the user. Typically used to clean up after the user terminates defer() or runloop() code.



EEL: ceil(value)

Returns the value rounded to the next highest integer (ceil(3.1)==4, ceil(-3.9)==-3).



EEL: convolve_c()



EEL: cos(angle)

Returns the cosine of the angle specified (specified in radians).



EEL: defer("code")

Identical to runloop(). Adds code to be called back by REAPER. Used to create persistent ReaScripts that continue to run and respond to input, while the user does other tasks.
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.



EEL: eval("code")

Executes code passed in. Code can use functions, but functions created in code can't be used elsewhere.



EEL: exp(exponent)

Returns the number e ($e, approximately 2.718) raised to the parameter-th power. This function is significantly faster than pow() or the ^ operator.



EEL: extension_api("function_name"[,...])

Used to call functions exported by extension plugins. The first parameter must be the exported function name, then its own parameters (as if the function was called directly).



EEL: fclose(fp)

Closes a file previously opened with fopen().



EEL: feof(fp)

Returns nonzero if the file fp is at the end of file.



EEL: fflush(fp)

If file fp is open for writing, flushes out any buffered data to disk.



EEL: fft(buffer,size)

Performs a FFT on the data in the local memory buffer at the offset specified by the first parameter. The size of the FFT is specified by the second parameter, which must be 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, or 32768. The outputs are permuted, so if you plan to use them in-order, call fft_permute(idx, size) before and fft_ipermute(idx,size) after your in-order use. Your inputs or outputs will need to be scaled down by 1/size, if used.
Note that fft()/ifft() require real / imaginary input pairs, so a 256 point FFT actually works with 512 items.
Note that fft()/ifft() must NOT cross a 65, 536 item boundary, so be sure to specify the offset accordingly.



EEL: fft_ipermute(buffer,size)

Permute the input for ifft(), taking bands from in-order to the order ifft() requires. see fft() for more information.



EEL: fft_permute(buffer,size)

Permute the output of fft() to have bands in-order. see fft() for more information.



EEL: fgetc(fp)

Reads a character from file fp, returns -1 if EOF.



EEL: fgets(fp,#str)

Reads a line from file fp into #str. Returns length of #str read.



EEL: floor(value)

Returns the value rounded to the next lowest integer (floor(3.9)==3, floor(-3.1)==-4).



EEL: fopen("fn","mode")

Opens a file "fn" with mode "mode". For read, use "r" or "rb", write "w" or "wb". Returns a positive integer on success.



EEL: fprintf(fp,"format"[,...])

Formats a string and writes it to file fp. For more information on format specifiers, see sprintf(). Returns bytes written to file.



EEL: fread(fp,#str,length)

Reads from file fp into #str, up to length bytes. Returns actual length read, or negative if error.



EEL: freembuf(address)

Hints the runtime that memory above the address specified may no longer be used. The runtime may, at its leisure, choose to lose the contents of memory above the address specified.



EEL: fseek(fp,offset,whence)

Seeks file fp, offset bytes from whence reference. Whence negative specifies start of file, positive whence specifies end of file, and zero whence specifies current file position.



EEL: ftell(fp)

Retunrs the current file position.



EEL: fwrite(fp,#str,len)

Writes up to len characters of #str to file fp. If len is less than 1, the full contents of #str will be written. Returns the number of bytes written to file.



EEL: get_action_context(#filename,sectionID,cmdID,mode,resolution,val)

Queries contextual information about the script, typically MIDI/OSC input values.
Returns true if a new value has been updated.
val will be set to a relative or absolute value depending on mode (=0: absolute mode, >0: relative modes). resolution=127 for 7-bit resolution, =16383 for 14-bit resolution.
Notes: sectionID, and cmdID will be set to -1 if the script is not part of the action list. mode, resolution and val will be set to -1 if the script was not triggered via MIDI/OSC.



EEL: gfx VARIABLES

The following global variables are special and will be used by the graphics system:

  • gfx_r, gfx_g, gfx_b, gfx_a - These represent the current red, green, blue, and alpha components used by drawing operations (0.0..1.0).
  • gfx_w, gfx_h - These are set to the current width and height of the UI framebuffer.
  • gfx_x, gfx_y - These set the "current" graphics position in x,y. You can set these yourselves, and many of the drawing functions update them as well.
  • gfx_mode - Set to 0 for default options. Add 1.0 for additive blend mode (if you wish to do subtractive, set gfx_a to negative and use gfx_mode as additive). Add 2.0 to disable source alpha for gfx_blit(). Add 4.0 to disable filtering for gfx_blit().
  • gfx_clear - If set to a value greater than -1.0, this will result in the framebuffer being cleared to that color. the color for this one is packed RGB (0..255), i.e. red+green*256+blue*65536. The default is 0 (black).
  • gfx_dest - Defaults to -1, set to 0..1024-1 to have drawing operations go to an offscreen buffer (or loaded image).
  • gfx_texth - Set to the height of a line of text in the current font. Do not modify this variable.
  • gfx_ext_retina - If set to 1.0 on initialization, will be updated to 2.0 if high resolution display is supported, and if so gfx_w/gfx_h/etc will be doubled.
  • mouse_x, mouse_y - mouse_x and mouse_y are set to the coordinates of the mouse relative to the graphics window.
  • mouse_wheel, mouse_hwheel - mouse wheel (and horizontal wheel) positions. These will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.
  • mouse_cap is a bitfield of mouse and keyboard modifier state.
    • 1: left mouse button
    • 2: right mouse button
    • 4: Control key
    • 8: Shift key
    • 16: Alt key
    • 32: Windows key
    • 64: middle mouse button




EEL: gfx_arc(x,y,r,ang1,ang2[,antialias])

Draws an arc of the circle centered at x,y, with ang1/ang2 being specified in radians.



EEL: gfx_blit(source, scale, rotation[, srcx, srcy, srcw, srch, destx, desty, destw, desth, rotxoffs, rotyoffs])

srcx/srcy/srcw/srch specify the source rectangle (if omitted srcw/srch default to image size), destx/desty/destw/desth specify dest rectangle (if not specified, these will default to reasonable defaults -- destw/desth default to srcw/srch * scale).



EEL: gfx_blit(source,scale,rotation)

If three parameters are specified, copies the entirity of the source bitmap to gfx_x,gfx_y using current opacity and copy mode (set with gfx_a, gfx_mode). You can specify scale (1.0 is unscaled) and rotation (0.0 is not rotated, angles are in radians).
For the "source" parameter specify -1 to use the main framebuffer as source, or an image index (see gfx_loadimg()).



EEL: gfx_blitext(source,coordinatelist,rotation)

Deprecated, use gfx_blit instead.



EEL: gfx_blurto(x,y)

Blurs the region of the screen between gfx_x,gfx_y and x,y, and updates gfx_x,gfx_y to x,y.



EEL: gfx_circle(x,y,r[,fill,antialias])

Draws a circle, optionally filling/antialiasing.



EEL: gfx_deltablit(srcimg,srcx,srcy,srcw,srch,destx,desty,destw,desth,dsdx,dtdx,dsdy,dtdy,dsdxdy,dtdxdy)

Blits from srcimg(srcx,srcy,srcw,srch) to destination (destx,desty,destw,desth). Source texture coordinates are s/t, dsdx represents the change in s coordinate for each x pixel, dtdy represents the change in t coordinate for each y pixel, etc. dsdxdy represents the change in dsdx for each line.



EEL: gfx_dock(v)

Call with v=-1 to query docked state, otherwise v>=0 to set docked state. State is &1 if docked, second byte is docker index (or last docker index if undocked).



EEL: gfx_drawchar(char)

Draws the character (can be a numeric ASCII code as well), to gfx_x, gfx_y, and moves gfx_x over by the size of the character.



EEL: gfx_drawnumber(n,ndigits)

Draws the number n with ndigits of precision to gfx_x, gfx_y, and updates gfx_x to the right side of the drawing. The text height is gfx_texth.



EEL: gfx_drawstr("str")

Draws a string at gfx_x, gfx_y, and updates gfx_x/gfx_y so that subsequent draws will occur in a similar place.



EEL: gfx_getchar([char])

If char is 0 or omitted, returns a character from the keyboard queue, or 0 if no character is available, or -1 if the graphics window is not open. If char is specified and nonzero, that character's status will be checked, and the function will return greater than 0 if it is pressed.

Common values are standard ASCII, such as 'a', 'A', '=' and '1', but for many keys multi-byte values are used, including 'home', 'up', 'down', 'left', 'rght', 'f1'.. 'f12', 'pgup', 'pgdn', 'ins', and 'del'.

Modified and special keys can also be returned, including:

  • Ctrl/Cmd+A..Ctrl+Z as 1..26
  • Ctrl/Cmd+Alt+A..Z as 257..282
  • Alt+A..Z as 'A'+256..'Z'+256
  • 27 for ESC
  • 13 for Enter
  • ' ' for space




EEL: gfx_getfont([#str])

Returns current font index. If a string is passed, it will receive the actual font face used by this font, if available.



EEL: gfx_getimgdim(image,w,h)

Retreives the dimensions of image (representing a filename: index number) into w and h. Sets these values to 0 if an image failed loading (or if the filename index is invalid).



EEL: gfx_getpixel(r,g,b)

Gets the value of the pixel at gfx_x,gfx_y into r,g,b.



EEL: gfx_gradrect(x,y,w,h, r,g,b,a[, drdx, dgdx, dbdx, dadx, drdy, dgdy, dbdy, dady])

Fills a gradient rectangle with the color and alpha specified. drdx-dadx reflect the adjustment (per-pixel) applied for each pixel moved to the right, drdy-dady are the adjustment applied for each pixel moved toward the bottom. Normally drdx=adjustamount/w, drdy=adjustamount/h, etc.



EEL: gfx_init("name"[,width,height,dockstate])

Initializes the graphics window with title name. Suggested width and height can be specified.

Once the graphics window is open, gfx_update() should be called periodically.



EEL: gfx_line(x,y,x2,y2[,aa])

Draws a line from x,y to x2,y2, and if aa is not specified or 0.5 or greater, it will be antialiased.



EEL: gfx_lineto(x,y[,aa])

Draws a line from gfx_x,gfx_y to x,y. If aa is 0.5 or greater, then antialiasing is used. Updates gfx_x and gfx_y to x,y.



EEL: gfx_loadimg(image,"filename")

Load image from filename into slot 0..1024-1 specified by image. Returns the image index if success, otherwise -1 if failure. The image will be resized to the dimensions of the image file.



EEL: gfx_measurechar(character,&w,&h)

Measures the drawing dimensions of a character with the current font (as set by gfx_setfont).



EEL: gfx_measurestr("str",&w,&h)

Measures the drawing dimensions of a string with the current font (as set by gfx_setfont).



EEL: gfx_muladdrect(x,y,w,h,mul_r,mul_g,mul_b[,mul_a,add_r,add_g,add_b,add_a])

Multiplies each pixel by mul_* and adds add_*, and updates in-place. Useful for changing brightness/contrast, or other effects.



EEL: gfx_printf("format"[, ...])

Formats and draws a string at gfx_x, gfx_y, and updates gfx_x/gfx_y accordingly (the latter only if the formatted string contains newline). For more information on format strings, see sprintf()



EEL: gfx_quit()

Closes the graphics window.



EEL: gfx_rect(x,y,w,h[,filled])

Fills a rectangle at x,y, w,h pixels in dimension, filled by default.



EEL: gfx_rectto(x,y)

Fills a rectangle from gfx_x,gfx_y to x,y. Updates gfx_x,gfx_y to x,y.



EEL: gfx_roundrect(x,y,w,h,radius[,antialias])

Draws a rectangle with rounded corners.



EEL: gfx_set(r[,g,b,a,mode,dest])

Sets gfx_r/gfx_g/gfx_b/gfx_a/gfx_mode, sets gfx_dest if final parameter specified



EEL: gfx_setcursor(resource_id,custom_cursor_name)

Sets the mouse cursor. resource_id is a value like 32512 (for an arrow cursor), custom_cursor_name is a string like "arrow" (for the REAPER custom arrow cursor). resource_id must be nonzero, but custom_cursor_name is optional.



EEL: gfx_setfont(idx[,"fontface", sz, flags])

Can select a font and optionally configure it. idx=0 for default bitmapped font, no configuration is possible for this font. idx=1..16 for a configurable font, specify fontface such as "Arial", sz of 8-100, and optionally specify flags, which is a multibyte character, which can include 'i' for italics, 'u' for underline, or 'b' for bold. These flags may or may not be supported depending on the font and OS. After calling gfx_setfont(), gfx_texth may be updated to reflect the new average line height.



EEL: gfx_setimgdim(image,w,h)

Resize image referenced by index 0..1024-1, width and height must be 0-2048. The contents of the image will be undefined after the resize.



EEL: gfx_setpixel(r,g,b)

Writes a pixel of r,g,b to gfx_x,gfx_y.



EEL: gfx_showmenu("str")

Shows a popup menu at gfx_x,gfx_y. str is a list of fields separated by | characters. Each field represents a menu item.
Fields can start with special characters:

# : grayed out
! : checked
> : this menu item shows a submenu
< : last item in the current submenu

An empty field will appear as a separator in the menu. gfx_showmenu returns 0 if the user selected nothing from the menu, 1 if the first field is selected, etc.
Example:

gfx_showmenu("first item, followed by separator||!second item, checked|>third item which spawns a submenu|#first item in submenu, grayed out|<second and last item in submenu|fourth item in top menu")



EEL: gfx_transformblit(srcimg,destx,desty,destw,desth,div_w,div_h,table)

Blits to destination at (destx,desty), size (destw,desth). div_w and div_h should be 2..64, and table should point to a table of 2*div_w*div_h values (this table must not cross a 65536 item boundary). Each pair in the table represents a S,T coordinate in the source image, and the table is treated as a left-right, top-bottom list of texture coordinates, which will then be rendered to the destination.



EEL: gfx_triangle(x1,y1,x2,y2,x3,y3[x4,y4...])

Draws a filled triangle, or any convex polygon.



EEL: gfx_update()

Updates the graphics display, if opened



EEL: ifft(buffer,size)

Perform an inverse FFT. For more information see fft().



EEL: invsqrt(value)

Returns a fast inverse square root (1/sqrt(x)) approximation of the parameter.



EEL: log(value)

Returns the natural logarithm (base e) of the parameter. If the value is not greater than 0, the return value is undefined.



EEL: log10(value)

Returns the base-10 logarithm of the parameter. If the value is not greater than 0, the return value is undefined.



EEL: loop(count,expression)

Evaluates count once, and then executes expression count, but not more than 1048576, times.



EEL: match("needle","haystack"[, ...])

Searches for the first parameter in the second parameter, using a simplified regular expression syntax.

  • * = match 0 or more characters
  • *? = match 0 or more characters, lazy
  • + = match 1 or more characters
  • +? = match 1 or more characters, lazy
  • ? = match one character

You can also use format specifiers to match certain types of data, and optionally put that into a variable:

  • %s means 1 or more chars
  • %0s means 0 or more chars
  • %5s means exactly 5 chars
  • %5-s means 5 or more chars
  • %-10s means 1-10 chars
  • %3-5s means 3-5 chars
  • %0-5s means 0-5 chars
  • %x, %d, %u, and %f are available for use similarly
  • %c can be used, but can't take any length modifiers
  • Use uppercase (%S, %D, etc) for lazy matching

See also sprintf() for other notes, including specifying direct variable references via {}.



EEL: matchi("needle","haystack"[, ...])

Case-insensitive version of match().



EEL: max(&value,&value)

Returns (by reference) the maximum value of the two parameters. Since max() returns by reference, expressions such as max(x,y) = 5 are possible.



EEL: memcpy(dest,src,length)

Copies length items of memory from src to dest. Regions are permitted to overlap.



EEL: memset(offset,value,length)

Sets length items of memory at offset to value.



EEL: min(&value,&value)

Returns (by reference) the minimum value of the two parameters. Since min() returns by reference, expressions such as min(x,y) = 5 are possible.



EEL: printf("format"[, ...])

Output formatted string to system-specific destination, see sprintf() for more information



EEL: rand([max])

Returns a psuedorandom real number between 0 and the parameter, inclusive. If the parameter is omitted or less than 1.0, 1.0 is used as a maximum instead.



EEL: runloop("code")

Identical to defer(). Adds code to be called back by REAPER. Used to create persistent ReaScripts that continue to run and respond to input, while the user does other tasks.
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.



EEL: sign(value)

Returns 1.0 if the parameter is greater than 0, -1.0 if the parameter is less than 0, or 0 if the parameter is 0.



EEL: sin(angle)

Returns the sine of the angle specified (specified in radians -- to convert from degrees to radians, multiply by $pi/180, or 0.017453).



EEL: sleep(ms)

Yields the CPU for the millisecond count specified, calling Sleep() on Windows or usleep() on other platforms.



EEL: sprintf(#dest,"format"[, ...])

Formats a string and stores it in #dest. Format specifiers begin with %, and may include:

  • %% = %
  • %s = string from parameter
  • %d = parameter as integer
  • %i = parameter as integer
  • %u = parameter as unsigned integer
  • %x = parameter as hex (lowercase) integer
  • %X = parameter as hex (uppercase) integer
  • %c = parameter as character
  • %f = parameter as floating point
  • %e = parameter as floating point (scientific notation, lowercase)
  • %E = parameter as floating point (scientific notation, uppercase)
  • %g = parameter as floating point (shortest representation, lowercase)
  • %G = parameter as floating point (shortest representation, uppercase)

Many standard C printf() modifiers can be used, including:

  • %.10s = string, but only print up to 10 characters
  • %-10s = string, left justified to 10 characters
  • %10s = string, right justified to 10 characters
  • %+f = floating point, always show sign
  • %.4f = floating point, minimum of 4 digits after decimal point
  • %10d = integer, minimum of 10 digits (space padded)
  • %010f = integer, minimum of 10 digits (zero padded)

Values for format specifiers can be specified as additional parameters to sprintf, or within {} in the format specifier (such as %{varname}d, in that case a global variable is always used).



EEL: sqr(value)

Returns the square of the parameter (similar to value*value, but only evaluating value once).



EEL: sqrt(value)

Returns the square root of the parameter. If the parameter is negative, the return value is undefined.



EEL: stack_exch(&value)

Exchanges a value with the top of the stack, and returns a reference to the parameter (with the new value).



EEL: stack_peek(index)

Returns a reference to the item on the top of the stack (if index is 0), or to the Nth item on the stack if index is greater than 0.



EEL: stack_pop(&value)

Pops a value from the user stack into value, or into a temporary buffer if value is not specified, and returns a reference to where the stack was popped. Note that no checking is done to determine if the stack is empty, and as such stack_pop() will never fail.



EEL: stack_push(&value)

Pushes value onto the user stack, returns a reference to the parameter.



EEL: str_delsub(#str,pos,len)

Deletes len characters at offset pos from #str, and returns #str.



EEL: str_getchar("str",offset[,type])

Returns the data at byte-offset offset of str. If offset is negative, position is relative to end of string.type defaults to signed char, but can be specified to read raw binary data in other formats (note the single quotes, these are single/multi-byte characters):

  • 'c' - signed char
  • 'cu' - unsigned char
  • 's' - signed short
  • 'S' - signed short, big endian
  • 'su' - unsigned short
  • 'Su' - unsigned short, big endian
  • 'i' - signed int
  • 'I' - signed int, big endian
  • 'iu' - unsigned int
  • 'Iu' - unsigned int, big endian
  • 'f' - float
  • 'F' - float, big endian
  • 'd' - double
  • 'D' - double, big endian




EEL: str_insert(#str,"srcstr",pos)

Inserts srcstr into #str at offset pos. Returns #str



EEL: str_setchar(#str,offset,val[,type]))

Sets value at offset offset, type optional. offset may be negative to refer to offset relative to end of string, or between 0 and length, inclusive, and if set to length it will lengthen string. see str_getchar() for more information on types.



EEL: str_setlen(#str,len)

Sets length of #str (if increasing, will be space-padded), and returns #str.



EEL: strcat(#str,"srcstr")

Appends srcstr to #str, and returns #str



EEL: strcmp("str","str2")

Compares strings, returning 0 if equal



EEL: strcpy(#str,"srcstr")

Copies the contents of srcstr to #str, and returns #str



EEL: strcpy_from(#str,"srcstr",offset)

Copies srcstr to #str, but starts reading srcstr at offset offset



EEL: strcpy_substr(#str,"srcstr",offs,ml))

PHP-style (start at offs, offs<0 means from end, ml for maxlen, ml<0 = reduce length by this amt)



EEL: stricmp("str","str2")

Compares strings ignoring case, returning 0 if equal



EEL: strlen("str")

Returns the length of the string passed as a parameter



EEL: strncat(#str,"srcstr",maxlen)

Appends srcstr to #str, stopping after maxlen characters of srcstr. Returns #str.



EEL: strncmp("str","str2",maxlen)

Compares strings giving up after maxlen characters, returning 0 if equal



EEL: strncpy(#str,"srcstr",maxlen)

Copies srcstr to #str, stopping after maxlen characters. Returns #str.



EEL: strnicmp("str","str2",maxlen)

Compares strings giving up after maxlen characters, ignoring case, returning 0 if equal



EEL: tan(angle)

Returns the tangent of the angle specified (specified in radians).



EEL: tcp_close(connection)

Closes a TCP connection created by tcp_listen() or tcp_connect().



EEL: tcp_connect("address",port[,block])

Create a new TCP connection to address:port. If block is specified and 0, connection will be made nonblocking. Returns TCP connection ID greater than 0 on success.



EEL: tcp_listen(port[,"interface",#ip_out])

Listens on port specified. Returns less than 0 if could not listen, 0 if no new connection available, or greater than 0 (as a TCP connection ID) if a new connection was made. If a connection made and #ip_out specified, it will be set to the remote IP. interface can be empty for all interfaces, otherwise an interface IP as a string.



EEL: tcp_listen_end(port)

Ends listening on port specified.



EEL: tcp_recv(connection,#str[,maxlen])

Receives data from a connection to #str. If maxlen is specified, no more than maxlen bytes will be received. If non-blocking, 0 will be returned if would block. Returns less than 0 if error.



EEL: tcp_send(connection,"str"[,len])

Sends a string to connection. Returns -1 on error, 0 if connection is non-blocking and would block, otherwise returns length sent. If len is specified and not less than 1, only the first len bytes of the string parameter will be sent.



EEL: tcp_set_block(connection,block)

Sets whether a connection blocks.



EEL: time([&val])

Sets the parameter (or a temporary buffer if omitted) to the number of seconds since January 1, 1970, and returns a reference to that value. The granularity of the value returned is 1 second.



EEL: time_precise([&val])

Sets the parameter (or a temporary buffer if omitted) to a system-local timestamp in seconds, and returns a reference to that value. The granularity of the value returned is system defined (but generally significantly smaller than one second).



EEL: while(expression)

Executes expression until expression evaluates to zero, or until 1048576iterations occur. An alternate and more useful syntax is while (expression) ( statements ), which evaluates statements after every non-zero evaluation of expression.





ReaScript/Lua Built-In Function list



Lua: reaper.atexit(function name or anonymous function definition)

Adds code to be executed when the script finishes or is ended by the user. Typically used to clean up after the user terminates defer() or runloop() code.



Lua: reaper.defer(function name or anonymous function definition)

Identical to runloop(). Adds code to be called back by REAPER. Used to create persistent ReaScripts that continue to run and respond to input, while the user does other tasks.
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.



Lua: reaper.get_action_context()

Returns contextual information about the script, typically MIDI/OSC input values:
is_new_value,filename,sectionID,cmdID,mode,resolution,val = reaper.get_action_context()

val will be set to a relative or absolute value depending on mode (=0: absolute mode, >0: relative modes). resolution=127 for 7-bit resolution, =16383 for 14-bit resolution.
Notes: sectionID, and cmdID will be set to -1 if the script is not part of the action list. mode, resolution and val will be set to -1 if the script was not triggered via MIDI/OSC.



Lua: gfx VARIABLES

The following global variables are special and will be used by the graphics system:

  • gfx.r, gfx.g, gfx.b, gfx.a - These represent the current red, green, blue, and alpha components used by drawing operations (0.0..1.0).
  • gfx.w, gfx.h - These are set to the current width and height of the UI framebuffer.
  • gfx.x, gfx.y - These set the "current" graphics position in x,y. You can set these yourselves, and many of the drawing functions update them as well.
  • gfx.mode - Set to 0 for default options. Add 1.0 for additive blend mode (if you wish to do subtractive, set gfx.a to negative and use gfx.mode as additive). Add 2.0 to disable source alpha for gfx.blit(). Add 4.0 to disable filtering for gfx.blit().
  • gfx.clear - If set to a value greater than -1.0, this will result in the framebuffer being cleared to that color. the color for this one is packed RGB (0..255), i.e. red+green*256+blue*65536. The default is 0 (black).
  • gfx.dest - Defaults to -1, set to 0..1024-1 to have drawing operations go to an offscreen buffer (or loaded image).
  • gfx.texth - Set to the height of a line of text in the current font. Do not modify this variable.
  • gfx.ext_retina - If set to 1.0 on initialization, will be updated to 2.0 if high resolution display is supported, and if so gfx.w/gfx.h/etc will be doubled.
  • gfx.mouse_x, gfx.mouse_y - gfx.mouse_x and gfx.mouse_y are set to the coordinates of the mouse relative to the graphics window.
  • gfx.mouse_wheel, gfx.mouse_hwheel - mouse wheel (and horizontal wheel) positions. These will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.
  • gfx.mouse_cap is a bitfield of mouse and keyboard modifier state.
    • 1: left mouse button
    • 2: right mouse button
    • 4: Control key
    • 8: Shift key
    • 16: Alt key
    • 32: Windows key
    • 64: middle mouse button




Lua: gfx.arc(x,y,r,ang1,ang2[,antialias])

Draws an arc of the circle centered at x,y, with ang1/ang2 being specified in radians.



Lua: gfx.blit(source, scale, rotation[, srcx, srcy, srcw, srch, destx, desty, destw, desth, rotxoffs, rotyoffs])

srcx/srcy/srcw/srch specify the source rectangle (if omitted srcw/srch default to image size), destx/desty/destw/desth specify dest rectangle (if not specified, these will default to reasonable defaults -- destw/desth default to srcw/srch * scale).



Lua: gfx.blit(source,scale,rotation)

If three parameters are specified, copies the entirity of the source bitmap to gfx.x,gfx.y using current opacity and copy mode (set with gfx.a, gfx.mode). You can specify scale (1.0 is unscaled) and rotation (0.0 is not rotated, angles are in radians).
For the "source" parameter specify -1 to use the main framebuffer as source, or an image index (see gfx.loadimg()).



Lua: gfx.blitext(source,coordinatelist,rotation)

Deprecated, use gfx.blit instead.



Lua: gfx.blurto(x,y)

Blurs the region of the screen between gfx.x,gfx.y and x,y, and updates gfx.x,gfx.y to x,y.



Lua: gfx.circle(x,y,r[,fill,antialias])

Draws a circle, optionally filling/antialiasing.



Lua: gfx.deltablit(srcimg,srcx,srcy,srcw,srch,destx,desty,destw,desth,dsdx,dtdx,dsdy,dtdy,dsdxdy,dtdxdy)

Blits from srcimg(srcx,srcy,srcw,srch) to destination (destx,desty,destw,desth). Source texture coordinates are s/t, dsdx represents the change in s coordinate for each x pixel, dtdy represents the change in t coordinate for each y pixel, etc. dsdxdy represents the change in dsdx for each line.



Lua: gfx.dock(v)

Call with v=-1 to query docked state, otherwise v>=0 to set docked state. State is &1 if docked, second byte is docker index (or last docker index if undocked).



Lua: gfx.drawchar(char)

Draws the character (can be a numeric ASCII code as well), to gfx.x, gfx.y, and moves gfx.x over by the size of the character.



Lua: gfx.drawnumber(n,ndigits)

Draws the number n with ndigits of precision to gfx.x, gfx.y, and updates gfx.x to the right side of the drawing. The text height is gfx.texth.



Lua: gfx.drawstr("str")

Draws a string at gfx.x, gfx.y, and updates gfx.x/gfx.y so that subsequent draws will occur in a similar place.



Lua: gfx.getchar([char])

If char is 0 or omitted, returns a character from the keyboard queue, or 0 if no character is available, or -1 if the graphics window is not open. If char is specified and nonzero, that character's status will be checked, and the function will return greater than 0 if it is pressed.

Common values are standard ASCII, such as 'a', 'A', '=' and '1', but for many keys multi-byte values are used, including 'home', 'up', 'down', 'left', 'rght', 'f1'.. 'f12', 'pgup', 'pgdn', 'ins', and 'del'.

Modified and special keys can also be returned, including:

  • Ctrl/Cmd+A..Ctrl+Z as 1..26
  • Ctrl/Cmd+Alt+A..Z as 257..282
  • Alt+A..Z as 'A'+256..'Z'+256
  • 27 for ESC
  • 13 for Enter
  • ' ' for space




Lua: gfx.getfont()

Returns current font index, and the actual font face used by this font (if available).



Lua: gfx.getimgdim(handle)

Retreives the dimensions of an image specified by handle, returns w, h pair.



Lua: gfx.getpixel(r,g,b)

Gets the value of the pixel at gfx.x,gfx.y into r,g,b.



Lua: gfx.gradrect(x,y,w,h, r,g,b,a[, drdx, dgdx, dbdx, dadx, drdy, dgdy, dbdy, dady])

Fills a gradient rectangle with the color and alpha specified. drdx-dadx reflect the adjustment (per-pixel) applied for each pixel moved to the right, drdy-dady are the adjustment applied for each pixel moved toward the bottom. Normally drdx=adjustamount/w, drdy=adjustamount/h, etc.



Lua: gfx.init("name"[,width,height,dockstate])

Initializes the graphics window with title name. Suggested width and height can be specified.

Once the graphics window is open, gfx.update() should be called periodically.



Lua: gfx.line(x,y,x2,y2[,aa])

Draws a line from x,y to x2,y2, and if aa is not specified or 0.5 or greater, it will be antialiased.



Lua: gfx.lineto(x,y[,aa])

Draws a line from gfx.x,gfx.y to x,y. If aa is 0.5 or greater, then antialiasing is used. Updates gfx.x and gfx.y to x,y.



Lua: gfx.loadimg(image,"filename")

Load image from filename into slot 0..1024-1 specified by image. Returns the image index if success, otherwise -1 if failure. The image will be resized to the dimensions of the image file.



Lua: gfx.measurechar(char)

Measures the drawing dimensions of a character with the current font (as set by gfx.setfont). Returns width and height of character.



Lua: gfx.measurestr("str")

Measures the drawing dimensions of a string with the current font (as set by gfx.setfont). Returns width and height of string.



Lua: gfx.muladdrect(x,y,w,h,mul_r,mul_g,mul_b[,mul_a,add_r,add_g,add_b,add_a])

Multiplies each pixel by mul_* and adds add_*, and updates in-place. Useful for changing brightness/contrast, or other effects.



Lua: gfx.printf("format"[, ...])

Formats and draws a string at gfx.x, gfx.y, and updates gfx.x/gfx.y accordingly (the latter only if the formatted string contains newline). For more information on format strings, see sprintf()



Lua: gfx.quit()

Closes the graphics window.



Lua: gfx.rect(x,y,w,h[,filled])

Fills a rectangle at x,y, w,h pixels in dimension, filled by default.



Lua: gfx.rectto(x,y)

Fills a rectangle from gfx.x,gfx.y to x,y. Updates gfx.x,gfx.y to x,y.



Lua: gfx.roundrect(x,y,w,h,radius[,antialias])

Draws a rectangle with rounded corners.



Lua: gfx.set(r[,g,b,a,mode,dest])

Sets gfx.r/gfx.g/gfx.b/gfx.a/gfx.mode, sets gfx.dest if final parameter specified



Lua: gfx.setcursor(resource_id,custom_cursor_name)

Sets the mouse cursor. resource_id is a value like 32512 (for an arrow cursor), custom_cursor_name is a string like "arrow" (for the REAPER custom arrow cursor). resource_id must be nonzero, but custom_cursor_name is optional.



Lua: gfx.setfont(idx[,"fontface", sz, flags])

Can select a font and optionally configure it. idx=0 for default bitmapped font, no configuration is possible for this font. idx=1..16 for a configurable font, specify fontface such as "Arial", sz of 8-100, and optionally specify flags, which is a multibyte character, which can include 'i' for italics, 'u' for underline, or 'b' for bold. These flags may or may not be supported depending on the font and OS. After calling gfx.setfont(), gfx.texth may be updated to reflect the new average line height.



Lua: gfx.setimgdim(image,w,h)

Resize image referenced by index 0..1024-1, width and height must be 0-2048. The contents of the image will be undefined after the resize.



Lua: gfx.setpixel(r,g,b)

Writes a pixel of r,g,b to gfx.x,gfx.y.



Lua: gfx.showmenu("str")

Shows a popup menu at gfx.x,gfx.y. str is a list of fields separated by | characters. Each field represents a menu item.
Fields can start with special characters:

# : grayed out
! : checked
> : this menu item shows a submenu
< : last item in the current submenu

An empty field will appear as a separator in the menu. gfx.showmenu returns 0 if the user selected nothing from the menu, 1 if the first field is selected, etc.
Example:

gfx.showmenu("first item, followed by separator||!second item, checked|>third item which spawns a submenu|#first item in submenu, grayed out|<second and last item in submenu|fourth item in top menu")



Lua: gfx.transformblit(srcimg,destx,desty,destw,desth,div_w,div_h,table)

Blits to destination at (destx,desty), size (destw,desth). div_w and div_h should be 2..64, and table should point to a table of 2*div_w*div_h values (table can be a regular table or (for less overhead) a reaper.array). Each pair in the table represents a S,T coordinate in the source image, and the table is treated as a left-right, top-bottom list of texture coordinates, which will then be rendered to the destination.



Lua: gfx.triangle(x1,y1,x2,y2,x3,y3[x4,y4...])

Draws a filled triangle, or any convex polygon.



Lua: gfx.update()

Updates the graphics display, if opened



Lua: reaper.new_array([table|array][size])

Creates a new reaper.array object of maximum and initial size size, if specified, or from the size/values of a table/array. Both size and table/array can be specified, the size parameter will override the table/array size.



Lua: reaper.runloop(function name or anonymous function definition)

Identical to defer(). Adds code to be called back by REAPER. Used to create persistent ReaScripts that continue to run and respond to input, while the user does other tasks.
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.



Lua: {reaper.array}.clear([value, offset, size])

Sets the value of zero or more items in the array. If value not specified, 0.0 is used. offset is 1-based, if size omitted then the maximum amount available will be set.



Lua: {reaper.array}.convolve([src, srcoffs, size, destoffs])

Convolves complex value pairs from reaper.array, starting at 1-based srcoffs, reading/writing to 1-based destoffs. size is in normal items (so it must be even)



Lua: {reaper.array}.copy([src, srcoffs, size, destoffs])

Copies values from reaper.array or table, starting at 1-based srcoffs, writing to 1-based destoffs.



Lua: {reaper.array}.fft(size[, permute, offset])

Performs a forward FFT of size. size must be a power of two between 4 and 32768 inclusive. If permute is specified and true, the values will be shuffled following the FFT to be in normal order.



Lua: {reaper.array}.get_alloc()

Returns the maximum (allocated) size of the array.



Lua: {reaper.array}.ifft(size[, permute, offset])

Performs a backwards FFT of size. size must be a power of two between 4 and 32768 inclusive. If permute is specified and true, the values will be shuffled before the IFFT to be in fft-order.



Lua: {reaper.array}.multiply([src, srcoffs, size, destoffs])

Multiplies values from reaper.array, starting at 1-based srcoffs, reading/writing to 1-based destoffs.



Lua: {reaper.array}.resize(size)

Resizes an array object to size. size must be [0..max_size].



Lua: {reaper.array}.table([offset, size])

Returns a new table with values from items in the array. Offset is 1-based and if size is omitted all available values are used.





ReaScript/Python Built-In Function list



Python: RPR_atexit(String)

Adds code to be executed when the script finishes or is ended by the user. Typically used to clean up after the user terminates defer() or runloop() code.



Python: RPR_defer(String code)

Identical to runloop(). Adds code to be called back by REAPER. Used to create persistent ReaScripts that continue to run and respond to input, while the user does other tasks.
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.



Python: RPR_runloop(String code)

Identical to defer(). Adds code to be called back by REAPER. Used to create persistent ReaScripts that continue to run and respond to input, while the user does other tasks.
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

View: [all] [C/C++] [EEL] [Lua] [Python]