Ultraschall Internals Documentation Reaper Internals Documentation Downloads Changelog of documentation Impressum and Contact
Reaper internals logo Documentation:
  Filetype Descriptions    Config Variables 
   ReaScript-Api-Docs     Video-Api-Docs    WebRC-Api-Docs 

View: [all] [C/C++] [EEL2] [Lua] [Python]
Jump to Index

Reaper Reascript-Api-Documentation 6.42
"Right Click Everything"

The Functions Reference


^ API-Documentation

1 Introduction to ReaScript2.1 CPP Api-Description2.2 EEL Api-Description
2.3 Python Api-Description2.4 Lua Api-Description3 Datatypes used in this document

^ Additional C++ Functions


^ reaper_plugin_functions.h
AddCustomizableMenuAddExtensionsMainMenuAudio_RegHardwareHook
CSurf_OnOscControlMessageCalculatePeaksCalculatePeaksFloatSrcPtr
CountActionShortcutsCreateLocalOscHandlerCreateMIDIInput
CreateMIDIOutputDeleteActionShortcutDestroyLocalOscHandler
DoActionShortcutDialogDuplicateCustomizableMenuFreeHeapPtr
GetActionShortcutDescGetColorThemeGetColorThemeStruct
GetContextMenuGetIconThemePointerGetIconThemePointerForDPI
GetIconThemeStructGetPeaksBitmapGetPreferredDiskReadMode
GetPreferredDiskReadModePeakGetPreferredDiskWriteModeGetSetMediaItemInfo
GetSetMediaItemTakeInfoGetSetMediaTrackInfoGetSetObjectState
GetSetObjectState2GetSetTrackMIDISupportFileGetSetTrackSendInfo
GetToggleCommandState2GetToggleCommandStateThroughHooksGetTrackInfo
HiresPeaksFromSourceIsInRealTimeAudioIsItemTakeActiveForPlayback
IsREAPERKBD_OnMainActionExLICE_Arc
LICE_BlitLICE_BlurLICE_BorderedRect
LICE_CircleLICE_ClearLICE_ClearRect
LICE_CopyLICE_CreateBitmapLICE_CreateFont
LICE_DrawCBezierLICE_DrawCharLICE_DrawGlyph
LICE_DrawRectLICE_DrawTextLICE_FillCBezier
LICE_FillCircleLICE_FillConvexPolygonLICE_FillRect
LICE_FillTrapezoidLICE_FillTriangleLICE_GetPixel
LICE_GradRectLICE_LineLICE_LineInt
LICE_LoadPNGLICE_LoadPNGFromResourceLICE_MeasureText
LICE_MultiplyAddRectLICE_PutPixelLICE_RotatedBlit
LICE_RoundRectLICE_ScaledBlitLICE_SimpleFill
LICE__DestroyLICE__DestroyFontLICE__DrawText
LICE__GetBitsLICE__GetDCLICE__GetHeight
LICE__GetRowSpanLICE__GetWidthLICE__IsFlipped
LICE__SetBkColorLICE__SetFromHFontLICE__SetTextColor
LICE__SetTextCombineModeLICE__resizeMIDI_eventlist_Create
MIDI_eventlist_DestroyPCM_Sink_CreatePCM_Sink_CreateEx
PCM_Sink_CreateMIDIFilePCM_Sink_CreateMIDIFileExPCM_Source_CreateFromSimple
PeakBuild_CreatePeakBuild_CreateExPeakGet_Create
PitchShiftSubModeMenuPlayPreviewPlayPreviewEx
PlayTrackPreviewPlayTrackPreview2PlayTrackPreview2Ex
REAPERAPI_LoadAPIReaperGetPitchShiftAPIResampler_Create
ResolveRenderPatternSectionFromUniqueIDSendLocalOscMessage
SetRenderLastErrorStopPreviewStopTrackPreview
StopTrackPreview2WDL_VirtualWnd_ScaledBlitBG__mergesort
get_config_varget_midi_config_varkbd_OnMidiEvent
kbd_OnMidiListkbd_ProcessActionsMenukbd_RunCommandThroughHooks
kbd_enumerateActionskbd_formatKeyNamekbd_getCommandName
kbd_getTextFromCmdkbd_processMidiEventActionExkbd_reprocessMenu
kbd_translateAcceleratorkbd_translateMouseplugin_getFilterList
plugin_getImportableProjectFilterListplugin_getapiplugin_register
projectconfig_var_addrprojectconfig_var_getoffsrealloc_cmd_ptr
screenset_registerscreenset_registerNewscreenset_unregister
screenset_unregisterByParamscreenset_updateLastFocusupdate_disk_counters

^ Additional EEL-Functions

absacosasin
atanatan2atexit
ceilconvolve_ccos
deferevalexp
extension_apifclosefeof
fflushfftfft_ipermute
fft_permutefft_realfgetc
fgetsfloorfopen
fprintffreadfreembuf
fseekftellfwrite
get_action_contextgfx_arcgfx_blit
gfx_blitgfx_blitextgfx_blurto
gfx_circlegfx_clienttoscreengfx_deltablit
gfx_dockgfx_drawchargfx_drawnumber
gfx_drawstrgfx_getchareel_getdropfile
gfx_getfontgfx_getimgdimgfx_getpixel
gfx_gradrectgfx_initgfx_line
gfx_linetogfx_loadimggfx_measurechar
gfx_measurestrgfx_muladdrectgfx_printf
gfx_quitgfx_rectgfx_rectto
gfx_roundrectgfx_screentoclientgfx_set
gfx_setcursorgfx_setfontgfx_setimgdim
gfx_setpixelgfx_showmenugfx_transformblit
gfx_trianglegfx_updategfx_variables
ifftifft_realinvsqrt
loglog10loop
matchmatchimax
mem_get_valuesmem_set_valuesmemcpy
memsetminprintf
randrunloopsign
sinsleepsprintf
sqrsqrtstack_exch
stack_peekstack_popstack_push
str_delsubstr_getcharstr_insert
str_setcharstr_setlenstrcat
strcmpstrcpystrcpy_from
strcpy_substrstricmpstrlen
strncatstrncmpstrncpy
strnicmptantcp_close
tcp_connecttcp_listentcp_listen_end
tcp_recvtcp_sendtcp_set_block
timetime_precisewhile

^ Additional Lua-Functions

atexitdeferget_action_context
gfx.arcgfx.blitgfx.blit(simplified)
gfx.blitextgfx.blurtogfx.circle
gfx.clienttoscreengfx.deltablitgfx.dock
gfx.drawchargfx.drawnumbergfx.drawstr
gfx.getchargfx.getdropfilegfx.getfont
gfx.getimgdimgfx.getpixelgfx.gradrect
gfx.initgfx.linegfx.lineto
gfx.loadimggfx.measurechargfx.measurestr
gfx.muladdrectgfx.printfgfx.quit
gfx.rectgfx.recttogfx.roundrect
gfx.screentoclientgfx.setgfx.setcursor
gfx.setfontgfx.setimgdimgfx.setpixel
gfx.showmenugfx.transformblitgfx.triangle
gfx.updategfx_variablesgmem_attach
gmem_readgmem_writenew_array
runloop{reaper.array}.clear{reaper.array}.convolve
{reaper.array}.copy{reaper.array}.fft{reaper.array}.fft_real
{reaper.array}.get_alloc{reaper.array}.ifft{reaper.array}.ifft_real
{reaper.array}.multiply{reaper.array}.resize{reaper.array}.table

^ Additional Python-Functions

atexitdeferrunloop

^ Api-Helper-Functions

APIExistsAPITestAddRemoveReaScript
BR_Win32_GetConstant(SWS)BR_Win32_HIBYTE(SWS)BR_Win32_HIWORD(SWS)
BR_Win32_LOBYTE(SWS)BR_Win32_LOWORD(SWS)BR_Win32_MAKELONG(SWS)
BR_Win32_MAKELPARAM(SWS)BR_Win32_MAKELRESULT(SWS)BR_Win32_MAKEWORD(SWS)
BR_Win32_MAKEWPARAM(SWS)BR_Win32_ShellExecute(SWS)CF_EnumerateActions(SWS)
CF_GetClipboard(SWS)CF_GetClipboardBig(SWS)CF_GetCommandText(SWS)
CF_GetSWSVersion(SWS)CF_SetClipboard(SWS)CF_ShellExecute(SWS)
ClearConsoleClearPeakCacheColorFromNative
ColorToNativeDB2SLIDERExecProcess
GetAppVersionGetExePathGetOS
GetResourcePathGetToggleCommandStateGetToggleCommandStateEx
IsMediaExtensionLocalizeStringMain_OnCommand
Main_OnCommandExNamedCommandLookupReaScriptError
RecursiveCreateDirectoryReverseNamedCommandLookupSLIDER2DB
SNM_CreateFastString(SWS)SNM_DeleteFastString(SWS)SNM_GetDoubleConfigVar(SWS)
SNM_GetFastString(SWS)SNM_GetFastStringLength(SWS)SNM_GetIntConfigVar(SWS)
SNM_GetLongConfigVar(SWS)SNM_SetDoubleConfigVar(SWS)SNM_SetFastString(SWS)
SNM_SetIntConfigVar(SWS)SNM_SetLongConfigVar(SWS)SetToggleCommandState
ShowActionListShowConsoleMsgToggleTrackSendUIMute
ValidatePtrValidatePtr2format_timestr
format_timestr_lenformat_timestr_posgenGuid
get_config_var_stringget_ini_fileguidToString
image_resolve_fnmkpanstrmkvolpanstr
mkvolstrparse_timestrparse_timestr_len
parse_timestr_posparsepanstrreduce_open_files
relative_fnresolve_fnresolve_fn2
stringToGuidtime_precise 

^ Arrangeview Management

BR_GetArrangeView(SWS)BR_SetArrangeView(SWS)CSurf_OnArrow
CSurf_OnScrollCSurf_OnZoomGetCursorContext
GetCursorContext2GetHZoomLevelGetSet_ArrangeView2
SetCursorContextUpdateArrangeUpdateTimeline
adjustZoom  

^ Audio Management

AudioAccessorValidateStateCF_EnumMediaSourceCues(SWS)CF_ExportMediaSource(SWS)
CF_GetMediaSourceBitDepth(SWS)CF_GetMediaSourceOnline(SWS)CF_GetMediaSourceRPP(SWS)
CF_SetMediaSourceOnline(SWS)CreateTakeAudioAccessorCreateTrackAudioAccessor
DestroyAudioAccessorGetAudioAccessorEndTimeGetAudioAccessorHash
GetAudioAccessorSamplesGetAudioAccessorStartTimeGetItemEditingTime2
GetMediaSourceFileNameGetMediaSourceLengthGetMediaSourceNumChannels
GetMediaSourceParentGetMediaSourceSampleRateGetMediaSourceType
GetPeakFileNameGetPeakFileNameExGetPeakFileNameEx2
GetSubProjectFromSourceGetTempoMatchPlayRateInsertMedia
InsertMediaSectionNF_AnalyzeMediaItemPeakAndRMS(SWS)NF_AnalyzeTakeLoudness(SWS)
NF_AnalyzeTakeLoudness2(SWS)NF_AnalyzeTakeLoudness_IntegratedOnly(SWS)NF_GetMediaItemAverageRMS(SWS)
NF_GetMediaItemMaxPeak(SWS)NF_GetMediaItemMaxPeakAndMaxPeakPos(SWS)NF_GetMediaItemPeakRMS_NonWindowed(SWS)
NF_GetMediaItemPeakRMS_Windowed(SWS)PCM_Sink_EnumPCM_Sink_GetExtension
PCM_Sink_ShowConfigPCM_Source_BuildPeaksPCM_Source_CreateFromFile
PCM_Source_CreateFromFileExPCM_Source_CreateFromTypePCM_Source_Destroy
PCM_Source_GetPeaksPCM_Source_GetSectionInfoResample_EnumModes

^ AudioMidi Devicemanagement

AudioAccessorStateChangedAudioAccessorUpdateAudio_Init
Audio_IsPreBufferAudio_IsRunningAudio_Quit
GetAudioDeviceInfoGetInputChannelNameGetInputOutputLatency
GetMIDIInputNameGetMIDIOutputNameGetMaxMidiInputs
GetMaxMidiOutputsGetNumAudioInputsGetNumAudioOutputs
GetNumMIDIInputsGetNumMIDIOutputsGetOutputChannelName
GetOutputLatencyGetUnderrunTimeOscLocalMessageToHost

^ Automation Management

CountAutomationItemsGetSetAutomationItemInfoGetSetAutomationItemInfo_String
InsertAutomationItem  

^ Envelope Management

BR_EnvAlloc(SWS)BR_EnvCountPoints(SWS)BR_EnvDeletePoint(SWS)
BR_EnvFind(SWS)BR_EnvFindNext(SWS)BR_EnvFindPrevious(SWS)
BR_EnvFree(SWS)BR_EnvGetParentTake(SWS)BR_EnvGetParentTrack(SWS)
BR_EnvGetPoint(SWS)BR_EnvGetProperties(SWS)BR_EnvSetPoint(SWS)
BR_EnvSetProperties(SWS)BR_EnvSortPoints(SWS)BR_EnvValueAtPos(SWS)
CSurf_SetAutoModeCountEnvelopePointsCountEnvelopePointsEx
CountTrackEnvelopesDeleteEnvelopePointExDeleteEnvelopePointRange
DeleteEnvelopePointRangeExEnvelope_EvaluateEnvelope_FormatValue
Envelope_GetParentTakeEnvelope_GetParentTrackEnvelope_SortPoints
Envelope_SortPointsExGetEnvelopeInfo_ValueGetEnvelopeName
GetEnvelopePointGetEnvelopePointByTimeGetEnvelopePointByTimeEx
GetEnvelopePointExGetEnvelopeScalingModeGetEnvelopeStateChunk
GetFXEnvelopeGetGlobalAutomationOverrideGetSelectedEnvelope
GetSelectedTrackEnvelopeGetSetEnvelopeInfo_StringGetSetEnvelopeState
GetSetEnvelopeState2GetTakeEnvelopeGetTakeEnvelopeByName
GetTrackAutomationModeGetTrackEnvelopeGetTrackEnvelopeByChunkName
GetTrackEnvelopeByNameInsertEnvelopePointInsertEnvelopePointEx
ScaleFromEnvelopeModeScaleToEnvelopeModeSetAutomationMode
SetEnvelopePointSetEnvelopePointExSetEnvelopeStateChunk
SetGlobalAutomationOverrideSetTrackAutomationMode 

^ Extended States

DeleteExtStateGetExtStateHasExtState
SetExtState  

^ FX Management

BR_GetTakeFXCount(SWS)BR_TrackFX_GetFXModuleName(SWS)CF_EnumSelectedFX(SWS)
CF_GetFocusedFXChain(SWS)CF_GetTakeFXChain(SWS)CF_GetTrackFXChain(SWS)
CF_SelectTrackFX(SWS)GetFocusedFXGetFocusedFX2
GetLastTouchedFXGetTCPFXParmPluginWantsAlwaysRunFx
SNM_AddTCPFXParm(SWS)SNM_MoveOrRemoveTrackFX(SWS)TakeFX_AddByName
TakeFX_CopyToTakeTakeFX_CopyToTakeTakeFX_CopyToTrack
TakeFX_CopyToTrackTakeFX_DeleteTakeFX_EndParamEdit
TakeFX_FormatParamValueTakeFX_FormatParamValueNormalizedTakeFX_GetChainVisible
TakeFX_GetCountTakeFX_GetEnabledTakeFX_GetEnvelope
TakeFX_GetFXGUIDTakeFX_GetFXNameTakeFX_GetFloatingWindow
TakeFX_GetFormattedParamValueTakeFX_GetIOSizeTakeFX_GetNamedConfigParm
TakeFX_GetNumParamsTakeFX_GetOfflineTakeFX_GetOpen
TakeFX_GetParamTakeFX_GetParamExTakeFX_GetParamFromIdent
TakeFX_GetParamIdentTakeFX_GetParamNameTakeFX_GetParamNormalized
TakeFX_GetParameterStepSizesTakeFX_GetPinMappingsTakeFX_GetPreset
TakeFX_GetPresetIndexTakeFX_GetUserPresetFilenameTakeFX_NavigatePresets
TakeFX_SetEnabledTakeFX_SetNamedConfigParmTakeFX_SetOffline
TakeFX_SetOpenTakeFX_SetParamTakeFX_SetParamNormalized
TakeFX_SetPinMappingsTakeFX_SetPresetTakeFX_SetPresetByIndex
TakeFX_ShowTrackFX_AddByNameTrackFX_CopyToTake
TrackFX_CopyToTrackTrackFX_DeleteTrackFX_EndParamEdit
TrackFX_FormatParamValueTrackFX_FormatParamValueNormalizedTrackFX_GetByName
TrackFX_GetChainVisibleTrackFX_GetCountTrackFX_GetEQ
TrackFX_GetEQBandEnabledTrackFX_GetEQParamTrackFX_GetEnabled
TrackFX_GetFXGUIDTrackFX_GetFXNameTrackFX_GetFloatingWindow
TrackFX_GetFormattedParamValueTrackFX_GetIOSizeTrackFX_GetInstrument
TrackFX_GetNamedConfigParmTrackFX_GetNumParamsTrackFX_GetOffline
TrackFX_GetParamTrackFX_GetParamExTrackFX_GetParamFromIdent
TrackFX_GetParamIdentTrackFX_GetParamNameTrackFX_GetParamNormalized
TrackFX_GetParameterStepSizesTrackFX_GetPinMappingsTrackFX_GetPreset
TrackFX_GetPresetIndexTrackFX_GetRecChainVisibleTrackFX_GetRecCount
TrackFX_GetUserPresetFilenameTrackFX_NavigatePresetsTrackFX_SetEQBandEnabled
TrackFX_SetEQParamTrackFX_SetEnabledTrackFX_SetNamedConfigParm
TrackFX_SetOfflineTrackFX_SetParamTrackFX_SetParamNormalized
TrackFX_SetPinMappingsTrackFX_SetPresetTrackFX_SetPresetByIndex
TrackList_AdjustWindows  

^ File Management

BR_Win32_GetPrivateProfileString(SWS)BR_Win32_WritePrivateProfileString(SWS)EnumerateFiles
EnumerateSubdirectoriesGetMediaFileMetadataSNM_ReadMediaFileTag(SWS)
SNM_TagMediaFile(SWS)file_exists 

^ JS_Plugin

JS_Actions_CountShortcuts(JS)JS_Actions_DeleteShortcut(JS)JS_Actions_DoShortcutDialog(JS)
JS_Actions_GetShortcutDesc(JS)JS_Byte(JS)JS_Composite(JS)
JS_Composite_Delay(JS)JS_Composite_ListBitmaps(JS)JS_Composite_Unlink(JS)
JS_Dialog_BrowseForFolder(JS)JS_Dialog_BrowseForOpenFiles(JS)JS_Dialog_BrowseForSaveFile(JS)
JS_Double(JS)JS_File_Stat(JS)JS_GDI_Blit(JS)
JS_GDI_CreateFillBrush(JS)JS_GDI_CreateFont(JS)JS_GDI_CreatePen(JS)
JS_GDI_DeleteObject(JS)JS_GDI_DrawText(JS)JS_GDI_FillEllipse(JS)
JS_GDI_FillPolygon(JS)JS_GDI_FillRect(JS)JS_GDI_FillRoundRect(JS)
JS_GDI_GetClientDC(JS)JS_GDI_GetScreenDC(JS)JS_GDI_GetSysColor(JS)
JS_GDI_GetTextColor(JS)JS_GDI_GetWindowDC(JS)JS_GDI_Line(JS)
JS_GDI_Polyline(JS)JS_GDI_ReleaseDC(JS)JS_GDI_SelectObject(JS)
JS_GDI_SetPixel(JS)JS_GDI_SetTextBkColor(JS)JS_GDI_SetTextBkMode(JS)
JS_GDI_SetTextColor(JS)JS_GDI_StretchBlit(JS)JS_Int(JS)
JS_LICE_AlterBitmapHSV(JS)JS_LICE_AlterRectHSV(JS)JS_LICE_Arc(JS)
JS_LICE_ArrayAllBitmaps(JS)JS_LICE_Bezier(JS)JS_LICE_Blit(JS)
JS_LICE_Circle(JS)JS_LICE_Clear(JS)JS_LICE_CreateBitmap(JS)
JS_LICE_CreateFont(JS)JS_LICE_DestroyBitmap(JS)JS_LICE_DestroyFont(JS)
JS_LICE_DrawChar(JS)JS_LICE_DrawText(JS)JS_LICE_FillCircle(JS)
JS_LICE_FillPolygon(JS)JS_LICE_FillRect(JS)JS_LICE_FillTriangle(JS)
JS_LICE_GetDC(JS)JS_LICE_GetHeight(JS)JS_LICE_GetPixel(JS)
JS_LICE_GetWidth(JS)JS_LICE_GradRect(JS)JS_LICE_IsFlipped(JS)
JS_LICE_Line(JS)JS_LICE_ListAllBitmaps(JS)JS_LICE_LoadJPG(JS)
JS_LICE_LoadPNG(JS)JS_LICE_MeasureText(JS)JS_LICE_ProcessRect(JS)
JS_LICE_PutPixel(JS)JS_LICE_Resize(JS)JS_LICE_RotatedBlit(JS)
JS_LICE_RoundRect(JS)JS_LICE_ScaledBlit(JS)JS_LICE_SetAlphaFromColorMask(JS)
JS_LICE_SetFontBkColor(JS)JS_LICE_SetFontColor(JS)JS_LICE_SetFontFromGDI(JS)
JS_LICE_WriteJPG(JS)JS_LICE_WritePNG(JS)JS_ListView_EnsureVisible(JS)
JS_ListView_EnumSelItems(JS)JS_ListView_GetFocusedItem(JS)JS_ListView_GetItem(JS)
JS_ListView_GetItemCount(JS)JS_ListView_GetItemRect(JS)JS_ListView_GetItemState(JS)
JS_ListView_GetItemText(JS)JS_ListView_GetSelectedCount(JS)JS_ListView_GetTopIndex(JS)
JS_ListView_HitTest(JS)JS_ListView_ListAllSelItems(JS)JS_ListView_SetItemState(JS)
JS_ListView_SetItemText(JS)JS_Localize(JS)JS_MIDIEditor_ArrayAll(JS)
JS_MIDIEditor_ListAll(JS)JS_Mem_Alloc(JS)JS_Mem_Free(JS)
JS_Mem_FromString(JS)JS_Mouse_GetCursor(JS)JS_Mouse_GetState(JS)
JS_Mouse_LoadCursor(JS)JS_Mouse_LoadCursorFromFile(JS)JS_Mouse_SetCursor(JS)
JS_Mouse_SetPosition(JS)JS_PtrFromStr(JS)JS_ReaScriptAPI_Version(JS)
JS_String(JS)JS_VKeys_ClearHistory(JS)JS_VKeys_GetDown(JS)
JS_VKeys_GetHistory(JS)JS_VKeys_GetState(JS)JS_VKeys_GetUp(JS)
JS_VKeys_Intercept(JS)JS_WindowMessage_Intercept(JS)JS_WindowMessage_InterceptList(JS)
JS_WindowMessage_ListIntercepts(JS)JS_WindowMessage_PassThrough(JS)JS_WindowMessage_Peek(JS)
JS_WindowMessage_Post(JS)JS_WindowMessage_Release(JS)JS_WindowMessage_ReleaseAll(JS)
JS_WindowMessage_ReleaseWindow(JS)JS_WindowMessage_Send(JS)JS_Window_AddressFromHandle(JS)
JS_Window_ArrayAllChild(JS)JS_Window_ArrayAllTop(JS)JS_Window_ArrayFind(JS)
JS_Window_AttachResizeGrip(JS)JS_Window_AttachTopmostPin(JS)JS_Window_ClientToScreen(JS)
JS_Window_Create(JS)JS_Window_Destroy(JS)JS_Window_Enable(JS)
JS_Window_EnableMetal(JS)JS_Window_Find(JS)JS_Window_FindChild(JS)
JS_Window_FindChildByID(JS)JS_Window_FindEx(JS)JS_Window_FindTop(JS)
JS_Window_FromPoint(JS)JS_Window_GetClassName(JS)JS_Window_GetClientRect(JS)
JS_Window_GetClientSize(JS)JS_Window_GetFocus(JS)JS_Window_GetForeground(JS)
JS_Window_GetLong(JS)JS_Window_GetLongPtr(JS)JS_Window_GetParent(JS)
JS_Window_GetRect(JS)JS_Window_GetRelated(JS)JS_Window_GetScrollInfo(JS)
JS_Window_GetTitle(JS)JS_Window_GetViewportFromRect(JS)JS_Window_HandleFromAddress(JS)
JS_Window_InvalidateRect(JS)JS_Window_IsChild(JS)JS_Window_IsVisible(JS)
JS_Window_IsWindow(JS)JS_Window_ListAllChild(JS)JS_Window_ListAllTop(JS)
JS_Window_ListFind(JS)JS_Window_MonitorFromRect(JS)JS_Window_Move(JS)
JS_Window_OnCommand(JS)JS_Window_RemoveXPStyle(JS)JS_Window_Resize(JS)
JS_Window_ScreenToClient(JS)JS_Window_SetFocus(JS)JS_Window_SetForeground(JS)
JS_Window_SetLong(JS)JS_Window_SetOpacity(JS)JS_Window_SetParent(JS)
JS_Window_SetPosition(JS)JS_Window_SetScrollPos(JS)JS_Window_SetStyle(JS)
JS_Window_SetTitle(JS)JS_Window_SetZOrder(JS)JS_Window_Show(JS)
JS_Window_Update(JS)Xen_AudioWriter_Create(JS)Xen_AudioWriter_Destroy(JS)
Xen_AudioWriter_Write(JS)Xen_GetMediaSourceSamples(JS)Xen_StartSourcePreview(JS)
Xen_StopSourcePreview(JS)  

^ Joystick Management

joystick_createjoystick_destroyjoystick_enum
joystick_getaxisjoystick_getbuttonmaskjoystick_getinfo
joystick_getpovjoystick_update 

^ MIDI Management

BR_GetMidiSourceLenPPQ(SWS)BR_GetMidiTakePoolGUID(SWS)BR_GetMidiTakeTempoInfo(SWS)
BR_IsMidiOpenInInlineEditor(SWS)BR_IsTakeMidi(SWS)BR_MIDI_CCLaneRemove(SWS)
BR_MIDI_CCLaneReplace(SWS)BR_SetMidiTakeTempoInfo(SWS)EnumTrackMIDIProgramNames
EnumTrackMIDIProgramNamesExFNG_AddMidiNote(SWS)FNG_AllocMidiTake(SWS)
FNG_CountMidiNotes(SWS)FNG_FreeMidiTake(SWS)FNG_GetMidiNote(SWS)
FNG_GetMidiNoteIntProperty(SWS)FNG_SetMidiNoteIntProperty(SWS)GetTrackMIDILyrics
GetTrackMIDINoteNameGetTrackMIDINoteNameExGetTrackMIDINoteRange
HasTrackMIDIProgramsHasTrackMIDIProgramsExMIDIEditor_EnumTakes
MIDIEditor_GetActiveMIDIEditor_GetModeMIDIEditor_GetSetting_int
MIDIEditor_GetSetting_strMIDIEditor_GetTakeMIDIEditor_LastFocused_OnCommand
MIDIEditor_OnCommandMIDIEditor_SetSetting_intMIDI_CountEvts
MIDI_DeleteCCMIDI_DeleteEvtMIDI_DeleteNote
MIDI_DeleteTextSysexEvtMIDI_DisableSortMIDI_EnumSelCC
MIDI_EnumSelEvtsMIDI_EnumSelNotesMIDI_EnumSelTextSysexEvts
MIDI_GetAllEvtsMIDI_GetCCMIDI_GetCCShape
MIDI_GetEvtMIDI_GetGridMIDI_GetHash
MIDI_GetNoteMIDI_GetPPQPosFromProjQNMIDI_GetPPQPosFromProjTime
MIDI_GetPPQPos_EndOfMeasureMIDI_GetPPQPos_StartOfMeasureMIDI_GetProjQNFromPPQPos
MIDI_GetProjTimeFromPPQPosMIDI_GetRecentInputEventMIDI_GetScale
MIDI_GetTextSysexEvtMIDI_GetTrackHashMIDI_InsertCC
MIDI_InsertEvtMIDI_InsertNoteMIDI_InsertTextSysexEvt
MIDI_SelectAllMIDI_SetAllEvtsMIDI_SetCC
MIDI_SetCCShapeMIDI_SetEvtMIDI_SetItemExtents
MIDI_SetNoteMIDI_SetTextSysexEvtMIDI_Sort
SetMIDIEditorGridSetTrackMIDILyricsSetTrackMIDINoteName
SetTrackMIDINoteNameExStuffMIDIMessageTakeIsMIDI
midi_reinit  

^ Marker Management

AddProjectMarkerAddProjectMarker2AddTempoTimeSigMarker
CountProjectMarkersCountTempoTimeSigMarkersDeleteProjectMarker
DeleteProjectMarkerByIndexDeleteTakeMarkerDeleteTakeStretchMarkers
DeleteTempoTimeSigMarkerEditTempoTimeSigMarkerEnumProjectMarkers
EnumProjectMarkers2EnumProjectMarkers3FindTempoTimeSigMarker
GetLastMarkerAndCurRegionGetNumTakeMarkersGetProjectTimeSignature
GetProjectTimeSignature2GetTakeMarkerGetTakeNumStretchMarkers
GetTakeStretchMarkerGetTakeStretchMarkerSlopeGetTempoTimeSigMarker
NF_GetSWSMarkerRegionSub(SWS)NF_SetSWSMarkerRegionSub(SWS)SNM_GetProjectMarkerName(SWS)
SNM_SetProjectMarker(SWS)SetProjectMarkerSetProjectMarker2
SetProjectMarker3SetProjectMarker4SetProjectMarkerByIndex
SetProjectMarkerByIndex2SetTakeMarkerSetTakeStretchMarker
SetTakeStretchMarkerSlopeSetTempoTimeSigMarker 

^ Mediaitem Management

AddMediaItemToTrackAddTakeToMediaItemApplyNudge
BR_GetMediaItemByGUID(SWS)BR_GetMediaItemGUID(SWS)BR_GetMediaItemImageResource(SWS)
BR_GetMediaItemTakeGUID(SWS)BR_GetMediaSourceProperties(SWS)BR_GetMediaTrackFreezeCount(SWS)
BR_SetItemEdges(SWS)BR_SetMediaItemImageResource(SWS)BR_SetMediaSourceProperties(SWS)
BR_SetTakeSourceFromFile(SWS)BR_SetTakeSourceFromFile2(SWS)CountMediaItems
CountSelectedMediaItemsCountTakeEnvelopesCountTakes
CountTrackMediaItemsCreateNewMIDIItemInProjDeleteTrackMediaItem
GetActiveTakeGetDisplayedMediaItemColorGetDisplayedMediaItemColor2
GetItemFromPointGetItemProjectContextGetItemStateChunk
GetMediaItemGetMediaItemInfo_ValueGetMediaItemNumTakes
GetMediaItemTakeGetMediaItemTakeByGUIDGetMediaItemTakeInfo_Value
GetMediaItemTake_ItemGetMediaItemTake_PeaksGetMediaItemTake_Source
GetMediaItemTake_TrackGetSelectedMediaItemGetSetItemState
GetSetItemState2GetSetMediaItemInfo_StringGetSetMediaItemTakeInfo_String
GetTakeGetTakeNameGetTrackMediaItem
IsMediaItemSelectedMoveMediaItemToTrackSNM_GetMediaItemTakeByGUID(SWS)
SNM_GetSetSourceState(SWS)SNM_GetSetSourceState2(SWS)SNM_GetSourceType(SWS)
SelectAllMediaItemsSetActiveTakeSetItemStateChunk
SetMediaItemInfo_ValueSetMediaItemLengthSetMediaItemPosition
SetMediaItemSelectedSetMediaItemTakeInfo_ValueSetMediaItemTake_Source
SplitMediaItemULT_GetMediaItemNote(SWS)ULT_SetMediaItemNote(SWS)
UpdateItemInProject  

^ MetaData Management

CF_GetMediaSourceMetadata(SWS)NF_TakeFX_GetModuleName(SWS) 

^ Miscellaneous

ArmCommandCSurf_FlushUndoCSurf_SetTrackListChange
EnsureNotCompletelyOffscreenGetArmedCommandGetThingFromPoint
Help_SetMain_UpdateLoopInfoMarkTrackItemsDirty
MediaItemDescendsFromTrackRenderFileSectionSNM_GetSetObjectState(SWS)
SNM_SelectResourceBookmark(SWS)SNM_TieResourceSlotActions(SWS)SetRegionRenderMatrix
Splash_GetWndTimeMap2_GetDividedBpmAtTimeTimeMap2_GetNextChangeTime
TimeMap2_QNToTimeTimeMap2_beatsToTimeTimeMap2_timeToBeats
TimeMap2_timeToQNTimeMap_GetDividedBpmAtTimeTimeMap_GetMeasureInfo
TimeMap_GetMetronomePatternTimeMap_GetTimeSigAtTimeTimeMap_QNToMeasures
TimeMap_QNToTimeTimeMap_QNToTime_absTimeMap_curFrameRate
TimeMap_timeToQNTimeMap_timeToQN_absTrackList_UpdateAllExternalSurfaces

^ Osara

osara_outputMessage  

^ Pitchshifting

EnumPitchShiftModesEnumPitchShiftSubModes 

^ Project Management

BR_GetClosestGridDivision(SWS)BR_GetNextGridDivision(SWS)BR_GetPrevGridDivision(SWS)
CSurf_OnTempoChangeEnumProjExtStateEnumProjects
EnumRegionRenderMatrixGetCurrentProjectInLoadSaveGetFreeDiskSpaceForRecordPath
GetProjExtStateGetProjectLengthGetProjectName
GetProjectPathGetProjectPathExGetProjectStateChangeCount
GetProjectTimeOffsetGetSetProjectAuthorGetSetProjectGrid
GetSetProjectInfoGetSetProjectInfo_StringGetSetProjectNotes
IsProjectDirtyMain_SaveProjectMain_openProject
MarkProjectDirtySelectProjectInstanceSetCurrentBPM
SetProjExtStateSetProjectGridSnapToGrid
Undo_BeginBlockUndo_BeginBlock2Undo_CanRedo2
Undo_CanUndo2Undo_DoRedo2Undo_DoUndo2
Undo_EndBlockUndo_EndBlock2Undo_OnStateChange
Undo_OnStateChange2Undo_OnStateChangeExUndo_OnStateChangeEx2
Undo_OnStateChange_Item  

^ ReaBlink

Blink_GetBeatAtTimeBlink_GetClockNowBlink_GetEnabled
Blink_GetMasterBlink_GetNumPeersBlink_GetPhaseAtTime
Blink_GetPlayingBlink_GetPuppetBlink_GetQuantum
Blink_GetStartStopSyncEnabledBlink_GetTempoBlink_GetTimeAtBeat
Blink_GetTimeForPlayingBlink_GetVersionBlink_SetBeatAtStartPlayingTimeRequest
Blink_SetBeatAtTimeForceBlink_SetBeatAtTimeRequestBlink_SetCaptureTransportCommands
Blink_SetEnabledBlink_SetMasterBlink_SetPlaying
Blink_SetPlayingAndBeatAtTimeRequestBlink_SetPuppetBlink_SetQuantum
Blink_SetStartStopSyncEnabledBlink_SetTempoBlink_SetTempoAtTime
Blink_StartStop  

^ ReaImGui

ImGui_AcceptDragDropPayloadImGui_AcceptDragDropPayloadImGui_AcceptDragDropPayloadFiles
ImGui_AcceptDragDropPayloadFilesImGui_AcceptDragDropPayloadRGBImGui_AcceptDragDropPayloadRGB
ImGui_AcceptDragDropPayloadRGBAImGui_AcceptDragDropPayloadRGBAImGui_AlignTextToFramePadding
ImGui_AlignTextToFramePaddingImGui_ArrowButtonImGui_ArrowButton
ImGui_AttachFontImGui_AttachFontImGui_Begin
ImGui_BeginImGui_BeginChildImGui_BeginChild
ImGui_BeginChildFrameImGui_BeginChildFrameImGui_BeginCombo
ImGui_BeginComboImGui_BeginDisabledImGui_BeginDisabled
ImGui_BeginDragDropSourceImGui_BeginDragDropSourceImGui_BeginDragDropTarget
ImGui_BeginDragDropTargetImGui_BeginGroupImGui_BeginGroup
ImGui_BeginListBoxImGui_BeginListBoxImGui_BeginMenu
ImGui_BeginMenuImGui_BeginMenuBarImGui_BeginMenuBar
ImGui_BeginPopupImGui_BeginPopupImGui_BeginPopupContextItem
ImGui_BeginPopupContextWindowImGui_BeginPopupModalImGui_BeginTabBar
ImGui_BeginTabItemImGui_BeginTableImGui_BeginTooltip
ImGui_BulletImGui_BulletTextImGui_Button
ImGui_ButtonFlags_MouseButtonLeftImGui_ButtonFlags_MouseButtonMiddleImGui_ButtonFlags_MouseButtonRight
ImGui_ButtonFlags_NoneImGui_CalcItemWidthImGui_CalcTextSize
ImGui_CaptureKeyboardFromAppImGui_CheckboxImGui_CheckboxFlags
ImGui_CloseCurrentPopupImGui_Col_BorderImGui_Col_BorderShadow
ImGui_Col_ButtonImGui_Col_ButtonActiveImGui_Col_ButtonHovered
ImGui_Col_CheckMarkImGui_Col_ChildBgImGui_Col_DockingEmptyBg
ImGui_Col_DockingPreviewImGui_Col_DragDropTargetImGui_Col_FrameBg
ImGui_Col_FrameBgActiveImGui_Col_FrameBgHoveredImGui_Col_Header
ImGui_Col_HeaderActiveImGui_Col_HeaderHoveredImGui_Col_MenuBarBg
ImGui_Col_ModalWindowDimBgImGui_Col_NavHighlightImGui_Col_NavWindowingDimBg
ImGui_Col_NavWindowingHighlightImGui_Col_PlotHistogramImGui_Col_PlotHistogramHovered
ImGui_Col_PlotLinesImGui_Col_PlotLinesHoveredImGui_Col_PopupBg
ImGui_Col_ResizeGripImGui_Col_ResizeGripActiveImGui_Col_ResizeGripHovered
ImGui_Col_ScrollbarBgImGui_Col_ScrollbarGrabImGui_Col_ScrollbarGrabActive
ImGui_Col_ScrollbarGrabHoveredImGui_Col_SeparatorImGui_Col_SeparatorActive
ImGui_Col_SeparatorHoveredImGui_Col_SliderGrabImGui_Col_SliderGrabActive
ImGui_Col_TabImGui_Col_TabActiveImGui_Col_TabHovered
ImGui_Col_TabUnfocusedImGui_Col_TabUnfocusedActiveImGui_Col_TableBorderLight
ImGui_Col_TableBorderStrongImGui_Col_TableHeaderBgImGui_Col_TableRowBg
ImGui_Col_TableRowBgAltImGui_Col_TextImGui_Col_TextDisabled
ImGui_Col_TextSelectedBgImGui_Col_TitleBgImGui_Col_TitleBgActive
ImGui_Col_TitleBgCollapsedImGui_Col_WindowBgImGui_CollapsingHeader
ImGui_ColorButtonImGui_ColorConvertHSVtoRGBImGui_ColorConvertNative
ImGui_ColorConvertRGBtoHSVImGui_ColorEdit3ImGui_ColorEdit4
ImGui_ColorEditFlags_AlphaBarImGui_ColorEditFlags_AlphaPreviewImGui_ColorEditFlags_AlphaPreviewHalf
ImGui_ColorEditFlags_DisplayHSVImGui_ColorEditFlags_DisplayHexImGui_ColorEditFlags_DisplayRGB
ImGui_ColorEditFlags_FloatImGui_ColorEditFlags_InputHSVImGui_ColorEditFlags_InputRGB
ImGui_ColorEditFlags_NoAlphaImGui_ColorEditFlags_NoBorderImGui_ColorEditFlags_NoDragDrop
ImGui_ColorEditFlags_NoInputsImGui_ColorEditFlags_NoLabelImGui_ColorEditFlags_NoOptions
ImGui_ColorEditFlags_NoPickerImGui_ColorEditFlags_NoSidePreviewImGui_ColorEditFlags_NoSmallPreview
ImGui_ColorEditFlags_NoTooltipImGui_ColorEditFlags_NoneImGui_ColorEditFlags_PickerHueBar
ImGui_ColorEditFlags_PickerHueWheelImGui_ColorEditFlags_Uint8ImGui_ColorPicker3
ImGui_ColorPicker4ImGui_ComboImGui_ComboFlags_HeightLarge
ImGui_ComboFlags_HeightLargestImGui_ComboFlags_HeightRegularImGui_ComboFlags_HeightSmall
ImGui_ComboFlags_NoArrowButtonImGui_ComboFlags_NoPreviewImGui_ComboFlags_None
ImGui_ComboFlags_PopupAlignLeftImGui_Cond_AlwaysImGui_Cond_Appearing
ImGui_Cond_FirstUseEverImGui_Cond_OnceImGui_ConfigFlags_DockingEnable
ImGui_ConfigFlags_NavEnableKeyboardImGui_ConfigFlags_NavEnableSetMousePosImGui_ConfigFlags_NoMouse
ImGui_ConfigFlags_NoMouseCursorChangeImGui_ConfigFlags_NoSavedSettingsImGui_ConfigFlags_None
ImGui_CreateContextImGui_CreateFontImGui_CreateListClipper
ImGui_CreateTextFilterImGui_DestroyContextImGui_DetachFont
ImGui_Dir_DownImGui_Dir_LeftImGui_Dir_None
ImGui_Dir_RightImGui_Dir_UpImGui_DragDouble
ImGui_DragDouble2ImGui_DragDouble3ImGui_DragDouble4
ImGui_DragDoubleNImGui_DragDropFlags_AcceptBeforeDeliveryImGui_DragDropFlags_AcceptNoDrawDefaultRect
ImGui_DragDropFlags_AcceptNoPreviewTooltipImGui_DragDropFlags_AcceptPeekOnlyImGui_DragDropFlags_None
ImGui_DragDropFlags_SourceAllowNullIDImGui_DragDropFlags_SourceAutoExpirePayloadImGui_DragDropFlags_SourceExtern
ImGui_DragDropFlags_SourceNoDisableHoverImGui_DragDropFlags_SourceNoHoldToOpenOthersImGui_DragDropFlags_SourceNoPreviewTooltip
ImGui_DragFloatRange2ImGui_DragIntImGui_DragInt2
ImGui_DragInt3ImGui_DragInt4ImGui_DragIntRange2
ImGui_DrawFlags_ClosedImGui_DrawFlags_NoneImGui_DrawFlags_RoundCornersAll
ImGui_DrawFlags_RoundCornersBottomImGui_DrawFlags_RoundCornersBottomLeftImGui_DrawFlags_RoundCornersBottomRight
ImGui_DrawFlags_RoundCornersLeftImGui_DrawFlags_RoundCornersNoneImGui_DrawFlags_RoundCornersRight
ImGui_DrawFlags_RoundCornersTopImGui_DrawFlags_RoundCornersTopLeftImGui_DrawFlags_RoundCornersTopRight
ImGui_DrawList_AddBezierCubicImGui_DrawList_AddBezierQuadraticImGui_DrawList_AddCircle
ImGui_DrawList_AddCircleFilledImGui_DrawList_AddConvexPolyFilledImGui_DrawList_AddLine
ImGui_DrawList_AddNgonImGui_DrawList_AddNgonFilledImGui_DrawList_AddPolyline
ImGui_DrawList_AddQuadImGui_DrawList_AddQuadFilledImGui_DrawList_AddRect
ImGui_DrawList_AddRectFilledImGui_DrawList_AddRectFilledMultiColorImGui_DrawList_AddText
ImGui_DrawList_AddTextExImGui_DrawList_AddTriangleImGui_DrawList_AddTriangleFilled
ImGui_DrawList_PathArcToImGui_DrawList_PathArcToFastImGui_DrawList_PathBezierCubicCurveTo
ImGui_DrawList_PathBezierQuadraticCurveToImGui_DrawList_PathClearImGui_DrawList_PathFillConvex
ImGui_DrawList_PathLineToImGui_DrawList_PathRectImGui_DrawList_PathStroke
ImGui_DrawList_PopClipRectImGui_DrawList_PushClipRectImGui_DrawList_PushClipRectFullScreen
ImGui_DummyImGui_EndImGui_EndChild
ImGui_EndChildFrameImGui_EndComboImGui_EndDisabled
ImGui_EndDragDropSourceImGui_EndDragDropTargetImGui_EndGroup
ImGui_EndListBoxImGui_EndMenuImGui_EndMenuBar
ImGui_EndPopupImGui_EndTabBarImGui_EndTabItem
ImGui_EndTableImGui_EndTooltipImGui_FocusedFlags_AnyWindow
ImGui_FocusedFlags_ChildWindowsImGui_FocusedFlags_NoneImGui_FocusedFlags_RootAndChildWindows
ImGui_FocusedFlags_RootWindowImGui_FontFlags_BoldImGui_FontFlags_Italic
ImGui_FontFlags_NoneImGui_GetBackgroundDrawListImGui_GetClipboardText
ImGui_GetColorImGui_GetColorExImGui_GetConfigFlags
ImGui_GetContentRegionAvailImGui_GetContentRegionMaxImGui_GetCursorPos
ImGui_GetCursorPosXImGui_GetCursorPosYImGui_GetCursorScreenPos
ImGui_GetCursorStartPosImGui_GetDeltaTimeImGui_GetDragDropPayload
ImGui_GetDragDropPayloadFileImGui_GetFontImGui_GetFontSize
ImGui_GetForegroundDrawListImGui_GetFrameCountImGui_GetFrameHeight
ImGui_GetFrameHeightWithSpacingImGui_GetInputQueueCharacterImGui_GetItemRectMax
ImGui_GetItemRectMinImGui_GetItemRectSizeImGui_GetKeyDownDuration
ImGui_GetKeyModsImGui_GetKeyPressedAmountImGui_GetMainViewport
ImGui_GetMouseClickedPosImGui_GetMouseCursorImGui_GetMouseDelta
ImGui_GetMouseDownDurationImGui_GetMouseDragDeltaImGui_GetMousePos
ImGui_GetMousePosOnOpeningCurrentPopupImGui_GetMouseWheelImGui_GetScrollMaxX
ImGui_GetScrollMaxYImGui_GetScrollXImGui_GetScrollY
ImGui_GetStyleColorImGui_GetStyleColorNameImGui_GetStyleVar
ImGui_GetTextLineHeightImGui_GetTextLineHeightWithSpacingImGui_GetTime
ImGui_GetTreeNodeToLabelSpacingImGui_GetVersionImGui_GetWindowContentRegionMax
ImGui_GetWindowContentRegionMinImGui_GetWindowContentRegionWidthImGui_GetWindowDockID
ImGui_GetWindowDrawListImGui_GetWindowHeightImGui_GetWindowPos
ImGui_GetWindowSizeImGui_GetWindowWidthImGui_HoveredFlags_AllowWhenBlockedByActiveItem
ImGui_HoveredFlags_AllowWhenBlockedByPopupImGui_HoveredFlags_AllowWhenDisabledImGui_HoveredFlags_AllowWhenOverlapped
ImGui_HoveredFlags_AnyWindowImGui_HoveredFlags_ChildWindowsImGui_HoveredFlags_None
ImGui_HoveredFlags_RectOnlyImGui_HoveredFlags_RootAndChildWindowsImGui_HoveredFlags_RootWindow
ImGui_IndentImGui_InputDoubleImGui_InputDouble2
ImGui_InputDouble3ImGui_InputDouble4ImGui_InputDoubleN
ImGui_InputIntImGui_InputInt2ImGui_InputInt3
ImGui_InputInt4ImGui_InputTextImGui_InputTextFlags_AllowTabInput
ImGui_InputTextFlags_AlwaysOverwriteImGui_InputTextFlags_AutoSelectAllImGui_InputTextFlags_CharsDecimal
ImGui_InputTextFlags_CharsHexadecimalImGui_InputTextFlags_CharsNoBlankImGui_InputTextFlags_CharsScientific
ImGui_InputTextFlags_CharsUppercaseImGui_InputTextFlags_CtrlEnterForNewLineImGui_InputTextFlags_EnterReturnsTrue
ImGui_InputTextFlags_NoHorizontalScrollImGui_InputTextFlags_NoUndoRedoImGui_InputTextFlags_None
ImGui_InputTextFlags_PasswordImGui_InputTextFlags_ReadOnlyImGui_InputTextMultiline
ImGui_InputTextWithHintImGui_InvisibleButtonImGui_IsAnyItemActive
ImGui_IsAnyItemFocusedImGui_IsAnyItemHoveredImGui_IsAnyMouseDown
ImGui_IsItemActivatedImGui_IsItemActiveImGui_IsItemClicked
ImGui_IsItemDeactivatedImGui_IsItemDeactivatedAfterEditImGui_IsItemEdited
ImGui_IsItemFocusedImGui_IsItemHoveredImGui_IsItemToggledOpen
ImGui_IsItemVisibleImGui_IsKeyDownImGui_IsKeyPressed
ImGui_IsKeyReleasedImGui_IsMouseClickedImGui_IsMouseDoubleClicked
ImGui_IsMouseDownImGui_IsMouseDraggingImGui_IsMouseHoveringRect
ImGui_IsMousePosValidImGui_IsMouseReleasedImGui_IsPopupOpen
ImGui_IsRectVisibleImGui_IsRectVisibleExImGui_IsWindowAppearing
ImGui_IsWindowCollapsedImGui_IsWindowDockedImGui_IsWindowFocused
ImGui_IsWindowHoveredImGui_KeyModFlags_AltImGui_KeyModFlags_Ctrl
ImGui_KeyModFlags_NoneImGui_KeyModFlags_ShiftImGui_KeyModFlags_Super
ImGui_LabelTextImGui_ListBoxImGui_ListClipper_Begin
ImGui_ListClipper_EndImGui_ListClipper_GetDisplayRangeImGui_ListClipper_Step
ImGui_LogFinishImGui_LogTextImGui_LogToClipboard
ImGui_LogToFileImGui_LogToTTYImGui_MenuItem
ImGui_MouseButton_LeftImGui_MouseButton_MiddleImGui_MouseButton_Right
ImGui_MouseCursor_ArrowImGui_MouseCursor_HandImGui_MouseCursor_NotAllowed
ImGui_MouseCursor_ResizeAllImGui_MouseCursor_ResizeEWImGui_MouseCursor_ResizeNESW
ImGui_MouseCursor_ResizeNSImGui_MouseCursor_ResizeNWSEImGui_MouseCursor_TextInput
ImGui_NewLineImGui_NumericLimits_FloatImGui_OpenPopup
ImGui_OpenPopupOnItemClickImGui_PlotHistogramImGui_PlotLines
ImGui_PointConvertNativeImGui_PopAllowKeyboardFocusImGui_PopButtonRepeat
ImGui_PopClipRectImGui_PopFontImGui_PopID
ImGui_PopItemWidthImGui_PopStyleColorImGui_PopStyleVar
ImGui_PopTextWrapPosImGui_PopupFlags_AnyPopupImGui_PopupFlags_AnyPopupId
ImGui_PopupFlags_AnyPopupLevelImGui_PopupFlags_MouseButtonLeftImGui_PopupFlags_MouseButtonMiddle
ImGui_PopupFlags_MouseButtonRightImGui_PopupFlags_NoOpenOverExistingPopupImGui_PopupFlags_NoOpenOverItems
ImGui_PopupFlags_NoneImGui_ProgressBarImGui_PushAllowKeyboardFocus
ImGui_PushButtonRepeatImGui_PushClipRectImGui_PushFont
ImGui_PushIDImGui_PushItemWidthImGui_PushStyleColor
ImGui_PushStyleVarImGui_PushTextWrapPosImGui_RadioButton
ImGui_RadioButtonExImGui_ResetMouseDragDeltaImGui_SameLine
ImGui_SelectableImGui_SelectableFlags_AllowDoubleClickImGui_SelectableFlags_AllowItemOverlap
ImGui_SelectableFlags_DisabledImGui_SelectableFlags_DontClosePopupsImGui_SelectableFlags_None
ImGui_SelectableFlags_SpanAllColumnsImGui_SeparatorImGui_SetClipboardText
ImGui_SetColorEditOptionsImGui_SetConfigFlagsImGui_SetCursorPos
ImGui_SetCursorPosXImGui_SetCursorPosYImGui_SetCursorScreenPos
ImGui_SetDragDropPayloadImGui_SetItemAllowOverlapImGui_SetItemDefaultFocus
ImGui_SetKeyboardFocusHereImGui_SetMouseCursorImGui_SetNextItemOpen
ImGui_SetNextItemWidthImGui_SetNextWindowBgAlphaImGui_SetNextWindowCollapsed
ImGui_SetNextWindowContentSizeImGui_SetNextWindowDockIDImGui_SetNextWindowFocus
ImGui_SetNextWindowPosImGui_SetNextWindowSizeImGui_SetNextWindowSizeConstraints
ImGui_SetScrollFromPosXImGui_SetScrollFromPosYImGui_SetScrollHereX
ImGui_SetScrollHereYImGui_SetScrollXImGui_SetScrollY
ImGui_SetTabItemClosedImGui_SetTooltipImGui_SetWindowCollapsed
ImGui_SetWindowCollapsedExImGui_SetWindowFocusImGui_SetWindowFocusEx
ImGui_SetWindowPosImGui_SetWindowPosExImGui_SetWindowSize
ImGui_SetWindowSizeExImGui_ShowAboutWindowImGui_ShowMetricsWindow
ImGui_SliderAngleImGui_SliderDoubleImGui_SliderDouble2
ImGui_SliderDouble3ImGui_SliderDouble4ImGui_SliderDoubleN
ImGui_SliderFlags_AlwaysClampImGui_SliderFlags_LogarithmicImGui_SliderFlags_NoInput
ImGui_SliderFlags_NoRoundToFormatImGui_SliderFlags_NoneImGui_SliderInt
ImGui_SliderInt2ImGui_SliderInt3ImGui_SliderInt4
ImGui_SmallButtonImGui_SortDirection_AscendingImGui_SortDirection_Descending
ImGui_SortDirection_NoneImGui_SpacingImGui_StyleVar_Alpha
ImGui_StyleVar_ButtonTextAlignImGui_StyleVar_CellPaddingImGui_StyleVar_ChildBorderSize
ImGui_StyleVar_ChildRoundingImGui_StyleVar_DisabledAlphaImGui_StyleVar_FrameBorderSize
ImGui_StyleVar_FramePaddingImGui_StyleVar_FrameRoundingImGui_StyleVar_GrabMinSize
ImGui_StyleVar_GrabRoundingImGui_StyleVar_IndentSpacingImGui_StyleVar_ItemInnerSpacing
ImGui_StyleVar_ItemSpacingImGui_StyleVar_PopupBorderSizeImGui_StyleVar_PopupRounding
ImGui_StyleVar_ScrollbarRoundingImGui_StyleVar_ScrollbarSizeImGui_StyleVar_SelectableTextAlign
ImGui_StyleVar_TabRoundingImGui_StyleVar_WindowBorderSizeImGui_StyleVar_WindowMinSize
ImGui_StyleVar_WindowPaddingImGui_StyleVar_WindowRoundingImGui_StyleVar_WindowTitleAlign
ImGui_TabBarFlags_AutoSelectNewTabsImGui_TabBarFlags_FittingPolicyResizeDownImGui_TabBarFlags_FittingPolicyScroll
ImGui_TabBarFlags_NoCloseWithMiddleMouseButtonImGui_TabBarFlags_NoTabListScrollingButtonsImGui_TabBarFlags_NoTooltip
ImGui_TabBarFlags_NoneImGui_TabBarFlags_ReorderableImGui_TabBarFlags_TabListPopupButton
ImGui_TabItemButtonImGui_TabItemFlags_LeadingImGui_TabItemFlags_NoCloseWithMiddleMouseButton
ImGui_TabItemFlags_NoPushIdImGui_TabItemFlags_NoReorderImGui_TabItemFlags_NoTooltip
ImGui_TabItemFlags_NoneImGui_TabItemFlags_SetSelectedImGui_TabItemFlags_Trailing
ImGui_TabItemFlags_UnsavedDocumentImGui_TableBgTarget_CellBgImGui_TableBgTarget_None
ImGui_TableBgTarget_RowBg0ImGui_TableBgTarget_RowBg1ImGui_TableColumnFlags_DefaultHide
ImGui_TableColumnFlags_DefaultSortImGui_TableColumnFlags_DisabledImGui_TableColumnFlags_IndentDisable
ImGui_TableColumnFlags_IndentEnableImGui_TableColumnFlags_IsEnabledImGui_TableColumnFlags_IsHovered
ImGui_TableColumnFlags_IsSortedImGui_TableColumnFlags_IsVisibleImGui_TableColumnFlags_NoClip
ImGui_TableColumnFlags_NoHeaderLabelImGui_TableColumnFlags_NoHeaderWidthImGui_TableColumnFlags_NoHide
ImGui_TableColumnFlags_NoReorderImGui_TableColumnFlags_NoResizeImGui_TableColumnFlags_NoSort
ImGui_TableColumnFlags_NoSortAscendingImGui_TableColumnFlags_NoSortDescendingImGui_TableColumnFlags_None
ImGui_TableColumnFlags_PreferSortAscendingImGui_TableColumnFlags_PreferSortDescendingImGui_TableColumnFlags_WidthFixed
ImGui_TableColumnFlags_WidthStretchImGui_TableFlags_BordersImGui_TableFlags_BordersH
ImGui_TableFlags_BordersInnerImGui_TableFlags_BordersInnerHImGui_TableFlags_BordersInnerV
ImGui_TableFlags_BordersOuterImGui_TableFlags_BordersOuterHImGui_TableFlags_BordersOuterV
ImGui_TableFlags_BordersVImGui_TableFlags_ContextMenuInBodyImGui_TableFlags_Hideable
ImGui_TableFlags_NoClipImGui_TableFlags_NoHostExtendXImGui_TableFlags_NoHostExtendY
ImGui_TableFlags_NoKeepColumnsVisibleImGui_TableFlags_NoPadInnerXImGui_TableFlags_NoPadOuterX
ImGui_TableFlags_NoSavedSettingsImGui_TableFlags_NoneImGui_TableFlags_PadOuterX
ImGui_TableFlags_PreciseWidthsImGui_TableFlags_ReorderableImGui_TableFlags_Resizable
ImGui_TableFlags_RowBgImGui_TableFlags_ScrollXImGui_TableFlags_ScrollY
ImGui_TableFlags_SizingFixedFitImGui_TableFlags_SizingFixedSameImGui_TableFlags_SizingStretchProp
ImGui_TableFlags_SizingStretchSameImGui_TableFlags_SortMultiImGui_TableFlags_SortTristate
ImGui_TableFlags_SortableImGui_TableGetColumnCountImGui_TableGetColumnFlags
ImGui_TableGetColumnIndexImGui_TableGetColumnNameImGui_TableGetColumnSortSpecs
ImGui_TableGetRowIndexImGui_TableHeaderImGui_TableHeadersRow
ImGui_TableNeedSortImGui_TableNextColumnImGui_TableNextRow
ImGui_TableRowFlags_HeadersImGui_TableRowFlags_NoneImGui_TableSetBgColor
ImGui_TableSetColumnEnabledImGui_TableSetColumnIndexImGui_TableSetupColumn
ImGui_TableSetupScrollFreezeImGui_TextImGui_TextColored
ImGui_TextDisabledImGui_TextFilter_ClearImGui_TextFilter_Draw
ImGui_TextFilter_GetImGui_TextFilter_IsActiveImGui_TextFilter_PassFilter
ImGui_TextFilter_SetImGui_TextWrappedImGui_TreeNode
ImGui_TreeNodeExImGui_TreeNodeFlags_AllowItemOverlapImGui_TreeNodeFlags_Bullet
ImGui_TreeNodeFlags_CollapsingHeaderImGui_TreeNodeFlags_DefaultOpenImGui_TreeNodeFlags_FramePadding
ImGui_TreeNodeFlags_FramedImGui_TreeNodeFlags_LeafImGui_TreeNodeFlags_NoAutoOpenOnLog
ImGui_TreeNodeFlags_NoTreePushOnOpenImGui_TreeNodeFlags_NoneImGui_TreeNodeFlags_OpenOnArrow
ImGui_TreeNodeFlags_OpenOnDoubleClickImGui_TreeNodeFlags_SelectedImGui_TreeNodeFlags_SpanAvailWidth
ImGui_TreeNodeFlags_SpanFullWidthImGui_TreePopImGui_TreePush
ImGui_UnindentImGui_VSliderDoubleImGui_VSliderInt
ImGui_ValidatePtrImGui_Viewport_GetCenterImGui_Viewport_GetPos
ImGui_Viewport_GetSizeImGui_Viewport_GetWorkCenterImGui_Viewport_GetWorkPos
ImGui_Viewport_GetWorkSizeImGui_WindowFlags_AlwaysAutoResizeImGui_WindowFlags_AlwaysHorizontalScrollbar
ImGui_WindowFlags_AlwaysUseWindowPaddingImGui_WindowFlags_AlwaysVerticalScrollbarImGui_WindowFlags_HorizontalScrollbar
ImGui_WindowFlags_MenuBarImGui_WindowFlags_NoBackgroundImGui_WindowFlags_NoCollapse
ImGui_WindowFlags_NoDecorationImGui_WindowFlags_NoDockingImGui_WindowFlags_NoFocusOnAppearing
ImGui_WindowFlags_NoInputsImGui_WindowFlags_NoMouseInputsImGui_WindowFlags_NoMove
ImGui_WindowFlags_NoNavImGui_WindowFlags_NoNavFocusImGui_WindowFlags_NoNavInputs
ImGui_WindowFlags_NoResizeImGui_WindowFlags_NoSavedSettingsImGui_WindowFlags_NoScrollWithMouse
ImGui_WindowFlags_NoScrollbarImGui_WindowFlags_NoTitleBarImGui_WindowFlags_None
ImGui_WindowFlags_TopMostImGui_WindowFlags_UnsavedDocument 

^ ReaPack

ReaPack_AboutInstalledPackageReaPack_AboutRepositoryReaPack_AddSetRepository
ReaPack_BrowsePackagesReaPack_CompareVersionsReaPack_EnumOwnedFiles
ReaPack_FreeEntryReaPack_GetEntryInfoReaPack_GetOwner
ReaPack_GetRepositoryInfoReaPack_ProcessQueue 

^ Theme management

GetThemeColorSetThemeColorThemeLayout_GetLayout
ThemeLayout_GetParameterThemeLayout_RefreshAllThemeLayout_SetLayout
ThemeLayout_SetParameter  

^ Track Management

AnyTrackSoloBR_GetMediaTrackByGUID(SWS)BR_GetMediaTrackGUID(SWS)
BR_GetMediaTrackSendInfo_Envelope(SWS)BR_GetMediaTrackSendInfo_Track(SWS)BR_GetSetTrackSendInfo(SWS)
BypassFxAllTracksCSurf_GetTouchStateCSurf_NumTracks
CSurf_OnFXChangeCSurf_OnInputMonitorChangeCSurf_OnInputMonitorChangeEx
CSurf_OnMuteChangeCSurf_OnMuteChangeExCSurf_OnPanChange
CSurf_OnPanChangeExCSurf_OnRecArmChangeCSurf_OnRecArmChangeEx
CSurf_OnRecvPanChangeCSurf_OnRecvVolumeChangeCSurf_OnSelectedChange
CSurf_OnSendPanChangeCSurf_OnSendVolumeChangeCSurf_OnSoloChange
CSurf_OnSoloChangeExCSurf_OnStopCSurf_OnTrackSelection
CSurf_OnVolumeChangeCSurf_OnVolumeChangeExCSurf_OnWidthChange
CSurf_OnWidthChangeExCSurf_ResetAllCachedVolPanStatesCSurf_SetSurfaceMute
CSurf_SetSurfacePanCSurf_SetSurfaceRecArmCSurf_SetSurfaceSelected
CSurf_SetSurfaceSoloCSurf_SetSurfaceVolumeCSurf_TrackFromID
CSurf_TrackToIDClearAllRecArmedCountSelectedTracks
CountSelectedTracks2CountTCPFXParmsCountTracks
CreateTrackSendDeleteTrackGetLastTouchedTrack
GetMasterMuteSoloFlagsGetMasterTrackGetMasterTrackVisibility
GetMediaItemTrackGetMediaItem_TrackGetMediaTrackInfo_Value
GetNumTracksGetParentTrackGetSelectedTrack
GetSelectedTrack2GetSetMediaTrackInfo_StringGetSetTrackGroupMembership
GetSetTrackGroupMembershipHighGetSetTrackSendInfo_StringGetSetTrackState
GetSetTrackState2GetTrackGetTrackColor
GetTrackDepthGetTrackFromPointGetTrackGUID
GetTrackNameGetTrackNumMediaItemsGetTrackNumSends
GetTrackReceiveNameGetTrackReceiveUIMuteGetTrackReceiveUIVolPan
GetTrackSendInfo_ValueGetTrackSendNameGetTrackSendUIMute
GetTrackSendUIVolPanGetTrackStateGetTrackStateChunk
GetTrackUIMuteGetTrackUIPanGetTrackUIVolPan
InsertTrackAtIndexIsTrackSelectedIsTrackVisible
NF_GetSWSTrackNotes(SWS)NF_GetSWS_RMSoptions(SWS)NF_SetSWSTrackNotes(SWS)
NF_SetSWS_RMSoptions(SWS)RemoveTrackSendReorderSelectedTracks
SNM_AddReceive(SWS)SNM_RemoveReceive(SWS)SNM_RemoveReceivesFrom(SWS)
SetMasterTrackVisibilitySetMediaTrackInfo_ValueSetOnlyTrackSelected
SetTrackColorSetTrackSelectedSetTrackSendInfo_Value
SetTrackSendUIPanSetTrackSendUIVolSetTrackStateChunk
SoloAllTracksTrackFX_GetOpenTrackFX_SetOpen
TrackFX_ShowTrack_GetPeakHoldDBTrack_GetPeakInfo

^ Transport Management

CSurf_GoEndCSurf_GoStartCSurf_OnFwd
CSurf_OnPauseCSurf_OnPlayCSurf_OnPlayRateChange
CSurf_OnRecordCSurf_OnRewCSurf_OnRewFwd
CSurf_ScrubAmtCSurf_SetPlayStateCSurf_SetRepeatState
GetAllProjectPlayStatesGetCursorPositionGetCursorPositionEx
GetPlayPositionGetPlayPosition2GetPlayPosition2Ex
GetPlayPositionExGetPlayStateGetPlayStateEx
GetSetRepeatGetSetRepeatExGetSet_LoopTimeRange
GetSet_LoopTimeRange2GoToMarkerGoToRegion
Loop_OnArrowMaster_GetPlayRateMaster_GetPlayRateAtTime
Master_GetTempoMaster_NormalizePlayRateMaster_NormalizeTempo
MoveEditCursorMuteAllTracksOnPauseButton
OnPauseButtonExOnPlayButtonOnPlayButtonEx
OnStopButtonOnStopButtonExSetEditCurPos
SetEditCurPos2  

^ User Interface

BR_GetCurrentTheme(SWS)BR_GetMediaTrackLayouts(SWS)BR_GetMouseCursorContext(SWS)
BR_GetMouseCursorContext_Envelope(SWS)BR_GetMouseCursorContext_Item(SWS)BR_GetMouseCursorContext_MIDI(SWS)
BR_GetMouseCursorContext_Position(SWS)BR_GetMouseCursorContext_StretchMarker(SWS)BR_GetMouseCursorContext_Take(SWS)
BR_GetMouseCursorContext_Track(SWS)BR_ItemAtMouseCursor(SWS)BR_PositionAtMouseCursor(SWS)
BR_SetMediaTrackLayouts(SWS)BR_TakeAtMouseCursor(SWS)BR_TrackAtMouseCursor(SWS)
BR_Win32_GetCursorPos(SWS)CF_LocateInExplorer(SWS)CF_SelectTrackFX(SWS)
DockGetPositionDockIsChildOfDockDockWindowActivate
DockWindowAddDockWindowAddExDockWindowRefresh
DockWindowRefreshForHWNDDockWindowRemoveDock_UpdateDockID
GR_SelectColorGSC_mainwndGetConfigWantsDock
GetLastColorThemeFileGetMainHwndGetMixerScroll
GetMouseModifierGetMousePositionGetTooltipWindow
GetUserFileNameForReadGetUserInputsLICE_ClipLine
MBNF_UpdateSWSMarkerRegionSubWindow(SWS)NF_Win32_GetSystemMetrics(SWS)
OpenColorThemeFileOpenMediaExplorerPreventUIRefresh
PromptForActionRefreshToolbarRefreshToolbar2
SN_FocusMIDIEditor(SWS)SetMixerScrollSetMouseModifier
ShowMessageBoxShowPopupMenuTrackCtl_SetToolTip
ViewPrefsmy_getViewport 

^ Window Management
BR_Win32_CB_FindString(SWS)BR_Win32_CB_FindStringExact(SWS)BR_Win32_ClientToScreen(SWS)
BR_Win32_FindWindowEx(SWS)BR_Win32_GET_X_LPARAM(SWS)BR_Win32_GET_Y_LPARAM(SWS)
BR_Win32_GetFocus(SWS)BR_Win32_GetForegroundWindow(SWS)BR_Win32_GetMainHwnd(SWS)
BR_Win32_GetMixerHwnd(SWS)BR_Win32_GetMonitorRectFromRect(SWS)BR_Win32_GetParent(SWS)
BR_Win32_GetWindow(SWS)BR_Win32_GetWindowLong(SWS)BR_Win32_GetWindowRect(SWS)
BR_Win32_GetWindowText(SWS)BR_Win32_HwndToString(SWS)BR_Win32_IsWindow(SWS)
BR_Win32_IsWindowVisible(SWS)BR_Win32_MIDIEditor_GetActive(SWS)BR_Win32_ScreenToClient(SWS)
BR_Win32_SendMessage(SWS)BR_Win32_SetFocus(SWS)BR_Win32_SetForegroundWindow(SWS)
BR_Win32_SetWindowLong(SWS)BR_Win32_SetWindowPos(SWS)BR_Win32_ShowWindow(SWS)
BR_Win32_StringToHwnd(SWS)BR_Win32_WindowFromPoint(SWS) 


^ 1 Introduction to ReaScript

ReaScript API

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 EEL2, 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.

A script named "__startup.lua|.eel" will be started automatically by Reaper at startup. You can have both; Reaper will run __startup.eel first, __startup.lua second. This __startup-script doesn't need to be registered into the actionlist of Reaper; it's pure existence in the scripts-folder of the resources-folder of Reaper is sufficient for it to be run.

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

This documentation includes the functions provided by SWS: sws-extension.org as well as Julian Sader's plugin, that can be installed via ReaPack.

The IDE in Reaper has some limitations, as every line must not exceed 4095 characters, or they will be split when the script is loaded the next time. It also tries to obey the script's chose character for indentation. So if every line begins with a tab, hitting tab will insert 4 spaces, if every line begins with spaces, hitting tab will insert 2 spaces. The IDE has known issues with Unicode-characters, especially when inserted via Alt+GR. So sometimes it's easier to use an external IDE/editor instead.

The base-directory for files created from ReaScript can be read from the reaper.ini -> [REAPER] -> lastcwd= That means, if you create a new file without giving it a path, it will be created in the path set in lastcwd.

Note: a lot of the functions in this document require 3rd-party-extensions. You can find and install them from here:
SWS: https://www.sws-extension.org
JS-extension: https://forum.cockos.com/showthread.php?t=212174
ReaPack: https://reapack.com/
ReaImGui: https://forum.cockos.com/showthread.php?t=250419
Osara: https://osara.reaperaccessibility.com/
ReaBlink: https://github.com/ak5k/reablink/releases/



^ 2.1 CPP Api-Description

Usage of the Reaper Api in C++

Note: the C++ pure virtual interfaces used require the MSVC-compatible C++ ABI on Win32. Sorry, mingw users.

Reaper extensions: see http://www.cockos.com/reaper/sdk/plugin/plugin.php and reaper_plugin.h. The API functions in this header can be retrieved using reaper_plugin_info_t.GetFunc() or by using the Action "[developer] Write C++ API functions header" directly in Reaper.

VST plugins: see http://www.cockos.com/reaper/sdk/vst/vst_ext.php The API functions in this header can be retrieved using audioMasterCallback.

Because the API is dynamic, callers should never assume a function exists. Check that a non-NULL function pointer was returned before using it (unless loaded functions are verified using REAPERAPI_LoadAPI(), see note below).

New (4.76+) usage of this file: - 1) most source files should just #include "reaper_plugin_functions.h" as is. - 2) one file should #define REAPERAPI_IMPLEMENT before including this file. - 3) the plug-in should call REAPERAPI_LoadAPI(rec->GetFunc) from REAPER_PLUGIN_ENTRYPOINT - and check the return value for errors (REAPERAPI_LoadAPI will return 0 on success).

By default, all functions listed in this file are loaded. This means that an older version of REAPER may not succeed in loading, and also it may bloat your plug-in. If you wish to only load needed functions, #define REAPERAPI_MINIMAL and various #define REAPERAPI_WANT_<functionname> lines before including this file. You must put these definitions where REAPERAPI_IMPLEMENT is defined and you can optionally put them elsewhere (to detect needed REAPERAPI_WANT_xxx lines at compile- time rather than link-time).



^ 2.2 EEL Api-Description

ReaScript/EEL API

For information on the EEL2 language, please see the EEL2 User Guide

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.



^ 2.3 Python Api-Description

ReaScript/Python API

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 *


^ 2.4 Lua Api-Description

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).



^ 3 Datatypes used in this document

Datatypes used in this document

boolean - accepts only true or false as values
optional boolean - a boolean, that can be given, but is not required
number - can be integer, double or a floating-point-number
optional number - a number, that can be given, but is not required
integer - only integer numbers allowed
reaper.array - a special array, that Reaper provides
string - a string of characters/text
optional string - a string, that can be given, but is not required

AudioAccessor - Audio Accessor object for a track or a media-item
BR_Envelope (BR) - an envelope-object, created from a track or take-envelope
HWND - a window
IReaperControlSurface - a ControlSurface, e.g. OSC-devices
joystick_device - a joystick-device
KbdSectionInfo - Keyboard Section Info, - 0, Main
- 100, Main (alt recording)
- 32060, MIDI Editor
- 32061, MIDI Event List Editor
- 32062, MIDI Inline Editor
- 32063, Media Explorer
PCM_source - the audiosource of a MediaItem
ReaProject - a project within Reaper; 0 for current open project(-tab); in EnumProjects, it is an object, not a number!
RprMidiTake (FNG) - ReaperMidiTake as object
RprMidiNote (FNG) - RprMidiNote as object
MediaTrack - a Reaper-Track as object
MediaItem - a Reaper-MediaItem like audio,video, Midi, etc as object
MediaItem_Take - a take within a MediaItem as object
TrackEnvelope - an envelope of a track as object
WDL_FastString(S&M) - a different kind of a string, made into a Reaper-object

deviceHDC - get it using function JS_GDI_GetWindowDC



^ Reaper version 5.62AddCustomizableMenu

C: bool retval = (*AddCustomizableMenu)(const char* menuidstr, const char* menuname, const char* kbdsecname, bool addtomainmenu)

Adds customizable menu.

Returnvalues:
bool retval

Parameters:
const char* menuidstr
is some unique identifying string
const char* menuname
is for main menus only (displayed in a menu bar somewhere), NULL otherwise
const char* kbdsecname
is the name of the KbdSectionInfo registered by this plugin, or NULL for the main actions section
bool addtomainmenu
true, add to main menu; false, don't add to main menu


^ Reaper version 5.62AddExtensionsMainMenu

C: bool retval = (*AddExtensionsMainMenu)()

Add an Extensions main menu, which the extension can populate/modify with plugin_register("hookcustommenu")


Returnvalues:
bool retval


^ Reaper version 5.62Audio_RegHardwareHook

C: int retval = (*Audio_RegHardwareHook)(bool isAdd, audio_hook_register_t* reg)

Registers Audio Hardware-Hook.

Returnvalues:
int retval

Parameters:
bool isAdd
audio_hook_register_t* reg


^ Reaper version 5.62CSurf_OnOscControlMessage

C: void (*CSurf_OnOscControlMessage)(const char* msg, const float* arg)

On OSC Control Message.

Parameters:
const char* msg
const float* arg


^ Reaper version 5.62CalculatePeaks

C: int retval = (*CalculatePeaks)(PCM_source_transfer_t* srcBlock, PCM_source_peaktransfer_t* pksBlock)

Calculates Peaks.

Returnvalues:
int retval

Parameters:
PCM_source_transfer_t* srcBlock
PCM_source_peaktransfer_t* pksBlock


^ Reaper version 5.62CalculatePeaksFloatSrcPtr

C: int retval = (*CalculatePeaksFloatSrcPtr)(PCM_source_transfer_t* srcBlock, PCM_source_peaktransfer_t* pksBlock)

Calculates Peaks.

Returnvalues:
int retval

Parameters:
PCM_source_transfer_t* srcBlock
PCM_source_peaktransfer_t* pksBlock


^ Reaper version 5.62CountActionShortcuts

C: int retval = (*CountActionShortcuts)(KbdSectionInfo* section, int cmdID)

Returns the number of shortcuts that exist for the given command ID. See GetActionShortcutDesc, DeleteActionShortcut, DoActionShortcutDialog.

Use NamedCommandLookup if you want to have the right commandID of an action, that is registered with an ActionCommandID-string.


Returnvalues:
int retval

Parameters:
KbdSectionInfo* section
the section, in which the action lies
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int cmdID
the commandID of the action, whose count of shortcuts you want to know.


^ Reaper version 5.62CreateLocalOscHandler

C: void* (*CreateLocalOscHandler)(void* obj, void* callback)

callback is a function pointer: void (*callback)(void* obj, const char* msg, int msglen), which handles OSC messages sent from REAPER. The function return is a local osc handler. See SendLocalOscMessage, DestroyOscHandler.


Returnvalues:
void*

Parameters:
void* obj
void* callback


^ Reaper version 5.62CreateMIDIInput

C: midi_Input* retval = (*CreateMIDIInput)(int dev)

Can only reliably create midi access for devices not already opened in prefs/MIDI, suitable for control surfaces etc.

Returnvalues:
midi_Input* retval

Parameters:
int dev


^ Reaper version 5.62CreateMIDIOutput

C: midi_Output* retval = (*CreateMIDIOutput)(int dev, bool streamMode, int* msoffset100)

Can only reliably create midi access for devices not already opened in prefs/MIDI, suitable for control surfaces etc.

Returnvalues:
midi_Output* retval

Parameters:
int dev
bool streamMode
true, msoffset points to a persistent variable(see msoffset100 for more details)
int* msoffset100
points to a persistent variable that can change and reflects added delay to output in 100ths of a millisecond.


^ Reaper version 5.62DeleteActionShortcut

C: bool retval = (*DeleteActionShortcut)(KbdSectionInfo* section, int cmdID, int shortcutidx)

Delete the specific shortcut for the given command ID. See CountActionShortcuts, GetActionShortcutDesc, DoActionShortcutDialog.


Returnvalues:
bool retval

Parameters:
KbdSectionInfo* section
the section, to which this action belongs to
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int cmdID
the commandID for the shortcut to be deleted
int shortcutidx
the shortcut to be deleted


^ Reaper version 5.62DestroyLocalOscHandler

C: void (*DestroyLocalOscHandler)(void* local_osc_handler)

See CreateLocalOscHandler, SendLocalOscMessage.


Parameters:
void* local_osc_handler


^ Reaper version 5.62DoActionShortcutDialog

C: bool retval = (*DoActionShortcutDialog)(HWND hwnd, KbdSectionInfo* section, int cmdID, int shortcutidx)

Open the action shortcut dialog to edit or add a shortcut for the given command ID. If (shortcutidx >= 0 && shortcutidx < CountActionShortcuts()), that specific shortcut will be replaced, otherwise a new shortcut will be added. See CountActionShortcuts, GetActionShortcutDesc, DeleteActionShortcut.


Returnvalues:
bool retval

Parameters:
HWND hwnd
KbdSectionInfo* section
int cmdID
int shortcutidx


^ Reaper version 5.62DuplicateCustomizableMenu

C: bool retval = (*DuplicateCustomizableMenu)(void* srcmenu, void* destmenu)

Populate destmenu with all the entries and submenus found in srcmenu.

Returnvalues:
bool retval

Parameters:
void* srcmenu
void* destmenu


^ Reaper version 5.62FreeHeapPtr

C: void (*FreeHeapPtr)(void* ptr)

free heap memory returned from a Reaper API function

Parameters:
void* ptr


^ Reaper version 5.62GetActionShortcutDesc

C: bool retval = (*GetActionShortcutDesc)(KbdSectionInfo* section, int cmdID, int shortcutidx, char* desc, int desclen)

Get the text description of a specific shortcut for the given command ID. See CountActionShortcuts,DeleteActionShortcut,DoActionShortcutDialog.


Returnvalues:
bool retval

Parameters:
KbdSectionInfo* section
the section of the action
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int cmdID
the commandID of the action, whose shortcut-description you want.
int shortcutidx
char* desc
int descclean


^ Reaper version 5.62GetColorTheme

C: INT_PTR retval = (*GetColorTheme)(int idx, int defval)

Deprecated, see GetColorThemeStruct.


Returnvalues:
INT_PTR retval

Parameters:
int idx
int defval


^ Reaper version 5.62GetColorThemeStruct

C: void* (*GetColorThemeStruct)(int* szOut)

returns the whole color theme (icontheme.h) and the size

Returnvalues:
void*

Parameters:
int* szOut


^ Reaper version 5.62GetContextMenu

C: HMENU retval = (*GetContextMenu)(int idx)

gets context menus. submenu 0:trackctl, 1:mediaitems, 2:ruler, 3:empty track area

Returnvalues:
HMENU retval

Parameters:
int idx


^ Reaper version 5.62GetIconThemePointer

C: void* (*GetIconThemePointer)(const char* name)

returns a named icontheme entry

Returnvalues:
void*

Parameters:
const char* name


^ Reaper version 6.02GetIconThemePointerForDPI

C: void* (*GetIconThemePointerForDPI)(const char* name, int dpisc);

returns a named icontheme entry for a given DPI-scaling (256=1:1).

Note: the return value should not be stored, it should be queried at each paint!
Querying name=NULL returns the start of the structure

Returnvalues:
void*

Parameters:
const char* name
int dpisc


^ Reaper version 5.62GetIconThemeStruct

C: void* (*GetIconThemeStruct)(int* szOut)

returns a pointer to the icon theme (icontheme.h) and the size of that struct.

Returnvalues:
void*

Parameters:
int* szOut


^ Reaper version 5.62GetPeaksBitmap

C: void* (*GetPeaksBitmap)(PCM_source_peaktransfer_t* pks, double maxamp, int w, int h, LICE_IBitmap* bmp)

See note in reaper_plugin.h about PCM_source_peaktransfer_t::samplerate

Returnvalues:
void*

Parameters:
PCM_source_peaktransfer_t* pks
double maxamp
int w
int h
LICE_IBitmap* bmp


^ Reaper version 5.62GetPreferredDiskReadMode

C: void (*GetPreferredDiskReadMode)(int* mode, int* nb, int* bs)

Gets user configured preferred disk read mode. mode/nb/bs are all parameters that should be passed to WDL_FileRead, see for more information.

Returnvalues:
void

Parameters:
int* mode
int* nb
int* bs


^ Reaper version 5.62GetPreferredDiskReadModePeak

C: void (*GetPreferredDiskReadModePeak)(int* mode, int* nb, int* bs)

Gets user configured preferred disk read mode for use when building peaks. mode/nb/bs are all parameters that should be passed to WDL_FileRead, see for more information.

Returnvalues:
void

Parameters:
int* mode
int* nb
int* bs


^ Reaper version 5.62GetPreferredDiskWriteMode

C: void (*GetPreferredDiskWriteMode)(int* mode, int* nb, int* bs)

Gets user configured preferred disk write mode. nb will receive two values, the initial and maximum write buffer counts. mode/nb/bs are all parameters that should be passed to WDL_FileWrite, see for more information.

Returnvalues:
void

Parameters:
int* mode
int* nb
int* bs


^ Reaper version 6.34GetSetMediaItemInfo

C: void* (*GetSetMediaItemInfo)(MediaItem* item, const char* parmname, void* setNewValue)

Get/Set Media Item Info

Returnvalues:
void*

Parameters:
MediaItem* item
a MediaItem-object
const char* parmname
the parameter to be gotten/set
P_TRACK : MediaTrack * (read only)
B_MUTE : bool * to muted state
B_MUTE_ACTUAL : bool * : muted (ignores solo). setting this value will not affect C_MUTE_SOLO.
C_MUTE_SOLO : char * : solo override (-1=soloed, 0=no override, 1=unsoloed). note that this API does not automatically unsolo other items when soloing (nor clear the unsolos when clearing the last soloed item), it must be done by the caller via action or via this API.
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 *, take volume (negative if take polarity is flipped)
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_FADEINDIR : double * of item fade in curve [-1; 1]
D_FADEOUTDIR : double * of item fade out curve [-1; 1]
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 * : Y-position (relative to top of track) in pixels (read-only)
I_LASTH : int * : height in pixels (read-only)
I_LASTY : int * to last y position in track (readonly)
I_LASTH : int * to last height in track (readonly)
I_CUSTOMCOLOR : int * : custom color, OS dependent color|0x100000 (i.e. ColorToNative(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)
P_NOTES : char * : item note text (do not write to returned pointer, use setNewValue to update)
void* setNewValue
the new value to be set, refer description of parmname for the values


^ Reaper version 6.34GetSetMediaItemTakeInfo

C: void* (*GetSetMediaItemTakeInfo)(MediaItem_Take* tk, const char* parmname, void* setNewValue)

Gets/Sets Media Item Take-parameters. Works like GetMediaItemTakeInfo_Value and SetMediaItemTakeInfo_Value but has more parameters.

Returnvalues:
void*

Parameters:
MediaItek_Take* tk
a MediaItem_Take-object, that shall be altered
const char* parmname
the name of the parameter to be changed
P_TRACK : pointer to MediaTrack (read-only)
P_ITEM : pointer to MediaItem (read-only)
P_SOURCE : PCM_source *. Note that if setting this, you should first retrieve the old source, set the new, THEN delete the old.
GUID : GUID * : 16-byte GUID, can query or update
P_NAME : char * to take name
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_LASTY : int * : Y-position (relative to top of track) in pixels (read-only)
I_LASTH : int * : height in pixels (read-only)
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, OS dependent color|0x100000 (i.e. ColorToNative(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)
void* setNewValue
the new value to be set to the parameter. See the description of parmname above for more details.


^ Reaper version 6.36GetSetMediaTrackInfo

C: void* (*GetSetMediaTrackInfo)(MediaTrack* tr, const char* parmname, void* setNewValue)

Gets/Sets MediaTrack-parameters. Works like GetMediaTrackInfo_Value and SetMediaTrackInfo_Value but has more parameters.

     -P_PARTRACK : MediaTrack * : parent track (read-only)
     -P_PROJECT : ReaProject * : parent project (read-only)
     -P_NAME : char * : track name (on master returns NULL)
     -P_ICON : const char * : track icon (full filename, or relative to resource_path/data/track_icons)
     -P_MCP_LAYOUT : const char * : layout name
     -P_RAZOREDITS : const char * : list of razor edit areas, as space-separated triples of start time, end time, and envelope GUID string.
       -Example: "0.00 1.00 \"\" 0.00 1.00 "{xyz-...}"
     -P_TCP_LAYOUT : const char * : layout name
     -P_EXT:xyz : char * : extension-specific persistent data
     -P_UI_RECT:tcp.mute : char * : read-only, allows querying screen position + size of track WALTER elements (tcp.size queries screen position and size of entire TCP, etc).
     -GUID : GUID * : 16-byte GUID, can query or update. If using a _String() function, GUID is a string {xyz-...}.
     -B_MUTE : bool * : muted
     -B_PHASE : bool * : track phase inverted
     -B_RECMON_IN_EFFECT : bool * : record monitoring in effect (current audio-thread playback state, read-only)
     -IP_TRACKNUMBER : int : track number 1-based, 0=not found, -1=master track (read-only, returns the int directly)
     -I_SOLO : int * : soloed, 0=not soloed, 1=soloed, 2=soloed in place, 5=safe soloed, 6=safe soloed in place
     -I_FXEN : int * : fx enabled, 0=bypassed, !0=fx active
     -I_RECARM : int * : record armed, 0=not record armed, 1=record armed
     -I_RECINPUT : int * : record input, &lt;0=no input. if 4096 set, input is MIDI and low 5 bits represent channel (0=all, 1-16=only chan), next 6 bits represent physical input (63=all, 62=VKB). If 4096 is not set, low 10 bits (0..1023) are input start channel (ReaRoute/Loopback start at 512). If 2048 is set, input is multichannel input (using track channel count), or if 1024 is set, input is stereo input, otherwise input is mono.
     -I_RECMODE : int * : record mode, 0=input, 1=stereo out, 2=none, 3=stereo out w/latency compensation, 4=midi output, 5=mono out, 6=mono out w/ latency compensation, 7=midi overdub, 8=midi replace
     -I_RECMON : int * : record monitoring, 0=off, 1=normal, 2=not when playing (tape style)
     -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, 2-64, even numbers only
     -I_SELECTED : int * : track selected, 0=unselected, 1=selected
     -I_WNDH : int * : current TCP window height in pixels including envelopes (read-only)
     -I_TCPH : int * : current TCP window height in pixels not including envelopes (read-only)
     -I_TCPY : int * : current TCP window Y-position in pixels relative to top of arrange view (read-only)
     -I_MCPX : int * : current MCP X-position in pixels relative to mixer container
     -I_MCPY : int * : current MCP Y-position in pixels relative to mixer container
     -I_MCPW : int * : current MCP width in pixels
     -I_MCPH : int * : current MCP height in pixels
     -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 compacted state (only valid on folders), 0=normal, 1=small, 2=tiny children
     -I_MIDIHWOUT : int * : track midi hardware output index, &lt;0=disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31)
     -I_PERFFLAGS : int * : track performance flags, &1=no media buffering, &2=no anticipative FX
     -I_CUSTOMCOLOR : int * : custom color, OS dependent color|0x100000 (i.e. ColorToNative(r,g,b)|0x100000). If you do not |0x100000, then it will not be used, but will store the color
     -I_HEIGHTOVERRIDE : int * : custom height override for TCP window, 0 for none, otherwise size in pixels
     -B_HEIGHTLOCK : bool * : track height lock (must set I_HEIGHTOVERRIDE before locking)
     -D_VOL : double * : trim volume of track, 0=-inf, 0.5=-6dB, 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, &lt;0=project default, 1=+0dB, etc
     -P_ENV:&lt;envchunkname or P_ENV:{GUID... : TrackEnvelope*, read only. chunkname can be &lt;VOLENV, &lt;PANENV, etc; GUID is the stringified envelope GUID.
     -B_SHOWINMIXER : bool * : track control panel visible in mixer (do not use on master track)
     -B_SHOWINTCP : bool * : track control panel visible in arrange view (do not use on master track)
     -B_MAINSEND : bool * : track sends audio to parent
     -C_MAINSEND_OFFS : char * : channel offset of track send to parent
     -B_FREEMODE : bool * : track free item positioning enabled (call UpdateTimeline() after changing)
     -C_BEATATTACHMODE : char * : track timebase, -1=project default, 0=time, 1=beats (position, length, rate), 2=beats (position only)
     -F_MCP_FXSEND_SCALE : float * : scale of fx+send area in MCP (0=minimum allowed, 1=maximum allowed)
     -F_MCP_FXPARM_SCALE : float * : scale of fx parameter area in MCP (0=minimum allowed, 1=maximum allowed)
     -F_MCP_SENDRGN_SCALE : float * : scale of send area as proportion of the fx+send total area (0=minimum allowed, 1=maximum allowed)
     -F_TCP_FXPARM_SCALE : float * : scale of TCP parameter area when TCP FX are embedded (0=min allowed, default, 1=max allowed)
     -I_PLAY_OFFSET_FLAG : int * : track playback offset state, &1=bypassed, &2=offset value is measured in samples (otherwise measured in seconds)
     -D_PLAY_OFFSET : double * : track playback offset, units depend on I_PLAY_OFFSET_FLAG

Returnvalues:
void*

Parameters:
MediaTrack* tr
the Mediatrack-object, that shall be modified
const char* parmname
the parameter to be gotten or set
void* setNewValue
the new value. See the description of parmname above for more details


^ Reaper version 5.62GetSetObjectState

C: char* retval = (*GetSetObjectState)(void* obj, const char* str)

get or set the state of a {track,item,envelope} as an RPPXML chunk str="" to get the chunk string returned (must call FreeHeapPtr when done) supply str to set the state (returns zero)


Returnvalues:
char* retval

Parameters:
void* obj
the object, to be modified. Can be MediaItem, TrackEnvelope, MediaTrack.
const char* str
supply str to set the state (returns zero); str="" to get the chunk string returned


^ Reaper version 5.62GetSetObjectState2

C: char* retval = (*GetSetObjectState2)(void* obj, const char* str, bool isundo)

get or set the state of a {track,item,envelope} as an RPPXML chunk

Returnvalues:
char* retval

Parameters:
void* obj
the object, to be modified. Can be MediaItem, TrackEnvelope, MediaTrack.
const char* str
supply str to set the state (returns zero); str="" to get the chunk string returned (must call FreeHeapPtr when done)
bool isundo
set, if the state will be used for undo purposes (which may allow REAPER to get the state more efficiently


^ Reaper version 6.02GetSetTrackMIDISupportFile

C: const char* retval = (*GetSetTrackMIDISupportFile)(ReaProject* proj, MediaTrack* track, int which, const char* filename)

Get or set the filename for storage of the MIDI bank/program select file.
"which" must be 1.

If fn != NULL, a new track MIDI storage file will be set; otherwise the existing track MIDI storage file will be returned.

Returnvalues:
const char* retval

Parameters:
ReaProject* proj
the project-number. 0 for the current project.
MediaTrack* track
the MediaTrack-object of the track to be treated
int which
thich MIDI-file to use
0, MIDI colormap image file,
1, MIDI bank/program select file,
2, MIDI text string file,
3, MIDI note mapping file.
const char* filename
If fn != NULL, a new track MIDI storage file will be set; otherwise the existing track MIDI storage file will be returned.


^ Reaper version 5.62GetSetTrackSendInfo

C: void* (*GetSetTrackSendInfo)(MediaTrack* tr, int category, int sendidx, const char* parmname, void* setNewValue)

Get or set send/receive/hardware output attributes.

For ReaRoute-users: the outputs are hardware outputs, but with 512 added to the destination channel index (512 is the first rearoute channel, 513 the second, etc).

Returnvalues:
void*

Parameters:
MediaTrack* tr
the MediaTrack object for the track to be gotten or set
int category
<0 for receives, 0=sends, >0 for hardware outputs
int sendidx
0..n (to enumerate, iterate over sendidx until it returns NULL)
const char* parmname
the parameter to get/set
P_DESTTRACK : read only, returns MediaTrack *, destination track, only applies for sends/recvs
P_SRCTRACK : read only, returns MediaTrack *, source track, only applies for sends/recvs
P_ENV : read only, returns TrackEnvelope *, setNewValue=<VOLENV, <PANENV, etc
B_MUTE : returns bool *
B_PHASE : returns bool *, true to flip phase
B_MONO : returns bool *
D_VOL : returns double *, 1.0 = +0dB etc
D_PAN : returns double *, -1..+1
D_PANLAW : returns double *,1.0=+0.0db, 0.5=-6dB, -1.0 = projdef etc
I_SENDMODE : returns int *, 0=post-fader, 1=pre-fx, 2=post-fx (deprecated), 3=post-fx
I_AUTOMODE : returns int * : automation mode (-1=use track automode, 0=trim/off, 1=read, 2=touch, 3=write, 4=latch)
I_SRCCHAN : returns int *, index,&1024=mono, -1 for none
I_DSTCHAN : returns int *, index, &1024=mono, otherwise stereo pair, hwout:&512=rearoute
I_MIDIFLAGS : returns int *, low 5 bits=source channel 0=all, 1-16, next 5 bits=dest channel, 0=orig, 1-16=chan
void* setNewValue
the new value to be set


^ Reaper version 5.62GetToggleCommandState2

C: int retval = (*GetToggleCommandState2)(KbdSectionInfo* section, int command_id)

Get Toggle Command State 2

Returnvalues:
int retval

Parameters:
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int command_id
the command-id of the command, whose toggle-state you want


^ Reaper version 5.62GetToggleCommandStateThroughHooks

C: int retval = (*GetToggleCommandStateThroughHooks)(KbdSectionInfo* section, int command_id)

Returns the state of an action via extension plugins' hooks.

Returnvalues:
int retval

Parameters:
MediaTrack* section
the section, in which the action appears in
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int command_id
the command-id of the action, whose state you want


^ Reaper version 5.62GetTrackInfo

C: const char* retval = (*GetTrackInfo)(INT_PTR track, int* flags)

Gets track info (returns name).

Returnvalues:
const char* retval

Parameters:
INT_PTR track
track index, -1=master, 0..n, or cast a MediaTrack* to int
int* flags
if flags is non-NULL, will be set to:
&1, folder
&2, selected
&4, has fx enabled
&8, muted
&16, soloed
&32, SIP'd (with &16)
&64, rec armed


^ Reaper version 5.62HiresPeaksFromSource

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

Hires peaks from source.

Returnvalues:
void

Parameters:
PCM_source* src
PCM_source_peaktransfer_t* block


^ Reaper version 5.62IsInRealTimeAudio

C: int retval = (*IsInRealTimeAudio)()

Are we in a realtime audio thread (between OnAudioBuffer calls,not in some worker/anticipative FX thread)? threadsafe

Returnvalues:
int retval


^ Reaper version 5.62IsItemTakeActiveForPlayback

C: bool retval = (*IsItemTakeActiveForPlayback)(MediaItem* item, MediaItem_Take* take)

get whether a take will be played (active take, unmuted, etc)

Returnvalues:
bool retval

Parameters:
MediaItem* item
MediaItem in which the take is to be checked
MediaItem_Take* take
the MediaItem_Take to be checked


^ Reaper version 5.62IsREAPER

C: bool retval = (*IsREAPER)()

Returns true if dealing with REAPER, returns false for ReaMote, etc

Returnvalues:
bool retval


^ Reaper version 5.62KBD_OnMainActionEx

C: int retval = (*KBD_OnMainActionEx)(int cmd, int val, int valhw, int relmode, HWND hwnd, ReaProject* proj)

val/valhw are used for midi stuff.

Returnvalues:
int retval

Parameters:
int cmd
int val
val=[0..127] and valhw=-1 (midi CC)
int valhw
valhw >=0 (midi pitch (valhw | val<<7))
int relmode
relmode absolute (0) or 1/2/3 for relative adjust modes
HWND hwnd
ReaProject* proj


^ Reaper version 5.62LICE_Arc

C: void (*LICE_Arc)(LICE_IBitmap* dest, float cx, float cy, float r, float minAngle, float maxAngle, LICE_pixel color, float alpha, int mode, bool aa)

LICE arc

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
float cx
float cy
float r
float minAngle
float maxAngle
LICE_pixel color
float alpha
int mode
bool aa


^ Reaper version 5.62LICE_Blit

C: void (*LICE_Blit)(LICE_IBitmap* dest, LICE_IBitmap* src, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, float alpha, int mode)

LICE blit

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
LICE_IBitmap* src
int dstx
int dsty
int srcx
int srcy
int srcw
int srch
float alpha
int mode


^ Reaper version 5.62LICE_Blur

C: void (*LICE_Blur)(LICE_IBitmap* dest, LICE_IBitmap* src, int dstx, int dsty, int srcx, int srcy, int srcw, int srch)

LICE blur

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
LICE_IBitmap* src
int dstx
int dsty
int srcx
int srcy
int srcw
int srch


^ Reaper version 5.62LICE_BorderedRect

C: void (*LICE_BorderedRect)(LICE_IBitmap* dest, int x, int y, int w, int h, LICE_pixel bgcolor, LICE_pixel fgcolor, float alpha, int mode)

LICE bordered rect.

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
int w
int h
LICE_pixel bgcolor
LICE_pixel fgcolor
float alpha
int mode


^ Reaper version 5.62LICE_Circle

C: void (*LICE_Circle)(LICE_IBitmap* dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)

LICE circle

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
float cx
float cy
float r
LICE_pixel color
float alpha
int mode
bool aa


^ Reaper version 5.62LICE_Clear

C: void (*LICE_Clear)(LICE_IBitmap* dest, LICE_pixel color)

LICE clear

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
LICE_pixel color


^ Reaper version 5.62LICE_ClearRect

C: void (*LICE_ClearRect)(LICE_IBitmap* dest, int x, int y, int w, int h, LICE_pixel mask, LICE_pixel orbits)

LICE clear rect

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
int w
int h
LICE_pixel mask
LICE_pixel orbits


^ Reaper version 5.62LICE_Copy

C: void (*LICE_Copy)(LICE_IBitmap* dest, LICE_IBitmap* src)

LICE copy

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
LICE_IBitmap* src


^ Reaper version 5.62LICE_CreateBitmap

C: LICE_IBitmap* retval = (*LICE_CreateBitmap)(int mode, int w, int h)

Create a new bitmap. this is like calling new LICE_MemBitmap (mode=0) or new LICE_SysBitmap (mode=1).

Returnvalues:
LICE_IBitmap* retval

Parameters:
int mode
int w
int h


^ Reaper version 5.62LICE_CreateFont

C: LICE_IFont* retval = (*LICE_CreateFont)()

LICE create font

Returnvalues:
LICE_IFont* retval


^ Reaper version 5.80LICE_DrawCBezier

C: void (*LICE_DrawCBezier)(LICE_IBitmap* dest, double xstart, double ystart, double xctl1, double yctl1, double xctl2, double yctl2, double xend, double yend, LICE_pixel color, float alpha, int mode, bool aa, double tol)

LICE Draw C Bezier

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
double xstart
double ystart
double xctl1
double yctl1
double xctl2
double yctl2
double xend
double yend
LICE_pixel color
float alpha
int mode
bool aa
double tol


^ Reaper version 5.62LICE_DrawChar

C: void (*LICE_DrawChar)(LICE_IBitmap* bm, int x, int y, char c, LICE_pixel color, float alpha, int mode)

LICE draw char

Returnvalues:
void

Parameters:
LICE_IBitmap* bm
int x
int y
char c
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_DrawGlyph

C: void (*LICE_DrawGlyph)(LICE_IBitmap* dest, int x, int y, LICE_pixel color, LICE_pixel_chan* alphas, int glyph_w, int glyph_h, float alpha, int mode)

LICE draw glyph

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
LICE_pixel color
LICE_pixel_chan* alphas
int glyph_w
int glyph_h
float alpha
int mode


^ Reaper version 5.62LICE_DrawRect

C: void (*LICE_DrawRect)(LICE_IBitmap* dest, int x, int y, int w, int h, LICE_pixel color, float alpha, int mode)

LICE draw rect

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
int w
int h
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_DrawText

C: void (*LICE_DrawText)(LICE_IBitmap* bm, int x, int y, const char* string, LICE_pixel color, float alpha, int mode)

LICE draw text

Returnvalues:
void

Parameters:
LICE_IBitmap* bm
int x
int y
const char* string
LICE_pixel color
float alpha
int mode


^ Reaper version 5.95LICE_FillCBezier

C: void (*LICE_FillCBezier)(LICE_IBitmap* dest, double xstart, double ystart, double xctl1, double yctl1, double xctl2, double yctl2, double xend, double yend, int yfill, LICE_pixel color, float alpha, int mode, bool aa, double tol);

LICE Fill CBezier

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
double xstart
double ystart
double xctl1
double yctl1
double xctl2
double yctl2
double xend
double yend
int yfill
LICE_pixel color
float alpha
int mode
bool aa
double tol


^ Reaper version 5.62LICE_FillCircle

C: void (*LICE_FillCircle)(LICE_IBitmap* dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)

LICE fill circle

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
float cx
float cy
float r
LICE_pixel color
float alpha
int mode
bool aa


^ Reaper version 5.62LICE_FillConvexPolygon

C: void (*LICE_FillConvexPolygon)(LICE_IBitmap* dest, int* x, int* y, int npoints, LICE_pixel color, float alpha, int mode)

LICE fill convex polygon

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int* x
int* y
int npoints
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_FillRect

C: void (*LICE_FillRect)(LICE_IBitmap* dest, int x, int y, int w, int h, LICE_pixel color, float alpha, int mode)

LICE fill rect

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
int w
int h
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_FillTrapezoid

C: void (*LICE_FillTrapezoid)(LICE_IBitmap* dest, int x1a, int x1b, int y1, int x2a, int x2b, int y2, LICE_pixel color, float alpha, int mode)

LICE fill trapezoid

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x1a
int x1b
int y1
int x2a
int x2b
int y2
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_FillTriangle

C: void (*LICE_FillTriangle)(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, int x3, int y3, LICE_pixel color, float alpha, int mode)

LICE fill triangle

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x1
int y1
int x2
int y2
int x3
int y3
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_GetPixel

C: LICE_pixel retval = (*LICE_GetPixel)(LICE_IBitmap* bm, int x, int y)

LICE get pixel

Returnvalues:
LICE_pixel retval

Parameters:
LICE_IBitmap* bm
int x
int y


^ Reaper version 5.62LICE_GradRect

C: void (*LICE_GradRect)(LICE_IBitmap* dest, int dstx, int dsty, int dstw, int dsth, float ir, float ig, float ib, float ia, float drdx, float dgdx, float dbdx, float dadx, float drdy, float dgdy, float dbdy, float dady, int mode)

LICE grad rect

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int dstx
int dsty
int dstw
int dsth
float ir
float ig
float ib
float ia
float drdx
float dgdx
float dbdx
float dadx
float drdy
float dgdy
float dbdy
float dady
int mode


^ Reaper version 5.62LICE_Line

C: void (*LICE_Line)(LICE_IBitmap* dest, float x1, float y1, float x2, float y2, LICE_pixel color, float alpha, int mode, bool aa)

LICE line

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
float x1
float y1
float x2
float y2
LICE_pixel color
float alpha
int mode
bool aa


^ Reaper version 5.62LICE_LineInt

C: void (*LICE_LineInt)(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, LICE_pixel color, float alpha, int mode, bool aa)

LICE line int

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x1
int y1
int x2
int y2
LICE_pixel color
float alpha
int mode
bool aa


^ Reaper version 5.62LICE_LoadPNG

C: LICE_IBitmap* retval = (*LICE_LoadPNG)(const char* filename, LICE_IBitmap* bmp)

LICE load png

Returnvalues:
LICE_IBitmap* retval

Parameters:
const char* filename
Lice_IBitmap* bmp


^ Reaper version 5.62LICE_LoadPNGFromResource

C: LICE_IBitmap* retval = (*LICE_LoadPNGFromResource)(HINSTANCE hInst, int resid, LICE_IBitmap* bmp)

LICE load png from resource

Returnvalues:
LICE_IBitmap* retval

Parameters:
HINSTANCE hInst
int resid
LICE_IBitmap* bmp


^ Reaper version 5.62LICE_MeasureText

C: void (*LICE_MeasureText)(const char* string, int* w, int* h)

LICE measure text

Returnvalues:
void

Parameters:
const char* string
int* w
int* h


^ Reaper version 5.62LICE_MultiplyAddRect

C: void (*LICE_MultiplyAddRect)(LICE_IBitmap* dest, int x, int y, int w, int h, float rsc, float gsc, float bsc, float asc, float radd, float gadd, float badd, float aadd)

LICE multiplay add rect

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
int w
int h
float rsc
float gsc
float bsc
float asc
float radd
float gadd
float badd
float aadd


^ Reaper version 5.62LICE_PutPixel

C: void (*LICE_PutPixel)(LICE_IBitmap* bm, int x, int y, LICE_pixel color, float alpha, int mode)

LICE put pixel

Returnvalues:
void

Parameters:
LICE_IBitmap* bm
int x
int y
LICE_pixel color
float alpha
int mode


^ Reaper version 5.62LICE_RotatedBlit

C: void (*LICE_RotatedBlit)(LICE_IBitmap* dest, LICE_IBitmap* src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, float angle, bool cliptosourcerect, float alpha, int mode, float rotxcent, float rotycent)

LICE rotate blit. These coordinates are offset from the center of the image,in source pixel coordinates.

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
LICE_IBitmap* src
int dstx
int dsty
int dstw
int dsth
float srcx
float srcy
float srcw
float srch
float angle
bool cliptosourcerect
float alpha
int mode
float rotxcent
float rotycent


^ Reaper version 5.62LICE_RoundRect

C: void (*LICE_RoundRect)(LICE_IBitmap* drawbm, float xpos, float ypos, float w, float h, int cornerradius, LICE_pixel col, float alpha, int mode, bool aa)

LICE round rect

Returnvalues:
void

Parameters:
LICE_IBitmap* drawbm
float xpos
float ypos
float w
float h
int cornerradius
LICE_pixel col
float alpha
int mode
bool aa


^ Reaper version 5.62LICE_ScaledBlit

C: void (*LICE_ScaledBlit)(LICE_IBitmap* dest, LICE_IBitmap* src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, float alpha, int mode)

LICE scaled blit.

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
LICE_IBitmap* src
int dstx
int dsty
int dstw
int dsth
float srcx
float srcy
float srcw
float srch
float alpha
int mode


^ Reaper version 5.62LICE_SimpleFill

C: void (*LICE_SimpleFill)(LICE_IBitmap* dest, int x, int y, LICE_pixel newcolor, LICE_pixel comparemask, LICE_pixel keepmask)

LICE simple fill

Returnvalues:
void

Parameters:
LICE_IBitmap* dest
int x
int y
LICE_pixel newcolor
LICE_pixel comparemask
LICE_pixel keepmask


^ Reaper version 5.62LICE__Destroy

C: void (*LICE__Destroy)(LICE_IBitmap* bm)

LICE destroy.

Returnvalues:
void

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__DestroyFont

C: void (*LICE__DestroyFont)(LICE_IFont* font);

LICE destroy-font.

Returnvalues:
void

Parameters:
LICE_IFont* font


^ Reaper version 5.62LICE__DrawText

C: int retval = (*LICE__DrawText)(LICE_IFont* font, LICE_IBitmap* bm, const char* str, int strcnt, RECT* rect, UINT dtFlags)

LICE draw text.

Returnvalues:
int retval

Parameters:
LICE_IFont* font
LICE_IBitmap* bm
const char* str
int strcnt
RECT* rect
UINT dtFlags


^ Reaper version 5.62LICE__GetBits

C: void* (*LICE__GetBits)(LICE_IBitmap* bm)

LICE get bits.

Returnvalues:
void*

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__GetDC

C: HDC retval = (*LICE__GetDC)(LICE_IBitmap* bm)

Translate mouse.

Returnvalues:
HDC retval

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__GetHeight

C: int retval = (*LICE__GetHeight)(LICE_IBitmap* bm)

LICE get height

Returnvalues:
int retval

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__GetRowSpan

C: int retval = (*LICE__GetRowSpan)(LICE_IBitmap* bm)

LICE get row span.

Returnvalues:
int retval

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__GetWidth

C: int retval = (*LICE__GetWidth)(LICE_IBitmap* bm)

LICE get width.

Returnvalues:
int retval

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__IsFlipped

C: bool retval = (*LICE__IsFlipped)(LICE_IBitmap* bm)

LICE is flipped

Returnvalues:
bool retval

Parameters:
LICE_IBitmap* bm


^ Reaper version 5.62LICE__SetBkColor

C: LICE_pixel retval = (*LICE__SetBkColor)(LICE_IFont* font, LICE_pixel color)

LICE set bk color

Returnvalues:
LICE_pixel retval

Parameters:
LICE_IFont* font
LICE_pixel color


^ Reaper version 5.62LICE__SetFromHFont

C: void (*LICE__SetFromHFont)(LICE_IFont* font, HFONT hfont, int flags)

LICE set from h-font

Returnvalues:
void

Parameters:
LICE_IFont* font
font must REMAIN valid,unless LICE_FONT_FLAG_PRECALCALL is set
HFONT hfont
int flags


^ Reaper version 5.62LICE__SetTextColor

C: LICE_pixel retval = (*LICE__SetTextColor)(LICE_IFont* font, LICE_pixel color)

LICE set text color

Returnvalues:
LICE_pixel retval

Parameters:
LICE_IFont* font
LICE_pixel color


^ Reaper version 5.62LICE__SetTextCombineMode

C: void (*LICE__SetTextCombineMode)(LICE_IFont* ifont, int mode, float alpha)

LICE set text combine mode

Returnvalues:
void

Parameters:
LICE_IFont* ifont
int mode
float alpha


^ Reaper version 5.62LICE__resize

C: bool retval = (*LICE__resize)(LICE_IBitmap* bm, int w, int h)

LICE resize

Returnvalues:
bool retval

Parameters:
LICE_IBitmap* bm
int w
int h


^ Reaper version 5.62MIDI_eventlist_Create

C: MIDI_eventlist* retval = (*MIDI_eventlist_Create)()

Create a MIDI_eventlist object. The returned object must be deleted with MIDI_eventlist_destroy().


Returnvalues:
MIDI_eventlist* retval


^ Reaper version 5.62MIDI_eventlist_Destroy

C: void (*MIDI_eventlist_Destroy)(MIDI_eventlist* evtlist)

Destroy a MIDI_eventlist object that was created using MIDI_eventlist_Create().


Returnvalues:
void

Parameters:
MIDI_eventlist* evtlist


^ Reaper version 5.62PCM_Sink_Create

C: PCM_sink* retval = (*PCM_Sink_Create)(const char* filename, const char* cfg, int cfg_sz, int nch, int srate, bool buildpeaks)

PCM sink create

Returnvalues:
PCM_sink* retval

Parameters:
const char* filename
const char* cfg
int cfg_sz
int nch
int srate
bool buildpeaks


^ Reaper version 5.62PCM_Sink_CreateEx

C: PCM_sink* retval = (*PCM_Sink_CreateEx)(ReaProject* proj, const char* filename, const char* cfg, int cfg_sz, int nch, int srate, bool buildpeaks)

PCM sink create ex.

Returnvalues:
PCM_sink* retval

Parameters:
ReaProject* proj
the project-number. 0 for the current project.
const char* filename
const char* cfg
int cfg_sz
int nch
int srate
bool buildpeaks


^ Reaper version 5.62PCM_Sink_CreateMIDIFile

C: PCM_sink* retval = (*PCM_Sink_CreateMIDIFile)(const char* filename, const char* cfg, int cfg_sz, double bpm, int div)

PCM sink create MIDI file.

Returnvalues:
PCM_sink* retval

Parameters:
const char* filename
const char* cfg
int cfg_sz
double bpm
int div


^ Reaper version 5.62PCM_Sink_CreateMIDIFileEx

C: PCM_sink* retval = (*PCM_Sink_CreateMIDIFileEx)(ReaProject* proj, const char* filename, const char* cfg, int cfg_sz, double bpm, int div)

PCM sink create MIDI file ex

Returnvalues:
PCM_sink* retval

Parameters:
ReaProject* proj
the project-number. 0 for the current project.
const char* filename
const char* cfg
int cfg_sz
double bpm
int div


^ Reaper version 5.62PCM_Source_CreateFromSimple

C: PCM_source* retval = (*PCM_Source_CreateFromSimple)(ISimpleMediaDecoder* dec, const char* fn)

PCM_Source create from simple

Returnvalues:
PCM_source* retval

Parameters:
ISimpleMediaDecoder* dec
const char* fn


^ Reaper version 5.62PeakBuild_Create

C: REAPER_PeakBuild_Interface* retval = (*PeakBuild_Create)(PCM_source* src, const char* fn, int srate, int nch)

Peak build create

Returnvalues:
REAPER_PeakBuild_Interface* retval

Parameters:
PCM_source* src
const char* fn
int srate
int nch


^ Reaper version 5.62PeakBuild_CreateEx

C: REAPER_PeakBuild_Interface* retval = (*PeakBuild_CreateEx)(PCM_source* src, const char* fn, int srate, int nch, int flags)

Peakbuild create-ex. flags&1 for FP support

Returnvalues:
REAPER_PeakBuild_Interface* retval

Parameters:
PCM_source* src
const char* fn
int srate
int nch
int flags


^ Reaper version 5.62PeakGet_Create

C: REAPER_PeakGet_Interface* retval =(*PeakGet_Create)(const char* fn, int srate, int nch)

Peak get create.

Returnvalues:
REAPER_PeakGet_Interface* retval

Parameters:
const char* fn
int srate
int nch


^ Reaper version 5.62PitchShiftSubModeMenu

C: int retval = (*PitchShiftSubModeMenu)(HWND hwnd, int x, int y, int mode, int submode_sel)

menu to select/modify pitch shifter submode, returns new value (or old value if no item selected)

Returnvalues:
int retval

Parameters:
HWND hwnd
int x
int y
int mode
int submode_sel


^ Reaper version 5.62PlayPreview

C: int retval = (*PlayPreview)(preview_register_t* preview)

Play preview. Return nonzero on success.

Returnvalues:
int retval

Parameters:
preview_register_t* preview


^ Reaper version 6.19PlayPreviewEx

C: int retval = (*PlayPreviewEx)(preview_register_t* preview, int bufflags, double measure_align)

return nonzero on success.

Bufflags:
&1 = buffer source,
&2 = treat length changes in source as varispeed and adjust internal state accordingly if buffering.

measure_align<0=play immediately, >0=align playback with measure start

Returnvalues:
int retval

Parameters:
preview_register_t* preview
int bufflags
double measure_align


^ Reaper version 5.62PlayTrackPreview

C: int retval = (*PlayTrackPreview)(preview_register_t* preview)

Play track preview. Returns nonzero on success,in these,m_out_chan is a track index (0-n).

Returnvalues:
int retval

Parameters:
preview_register_t* preview


^ Reaper version 5.62PlayTrackPreview2

C: int retval = (*PlayTrackPreview2)(ReaProject* proj, preview_register_t* preview)

Play track preview. Return nonzero on success,in these,m_out_chan is a track index (0-n).

Returnvalues:
int retval

Parameters:
ReaProject* proj
the project-number. 0 for the current project.
preview_register_t* preview


^ Reaper version 6.19PlayTrackPreview2Ex

C: int retval = (*PlayTrackPreview2Ex)(ReaProject* proj, preview_register_t* preview, int flags, double measure_align)

return nonzero on success,in these,moutchan is a track index (0-n). for flags see PlayPreviewEx bufflags


Returnvalues:
int retval

Parameters:
ReaProject* proj
the project-number. 0 for the current project.
preview_register_t* preview
int flags
double measure_align


^ Reaper version 5.62REAPERAPI_LoadAPI

C: int retval = REAPERAPI_LoadAPI(void *(*getAPI)(const char *))

Checks, whether a certain Reaper-API-function exists.

Because the API is dynamic, callers should never assume a function exists.
Check that a non-NULL function pointer was returned before using it (unless
loaded functions are verified using REAPERAPI_LoadAPI(), see note below).

  1) most source files should just #include "reaper_plugin_functions.h" as is.
  2) one file should #define REAPERAPI_IMPLEMENT before including this file.
  3) the plug-in should call REAPERAPI_LoadAPI(rec->GetFunc) from REAPER_PLUGIN_ENTRYPOINT
     and check the return value for errors (REAPERAPI_LoadAPI will return 0 on success).

Returnvalues:
int retval
0, if a function exists

Parameters:
const char *


^ Reaper version 5.62ReaperGetPitchShiftAPI

C: IReaperPitchShift* retval = (*ReaperGetPitchShiftAPI)(int version)

version must be REAPER_PITCHSHIFT_API_VER

Returnvalues:
IReaperPitchShift* retval

Parameters:
int version


^ Reaper version 5.62Resampler_Create

C: REAPER_Resample_Interface* retval = (*Resampler_Create)()

Resampler create

Returnvalues:
REAPER_Resample_Interface* retval


^ Reaper version 6.26ResolveRenderPattern

C: int retval = (*ResolveRenderPattern)(ReaProject* project, const char* path, const char* pattern, char* targets, int targets_sz)

Resolve a wildcard pattern into a set of nul-separated, double-nul terminated render target filenames. Returns the length of the string buffer needed for the returned file list. Call with path=NULL to suppress filtering out illegal pathnames, call with targets=NULL to get just the string buffer length.

Returnvalues:
int retval

Parameters:
ReaProject* project
const char* path
const char* pattern
char* targets
int targets_sz


^ Reaper version 5.62SectionFromUniqueID

C: KbdSectionInfo* retval = (*SectionFromUniqueID)(int uniqueID)

Section from unique ID.

Returnvalues:
KbdSectionInfo* retval

Parameters:
int uniqueID


^ Reaper version 5.62SendLocalOscMessage

C: void (*SendLocalOscMessage)(void* local_osc_handler, const char* msg, int msglen)

Send local Osc message.

Returnvalues:
void

Parameters:
void* local_osc_handler
const char* msg
int msglen


^ Reaper version 5.62SetRenderLastError

C: void (*SetRenderLastError)(const char* errorstr)

Set render last error.

Returnvalues:
void

Parameters:
const char* errorstr


^ Reaper version 5.62StopPreview

C: int retval = (*StopPreview)(preview_register_t* preview)

Stop preview.

Returnvalues:
int retval

Parameters:
preview_register_t* preview


^ Reaper version 5.62StopTrackPreview

C: int retval = (*StopTrackPreview)(preview_register_t* preview)

Stop track preview. Return nonzero on success.

Returnvalues:
int retval

Parameters:
preview_register_t* preview


^ Reaper version 5.62StopTrackPreview2

C: int retval = (*StopTrackPreview2)(ReaProject* proj, preview_register_t* preview)

Stop track preview2.

Returnvalues:
int retval

Parameters:
void* ReaProject
the project-number. 0 for the current project.
preview_register_t* preview


^ Reaper version 5.62WDL_VirtualWnd_ScaledBlitBG

C: bool retval = (*WDL_VirtualWnd_ScaledBlitBG)(LICE_IBitmap* dest, WDL_VirtualWnd_BGCfg* src, int destx, int desty, int destw, int desth, int clipx, int clipy, int clipw, int cliph, float alpha, int mode)

WDL virtualwnd scale blit bg.

Returnvalues:
bool retval

Parameters:
LICE_IBitmap* dest
WDL_VirtualWnd_BGCfg* src
int destx
int desty
int destw
int desth
int clipx
int clipy
int clipw
int cliph
float alpha
int mode


^ Reaper version 5.62__mergesort

C: void (*__mergesort)(void* base, size_t nmemb, size_t size, int (*cmpfunc)(const void*,const void*), void* tmpspace)

is a stable sorting function with an API similar to qsort().
HOWEVER, it requires some temporary space, equal to the size of the data being sorted, so you can pass it as the last parameter,
or NULL and it will allocate and free space internally.

Returnvalues:
void*

Parameters:
void* base
size_t nmemb
size_t size
int *cmpfunc...
void* tmpspace


^ Reaper version 5.62get_config_var

C: void* (*get_config_var)(const char* name, int* szOut)

gets config var

see Reaper_Config_Variables.html for valid config-vars


Returnvalues:
void*

Parameters:
const char* name
int* szOut


^ Reaper version 5.62get_midi_config_var

C: void* (*get_midi_config_var)(const char* name, int* szOut);

Deprecated.

Returnvalues:
void*

Parameters:
const char* name
int* szOut


^ Reaper version 5.62kbd_OnMidiEvent

C: void (*kbd_OnMidiEvent)(MIDI_event_t* evt, int dev_index)

On Midi Event. Can be called from anywhere (threadsafe)

Returnvalues:
void

Parameters:
MIDI_event_t* evt
the MIDI-event
int dev_index


^ Reaper version 5.62kbd_OnMidiList

C: void (*kbd_OnMidiList)(MIDI_eventlist* list, int dev_index)

On MIDI List. Can be called from anywhere (threadsafe)

Returnvalues:
void

Parameters:
MIDI_eventlist* list
int dev_index


^ Reaper version 5.62kbd_ProcessActionsMenu

C: void (*kbd_ProcessActionsMenu)(HMENU menu, KbdSectionInfo* section)

Process actions-menu.

Returnvalues:
void

Parameters:
HMENU menu
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer


^ Reaper version 5.62kbd_RunCommandThroughHooks

C: bool retval = (*kbd_RunCommandThroughHooks)(KbdSectionInfo* section, int* actionCommandID, int* val, int* valhw, int* relmode, HWND hwnd)

Run command through hooks. actioncommandID may get modified.

Returnvalues:
bool retval

Parameters:
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int* actionCommandID
the commandid-number of the action you want to run.
int* val
int* valhw
int* relmode
HWND hwnd


^ Reaper version 5.62kbd_enumerateActions

C: int retval = (*kbd_enumerateActions)(KbdSectionInfo* section, int idx, const char** nameOut)

Enumerates actions.

Returnvalues:
int retval

Parameters:
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
int idx
const char** nameOut


^ Reaper version 5.62kbd_formatKeyName

C: void (*kbd_formatKeyName)(ACCEL* ac, char* s)

Format keyname

Returnvalues:
void

Parameters:
ACCEL* ac
char* s


^ Reaper version 5.62kbd_getCommandName

C: void (*kbd_getCommandName)(int cmd, char* s, KbdSectionInfo* section)

Get the string of a key assigned to command "cmd" in a section. This function is poorly named as it doesn't return the command's name, see kbd_getTextFromCmd.


Returnvalues:
void

Parameters:
int cmd
commandid of the action
char* s
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer


^ Reaper version 5.62kbd_getTextFromCmd

C: const char* retval = (*kbd_getTextFromCmd)(DWORD cmd, KbdSectionInfo* section)

Get text from Command

Returnvalues:
const char*

Parameters:
DWORD cmd
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer


^ Reaper version 5.62kbd_processMidiEventActionEx

C: bool retval = (*kbd_processMidiEventActionEx)(MIDI_event_t* evt, KbdSectionInfo* section, HWND hwndCtx)

Process Midi Event Action

Returnvalues:
bool retval

Parameters:
MIDI_event_t* evt
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
HWND hwndCtx


^ Reaper version 5.62kbd_reprocessMenu

C: void (*kbd_reprocessMenu)(HMENU menu, KbdSectionInfo* section)

Reprocess a menu recursively, setting key assignments to what their command IDs are mapped to.

Returnvalues:
void

Parameters:
HMENU menu
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer


^ Reaper version 5.62kbd_translateAccelerator

C: int retval = (*kbd_translateAccelerator)(HWND hwnd, MSG* msg, KbdSectionInfo* section)

Pass in the HWND to receive commands, a MSG of a key command,  and a valid section,
and kbd_translateAccelerator() will process it looking for any keys bound to it, and send the messages off.
Returns 1 if processed, 0 if no key binding found.

Returnvalues:
int retval

Parameters:
HWND hwnd
MSG* msg
KbdSectionInfo* section
the section, in which the action exists
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer


^ Reaper version 5.62kbd_translateMouse

C: bool retval = (*kbd_translateMouse)(void* winmsg, unsigned char* midimsg)

Translate mouse.

Returnvalues:
bool retval

Parameters:
void* winmsg
unsigned char* midimsg


^ Reaper version 5.62plugin_getFilterList

C: const char* retval (*plugin_getFilterList)()

Plugin get filter list. Returns a double-NULL terminated list of importable media files, suitable for passing to GetOpenFileName() etc. Includes . (All files).


Returnvalues:
const char* retval


^ Reaper version 5.62plugin_getImportableProjectFilterList

C: const char* retval = (*plugin_getImportableProjectFilterList)()

Plugin get importable project filter list. Returns a double-NULL terminated list of importable project files, suitable for passing to GetOpenFileName() etc. Includes . (All files).


Returnvalues:
const char* retval


^ Reaper version 5.62plugin_getapi

C: void* (*plugin_getapi)(const char* name)

Plugin get api.

Returnvalues:
void*

Parameters:
const char* name


^ Reaper version 5.62plugin_register

C: int retval = (*plugin_register)(const char* name, void* infostruct)

like rec->Register

if you have a function called myfunction(..) that you want to expose to other extensions or plug-ins, use register("API_myfunction",funcaddress), and "-API_myfunction" to remove.          Other extensions then use GetFunc("myfunction") to get the function pointer.

REAPER will also export the function address to ReaScript, so your extension could supply a Python module that provides a wrapper called RPR_myfunction(..).
register("APIdef_myfunction",defstring) will include your function declaration and help in the auto-generated REAPER API header and ReaScript documentation.

defstring is four null-separated fields: return type, argument types, argument names, and help.

   Example: double myfunction(char* str, int flag) would have defstring="double\0char*,int\0str,flag\0help text for myfunction"

another thing you can register is "hookcommand", which you pass a callback:

   NON_API: bool runCommand(int command, int flag);
            register("hookcommand",runCommand);

which returns TRUE to eat (process) the command.

flag is usually 0 but can sometimes have useful info depending on the message.

note: it's OK to call Main_OnCommand() within your runCommand, however you MUST check for recursion if doing so!
in fact, any use of this hook should benefit from a simple reentrancy test...

to get notified when an action of the main section is performed, you can register "hookpostcommand", which you pass a callback:

   NON_API: void postCommand(int command, int flag);
            register("hookpostcommand",postCommand);

you can also register "hookcommand2", which you pass a callback:

   NON_API: bool onAction(KbdSectionInfo *sec, int command, int val, int valhw, int relmode, HWND hwnd);
            register("hookcommand2",onAction);

which returns TRUE to eat (process) the command.

val/valhw are used for actions learned with MIDI/OSC.
val = \[0..127\] and valhw = -1 for MIDI CC,
valhw >=0 for MIDI pitch or OSC with value = (valhw|val<<7)/16383.0,
relmode absolute(0) or 1/2/3 for relative adjust modes

you can also register command IDs for actions, register with "command_id", parameter is a unique string with only A-Z, 0-9, returns command ID (or 0 if not supported/out of actions)

register("command_id_lookup", unique_string) will look up the integer ID of the named action without registering the string if it doesn't already exist.

Returnvalues:
int retval

Parameters:
const char* name
void* infostruct


^ Reaper version 5.62projectconfig_var_addr

C: void* (*projectconfig_var_addr)(ReaProject* proj, int idx)

Project config var addr.

see Reaper_Config_Variables.html for valid config-vars


Returnvalues:
void*

Parameters:
ReaProject* proj
the project-number. 0 for the current project.
int idx


^ Reaper version 5.62projectconfig_var_getoffs

C: int retval = (*projectconfig_var_getoffs)(const char* name, int* szOut)

Returns offset to pass to projectconfigvaraddr() to get project-config var of name. szout gets size of object.

see Reaper_Config_Variables.html for valid config-vars


Returnvalues:
int retval

Parameters:
const char* name
int* szOut
size of the object


^ Reaper version 5.965realloc_cmd_ptr

C: bool retval = (*realloc_cmd_ptr)(char** ptr, int* ptr_size, int new_size)

special use for NeedBig script API functions - reallocates a NeedBig buffer and updates its size, returns false on error

Returnvalues:
boolean retval

Parameters:
char** ptr
int* ptr_size
int new_size


^ Reaper version 5.62screenset_register

C: void (*screenset_register)(char* id, void* callbackFunc, void* param)

Screenset register.

Returnvalues:
void

Parameters:
char* id
void* callbackFunc
void* param


^ Reaper version 5.62screenset_registerNew

C: void (*screenset_registerNew)(char* id, screensetNewCallbackFunc callbackFunc, void* param)

Screenset register new.

Returnvalues:
void

Parameters:
char* id
screensetNewCallbackFunc callbackFunc
void* param


^ Reaper version 5.62screenset_unregister

C: void (*screenset_unregister)(char* id)

Screenset unregister.

Returnvalues:
void

Parameters:
char* id


^ Reaper version 5.62screenset_unregisterByParam

C: void (*screenset_unregisterByParam)(void* param)

Screenset unregister by param

Returnvalues:
void

Parameters:
void* param


^ Reaper version 5.62screenset_updateLastFocus

C: void (*screenset_updateLastFocus)(HWND prevWin)

LICE simple fill

Returnvalues:
void

Parameters:
HWND prevWin


^ Reaper version 6.13update_disk_counters

C: void (*update_disk_counters)(int readamt, int writeamt)

Updates disk I/O statistics with bytes transferred since last call.
Notify REAPER of a write error by calling with readamt=0, writeamt=-101010110 for unknown or -101010111 for disk full

Returnvalues:
void

Parameters:
int readamt
int writeamt


^ Reaper version 5.62abs

EEL2: float abs_value = abs(float value)

Returns the absolute value of the parameter.

Parameters:
float abs_value
the absolute-value of value


^ Reaper version 5.62acos

EEL2: float arc_cos = acos(float 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.

Returnvalues:
float arc_cos
the arc-cosine-value in radians

Parameters:
float value
the value, that you want to convert into arc-cosine


^ Reaper version 5.62asin

EEL2: float arc_sine = asin(float 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.

Returnvalues:
float arc_sine
the arc-sine-value in radians of value

Parameters:
float value
the value, that you want to convert to arc-sine


^ Reaper version 5.62atan

EEL2: float arc_tan = 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.

Returnvalues:
float arc_tan
the arc-tan-value in radians of value

Parameters:
float value
the value, that you want to convert to arc-tan


^ Reaper version 5.62atan2

EEL2: 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.

Parameters:
float numerator
the numerator to calculate the arc-tangent
float denominator
the denominator to calculate the arc-tangent


^ Reaper version 5.62atexit

EEL2: float retval = atexit(string 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.

Parameters:
string code
the code to be run. You can also add a regular functioncall into this string, like "main()", if there's a main-function in the script


^ Reaper version 5.62ceil

EEL2: float round_val = ceil(float value)

Returns the value rounded to the next highest integer (ceil(3.1)==4, ceil(-3.9)==-3).

Returnvalues:
float round_val
the rounded value to the next highest integer

Parameters:
float value
the value to round


^ Reaper version 5.62convolve_c

EEL2: float convolved_val = convolve_c(float dest, float src, float size)

Multiplies each of size complex pairs in dest by the complex pairs in src. Often used for convolution.

Returnvalues:
float convolved_val

Parameters:
float dest
float src
float size


^ Reaper version 5.62cos

EEL2: float cos = cos(float angle)

Returns the cosine of the angle specified (specified in radians).

Returnvalues:
float cos
the cosine value in radians

Parameters:
float angle
the angle to convert into cosine


^ Reaper version 5.62defer

EEL2: defer(string "code")

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. Identical to runloop().
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

Each function called by defer can only be deferred once per defer-cycle(unlike in Lua, where you can have one function deferred multiple times).

Unlike "normal" loops, defer allows looped code to run in the background without blocking Reaper's user interface.
That way, scripts, who need longer time to run, can be made possible.

Example:
the following example allows adding a to variable A with each defer-cycle.

function main()(
  A=A+1;
  defer("main()");
);

main();

Parameters:
string code
the code to be run. You can also add a regular functioncall into this string, like "main()", if there's a main-function in the script


^ Reaper version 5.62eval

EEL2: eval(code)

Executes code passed in. Code can use functions, but functions created in code can't be used elsewhere.

Allows loading code from files and executing it

Parameters:
string code
the code to be executed


^ Reaper version 5.62exp

EEL2: float e_pow = exp(float 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.

Returnvalues:
float e_pow
the number e raised to parameter-th power

Parameters:
float exponent
the exponent to use for raise


^ Reaper version 5.62extension_api

EEL2: various retval = extension_api(string 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).

Will return the returnvalue of the function called.

Returnvalues:
various retval
the return value of functionname, can be of numerous datatypes, refer to the docs of functionname

Parameters:
string functionname
the name of the function to run
various parameters...
the parameters used by functionname


^ Reaper version 5.62fclose

EEL2: integer retval = fclose(filehandler fp)

Closes a file previously opened with fopen().

Returnvalues:
integer retval
0, closing was successful; -1, closing was unsuccessful

Parameters:
filehandler fp
the handler of the opened file


^ Reaper version 5.62feof

EEL2: integer retval = feof(filehandler fp)

Returns nonzero if the file fp is at the end of file.

Returnvalues:
integer rteval
0, file is not at the end of a file; nonzero, it is at the end of the file

Parameters:
filehandler fp
the handler of the opened file


^ Reaper version 5.62fflush

EEL2: integer retval = fflush(filehandler fp)

If file fp is open for writing, flushes out any buffered data to disk.

Returnvalues:
integer retval
-1, couldn't flush file; 0, flushing was successful

Parameters:
filehandler fp
the handler of the file


^ Reaper version 5.62fft

EEL2: float retval = fft(data buffer, integer 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 16, 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(buffer, size) before and fft_ipermute(buffer,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.

Returnvalues:
float retval

Parameters:
data buffer
integer size


^ Reaper version 5.62fft_ipermute

EEL2: float retval = fft_ipermute(data buffer, integer size)

Permute the input for ifft(), taking bands from in-order to the order ifft() requires. See fft() for more information.


Returnvalues:
float retval

Parameters:
data buffer
integer size


^ Reaper version 5.62fft_permute

EEL2: float retval = fft_permute(data buffer, integer size)

Permute the output of fft() to have bands in-order. See fft() for more information.


Returnvalues:
float retval

Parameters:
data buffer
integer size


^ Reaper version 5.62fft_real

EEL2: fft_real(data buffer, integer size)

Performs an FFT, but takes size input samples and produces size/2 complex output pairs. Usually used along with fft_permute(size/2). Inputs/outputs will need to be scaled by 0.5/size.

Parameters:
data buffer
integer size


^ Reaper version 5.62fgetc

EEL2: integer character = fgetc(filehandler fp)

Reads a character from file fp, returns -1 if EOF.

Returnvalues:
integer character
a character read from the file; -1, if end of file

Parameters:
filehandler fp
the handler to the file


^ Reaper version 5.62fgets

EEL2: integer length = fgets(filehandler fp, string #str)

Reads a line from file fp into #str. Returns length of #str read.

Returnvalues:
integer length
the length of the line read from file.

Parameters:
filehandler fp
the handler of the file
string #str
the returned string


^ Reaper version 5.62floor

EEL2: integer rounded_value = floor(float value)

Returns the value rounded to the next lowest integer (floor(3.9)==3, floor(-3.1)==-4).

Returnvalues:
integer rounded_value
the rounded value to the next lowest integer

Parameters:
float value
the value to be rounded


^ Reaper version 5.62fopen

EEL2: filehandler fp = fopen(string fn, string mode)

Opens a file "fn" with mode "mode". For read, use "r" or "rb", write "w" or "wb". Returns a positive integer on success.

Returnvalues:
filehandler fp
the filehandler of the opened file; 0, if file couldn't be opened

Parameters:
string fn
the filename to be opened
string mode
the opening mode
"r" read,
"rb", read binary
"w", write
"wb", write binary


^ Reaper version 5.62fprintf

EEL2: integer length = fprintf(filehandler fp, string format[, various ...])

Formats a string and writes it to file fp. For more information on format specifiers, see sprintf(). Returns bytes written to file.

Many standard C printf() modifiers can be used, including:

Values for format specifiers can be specified as additional parameters to fprintf, or within {} in the format specifier (such as %{varname}d, in that case a global variable is always used).


Returnvalues:
integer length
the length of the written string

Parameters:
filehandler fp
string format
a string to format
various [...]


^ Reaper version 5.62fread

EEL2: integer read_length = fread(filehandler fp, string #str, integer length)

Reads from file fp into #str, up to length bytes. Returns actual length read, or negative if error.

Returnvalues:
integer read_length
the length of the returned string(might be less than parameter length)

Parameters:
filehandler fp
the handler of the file
string #str
the string read from the file
integer length
the length you want to read from the file


^ Reaper version 5.62freembuf

EEL2: float retval = freembuf(float 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.

Returnvalues:
float retval

Parameters:
float address


^ Reaper version 5.62fseek

EEL2: integer retval = fseek(filehandler fp, integer offset, integer 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.

Returnvalues:
integer retval
-1, if seek isn't possible;

Parameters:
filehandler fp
integer offset
integer whence


^ Reaper version 5.62ftell

EEL2: integer fposition = ftell(filehandler fp)

Returns the current file position.

Returnvalues:
integer fposition
the current position within the opened file

Parameters:
filehandler fp
the handler of the file


^ Reaper version 5.62fwrite

EEL2: integer length = fwrite(filehandler fp, string #str, integer 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.

Use fflush(fp) to write all data from the cache into the file.

Returnvalues:
integer length
the number of written bytes

Parameters:
filehandler fp
the handler of the file
string #str
the string to write into the file
integer len
the number of bytes to write to the file; 0, to write entire string


^ Reaper version 5.62get_action_context

EEL2: get_action_context(string #filename, integer sectionID, integer cmdID, integer mode, integer resolution, integer 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.

For relative mode bindings, calling get_action_context() will return the accumulated relative value in decoded form (not 65 or 63, but +1/-1 etc), and clear the internal state. So if you call it multiple times, the first one will return the accumulated value, and the second will always return 0.

Parameters:
string #filename
the filename plus path of the script
integer sectionID
the section
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
integer cmdID
the command id of the script
integer mode
-1, if script isn't run by shortcut; 55953, if script is run by shortcut
integer resolution
-1, if script isn't run by shortcut; resolution of OSC(14 bit)/MIDI(7 bit)
integer val
the value sent by MIDI or OSC


^ Reaper version 5.62gfx_arc

EEL2: integer retval = gfx_arc(integer x, integer y, integer r, float ang1, float ang2[, optional float antialias])

Draws an arc of the circle centered at x,y, with ang1/ang2 being specified in radians.

Returnvalues:
integer retval
usually 0

Parameters:
integer x
x position of the center of the circle
integer y
y position of the center of the circle
integer r
the radius of the circle
float ang1
the beginning of the circle in radians; meant for partial circles; 0-6.28
float ang2
the end of the circle in radians; meant for partial circles; 0-6.28
optional float antialias
<=0.5, antialias off; >0.5, antialias on


^ Reaper version 5.62gfx_blit

EEL2: integer src = gfx_blit(integer source, float scale, float rotation[, optional float srcx, optional float srcy, optional float srcw, optional float srch, optional integer destx, optional integer desty, optional integer destw, optional integer desth, optional float rotxoffs, optional float 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).

Returnvalues:
integer src
the blitted source

Parameters:
integer source
the source-image/framebuffer to blit; -1 to 1023; -1 for the currently displayed framebuffer.
float scale
the scale-factor; 1, for normal size; smaller or bigger than 1 make image smaller or bigger
has no effect, when destx, desty, destw, desth are given
float rotation
the rotation-factor; 0 to 6.28; 3.14 for 180 degrees.
optional float srcx
the x-coordinate-offset in the source-image
optional float srcy
the y-coordinate-offset in the source-image
optional float srcw
the width-offset in the source-image
optional float srch
the height-offset in the source-image
optional integer destx
the x-coordinate of the blitting destination
optional integer desty
the y-coordinate of the blitting destination
optional integer destw
the width of the blitting destination; may lead to stretched images
optional integer desth
the height of the blitting destination; may lead to stretched images
optional float rotxoffs
influences rotation
optional float rotyoffs
influences rotation


^ Reaper version 5.62gfx_blit

EEL2: integer src = gfx_blit(integer source, float scale, float rotation[, optional float srcx, optional float srcy, optional float srcw, optional float srch, optional integer destx, optional integer desty, optional integer destw, optional integer desth, optional float rotxoffs, optional float 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).

Returnvalues:
integer src
the blitted source

Parameters:
integer source
the source-image/framebuffer to blit; -1 to 1023; -1 for the currently displayed framebuffer.
float scale
the scale-factor; 1, for normal size; smaller or bigger than 1 make image smaller or bigger
has no effect, when destx, desty, destw, desth are given
float rotation
the rotation-factor; 0 to 6.28; 3.14 for 180 degrees.
optional float srcx
the x-coordinate-offset in the source-image
optional float srcy
the y-coordinate-offset in the source-image
optional float srcw
the width-offset in the source-image
optional float srch
the height-offset in the source-image
optional integer destx
the x-coordinate of the blitting destination
optional integer desty
the y-coordinate of the blitting destination
optional integer destw
the width of the blitting destination; may lead to stretched images
optional integer desth
the height of the blitting destination; may lead to stretched images
optional float rotxoffs
influences rotation
optional float rotyoffs
influences rotation


^ Reaper version 5.62gfx_blitext

EEL2: gfx_blitext(integer source, array coordinatelist, integer rotation)

Deprecated, use gfx_blit instead.

Note: the naming of the function might be misleading, as it has nothing to do with blitting of text, but rather is called Blit Ext.

Parameters:
integer source
array coordinatelist
float rotation


^ Reaper version 5.62gfx_blurto

EEL2: gfx_blurto(integer x, integer y)

Blurs the region of the screen between gfx_x,gfx_y and x,y, and updates gfx_x,gfx_y to x,y.

Parameters:
integer x
x position of the other edge of the blur-region
integer y
y position of the other edge of the blur-region


^ Reaper version 5.62gfx_circle

EEL2: gfx_circle(integer x, integer y, float r[, float fill, float antialias])

Draws a circle, optionally filling/antialiasing

Parameters:
integer x
x position of center of the circle
integer y
y position of center of the circle
float r
radius of the circle
float fill
<=0.5, circle is not filled; >0.5, circle is filled
float antialias
<=0.5, circle is not antialiased; >0.5, circle is antialiased


^ Reaper version 5.62gfx_clienttoscreen

EEL2: gfx_clienttoscreen(integer x, integer y)

Converts client coordinates x,y to screen coordinates.

Use variables for x and y, as the returned values will be put back into them:

gfx_init(""); // open window
x=10; // the client x-coordinate
y=20; // the client y-coordinate

gfx_clienttoscreen(x,y); // x and y hold now the converted screen-coordinates

Parameters:
integer x
the x coordinate within(!) the gfx_init()-window, that shall be converted to screen-coordinates
integer y
the y coordinate within(!) the gfx_init()-window, that shall be converted to screen-coordinates


^ Reaper version 5.95gfx_deltablit

EEL2: gfx_deltablit(integer srcimg, integer srcs, integer srct, integer srcw, integer srch, float destx, float desty, float destw, float desth, float dsdx, float dtdx, float dsdy, float dtdy, float dsdxdy, float dtdxdy[,optional integer usecliprect=1])

Blits from srcimg(srcs,srct,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. If usecliprect is specified and 0, then srcw/srch are ignored.

This function allows you to manipulate the image, which you want to blit, by transforming, moving or cropping it.

To do rotation, you can manipulate dtdx and dsdy together.

Parameters:
integer srcimg
image - the image to blit
integer srcs
positiondeltaX - the delta of the x-position of the image within the blitted area in pixels(useful default: 0)
integer srct
positiondeltaY - the delta of the y-position of the image within the blitted area in pixels(useful default: 0)
integer srcw
unknown - (useful default: 0)
integer srch
unknown - (useful default: 0)
float destx
positiondeltaX - the delta of the x-position of the blitted area in pixels(useful default: 0)
float desty
positiondeltaY - the delta of the y-position of the blitted area in pixels(useful default: 0)
float destw
blitsizeX - the x-size of the blitted area in pixels; the deltaimage might be cropped, if it exceeds this size(useful default: width of the image)
float desth
blitsizeY - the y-size of the blitted area in pixels; the deltaimage might be cropped, if it exceeds this size(useful default: height of the image)
float dsdx
stretchfactorX, the lower, the more stretched is the image(minimum 0; 1 for full size); limited by blitsizeX(useful default: 1)
float dtdx
deltaY: the delta of the right side of the image, related to the left side of the image; positive, right is moved up; negative, right is moved down; this delta is linear(useful default: 0)
float dsdy
deltaX: the delta of the bottom side of the image, related to the top side of the image; positive, bottom is moved left; negative, bottom is moved right; this delta is linear(useful default: 0)
float dtdy
stretchfactorY, the lower, the more stretched is the image(minimum 0; 1 for full size); limited by blitsizeY(useful default: 1)
float dsdxdy
deltacurvedY: the delta of the right side of the image, related to the left side of the image; positive, right is moved up; negative, right is moved down; this delta "curves" the delta via a bezier(useful default: 0)
float dtdxdy
deltacurvedX: the delta of the bottom side of the image, related to the top side of the image; positive, bottom is moved left; negative, bottom is moved right; this delta "curves" the delta via a bezier(useful default: 0)
optional float usecliprect
can be set to 0 or 1(useful default: 0)


^ Reaper version 5.62gfx_dock

EEL2: integer dockstate = gfx_dock(integer v[, optional integer wx, optional integer wy, optional integer ww, optional integer wh])

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). If wx-wh are specified, they will be filled with the undocked window position/size

Returnvalues:
integer dockstate
the new/queried dockstate

Parameters:
integer v
-1, query only docking-state; 0 and higher, set state of the window to docked
optional integer wx
will hold window-x-position
optional integer wy
will hold window-y-position
optional integer ww
will hold window-width            
optional integer wh
will hold window-height


^ Reaper version 5.62gfx_drawchar

EEL2: integer retval = gfx_drawchar(integer 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.

Returnvalues:
integer retval
the ASCII-representation of the shown character

Parameters:
integer char
the numeric ASCII-representation of the character to be drawn


^ Reaper version 5.62gfx_drawnumber

EEL2: double retval = gfx_drawnumber(double n, double n_digits)

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.

Returnvalues:
double retval
the number of parameter n

Parameters:
double n
the number to draw
double n_digits
the number of shown digits; double values will be rounded


^ Reaper version 5.62gfx_drawstr

EEL2: integer retval = gfx_drawstr(string str, optional integer flags, optional integer right, optional integer bottom)

Draws a string at gfx_x, gfx_y, and updates gfx_x/gfx_y so that subsequent draws will occur in a similar place.

* If flags, right ,bottom passed in: * flags&1: center horizontally * flags&2: right justify * flags&4: center vertically * flags&8: bottom justify * flags&256: ignore right/bottom, otherwise text is clipped to (gfx_x, gfx_y, right, bottom)


Returnvalues:
integer retval
2000000, no string is drawn; 2000001, string is drawn

Parameters:
string str
the string to draw
optional integer flags
the flags to adjust the text-alignement
optional integer right
clip text at x-pixels from gfx_x
optional integer bottom
clip text at y-pixels from gfx_y


^ Reaper version 5.62gfx_getchar

EEL2: integer typed_character = gfx_getchar(integer 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'.

Shortcuts with scope "Global + textfields" will still run the associated action, scope of "Normal" or "Global" will not.

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


Returnvalues:
integer typed_character
the character that has been typed; -1, if no window is open

Parameters:
integer char
if you want to get only a certain character-key, pass the ASCII-code for the character into this parameter


^ Reaper version 5.91eel_getdropfile

EEL2: integer retval = gfx_getdropfile(integer idx[, string #filename])

Returns filenames, drag'n'dropped into a window created by gfx_init().
Use idx to get a specific filename, that has been dropped into the gfx_init()-window.

Does NOT support mediaitems/takes or other Reaper-objects!

It MUST be called BEFORE calling gfx_update, as gfx_update flushes the filelist accessible with gfx_getdropfile.

Returnvalues:
integer retval
0, if droppped-filename with indexnumber idx doesn't exist; 1, if it exists; hints, if you already read all dropped filenames.
string filename
the filename of dropped-file with indexnumber idx

Parameters:
integer idx
the indexnumber for a filename, that has been dropped into a gfx_init()-window.
0, the first file; 1, the second file; 2, the third file, etc.
-1, clears the filelist.


^ Reaper version 5.62gfx_getfont

EEL2: integer font_index = gfx_getfont(optional string #str)

Returns current font index. If a string is passed, it will receive the actual font face used by this font, if available.

Returnvalues:
integer font_index
the index of the currently used font

Parameters:
optional string #str
this variable will hold the font-face after calling gfx_getfont


^ Reaper version 5.62gfx_getimgdim

EEL2: integer retval = gfx_getimgdim(integer image, integer w, integer h)

Retrieves 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).

Returnvalues:
integer retval
the image-index

Parameters:
integer image
the image, whose dimensions you want to retrieve
integer w
will hold the width of the image
integer h
will hold the height of the image


^ Reaper version 5.62gfx_getpixel

EEL2: integer red_value = gfx_getpixel(integer r, integer g, integer b)

Gets the value of the pixel at gfx_x,gfx_y into r,g,b.

Parameters:
integer r
will hold the red-color-value, a value between 0 to 1
integer g
will hold the green-color-value, a value between 0 to 1
integer b
will hold the blue-color-value, a value between 0 to 1


^ Reaper version 5.62gfx_gradrect

EEL2: integer retval = gfx_gradrect(integer x, integer y, integer w, integer h, double r, double g, double b, double a, optional double drdx, optional double dgdx, optional double dbdx, optional double dadx, optional double drdy, optional double dgdy, optional double dbdy, optional double 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.

Returnvalues:
integer retval

Parameters:
integer x
integer y
integer w
integer h
double r
double g
double b
double a
optional double drdx
optional double dgdx
optional double dbdx
optional double dadx
optional double drdy
optional double dgdy
optional double dbdy
optional double dady


^ Reaper version 6.40gfx_init

EEL2: integer retval = gfx_init(string name, optional integer width, optional integer height, optional integer dockstate, optional integer xpos, optional integer ypos)

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.

To resize/reposition the window, call gfx_init again and pass an empty string as name-parameter.

To retitle the window, run gfx_init again with the new title as parameter name.

To get the current window-states, dimensions, etc, you can use gfx_dock.


Parameters:
string name
the name of the window; "" to alter position/size of already opened window
optional integer width
the width of the window(default=640)
optional integer height
the height of the window(default=400)
optional integer dockstate
the dockstate of the window; 1, docked; 0, undocked(default undocked=0)
optional integer xpos
the x-position of the window(default: 0)
optional integer ypos
the y-position of the window(default: 0)


^ Reaper version 5.62gfx_line

EEL2: gfx_line(integer x, integer y, integer x2, integer y2, optional float 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.

Parameters:
integer x
the x-position of starting-point
integer y
the y-position of starting-point
integer x2
the x-position of ending-point
integer y2
the y-position of ending-point
optional float aa
0.5 and higher or not specified, antialias; lower than 0.5, not antialiased


^ Reaper version 5.62gfx_lineto

EEL2: 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.

Parameters:
x
y
aa


^ Reaper version 5.62gfx_loadimg

EEL2: 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.

Parameters:
image
filename


^ Reaper version 5.62gfx_measurechar

EEL2: gfx_measurechar(character,&w,&h)

Measures the drawing dimensions of a character with the current font (as set by gfx.setfont). Returns width and height of character.


Parameters:
character
a character, whose dimensions you want to know
w
the width of this character
h
the height if this character


^ Reaper version 5.62gfx_measurestr

EEL2: gfx_measurestr(str,&w,&h)

Measures the drawing dimensions of a string with the current font (as set by gfx_setfont).

Parameters:
str
w
h


^ Reaper version 5.62gfx_muladdrect

EEL2: 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.

Parameters:
x
y
w
h
mul_r
mul_g
mul_b
mul_a
add_r
add_g
add_b
add_a


^ Reaper version 5.62gfx_printf

EEL2: 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()

Many standard C printf() modifiers can be used, including:

Values for format specifiers can be specified as additional parameters to gfx_printf, or within {} in the format specifier (such as %{varname}d, in that case a global variable is always used).


Parameters:
format
...


^ Reaper version 5.62gfx_quit

EEL2: gfx_quit()

Closes the graphics window.


^ Reaper version 5.62gfx_rect

EEL2: gfx_rect(x,y,w,h[,filled])

Fills a rectangle at x,y,w,h pixels in dimension, filled by default.

Parameters:
x
y
w
h
filled


^ Reaper version 5.62gfx_rectto

EEL2: gfx_rectto(x,y)

Fills a rectangle from gfx_x,gfx_y to x,y. Updates gfx_x,gfx_y to x,y.

Parameters:
x
y


^ Reaper version 5.62gfx_roundrect

EEL2: gfx_roundrect(x,y,w,h,radius[,antialias])

Draws a rectangle with rounded corners.

Parameters:
x
y
w
h
radius
antialias


^ Reaper version 5.62gfx_screentoclient

EEL2: gfx_screentoclient(x,y)

Converts screen coordinates x,y to client coordinates.

Parameters:
x
y


^ Reaper version 5.62gfx_set

EEL2: gfx_set(r[,g,b,a2,mode,dest])

Sets gfx_r/gfx_g/gfx_b/gfx_a2/gfx_mode, sets gfx_dest if final parameter specified

Parameters:
r
g
b
a
mode
dest


^ Reaper version 5.62gfx_setcursor

EEL2: 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.

Parameters:
resource_id
custom_cursor_name


^ Reaper version 5.62gfx_setfont

EEL2: gfx_setfont(idx[,fontface, sz, flags])

Can select a font and optionally configure it.

After calling gfx_setfont(), gfx_texth may be updated to reflect the new average line height.

Parameters:
idx
the font-id; idx=0 for default bitmapped font, no configuration is possible for this font.
idx=1..16 for a configurable font
fontface
the name of the font, like "arial"
sz
the size of the font (8-100)
flags
flags, how to render the text; values are repeating every 256 numbers
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.
66 and 98, Bold (B), (b)
73 and 105, italic (I), (i)
79 and 111, white outline (O), (o)
82 and 114, reduced(halfbright) (R), (r)
83 and 115, sharpen (S), (s)
85 and 117, underline (U), (u)
86 and 118, inVerse (V), (v)


^ Reaper version 6.14gfx_setimgdim

EEL2: gfx_setimgdim(image,w,h)

Resize image referenced by index 0..1024-1, width and height must be 0-8192. The contents of the image will be undefined after the resize.

Parameters:
image
w
h


^ Reaper version 5.62gfx_setpixel

EEL2: gfx_setpixel(r,g,b)

Writes a pixel of r,g,b to gfx_x,gfx_y.

Parameters:
r
g
b


^ Reaper version 5.62gfx_showmenu

EEL2: 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")

Parameters:
str


^ Reaper version 5.62gfx_transformblit

EEL2: 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.

Parameters:
srcimg
destx
desty
destw
desth
div_w
div_h
table


^ Reaper version 5.62gfx_triangle

EEL2: gfx_triangle(x1,y1,x2,y2,x3,y3[x4,y4...])

Draws a filled triangle, or any convex polygon.

Parameters:
x1
y1
x2
y2
x3
y3
x4
y4
...


^ Reaper version 5.62gfx_update

EEL2: gfx_update()

Updates the graphics display, if opened.


^ Reaper version 6.30gfx_variables

EEL2: gfx VARIABLES

The following global variables are special and will be used by the graphics system:

   * gfx_r - current red component (0..1) used by drawing operations.
   * gfx_g - current green component (0..1) used by drawing operations.
   * gfx_b - current blue component (0..1) used by drawing operations.
   * gfx_a2 - current alpha component (0..1) used by drawing operations when writing solid colors (normally ignored but useful when creating transparent images).
   * gfx_a - alpha for drawing (1=normal).
   * gfx_mode - blend mode for drawing. Set mode 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_w - width of the UI framebuffer.
   * gfx_h - height of the UI framebuffer.
   * gfx_x - current graphics position X. Some drawing functions use as start position and update.
   * gfx_y - current graphics position Y. Some drawing functions use as start position and update.
   * gfx_clear - if greater than -1.0, framebuffer will be 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 - destination for drawing operations, -1 is main framebuffer, set to 0..1024-1 to have drawing operations go to an offscreen buffer (or loaded image).
   * gfx_texth - the (READ-ONLY) height of a line of text in the current font. Do not modify this variable.
   * gfx_ext_retina - to support hidpi/retina, callers should 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_ext_flags - &1 if context is JSFX embedded in TCP or MCP.
   * mouse_x - current X coordinate of the mouse relative to the graphics window.
   * mouse_y - current Y coordinate of the mouse relative to the graphics window.
   * mouse_wheel - wheel position, will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.
   * mouse_hwheel - horizontal wheel positions, will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.
   * mouse_cap - 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

    Note: Mousebuttons will be returned after gfx_init(), the other keyboard-modifier only when using gfx_getchar()!


^ Reaper version 5.62ifft

EEL2: ifft(buffer,size)

Perform an inverse FFT. For more information see fft().


Parameters:
buffer
size


^ Reaper version 5.62ifft_real

EEL2: ifft_real(buffer,size)

Performs an inverse FFT, but takes size/2 complex input pairs and produces size real output values. Usually used along with fft_ipermute(size/2).

Parameters:
buffer
size


^ Reaper version 5.62invsqrt

EEL2: invsqrt(value)

Returns a fast inverse square root (1/sqrt(x)) approximation of the parameter.

Parameters:
value


^ Reaper version 5.62log

EEL2: log(value)

Returns the natural logarithm (base e) of the parameter. If the value is not greater than 0, the return value is undefined.

Parameters:
value


^ Reaper version 5.62log10

EEL2: log10(value)

Returns the base-10 logarithm of the parameter. If the value is not greater than 0, the return value is undefined.

Parameters:
value


^ Reaper version 5.62loop

EEL2: loop(count,expression)

Evaluates count once, and then executes expression count, but not more than 1048576, times.

Parameters:
count
expression


^ Reaper version 5.62match

EEL2: match(needle,haystack[, ...])

Searches for the first parameter in the second parameter, using a simplified regular expression syntax.

You can also use format specifiers to match certain types of data, and optionally put that into a variable:

See also sprintf() for other notes, including specifying direct variable references via {}.


Parameters:
needle
haystack
...


^ Reaper version 5.62matchi

EEL2: matchi(needle,haystack[, ...])

Case-insensitive version of match().


Parameters:
needle
haystack
...


^ Reaper version 5.62max

EEL2: max(&value,&value2)

Returns (by reference) the maximum value of the two parameters. Since max() returns by reference, expressions such as max(x,y) = 5 are possible.

Parameters:
value
value2


^ Reaper version 5.62mem_get_values

EEL2: mem_get_values(offset, ...)

Reads values from memory starting at offset into variables specified. Slower than regular memory reads for less than a few variables, faster for more than a few. Undefined behavior if used with more than 32767 variables.

Parameters:
offset
...


^ Reaper version 5.62mem_set_values

EEL2: mem_set_values(offset, ...)

Writes values to memory starting at offset from variables specified. Slower than regular memory writes for less than a few variables, faster for more than a few. Undefined behavior if used with more than 32767 variables.

Parameters:
offset
...


^ Reaper version 5.62memcpy

EEL2: memcpy(dest,src,length)

Copies length items of memory from src to dest. Regions are permitted to overlap.

Parameters:
dest
src
length


^ Reaper version 5.62memset

EEL2: memset(offset,value,length)

Sets length items of memory at offset to value.

Parameters:
offset
value
length


^ Reaper version 5.62min

EEL2: min(&value,&value2)

Returns (by reference) the minimum value of the two parameters. Since min() returns by reference, expressions such as min(x,y) = 5 are possible.

Parameters:
value
value2


^ Reaper version 5.62printf

EEL2: printf(format[, ...])

Output formatted string to system-specific destination, see sprintf() for more information

Many standard C printf() modifiers can be used, including:

Values for format specifiers can be specified as additional parameters to printf, or within {} in the format specifier (such as %{varname}d, in that case a global variable is always used).


Parameters:
format
...


^ Reaper version 5.62rand

EEL2: 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.

Parameters:
max


^ Reaper version 5.62runloop

EEL2: runloop(string code)

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. Identical to defer().

Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

Each function called by runloop can only be deferred once per runloop-cycle(unlike in Lua, where you can have one function deferred multiple times).

Unlike "normal" loops, runloop allows looped code to run in the background without blocking Reaper's user interface.
That way, scripts, who need longer time to run, can be made possible.

Example:
the following example allows adding a to variable A with each runloop-cycle.

function main()(
  A=A+1;
  runloop("main()");
);

main();

Parameters:
string code
the code to be run. You can also add a regular functioncall into this string, like "main()", if there's a main-function in the script


^ Reaper version 5.62sign

EEL2: 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.

Parameters:
value


^ Reaper version 5.62sin

EEL2: 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).

Parameters:
angle


^ Reaper version 5.62sleep

EEL2: sleep(ms)

Yields the CPU for the millisecond count specified, calling Sleep() on Windows or usleep() on other platforms.

Parameters:
ms


^ Reaper version 5.62sprintf

EEL2: 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).

Parameters:
#dest
format
...


^ Reaper version 5.62sqr

EEL2: sqr(value)

Returns the square of the parameter (similar to value*value, but only evaluating value once).

Parameters:
value


^ Reaper version 5.62sqrt

EEL2: sqrt(value)

Returns the square root of the parameter. If the parameter is negative, the return value is undefined.

Parameters:
value


^ Reaper version 5.62stack_exch

EEL2: stack_exch(&value)

Exchanges a value with the top of the stack, and returns a reference to the parameter (with the new value).

Parameters:
value


^ Reaper version 5.62stack_peek

EEL2: 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.

Parameters:
index


^ Reaper version 5.62stack_pop

EEL2: 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.

Parameters:
value


^ Reaper version 5.62stack_push

EEL2: stack_push(&value)

Pushes value onto the user stack, returns a reference to the parameter.

Parameters:
value


^ Reaper version 5.62str_delsub

EEL2: str_delsub(#str,pos,len)

Deletes len characters at offset pos from #str, and returns #str.

Parameters:
#str
pos
len


^ Reaper version 5.62str_getchar

EEL2: 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


Parameters:
str
offset
type


^ Reaper version 5.62str_insert

EEL2: str_insert(#str,srcstr,pos)

Inserts srcstr into #str at offset pos. Returns #str.

Parameters:
#str
srcstr
pos


^ Reaper version 5.62str_setchar

EEL2: 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.


Parameters:
#str
offset
val
type


^ Reaper version 5.62str_setlen

EEL2: str_setlen(#str,len)

Sets length of #str (if increasing, will be space-padded), and returns #str.

Parameters:
#str
len


^ Reaper version 5.62strcat

EEL2: strcat(#str,srcstr)

Appends srcstr to #str, and returns #str

Parameters:
#str
srcstr


^ Reaper version 5.62strcmp

EEL2: strcmp(str,str2)

Compares strings, returning 0 if equal

Parameters:
str
str2


^ Reaper version 5.62strcpy

EEL2: strcpy(#str,srcstr)

Copies the contents of srcstr to #str, and returns #str

Parameters:
#str
srcstr


^ Reaper version 5.62strcpy_from

EEL2: strcpy_from(#str,srcstr,offset)

Copies srcstr to #str, but starts reading srcstr at offset offset

Parameters:
#str
srcstr
offset


^ Reaper version 5.62strcpy_substr

EEL2: 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)

Parameters:
#str
srcstr
offs
ml


^ Reaper version 5.62stricmp

EEL2: stricmp(str,str2)

Compares strings ignoring case, returning 0 if equal.

Parameters:
str
str2


^ Reaper version 5.62strlen

EEL2: strlen(str)

Returns the length of the string passed as a parameter.

Parameters:
str


^ Reaper version 5.62strncat

EEL2: strncat(#str,srcstr,maxlen)

Appends srcstr to #str, stopping after maxlen characters of srcstr. Returns #str.

Parameters:
#str
srcstr
maxlen


^ Reaper version 5.62strncmp

EEL2: strncmp(str,str2,maxlen)

Compares strings giving up after maxlen characters, returning 0 if equal.

Parameters:
str
str2
maxlen


^ Reaper version 5.62strncpy

EEL2: strncpy(#str,srcstr,maxlen)

Copies srcstr to #str, stopping after maxlen characters. Returns #str.

Parameters:
#str
srcstr
maxlen


^ Reaper version 5.62strnicmp

EEL2: strnicmp(str,str2,maxlen)

Compares strings giving up after maxlen characters, ignoring case, returning 0 if equal.

Parameters:
str
str2
maxlen


^ Reaper version 5.62tan

EEL2: double tangent = tan(double angle)

Returns the tangent of the angle specified (specified in radians).

Returnvalues:
double tangent
the tangent of the angle

Parameters:
double angle
the angle in radians


^ Reaper version 5.62tcp_close

EEL2: integer retval = tcp_close(tcp_handler connection)

Closes a TCP connection created by tcp_listen() or tcp_connect().

Returnvalues:
integer retval
1, closing was successful; 0, closing was unsuccessful

Parameters:
tcp_handler connection
the handler to the tcp-connection


^ Reaper version 5.62tcp_connect

EEL2: tcp_handler connection = tcp_connect(string address, integer port[, optional integer 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.

Returnvalues:
tcp_handler connection
the handler to the tcp-connection

Parameters:
string address
the tcp-address of the connection
integer port
the port of the connection
optional integer block
0, non-blocking connection; unspecified, blocking connection


^ Reaper version 5.62tcp_listen

EEL2: tcp_listen(integer port[, optional string interface, optional string #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.

Parameters:
integer port
optional string interface
optional string #ip_out


^ Reaper version 5.62tcp_listen_end

EEL2: tcp_listen_end(integer port)

Ends listening on port specified.

Parameters:
integer port


^ Reaper version 5.62tcp_recv

EEL2: integer retval = tcp_recv(tcp_handler connection, string #str[, integer 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.

Returnvalues:
integer retval
0, receiving works; -1, receiving doesn't work

Parameters:
tcp_handler connection
string #str
integer maxlen


^ Reaper version 5.62tcp_send

EEL2: tcp_send(tcp_handler connection, string str[, optional integer 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.

Parameters:
tcp_handler connection
string str
optional integer len


^ Reaper version 5.62tcp_set_block

EEL2: integer retval = tcp_set_block(connection,block)

Sets whether a connection blocks.

Returnvalues:
integer retval
the new block-state

Parameters:
tcp_handlerconnection
the handler to the tcp-connection
integer block
0, keep block unblocked


^ Reaper version 5.62time

EEL2: 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.

Parameters:
integer seconds
number of seconds since January 1, 1970


^ Reaper version 5.62time_precise

EEL2: float timestamp = time_precise([&timestamp])

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).

Parameters:
float timestamp
the timestamp


^ Reaper version 5.62while

EEL2: integer retval = while(code expression)

Executes expression until expression evaluates to zero, or until 1048576 iterations occur. An alternate and more useful syntax is while (expression) ( statements ), which evaluates statements after every non-zero evaluation of expression.

A=0; // set A to 0

// while A is still less than 10, add 1 to A
while(A<10)(
  A=A+1;
);

Returnvalues:
integer retval
0

Parameters:
code expression
the expression that needs to return true or false


^ Reaper version 5.62atexit

Lua: reaper.atexit(function function)

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.

You can't defer this atexit-function, when it is run as exit-function, though, when it is run regularily before exiting the script.

You can define more than one atexit-function. They will be run in the order they've been registered as atexit-functions.
For example:

    reaper.atexit(exit1)
    reaper.atexit(exit2)
    reaper.atexit(exit3)

will run exit1, exit2 and then exit3, when exiting the script.

You can have up to 1024 atexit-functions set in one script, no matter if its different or the same function.

Parameters:
function function
the function, with which the script shall finish


^ Reaper version 5.62defer

Lua: boolean retval = reaper.defer(function function)

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. Identical to runloop().Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

There can be 1024 defer-nodes running at the same time in one script, no matter if it's different functions or the same one.

Returnvalues:
boolean retval
true, node could be created; false, you tried to add more than 1024 defer-nodes in the script

Parameters:
function function
the function to be called, when the current defer/runloop-run has ended


^ Reaper version 5.62get_action_context

Lua: boolean is_new_value, string filename_with_path, integer sectionID, integer cmdID, integer mode, integer resolution, integer val = reaper.get_action_context()

Returns contextual information about the script, typically MIDI/OSC input values.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.

For relative mode bindings, calling get_action_context() will return the accumulated relative value in decoded form (not 65 or 63, but +1/-1 etc), and clear the internal state. So if you call it multiple times, the first one will return the accumulated value, and the second will always return 0.

Returnvalues:
boolean is_new_value
unknown
string filename_with_path
the script's own filename with path
integer sectionID
the section, in which this script was called
integer cmdID
the command-id associated with this script
integer mode
-1, if script isn't run by shortcut; 55953, if script is run by shortcut
integer resolution
-1, if script isn't run by shortcut; resolution of OSC(14 bit)/MIDI(7 bit)-shortcut
integer val
-1, if script isn't run by shortcut; the value sent by OSC or MIDI


^ Reaper version 5.62gfx.arc

Lua: gfx.arc(integer x, integer y, integer r, number ang1, number ang2, optional number antialias)

Draws an arc of the circle centered at x,y, with ang1/ang2 being specified in radians.

Parameters:
integer x
x position of the center of the circle
integer y
y position of the center of the circle
integer r
the radius of the circle
number ang1
the beginning of the circle in radians; meant for partial circles; 0-6.28
number ang2
the end of the circle in radians; meant for partial circles; 0-6.28
optional number antialias
<=0.5, antialias off; >0.5, antialias on


^ Reaper version 5.62gfx.blit

Lua: integer source = gfx.blit(integer source, number scale, number rotation, optional number srcx, optional number srcy, optional number srcw, optional number srch, optional integer destx, optional integer desty, optional integer destw, optional integer desth, optional integer rotxoffs, optional integer rotyoffs)

Blits(draws) the content of source-image to another source-image or an opened window.

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).

Parameters:
integer source
the source-image/framebuffer to blit; -1 to 1023; -1 for the currently displayed framebuffer.
number scale
the scale-factor; 1, for normal size; smaller or bigger than 1 make image smaller or bigger
has no effect, when destx, desty, destw, desth are given
number rotation
the rotation-factor; 0 to 6.28; 3.14 for 180 degrees.
optional number srcx
the x-coordinate-offset in the source-image
optional number srcy
the y-coordinate-offset in the source-image
optional number srcw
the width-offset in the source-image
optional number srch
the height-offset in the source-image
optional integer destx
the x-coordinate of the blitting destination
optional integer desty
the y-coordinate of the blitting destination
optional integer destw
the width of the blitting destination; may lead to stretched images
optional integer desth
the height of the blitting destination; may lead to stretched images
optional number rotxoffs
influences rotation
optional number rotyoffs
influences rotation


^ Reaper version 5.62gfx.blit(simplified)

Lua: integer source = gfx.blit(integer source, number scale, number rotation)

Blits(draws) the content of source-image to another source-image or an opened window.

This is a simplified version of gfx.blit().

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()).


Parameters:
integer source
the source-image/framebuffer to blit; -1 to 1023; -1 for the currently displayed framebuffer.
number scale
the scale-factor; 1, for normal size; smaller or bigger than 1 make image smaller or bigger
number rotation
the rotation-factor; 0 to 6.28; 3.14 for 180 degrees.


^ Reaper version 5.62gfx.blitext

Lua: number retval = gfx.blitext(source,coordinatelist,rotation)

Deprecated, use gfx.blit instead.

Note: the naming of the function might be misleading, as it has nothing to do with blitting of text, but rather is called Blit Ext.

Returnvalues:
number retval
the index of the source that got blitted

Parameters:
integer source
the source of the blitted image
table coordinatelist
number rotation


^ Reaper version 5.62gfx.blurto

Lua: gfx.blurto(integer x, integer y)

Blurs the region of the screen between gfx.x,gfx.y and x,y, and updates gfx.x,gfx.y to x,y.

Parameters:
integer x
x position of the other edge of the blur-region
integer y
y position of the other edge of the blur-region


^ Reaper version 5.62gfx.circle

Lua: gfx.circle(integer x, integer y, integer r, optional number fill, optional number antialias)

Draws a circle, optionally filling/antialiasing.

Parameters:
integer x
x position of center of the circle
integer y
y position of center of the circle
integer r
radius of the circle
optional number fill
<=0.5, circle is not filled; >0.5, circle is filled
optional number antialias
<=0.5, circle is not antialiased; >0.5, circle is antialiased


^ Reaper version 5.62gfx.clienttoscreen

Lua: int convx, int convy = gfx.clienttoscreen(integer x, integer y)

Converts the coordinates x,y to screen coordinates, returns those values.

Returnvalues:
integer convx
the converted coordinate in relation of the screen-viewport
integer convy
the converted coordinate in relation of the screen-viewport

Parameters:
integer x
the x coordinate within(!) the gfx.init()-window, that shall be converted to screen-coordinates
integer y
the y coordinate within(!) the gfx.init()-window, that shall be converted to screen-coordinates


^ Reaper version 5.95gfx.deltablit

Lua: number retval = gfx.deltablit(integer srcimg, integer srcs, integer srct, integer srcw, integer srch, number destx, number desty, number destw, number desth, number dsdx, number dtdx, number dsdy, number dtdy, number dsdxdy, number dtdxdy,optional integer usecliprect)

Blits from srcimg(srcs,srct,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. If usecliprect is specified and 0, then srcw/srch are ignored.

This function allows you to manipulate the image, which you want to blit, by transforming, moving or cropping it.

To do rotation, you can manipulate dtdx and dsdy together.

Returnvalues:
number retval
unknown, usually 0

Parameters:
integer srcimg
image - the image to blit
integer srcs
positiondeltaX - the delta of the x-position of the image within the blitted area in pixels(useful default: 0)
integer srct
positiondeltaY - the delta of the y-position of the image within the blitted area in pixels(useful default: 0)
integer srcw
unknown - (useful default: 0)
integer srch
unknown - (useful default: 0)
number destx
positiondeltaX - the delta of the x-position of the blitted area in pixels(useful default: 0)
number desty
positiondeltaY - the delta of the y-position of the blitted area in pixels(useful default: 0)
number destw
blitsizeX - the x-size of the blitted area in pixels; the deltaimage might be cropped, if it exceeds this size(useful default: width of the image)
number desth
blitsizeY - the y-size of the blitted area in pixels; the deltaimage might be cropped, if it exceeds this size(useful default: height of the image)
number dsdx
stretchfactorX, the lower, the more stretched is the image(minimum 0; 1 for full size); limited by blitsizeX(useful default: 1)
number dtdx
deltaY: the delta of the right side of the image, related to the left side of the image; positive, right is moved up; negative, right is moved down; this delta is linear(useful default: 0)
number dsdy
deltaX: the delta of the bottom side of the image, related to the top side of the image; positive, bottom is moved left; negative, bottom is moved right; this delta is linear(useful default: 0)
number dtdy
stretchfactorY, the lower, the more stretched is the image(minimum 0; 1 for full size); limited by blitsizeY(useful default: 1)
number dsdxdy
deltacurvedY: the delta of the right side of the image, related to the left side of the image; positive, right is moved up; negative, right is moved down; this delta "curves" the delta via a bezier(useful default: 0)
number dtdxdy
deltacurvedX: the delta of the bottom side of the image, related to the top side of the image; positive, bottom is moved left; negative, bottom is moved right; this delta "curves" the delta via a bezier(useful default: 0)
optional integer usecliprect
can be set to 0 or 1(useful default: 0)


^ Reaper version 5.62gfx.dock

Lua: number querystate, optional integer window_x_position, optional integer window_y_position, optional integer window_width, optional integer window_height = gfx.dock(integer v, optional integer wx, optional integer wy, optional integer ww, optional integer wh)

Queries or sets the docking-state of the gfx.init()-window.
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).

If you pass numbers to wx-wh, you can query window size and position additionally to the dock-state

A specific docking index does not necessarily represent a specific docker, means, you can not query/set left docker top, but rather all dockers that exist in the current screenset.
So the first queried/set docker can be top-left-docker or the top docker or even one of the bottom dockers.
The order doesn't seem to make any sense. Especially with more than 16 windows docked in the current screenset.

Returnvalues:
integer querystate
0 if not docked; &1 if docked;  the bits &256, &512, &1024, &2048 get the docker-index
integer window_x_position
the x position of the window in pixels; only if wx~=nil
integer window_y_position
the y position of the window in pixels; only if wy~=nil
integer window_width
the width of the window in pixels; only if ww~=nil
integer window_height
the height of the window in pixels ; only if wh~=nil

Parameters:
integer v
-1, query docking-state; 0 and higher, set state of the window to docked; the bits &256, &512, &1024, &2048 set the docker-index
optional integer wx
set to a number to query current-windowx-position
optional integer wy
set to a number to query current-windowy-position
optional integer ww
set to a number to query current-window-width
optional integer wh
set to a number to query current-window-height


^ Reaper version 5.62gfx.drawchar

Lua: integer char = gfx.drawchar(integer 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.

Returnvalues:
integer char
the character drawn; 0, if invalid(like strings or characters passed as parameter)

Parameters:
integer char
the numeric ASCII-representation of the character to be drawn


^ Reaper version 5.62gfx.drawnumber

Lua: gfx.drawnumber(number n, integer 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.

Parameters:
number n
the number to be drawn
integer ndigits
the number of digits for the precision


^ Reaper version 5.62gfx.drawstr

Lua: gfx.drawstr(string str, optional integer flags, optional integer right, optional integer bottom)

Draws a string at gfx.x, gfx.y, and updates gfx.x/gfx.y so that subsequent draws will occur in a similar place.

You can optionally set a clipping area for the text, if you set parameter flags&256 and the parameters right and bottom.

On Windows, fonts with a size > 255 may have trouble of being displayed correctly, due problems with the font-rendering and the alpha-channel. Justin's post about this.
To overcome this, try this to disable the alpha-channel:
By default, gfx.blit() blits with alpha channel. You can disable this behavior by setting "gfx.mode=2" before calling gfx.blit().

Parameters:
string str
the string to be drawn into the gfx.init-window
optional integer flags
influence, how the text shall be drawn
flags&1: center horizontally
flags&2: right justify
flags&4: center vertically
flags&8: bottom justify
flags&256: ignore right/bottom, otherwise text is clipped to (gfx.x, gfx.y, right, bottom)
optional integer right
if flags&256 is set, this parameter clips text on the right side in pixels
optional integer bottom
if flags&256 is set, this parameter clips text on the bottom side in pixels


^ Reaper version 5.94gfx.getchar

Lua: integer charactercode = gfx.getchar(optional integer character)

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', 'right', 'f1'.. 'f12', 'pgup', 'pgdn', 'ins', and 'del'.

Shortcuts with scope "Global + textfields" will still run the associated action, scope of "Normal" or "Global" will not.

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  
-
- use 65536 as parameter charactercode to query special flags, returns: &1 (supported in this script), &2=window has focus, &4=window is visible  

Some multibyte-characters, like home, up, down, left, right, f1 .. f12, pgup, pgdn, ins, del are returned as values above 255, but some other characters, like €,  
are "real"-multibyte-characters, stored as multiple 8-bit-values after each other.
To retrieve them, you need to run gfx.getchar() twice per defer-cycle and return their retvals into two variables:  
Example:

            A=gfx.getchar() -- first byte
            B=gfx.getchar() -- second byte

            if A==261 and B==128 then reaper.MB("You typed the Euro-symbol.", "Message", 0) end -- typed character is the Euro-currency-symbol.

Returnvalues:
integer charactercode
either the charactercode or 0 if nothing is pressed
-1, if the gfx.init-window is closed

When the parameter character is given and not 0, charactercode is either
0, nothing is pressed, or
>0, the character you want to check for is pressed.

Parameters:
optional integer character
the character to check for; use 65536 to check window-state(visible, focus)
   &1 (supported in this script), &2=window has focus, &4=window is visible


^ Reaper version 5.91gfx.getdropfile

Lua: integer retval, string filename = gfx.getdropfile(integer idx)

Returns filenames, drag'n'dropped into a window created by gfx.init().
Use idx to get a specific filename, that has been dropped into the gfx.init()-window.

Does NOT support mediaitems/takes or other Reaper-objects!

It MUST be called BEFORE calling gfx.update, as gfx.update flushes the filelist accessible with gfx.getdropfile.

Returnvalues:
integer retval
0, if droppped-filename with indexnumber idx doesn't exist; 1, if it exists; hints, if you already reached the last filename dropped.
string filename
the filename of dropped-file with indexnumber idx

Parameters:
integer idx
the indexnumber for a filename, that has been dropped into a gfx.init()-window.
0, the first file; 1, the second file; 2, the third file, etc.
-1, clears the filelist.


^ Reaper version 5.62gfx.getfont

Lua: integer fontindex, string fontface = gfx.getfont()

Returns current font index, and the actual font face used by this font (if available).

Use gfx.setfont to set a font for a specific index.


Returnvalues:
integer fontindex
the index of the font used.
string fontface
the font-face(fontname) of the currently used font


^ Reaper version 5.62gfx.getimgdim

Lua: integer w, integer h = gfx.getimgdim(integer handle)

Retrieves the dimensions of an image specified by handle, returns w, h pair.
Handle is basically a frame-buffer.

Returnvalues:
integer w
the width of the image-handle in pixels
integer h
the height of the image-handle in pixels

Parameters:
integer handle
the index of the image-handle/framebuffer to retrieve the dimensions from;-1 to 1023; -1 for the currently displayed framebuffer.


^ Reaper version 5.62gfx.getpixel

Lua: integer r, integer g, integer b = gfx.getpixel()

Returns r,g,b values [0..1] of the pixel at (gfx.x,gfx.y)

Returnvalues:
integer r
the red-color-value, a value between 0 to 1
integer g
the green-color-value, a value between 0 to 1
integer b
the blue-color-value, a value between 0 to 1


^ Reaper version 5.62gfx.gradrect

Lua: gfx.gradrect(number x, number y, number w, number h, number r, number g, number b, number a[, optional number drdx, optional number dgdx, optional number dbdx, optional number dadx, optional number drdy, optional number dgdy, optional number dbdy, optional number 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.

Parameters:
number x
number y
number w
number h
number r
number g
number b
number a
optional number drdx
optional number dgdx
optional number dbdx
optional number dadx
optional number drdy
optional number dgdy
optional number dbdy
optional number dady


^ Reaper version 6.40gfx.init

Lua: integer retval = gfx.init(string "name", optional integer width, optional integer height, optional integer dockstate, optional integer xpos, optional integer ypos)

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.

Only one graphics-window can be opened per script! Calling gfx.ini after a window has been opened has no effect.

To resize/reposition the window, call gfx.init again and pass an empty string as name-parameter.

To retitle the window, run gfx.init again with the new title as parameter name.

To get the current window-states, dimensions, etc, you can use gfx.dock.


Returnvalues:
number retval
1.0, if window is opened

Parameters:
string name
the name of the window, which will be shown in the title of the window
optional integer width
the width of the window; minmum is 50
optional integer height
the height of the window; minimum is 16
optional integer dockstate
&1=0, undocked; &1=1, docked
optional integer xpos
x-position of the window in pixels; minimum is -80
optional integer ypos
y-position of the window in pixels; minimum is -15


^ Reaper version 5.62gfx.line

Lua: gfx.line(integer x, integer y, integer x2, integer y2, optional number 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.

Parameters:
integer x
x-position of start of the line in pixels
integer y
y-position of start of the line in pixels
integer x2
x-position of the end of the line in pixels
integer y2
y-position of the end of the line in pixels
optional number aa
<0.5, no antialias; >=0.5, antialias


^ Reaper version 5.62gfx.lineto

Lua: gfx.lineto(integer x, integer y, number 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.

Parameters:
integer x
x-position of the end of the line in pixels
integer y
y-position of the end of the line in pixels
optional number aa
<0.5, no antialias; >=0.5, antialias


^ Reaper version 5.62gfx.loadimg

Lua: integer retval = gfx.loadimg(integer image, string 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.

Returnvalues:
integer retval
the image-index in case of successful loading; -1 if loading failed

Parameters:
integer image
the buffer-index(0 - 1023), in which to load the image
string filename
the path+filename of the image to be loaded


^ Reaper version 5.62gfx.measurechar

Lua: integer width, integer height = gfx.measurechar(integer char)

Measures the drawing dimensions of a character with the current font (as set by gfx.setfont). Returns width and height of character.


Returnvalues:
integer width
the width of the character in pixels
integer height
the height of the character in pixels

Parameters:
integer char
ASCII-Code of the character to measure


^ Reaper version 5.62gfx.measurestr

Lua: integer width, integer height = gfx.measurestr(string str)

Measures the drawing dimensions of a string with the current font (as set by gfx.setfont). Returns width and height of string.


Returnvalues:
integer width
the width of the drawing dimensions of str in pixels
integer height
the height of the drawing dimensions of str in pixels

Parameters:
string str
the string, whose drawing dimensions you want to know


^ Reaper version 5.62gfx.muladdrect

Lua: integer retval = gfx.muladdrect(integer x, integer y, integer w, integer h, number mul_r, number mul_g, number mul_b, optional number mul_a, optional number add_r, optional number add_g, optional number add_b, optional number add_a)

Multiplies each pixel within the given rectangle(x,y,w,h) by the mul_*-parameters and optionally adds add_*-parameters, and updates in-place. Useful for changing brightness/contrast, or other effects.

The multiplied values usually affect only pixels, that are not black(0,0,0,0), while the added values affect all pixels.

Returnvalues:
integer retval
unknown

Parameters:
integer x
the x-position of the rectangle in pixels, in which you want to multiply/add colorvalues to
integer y
the y-position of the rectangle in pixels, in which you want to multiply/add colorvalues to
integer w
the width of the rectangle in pixels, in which you want to multiply/add colorvalues to
integer h
the height of the rectangle in pixels, in which you want to multiply/add colorvalues to
number mul_r
the red-value to multiply by within the rectangle; 0 to 1
number mul_g
the green-value to multiply by within the rectangle; 0 to 1
number mul_b
the blue-value to multiply by within the rectangle; 0 to 1
optional number mul_a
the alpha-value to multiply by within the rectangle; 0 to 1
optional number add_r
the red-value to add by within the rectangle; 0 to 1
optional number add_g
the green-value to add by within the rectangle; 0 to 1
optional number add_b
the blue-value to add by within the rectangle; 0 to 1
optional number add_a
the alpha-value to add by within the rectangle; 0 to 1


^ Reaper version 5.62gfx.printf

Lua: number retval = gfx.printf(string format[, various ...])

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()

    * %% = %
    * %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 gfx.printf, or within {} in the format specifier (such as %{varname}d, in that case a global variable is always used).

Returnvalues:
number retval
always 0

Parameters:
string format
the format, as which the string shall be printed(refer to the description)
various ...
the value to be shown, canbe of various datatypes


^ Reaper version 5.62gfx.quit

Lua: integer retval = gfx.quit()

Closes the graphics window.

Returnvalues:
integer retval
unknown, usually 0


^ Reaper version 5.62gfx.rect

Lua: integer retval = gfx.rect(integer x, integer y, integer w, integer h, optional integer filled)

Fills a rectangle at x,y, w,h pixels in dimension, filled by default.

Returnvalues:
integer retval
unknown; usually 0

Parameters:
integer x
the x-position of the upper left corner
integer y
the y-position of the upper left corner
integer w
the width of the rectangle; must be positive
integer h
the height of the rectangle; must be positive
optional integer filled
0, unfilled; 1, filled; omitted/nil, filled


^ Reaper version 5.62gfx.rectto

Lua: integer x_coordinate = gfx.rectto(integer x, integer y)

Fills a rectangle from gfx.x,gfx.y to x,y. Updates gfx.x,gfx.y to x,y.

Returnvalues:
integer x_coordinate
the x-coordinate given as x-parameter; the purpose is unknown

Parameters:
integer x
the x-coordinate, to which the rectangle shall be drawn to
integer y
the y-coordinate, to which the rectangle shall be drawn to


^ Reaper version 5.62gfx.roundrect

Lua: integer retval = gfx.roundrect(integer x, integer y, integer w, integer h, number radius, optional integer antialias)

Draws a rectangle with rounded corners.

Returnvalues:
integer retval
unknown

Parameters:
integer x
the x-coordinate of the upper-left corner of the rectangle in pixels
integer y
the y-coordinate of the upper-left corner of the rectangle in pixels
integer w
the width of the rectangle in pixels
integer h
the height of the rectangle in pixels
number radius
the radius of the rounded corners of the rectangle; 0, for a normal rectangle;
number antialias
0, no antialias; 1 and higher, apply antialias to the rectangle


^ Reaper version 5.62gfx.screentoclient

Lua: integer convx, integer convy = gfx.screentoclient(integer x, integer y)

Converts the screen coordinates x,y to client coordinates, returns those values.

Returnvalues:
integer convx
the x-client-coordinate, as converted from the x-screen-coordinate, in pixels
integer convy
the y-client-coordinate, as converted from the y-screen-coordinate, in pixels

Parameters:
integer x
the x-screen-coordinate that shall be converted, in pixels
integer y
the y-screen-coordinate that shall be converted, in pixels


^ Reaper version 5.97gfx.set

Lua: integer retval = gfx.set(number r, optional number g, optional number b, optional number a2, optional integer mode, optional integer dest)

Sets color, drawing mode and optionally the drawing-image-source-destination.
If sets the corresponding gfx-variables.
Sets gfx.r/gfx.g/gfx.b/gfx.a2/gfx.mode sets gfx.dest if final parameter specified

Returnvalues:
integer retval
unknown

Parameters:
number r
the red-value; 0 to 1; if only parameter r is given, it's value will be used for g, b as well
optional number g
the green-value; 0 to 1
optional number b
the blue-value; 0 to 1
optional number a2
the alpha-value; 0 to 1
optional integer mode
the drawing-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().
optional integer dest
the source-image/framebuffer to draw to; -1 to 1023; -1 for the currently displayed framebuffer.


^ Reaper version 5.62gfx.setcursor

Lua: number retval = gfx.setcursor(optional integer resource_id, optional string 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.

examples for resource_id:
    101, enter text
    102, hourglass
    103, cross
    104, arrow up
    105, arrows to left up AND right down
    106, arrows to left down AND right up
    107, arrows to left AND right
    108, arrows to up AND down
    109, arrows to up, down, left and right
    110, stop sign
    111, arrow with hourglass
    112, arrow with question mark
    113, a pen
    114, hand with index finger pointing
    115, a square
    116, arrow with cd
    
works only with gfx-window opened.

Returnvalues:
number retval
0.0, gfx-window not opened; 1.0, gfx-window opened

Parameters:
optional integer resource_id
the index of the mousecursor to be used
optional string custom_cursor_name
a name of the mousecursor to be used


^ Reaper version 5.62gfx.setfont

Lua: gfx.setfont(integer idx,optional string fontface, optional integer sz, optional integer flags)

Can select a font and optionally configure it.

After calling gfx_setfont(), gfx_texth may be updated to reflect the new average line height.

Parameters:
integer idx
the font-id; idx=0 for default bitmapped font, no configuration is possible for this font.
idx=1..16 for a configurable font
optional string fontface
the name of the font, like "arial"
optional integer sz
the size of the font (8-100)
optional integer flags
flags, how to render the text; up to 4 flags can be passed at the same time
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.
  66 and 98, Bold (B), (b)
  73 and 105, italic (I), (i)
  79 and 111, white outline (O), (o)
  82 and 114, blurred (R), (r)
  83 and 115, sharpen (S), (s)
  85 and 117, underline (U), (u)
  86 and 118, inVerse (V), (v)

To create such a multibyte-character, assume this flag-value as a 32-bit-value.
The first 8 bits are the first flag, the next 8 bits are the second flag,
the next 8 bits are the third flag and the last 8 bits are the second flag.
The flagvalue(each dot is a bit): .... ....   .... ....   .... ....   .... ....
If you want to set it to Bold(B) and Italic(I), you use the ASCII-Codes of both(66 and 73 respectively),
take them apart into bits and set them in this 32-bitfield.
The first 8 bits will be set by the bits of ASCII-value 66(B), the second 8 bits will be set by the bits of ASCII-Value 73(I).
The resulting flagvalue is: 0100 0010   1001 0010   0000 0000   0000 0000
which is a binary representation of the integer value 18754, which combines 66 and 73 in it.


^ Reaper version 6.14gfx.setimgdim

Lua: integer retval = gfx.setimgdim(integer image, integer w, integer h)

Resize image referenced by index 0..1024-1, width and height must be 0-8192. The contents of the image will be undefined after the resize.

Returnvalues:
integer retval
0, if image couldn't be set(e.g. no such handle exists); 1, if setting new dimensions was successful

Parameters:
integer image
the image-handle/framebuffer, whose dimensions you want to set
integer w
the new width of the image-handle
integer h
the new height of the image-handle


^ Reaper version 5.62gfx.setpixel

Lua: integer retval = gfx.setpixel(number r, number g, number b)

Writes a pixel of r,g,b to gfx.x,gfx.y.

Returnvalues:
integer retval
1, if writing that pixel was successful; -1, is not

Parameters:
number r
the red-color-value of the pixel; 0-1
number g
the green-color-value of the pixel; 0-1
number b
the blue-color-value of the pixel; 0-1


^ Reaper version 5.62gfx.showmenu

Lua: integer selection = gfx.showmenu(string 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.

Example: selection = 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")

gfx.showmenu returns 0 if the user selected nothing from the menu, 1 if the first field is selected, etc.

Returnvalues:
integer selection
the menu-entry the user selected, with 1 for the first, 2 for the second, etc; 0, nothing was selected

Parameters:
string str
a string with the menu-entries; separate the entrynames with a |
  Each menu-entry can start with special characters that influence the appearance of that entry:
  #, item is grayed out; !, item is checked; >, this menu item shows a submenu;<, last item in the current submenu.


^ Reaper version 5.62gfx.transformblit

Lua: number retval = gfx.transformblit(integer srcimg, integer destx, integer desty, integer destw, integer desth, integer div_w, integer div_h, table 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.

Returnvalues:
number retval

Parameters:
integer srcimg
the image-index (1 to 1024) that you want to blit into the screenbuffer -1
integer destx
x position of the blit picture
integer desty
y position of the blit picture
integer destw
width of the blit picture
integer desth
height of the blit picture
integer div_w
unknown, 2 to 64; probably related to parameter table
integer div_h
unknown, 2 to 64; probably related to parameter table
table table
a table of the texture coordinates, with each entry being set to a pair of value, eg: 1, 0. Will be read from left to right and from top to bottom.
table[1]=1,2
table[2]=2,3
table[3]=3,1
How these values work needs more research...


^ Reaper version 5.62gfx.triangle

Lua: gfx.triangle(integer x1, integer y1, integer x2, integer y2, integer x3, integer y3, [optional integer x4, optional integer y4, ...)

Draws a filled triangle, or any convex polygon.

Parameters:
integer x1
the x-position of the first point of the polygon
integer y1
the y-position of the first point of the polygon
integer x2
the x-position of the second point of the polygon
integer y2
the y-position of the second point of the polygon
integer x3
the x-position of the third point of the polygon
integer y3
the y-position of the third point of the polygon
optional integer x4
the x-position of the fourth point of the polygon
optional integer y4
the y-position of the fourth point of the polygon
...
...
...
...


^ Reaper version 5.62gfx.update

Lua: gfx.update()

Updates the graphics display, if opened


^ Reaper version 6.30gfx_variables

Lua: gfx VARIABLES

The following global variables are special and will be used by the graphics system:

  * gfx.r - current red component (0..1) used by drawing operations.
  * gfx.g - current green component (0..1) used by drawing operations.
  * gfx.b - current blue component (0..1) used by drawing operations.
  * gfx.a2 - current alpha component (0..1) used by drawing operations when writing solid colors (normally ignored but useful when creating transparent images).
  * gfx.a - alpha for drawing (1=normal).
  * gfx.mode - blend mode for drawing. Set mode 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.w - width of the UI framebuffer.
  * gfx.h - height of the UI framebuffer.
  * gfx.x - current graphics position X. Some drawing functions use as start position and update.
  * gfx.y - current graphics position Y. Some drawing functions use as start position and update.
  * gfx.clear - if greater than -1.0, framebuffer will be 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 - destination for drawing operations, -1 is main framebuffer, set to 0..1024-1 to have drawing operations go to an offscreen buffer (or loaded image).
  * gfx.texth - the (READ-ONLY) height of a line of text in the current font. Do not modify this variable.
  * gfx.ext_retina - to support hidpi/retina, callers should 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.ext_flags - &1 if context is JSFX embedded in TCP or MCP.
  * gfx.mouse_x - current X coordinate of the mouse relative to the graphics window.
  * gfx.mouse_y - current Y coordinate of the mouse relative to the graphics window.
  * gfx.mouse_wheel - wheel position, will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.
  * gfx.mouse_hwheel - horizontal wheel positions, will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.
  * gfx.mouse_cap - 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
        
Note: Mousebuttons will be returned after gfx_init(), the other keyboard-modifier only when using gfx_getchar()!
        


^ Reaper version 6.20gmem_attach

Lua: string former_attached_gmemname = reaper.gmem_attach(string sharedMemoryName)

Causes gmem_read()/gmem_write() to read EEL2/JSFX/Video shared memory segment named by parameter. Set to empty string to detach. 6.20+: returns previous shared memory segment name.

Must be called, before you can use a specific gmem-variable-index with gmem_write!

Returnvalues:
string former_attached_gmemname
if you change the attached-gmem from one to a new one, this will hold the name of the previous attached shared memory(gmem)

Parameters:
string sharedMemoryName
the name of the shared memory


^ Reaper version 5.97gmem_read

Lua: number retval = reaper.gmem_read(integer index)

Read (number) value from shared memory attached-to by gmem_attach(). index can be [0..1<<25).

returns nil if not available

Returnvalues:
number retval
the stored number-value stored in gmem-variable with index

Parameters:
integer index
the index of the memory-variable to read from; index must be 0 and higher


^ Reaper version 5.97gmem_write

Lua: reaper.gmem_write(integer index, number value)

Write (number) value to shared memory attached-to by gmem_attach(). index can be [0..1<<25).

Before you can write into a currently unused variable with index "index", you must call gmem_attach first!


Parameters:
integer index
the index of the memory-variable to write to; index must be 0 and higher
number value
a number, either integer or float


^ Reaper version 5.62new_array

Lua: ReaperArray reaper.array = reaper.new_array([table|array values], [integer 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.

Returnvalues:
ReaperArray reaper.array

Parameters:
table|array values
integer size


^ Reaper version 5.62runloop

Lua: boolean retval = reaper.runloop(function function)

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. Identical to defer().Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

Returnvalues:
int retval
true, if succeded

Parameters:
function function
the function to be called


^ Reaper version 5.62{reaper.array}.clear

Lua: boolean retval = {reaper.array}.clear([number|string value, integer offset, integer 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.

Returnvalues:
boolean retval

Parameters:
number|string value
integer offset
integer size


^ Reaper version 5.62{reaper.array}.convolve

Lua: integer retval = {reaper.array}.convolve([reaper.array src, integer srcoffs, integer size, integer 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)

Returnvalues:
integer retval

Parameters:
reaper.array src
integer scroffs
integer size
integer destoffs


^ Reaper version 5.62{reaper.array}.copy

Lua: integer retval = {reaper.array}.copy([reaper.array src, integer srcoffs, integer size, integer destoffs])

Copies values from reaper.array or table, starting at 1-based srcoffs, writing to 1-based destoffs.

Returnvalues:
integer retval

Parameters:
reaper.array src
integer srcoffs
integer size
integer destoffs


^ Reaper version 5.62{reaper.array}.fft

Lua: boolean retval = {reaper.array}.fft(integer size[, boolean permute, integer 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.

Returnvalues:
boolean retval
true, fft was successful; false, fft was unsuccessful

Parameters:
integer size
boolean premute
integer offset


^ Reaper version 5.62{reaper.array}.fft_real

Lua: boolean retval = {reaper.array}.fft_real(integer size[, boolean permute, integer offset])

Performs a forward real->complex 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.

Returnvalues:
boolean retval
true, fft was successful; false, fft was unsuccessful

Parameters:
integer size
boolean premute
integer offset


^ Reaper version 5.62{reaper.array}.get_alloc

Lua: integer size = {reaper.array}.get_alloc()

Returns the maximum (allocated) size of the array.

Returnvalues:
integer size


^ Reaper version 5.62{reaper.array}.ifft

Lua: boolean retval = {reaper.array}.ifft(integer size[, boolean permute, integer 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.

Returnvalues:
boolean retval
true, fft was successful; false, fft was unsuccessful

Parameters:
integer size
boolean permute
integer offset


^ Reaper version 5.62{reaper.array}.ifft_real

Lua: boolean retval = {reaper.array}.ifft_real(integer size[, boolean permute, integer offset])

Performs a backwards complex->real 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.

Returnvalues:
boolean retval
true, fft was successful; false, fft was unsuccessful

Parameters:
integer size
boolean permute
integer offset


^ Reaper version 5.62{reaper.array}.multiply

Lua: integer retvals = {reaper.array}.multiply([{reaper.array} src, integer srcoffs, integer size, number destoffs])

Multiplies values from reaper.array, starting at 1-based srcoffs, reading/writing to 1-based destoffs.

Returnvalues:
integer retvals

Parameters:
{reaper.array} src
integer srcoffs
integer size
number destoff


^ Reaper version 5.62{reaper.array}.resize

Lua: boolean retval = {reaper.array}.resize(size)

Resizes an array object to size. size must be [0..max_size].

Returnvalues:
boolean retval
true, changing size was successful; false, changing was unsuccessful

Parameters:
integer size
the new size of the table


^ Reaper version 5.62{reaper.array}.table

Lua: table new_table = {reaper.array}.table([integer offset, integer 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.

Returnvalues:
table new_table
a table with the entries from the reaper.array

Parameters:
integer offset
the first entry of the reaper.array to be included into the table
integer size
the number of entries to include into the table


^ Reaper version 5.62atexit

Python: RPR_atexit(String 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.

Parameters:
String code


^ Reaper version 5.62defer

Python: RPR_defer(String code)

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. Identical to runloop().
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

Parameters:
String code


^ Reaper version 5.62runloop

Python: RPR_runloop(String code)

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. Identical to defer().
Note that no undo point will be automatically created when the script finishes, unless you create it explicitly.

Parameters:
String code


^ Reaper version 5.62APIExists

C: bool APIExists(const char* function_name)
EEL2: bool APIExists(function_name")
Lua: boolean func_exists = reaper.APIExists(string function_name)
Python: Boolean RPR_APIExists(String function_name)

Returns true if function_name exists in the REAPER API

Returnvalues:
boolean func_exists
true, if function_name exists, false if not

Parameters:
string function_name
the name of the function you want to check the existence for


^ Reaper version 5.62APITest

C: void APITest()
EEL2: APITest()
Lua: reaper.APITest()
Python: RPR_APITest()

Displays a message window with "Hello World", if the API was successfully called.


^ Reaper version 5.62AddRemoveReaScript

C: int AddRemoveReaScript(bool add, int sectionID, const char* scriptfn, bool commit)
EEL2: int AddRemoveReaScript(bool add, int sectionID, "scriptfn", bool commit)
Lua: integer command_id = reaper.AddRemoveReaScript(boolean add, integer sectionID, string scriptfn, boolean commit)
Python: Int RPR_AddRemoveReaScript(Boolean add, Int sectionID, String scriptfn, Boolean commit)

Adds a ReaScript (returns the new command ID, or 0 if failed) or removes a ReaScript
Returns >0 on success.
Use commit==true when adding/removing a single script.
When bulk adding/removing multiple scripts, you can optimize the n-1 first calls with commit==false and commit==true for the last call.
The commandID returned, might change, when adding this script into another Reaper-installation.
To be sure to use the right command-id, use ReverseNamedCommandLookup() to get the ActionCommandID, which will never change, until you remove the script.

If you want to add a script to several sections, you need to add them individually, by calling the function again with the changed section-number.

Returnvalues:
integer command id
the command ID for this script.

Parameters:
boolean add
true, if it shall be added, false if it shall be removed
integer sectionID
the section, in which this script shall appear(e.g. in the Show Actions-Dialog)
  0, Main
  100, Main (alt recording) Note: If you already added to main(section 0), this function automatically adds the script to Main(alt) as well.
  32060, MIDI Editor
  32061, MIDI Event List Editor
  32062, MIDI Inline Editor
  32063, Media Explorer
string scriptfn
the filename of the Reascript to be added
boolean commit
true, if it shall be committed, false, if you want to add new scripts first.
Committing means, that Reaper stores the Reascript-information into the reaper-kb.ini for permanent use.
It will be committed at Reaper's exit as well, but if Reaper crashes before exiting properly, your added
script might get lost. When adding many Reascripts to Reaper, setting commit to false might help prevail
ressources, as you don't rewrite the reaper-kb.ini file over and over again. However, if you only add a
few scripts, this might not be of importance to you.


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_GetConstant(SWS)

C: int BR_Win32_GetConstant(const char* constantName)
EEL2: int extension_api("BR_Win32_GetConstant", "constantName")
Lua: integer retval = reaper.BR_Win32_GetConstant(string constantName)
Python: Int BR_Win32_GetConstant(String constantName)

[BR] Returns various constants needed for BR_Win32 functions.
Supported constants are:
CB_ERR, CB_GETCOUNT, CB_GETCURSEL, CB_SETCURSEL
EM_SETSEL
GW_CHILD, GW_HWNDFIRST, GW_HWNDLAST, GW_HWNDNEXT, GW_HWNDPREV, GW_OWNER
GWL_STYLE
SW_HIDE, SW_MAXIMIZE, SW_SHOW, SW_SHOWMINIMIZED, SW_SHOWNA, SW_SHOWNOACTIVATE, SW_SHOWNORMAL
SWP_FRAMECHANGED, SWP_FRAMECHANGED, SWP_NOMOVE, SWP_NOOWNERZORDER, SWP_NOSIZE, SWP_NOZORDER
VK_DOWN, VK_UP
WM_CLOSE, WM_KEYDOWN
WS_MAXIMIZE, WS_OVERLAPPEDWINDOW

Returnvalues:
integer retval

Parameters:
string constantName


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_HIBYTE(SWS)

C: int BR_Win32_HIBYTE(int value)
EEL2: int extension_api("BR_Win32_HIBYTE", int value)
Lua: integer retval = reaper.BR_Win32_HIBYTE(integer value)
Python: Int BR_Win32_HIBYTE(Int value)

[BR] Equivalent to win32 API HIBYTE().

Returnvalues:
integer retval

Parameters:
integer value


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_HIWORD(SWS)

C: int BR_Win32_HIWORD(int value)
EEL2: int extension_api("BR_Win32_HIWORD", int value)
Lua: integer retval = reaper.BR_Win32_HIWORD(integer value)
Python: Int BR_Win32_HIWORD(Int value)

[BR] Equivalent to win32 API HIWORD().

Returnvalues:
integer retval

Parameters:
integer value


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_LOBYTE(SWS)

C: int BR_Win32_LOBYTE(int value)
EEL2: int extension_api("BR_Win32_LOBYTE", int value)
Lua: integer retval = reaper.BR_Win32_LOBYTE(integer value)
Python: Int BR_Win32_LOBYTE(Int value)

[BR] Equivalent to win32 API LOBYTE().


Returnvalues:
integer retval

Parameters:
integer value


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_LOWORD(SWS)

C: int BR_Win32_LOWORD(int value)
EEL2: int extension_api("BR_Win32_LOWORD", int value)
Lua: integer retval = reaper.BR_Win32_LOWORD(integer value)
Python: Int BR_Win32_LOWORD(Int value)

[BR] Equivalent to win32 API LOWORD().

Returnvalues:
integer retval

Parameters:
integer value


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_MAKELONG(SWS)

C: int BR_Win32_MAKELONG(int low, int high)
EEL2: int extension_api("BR_Win32_MAKELONG", int low, int high)
Lua: integer retval = reaper.BR_Win32_MAKELONG(integer low, integer high)
Python: Int BR_Win32_MAKELONG(Int low, Int high)

[BR] Equivalent to win32 API MAKELONG().

Returnvalues:
integer retval

Parameters:
integer low
integer high


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_MAKELPARAM(SWS)

C: int BR_Win32_MAKELPARAM(int low, int high)
EEL2: int extension_api("BR_Win32_MAKELPARAM", int low, int high)
Lua: integer retval = reaper.BR_Win32_MAKELPARAM(integer low, integer high)
Python: Int BR_Win32_MAKELPARAM(Int low, Int high)

[BR] Equivalent to win32 API MAKELPARAM().

Returnvalues:
integer retval

Parameters:
integer low
integer high


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_MAKELRESULT(SWS)

C: int BR_Win32_MAKELRESULT(int low, int high)
EEL2: int extension_api("BR_Win32_MAKELRESULT", int low, int high)
Lua: integer retval = reaper.BR_Win32_MAKELRESULT(integer low, integer high)
Python: Int BR_Win32_MAKELRESULT(Int low, Int high)

[BR] Equivalent to win32 API MAKELRESULT().

Returnvalues:
integer retval

Parameters:
integer low
integer high


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_MAKEWORD(SWS)

C: int BR_Win32_MAKEWORD(int low, int high)
EEL2: int extension_api("BR_Win32_MAKEWORD", int low, int high)
Lua: integer retval = reaper.BR_Win32_MAKEWORD(integer low, integer high)
Python: Int BR_Win32_MAKEWORD(Int low, Int high)

[BR] Equivalent to win32 API MAKEWORD().

Returnvalues:
integer retval

Parameters:
integer low
integer high


^ Reaper version 5.965 SWS version 2.10.0.1BR_Win32_MAKEWPARAM(SWS)

C: int BR_Win32_MAKEWPARAM(int low, int high)
EEL2: int extension_api("BR_Win32_MAKEWPARAM", int low, int high)
Lua: integer retval = reaper.BR_Win32_MAKEWPARAM(integer low, integer high)
Python: Int BR_Win32_MAKEWPARAM(Int low, Int high)

[BR] Equivalent to win32 API MAKEWPARAM().

Returnvalues:
integer retval

Parameters:
integer low
integer high


^ Reaper version 5.62 SWS version 2.9.7BR_Win32_ShellExecute(SWS)

C: int BR_Win32_ShellExecute(const char* operation, const char* file, const char* parameters, const char* directory, int showFlags)
EEL2: int extension_api("BR_Win32_ShellExecute", "operation", "file", "parameters", "directory", int showFlags)
Lua: integer retval = reaper.BR_Win32_ShellExecute(string operation, string file, string parameters, string directory, integer showFlags)
Python: Int BR_Win32_ShellExecute(String operation, String file, String parameters, String directory, Int showFlags)

[BR] Equivalent to win32 API ShellExecute() with HWND set to main window

Returnvalues:
integer retval

Parameters:
string operation
string file
string parameters
string directory
integer showFlags


^ Reaper version 5.965 SWS version 2.12.1.1CF_EnumerateActions(SWS)

C: int CF_EnumerateActions(int section, int index, char* nameOut, int nameOut_sz)
EEL2: int extension_api("CF_EnumerateActions", int section, int index, #name)
Lua: integer retval, string name = reaper.CF_EnumerateActions(integer section, integer index)
Python: (Int retval, Int section, Int index, String nameOut, Int nameOut_sz) = CF_EnumerateActions(section, index, nameOut, nameOut_sz)

Wrapper for the unexposed kbd_enumerateActions API function.
Main=0, Main (alt recording)=100, MIDI Editor=32060, MIDI Event List Editor=32061, MIDI Inline Editor=32062, Media Explorer=32063

Returnvalues:
integer retval
string name

Parameters:
integer section
integer index


^ Reaper version 5.979 SWS version 2.12.1.1CF_GetClipboard(SWS)

C: void CF_GetClipboard(char* textOutNeedBig, int textOutNeedBig_sz)
EEL2: extension_api("CF_GetClipboard", #text)
Lua: string text = reaper.CF_GetClipboard()
Python: (String textOutNeedBig, Int textOutNeedBig_sz) = CF_GetClipboard(textOutNeedBig, textOutNeedBig_sz)

Read the contents of the system clipboard.

Returnvalues:
string text
the content of the clipboard


^ Reaper version 5.62 SWS version 2.11.0CF_GetClipboardBig(SWS)

C: const char* CF_GetClipboardBig(WDL_FastString* output)
EEL2: bool extension_api("CF_GetClipboardBig", #retval, WDL_FastString output)
Lua: string clipboard_content = reaper.CF_GetClipboardBig(WDL_FastString output)
Python: String CF_GetClipboardBig(WDL_FastString output)

[DEPRECATED: Use CF_GetClipboard] Read the contents of the system clipboard. See SNM_CreateFastString and SNM_DeleteFastString.


Returnvalues:
string clipboard_content
the content of the clipboard

Parameters:
WDL_FastString output
a faststring used by this


^ Reaper version 5.965 SWS version 2.10.0.1CF_GetCommandText(SWS)

C: const char* CF_GetCommandText(int section, int command)
EEL2: bool extension_api("CF_GetCommandText", #retval, int section, int command)
Lua: string str = reaper.CF_GetCommandText(integer section, integer command)
Python: String CF_GetCommandText(Int section, Int command)

Wrapper for the unexposed kbd_getTextFromCmd API function. See CF_EnumerateActions for common section IDs.


Returnvalues:
string str

Parameters:
integer section
integer command


^ Reaper version 5.965 SWS version 2.12.0CF_GetSWSVersion(SWS)

C: void CF_GetSWSVersion(char* versionOut, int versionOut_sz)
EEL2: extension_api("CF_GetSWSVersion", #version)
Lua: string version = reaper.CF_GetSWSVersion()
Python: (String versionOut, Int versionOut_sz) = CF_GetSWSVersion(versionOut, versionOut_sz)

Return the current SWS version number.

Returnvalues:
string version


^ Reaper version 5.62 SWS version 2.9.7CF_SetClipboard(SWS)

C: void CF_SetClipboard(const char* str)
EEL2: extension_api("CF_SetClipboard", "str")
Lua: reaper.CF_SetClipboard(string str)
Python: CF_SetClipboard(String str)

Write the given string into the system clipboard.

Parameters:
string str
the string to put into the clipboard


^ Reaper version 5.965 SWS version 2.10.0.1CF_ShellExecute(SWS)

C: bool CF_ShellExecute(const char* file)
EEL2: bool extension_api("CF_ShellExecute", "file")
Lua: boolean retval = reaper.CF_ShellExecute(string file)
Python: Boolean CF_ShellExecute(String file)

Open the given file or URL in the default application. See also CF_LocateInExplorer.


Returnvalues:
boolean retval

Parameters:
string file


^ Reaper version 5.62ClearConsole

C: void ClearConsole()
EEL2: ClearConsole()
Lua: reaper.ClearConsole()
Python: RPR_ClearConsole()

Clear the ReaScript console. See ShowConsoleMsg



^ Reaper version 5.62ClearPeakCache

C: void ClearPeakCache()
EEL2: ClearPeakCache()
Lua: reaper.ClearPeakCache()
Python: RPR_ClearPeakCache()

resets the global peak caches


^ Reaper version 5.62ColorFromNative

C: void ColorFromNative(int col, int* rOut, int* gOut, int* bOut)
EEL2: ColorFromNative(int col, int &r, int &g, int &b)
Lua: integer r, integer g, integer b = reaper.ColorFromNative(integer col)
Python: (Int col, Int rOut, Int gOut, Int bOut) = RPR_ColorFromNative(col, rOut, gOut, bOut)

Extract RGB values from an OS dependent color. See ColorToNative.

As Reaper treats colors differently on Mac and Windows, you should always use ColorFromNative and ColorToNative.


Returnvalues:
integer r
the value for red, from 0 to 255
integer g
the value for green, from 0 to 255
integer b
the value for blue, from 0 to 255

Parameters:
integer col
the colorvalue to convert from


^ Reaper version 5.62ColorToNative

C: int ColorToNative(int r, int g, int b)
EEL2: int ColorToNative(int r, int g, int b)
Lua: integer col = reaper.ColorToNative(integer r, integer g, integer b)
Python: Int RPR_ColorToNative(Int r, Int g, Int b)

Make an OS dependent color from RGB values (e.g. RGB() macro on Windows). r,g and b are in [0..255]. See ColorFromNative As Reaper treats colors differently on Mac and Windows, you should always use ColorFromNative and ColorToNative.

When using the returned colorvalue, you need to add |0x1000000 at the end of it, like ColorToNative(20,30,40)|0x1000000.


Returnvalues:
integer col
the correct colorvalue, fitting to your system.

Parameters:
integer r
the value for red, from 0 to 255
integer g
the value for green, from 0 to 255
integer b
the value for blue, from 0 to 255


^ Reaper version 5.62DB2SLIDER

C: double DB2SLIDER(double x)
EEL2: double DB2SLIDER(x)
Lua: number slider_value = reaper.DB2SLIDER(number x)
Python: Float RPR_DB2SLIDER(Float x)

Converts dB-value into a slider-value. Good for converting envelope-point-values.

Returnvalues:
number slider_value
the slider-value

Parameters:
number x
the dB-value to be converted. Minimum -332db for position 0


^ Reaper version 5.62ExecProcess

C: const char* ExecProcess(const char* cmdline, int timeoutmsec)
EEL2: bool ExecProcess(#retval, "cmdline", int timeoutmsec)
Lua: string command_output = reaper.ExecProcess(string cmdline, integer timeoutmsec)
Python: String RPR_ExecProcess(String cmdline, Int timeoutmsec)

Executes command line, returns NULL on total failure, otherwise the return value, a newline, and then the output of the command.

Commands executed with ExecProcess() don't benefit from PATH-system-variables. That said, you must give the full path to a command, even if you can usually just type the command into a shell. You also may need to set a codepage manually to get the correct character-encoding. So in some cases, writing a batch-script and executing it with ExecProcess() might be a good idea.

Note: when using this in Lua, you need to take care of the right file-separators: / on Mac and Linux or \ on Windows. Unlike other Lua/Lua-used-ReaScript-functions, this will not convert the file-separators to the current system's equivalent.
Keep that in mind, when doing multi-platform-scripts!

The base-directory is Reaper's appdirectory.

On Windows, you can not use command-line-internal commands, like dir or cd, directly. To use them, you need to use cmd.exe.
You can do it like:

-    "$Path_to_Command_Exe\\cmd.exe /Q /C command"

where "/Q" executes cmd.exe silently(otherwise a command-line-window pops up; but output of commands will show anyway) and "/C command" executes command.

To get a full directory-listing of c:\\ in a file c:\\directorylisting.txt, you can use:
-   "c:\\windows\\system32\\cmd.exe /Q /C dir c:\\ >c:\\directorylisting.txt"

Returnvalues:
string command_output
return value, newline and output of the command; otherwise nil

Parameters:
string cmdline
the command to execute
integer timeoutmsec
how long to wait, until termination of execution
positive value, the time to wait for execution in milliseconds
   0, command will be allowed to run indefinitely (recommended for large amounts of returned output).
  -1, for no wait/terminate
  -2, for no wait and minimize


^ Reaper version 6.18GetAppVersion

C: const char* GetAppVersion()
EEL2: bool GetAppVersion(#retval)
Lua: string reaper_app_version = reaper.GetAppVersion()
Python: String RPR_GetAppVersion()

Returns app version which may include an OS/arch signifier, such as: "6.17" (windows 32-bit), "6.17/x64" (windows 64-bit), "6.17/OSX64" (macOS 64-bit Intel), "6.17/OSX" (macOS 32-bit), "6.17/macOS-arm64", "6.17/linux-x86_64", "6.17/linux-i686", "6.17/linux-aarch64", "6.17/linux-armv7l", etc

Returnvalues:
string reaper_app_version
the returned version-number of Reaper


^ Reaper version 5.62GetExePath

C: const char* GetExePath()
EEL2: bool GetExePath(#retval)
Lua: string path = reaper.GetExePath()
Python: String RPR_GetExePath()

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

Returnvalues:
string path
the path to the reaper.exe or reaper.app


^ Reaper version 6.18GetOS

C: const char* GetOS()
EEL2: bool GetOS(#retval)
Lua: string operating_system = reaper.GetOS()
Python: String RPR_GetOS()

Returns the current operating-system. Good for determining, e.g. the correct filesystem-separators.

Returnvalues:
string operating_system
"Win32", "Win64", "OSX32", "OSX64", "macOS-arm64" or "Other"


^ Reaper version 5.62GetResourcePath

C: const char* GetResourcePath()
EEL2: bool GetResourcePath(#retval)
Lua: string resource_path = reaper.GetResourcePath()
Python: String RPR_GetResourcePath()

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

When resourcepath is equal to app-path(see GetExePath), it is an indicator that Reaper is installed as portable installation.


Returnvalues:
string resource_path
the path to the resource-folder


^ Reaper version 5.62GetToggleCommandState

C: int GetToggleCommandState(int command_id)
EEL2: int GetToggleCommandState(int command_id)
Lua: integer retval = reaper.GetToggleCommandState(integer command_id)
Python: Int RPR_GetToggleCommandState(Int command_id)

Return toggle-state of an action. See GetToggleCommandStateEx. See NamedCommandLookup() for the correct command_id.


Returnvalues:
integer retval
toggle-state
0, off
&1, on/checked in menus
&2, on/grayed out in menus
&16, on/bullet in front of the entry in menus
-1, NA because the action does not have on/off states.

Parameters:
integer command_id
the command_id, whose toggle-state you want to know.


^ Reaper version 5.62GetToggleCommandStateEx

C: int GetToggleCommandStateEx(int section_id, int command_id)
EEL2: int GetToggleCommandStateEx(int section_id, int command_id)
Lua: integer retval = reaper.GetToggleCommandStateEx(integer section_id, integer command_id)
Python: Int RPR_GetToggleCommandStateEx(Int section_id, Int command_id)

Return toggle-state of an action. For the main action context, the MIDI editor, or the media explorer, returns the toggle state of the action. For the MIDI editor, the action state for the most recently focused window will be returned. See NamedCommandLookup() for the correct command_id.


Returnvalues:
integer retval
toggle-state
0, off
&1, on/checked in menus
&2, on/grayed out in menus
&16, on/bullet in front of the entry in menus
-1, NA because the action does not have on/off states.

Parameters:
integer section_id
the section, in which the action lies
0, Main
100, Main (alt recording)
32060, MIDI Editor
32061, MIDI Event List Editor
32062, MIDI Inline Editor
32063, Media Explorer
integer command_id
the command_id, whose toggle-state you want to know.


^ Reaper version 5.62IsMediaExtension

C: bool IsMediaExtension(const char* ext, bool wantOthers)
EEL2: bool IsMediaExtension("ext", bool wantOthers)
Lua: boolean is_mediaextension = reaper.IsMediaExtension(string ext, boolean wantOthers)
Python: Boolean RPR_IsMediaExtension(String ext, Boolean wantOthers)

Tests a file extension (i.e. "wav" or "mid") to see if it's a media extension.
If wantOthers is set, then "RPP", "TXT" and other project-type formats will also pass.

Returnvalues:
boolean is_mediaextension

Parameters:
string ext
boolean wantOthers


^ Reaper version 6.11LocalizeString

C: const char* LocalizeString(const char* src_string, const char* section, int flagsOptional)
EEL2: bool LocalizeString(#retval, "src_string", "section", int flags)
Lua: string retval = reaper.LocalizeString(string src_string, string section, integer flags)
Python: String RPR_LocalizeString(String src_string, String section, Int flagsOptional)

Returns a localized version of src_string, in section section. flags can have 1 set to only localize if sprintf-style formatting matches the original.

Returnvalues:
string retval
the localized string or the original string, if no localized string is available

Parameters:
string src_string
the string, which you want to be translated
string section
the section in the ReaperLangPack-file, in which the string to localize is located
integer flags
1, set to only localize if sprintf-style formatting matches the original


^ Reaper version 5.62Main_OnCommand

C: void Main_OnCommand(int command, int flag)
EEL2: Main_OnCommand(int command, int flag)
Lua: reaper.Main_OnCommand(integer command, integer flag)
Python: RPR_Main_OnCommand(Int command, Int flag)

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


Parameters:
integer command
the command-id of the action, you want to run
integer flag
set to 0


^ Reaper version 5.62Main_OnCommandEx

C: void Main_OnCommandEx(int command, int flag, ReaProject* proj)
EEL2: 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().


Parameters:
integer command
the command-id of the action, you want to run
integer flag
0
ReaProject proj
the project-number. 0 for the current project.


^ Reaper version 5.62NamedCommandLookup

C: int NamedCommandLookup(const char* command_name)
EEL2: int NamedCommandLookup("command_name")
Lua: integer retval = 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.

see Main_OnCommand for executing actions with command-ID-numbers.


Returnvalues:
integer retval
the command-id-number of the script/action, which can be used to e.g. run the action, toggle actions, refresh toolbars, etc.

Parameters:
string command_name
the ActionCommandID of the script/action, whose command-id number you want. Must start with _, eg. "SWS_ABOUT" -> "_SWS_ABOUT"


^ Reaper version 6.29ReaScriptError

C: void ReaScriptError(const char* errmsg)
EEL2: ReaScriptError("errmsg")
Lua: reaper.ReaScriptError(string errmsg)
Python: RPR_ReaScriptError(String errmsg)

Causes REAPER to display the error message after the current ReaScript finishes. If called within a Lua context and errmsg has a ! prefix, script execution will be terminated.

Parameters:
string errmsg
the message to show


^ Reaper version 5.62RecursiveCreateDirectory

C: int RecursiveCreateDirectory(const char* path, size_t ignored)
EEL2: int RecursiveCreateDirectory("path", size_t ignored)
Lua: integer retval = reaper.RecursiveCreateDirectory(string path, integer ignored)
Python: Int RPR_RecursiveCreateDirectory(String path, Int ignored)

Creates a new directory.

You can recursivly create directories, means: if the higher directories don't exist, the will also be automatically created.

returns positive value on success, 0 on failure.

Returnvalues:
integer retval
0, failure; 1 and higher, success

Parameters:
string path
the directory-path to be created
integer ignored
unknown


^ Reaper version 5.62ReverseNamedCommandLookup

C: const char* ReverseNamedCommandLookup(int command_id)
EEL2: bool ReverseNamedCommandLookup(#retval, int command_id)
Lua: string action_command_id = 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.

Returnvalues:
string action_command_id
the ActionCommandID of the command/script/action

Parameters:
integer command_id
the command/script/action, whose ActionCommandID you want to have


^ Reaper version 5.62SLIDER2DB

C: double SLIDER2DB(double y)
EEL2: double SLIDER2DB(y)
Lua: number db_value = reaper.SLIDER2DB(number y)
Python: Float RPR_SLIDER2DB(Float y)

Convert slider-value to it's dB-value-equivalent.

Returnvalues:
number db_value
the slider-value, you want to convert to dB

Parameters:
number y
the dB-value


^ Reaper version 5.62 SWS version 2.9.7SNM_CreateFastString(SWS)

C: WDL_FastString* SNM_CreateFastString(const char* str)
EEL2: WDL_FastString extension_api("SNM_CreateFastString", "str")
Lua: WDL_FastString fstr = reaper.SNM_CreateFastString(string str)
Python: WDL_FastString SNM_CreateFastString(String str)

[S&M] Instantiates a new "fast string". You must delete this string, see SNM_DeleteFastString.


Returnvalues:
WDL_FastString fstr

Parameters:
string str


^ Reaper version 5.62 SWS version 2.9.7SNM_DeleteFastString(SWS)

C: void SNM_DeleteFastString(WDL_FastString* str)
EEL2: extension_api("SNM_DeleteFastString", WDL_FastString str)
Lua: reaper.SNM_DeleteFastString(WDL_FastString str)
Python: SNM_DeleteFastString(WDL_FastString str)

[S&M] Deletes a "fast string" instance.

Parameters:
WDL_FastString str


^ Reaper version 5.62 SWS version 2.12.1SNM_GetDoubleConfigVar(SWS)

C: double SNM_GetDoubleConfigVar(const char* varname, double errvalue)
EEL2: double extension_api("SNM_GetDoubleConfigVar", "varname", errvalue)
Lua: number retval = reaper.SNM_GetDoubleConfigVar(string varname, number errvalue)
Python: Float SNM_GetDoubleConfigVar(String varname, Float errvalue)

[S&M] Returns a floating-point preference (look in project prefs first, then in general prefs). Returns errvalue if failed (e.g. varname not found).

The settings can be from the Preferences, Project settings and Render-dialog, as well as numerous other settings, as e.g. set in the context menu of the transport-area. Some variables are bitfields, where each bit represents e.g a checkbox in the preferences.

see Reaper Config Variables for valid config-vars


Returnvalues:
number retval
the returned number/doublefloat-value of varname

Parameters:
string varname
the name of the config-variable to be read; not case sensitive
number errvalue
the errorvalue that will be returned, if varname isn't a valid one


^ Reaper version 5.62 SWS version 2.9.7SNM_GetFastString(SWS)

C: const char* SNM_GetFastString(WDL_FastString* str)
EEL2: bool extension_api("SNM_GetFastString", #retval, WDL_FastString str)
Lua: string str = reaper.SNM_GetFastString(WDL_FastString str)
Python: String SNM_GetFastString(WDL_FastString str)

[S&M] Gets the "fast string" content.

Returnvalues:
string str

Parameters:
WDL_FastString str


^ Reaper version 5.62 SWS version 2.9.7SNM_GetFastStringLength(SWS)

C: int SNM_GetFastStringLength(WDL_FastString* str)
EEL2: int extension_api("SNM_GetFastStringLength", WDL_FastString str)
Lua: integer retval = reaper.SNM_GetFastStringLength(WDL_FastString str)
Python: Int SNM_GetFastStringLength(WDL_FastString str)

[S&M] Gets the "fast string" length.

Returnvalues:
integer retval

Parameters:
WDL_FastString str


^ Reaper version 5.80 SWS version 2.9.7SNM_GetIntConfigVar(SWS)

C: int SNM_GetIntConfigVar(const char* varname, int errvalue)
EEL2: int extension_api("SNM_GetIntConfigVar", "varname", int errvalue)
Lua: integer retval = reaper.SNM_GetIntConfigVar(string varname, integer errvalue)
Python: Int SNM_GetIntConfigVar(String varname, Int errvalue)

[S&M] Returns an integer preference (look in project prefs first, then in general prefs). Returns errvalue if failed (e.g. varname not found).

The settings can be from the Preferences, Project settings and Render-dialog, as well as numerous other settings, as e.g. set in the context menu of the transport-area. Some variables are bitfields, where each bit represents e.g a checkbox in the preferences.

see Reaper Config Variables for valid config-vars


Returnvalues:
integer retval
the returned integer-value of varname

Parameters:
string varname
the name of the config-variable to be read; not case sensitive
integer errvalue
the errorvalue that will be returned, if varname isn't a valid one


^ Reaper version 5.80 SWS version 2.12.1SNM_GetLongConfigVar(SWS)

C: bool SNM_GetLongConfigVar(const char* varname, int* highOut, int* lowOut)
EEL2: bool extension_api("SNM_GetLongConfigVar", "varname", int &high, int &low)
Lua: boolean retval, integer high, integer low = reaper.SNM_GetLongConfigVar(string varname)
Python: (Boolean retval, String varname, Int highOut, Int lowOut) = SNM_GetLongConfigVar(varname, highOut, lowOut)

[S&M] Reads a 64-bit integer preference split in two 32-bit integers (look in project prefs first, then in general prefs). Returns false if failed (e.g. varname not found).

see Reaper Config Variables for valid config-vars


Returnvalues:
boolean retval
true, varname was found; false, varname wasn't found
integer high
the high-32bits of the value
integer low
the low-32bits of the value

Parameters:
string varname
the name of the config-variable to be read; not case sensitive


^ Reaper version 5.62 SWS version 2.12.1SNM_SetDoubleConfigVar(SWS)

C: bool SNM_SetDoubleConfigVar(const char* varname, double newvalue)
EEL2: bool extension_api("SNM_SetDoubleConfigVar", "varname", newvalue)
Lua: boolean retval = reaper.SNM_SetDoubleConfigVar(string varname, number newvalue)
Python: Boolean SNM_SetDoubleConfigVar(String varname, Float newvalue)

[S&M] Sets a floating-point preference (look in project prefs first, then in general prefs). Returns false if failed (e.g. varname not found or newvalue out of range).

The settings can be from the Preferences, Project settings and Render-dialog, as well as numerous other settings, as e.g. set in the context menu of the transport-area. Some variables are bitfields, where each bit represents e.g a checkbox in the preferences.

The changed settings are usually only changed within the running Reaper, but not stored in the config-files, so you need to do it manually or they get lost after Reaper is closed!

see Reaper Config Variables for valid config-vars


Returnvalues:
boolean retval
true, if setting was successful; false, if not

Parameters:
string varname
the name of the config-variable to be read; not case sensitive
number newvalue
the new value to be set into varname


^ Reaper version 5.62 SWS version 2.9.7SNM_SetFastString(SWS)

C: WDL_FastString* SNM_SetFastString(WDL_FastString* str, const char* newstr)
EEL2: WDL_FastString extension_api("SNM_SetFastString", WDL_FastString str, "newstr")
Lua: WDL_FastString fstr = reaper.SNM_SetFastString(WDL_FastString str, string newstr)
Python: WDL_FastString SNM_SetFastString(WDL_FastString str, String newstr)

[S&M] Sets the "fast string" content. Returns str for facility.

Returnvalues:
WDL_FastString fstr

Parameters:
WDL_FastString str
string newstr


^ Reaper version 5.62 SWS version 2.9.7SNM_SetIntConfigVar(SWS)

C: bool SNM_SetIntConfigVar(const char* varname, int newvalue)
EEL2: bool extension_api("SNM_SetIntConfigVar", "varname", int newvalue)
Lua: boolean retval = reaper.SNM_SetIntConfigVar(string varname, integer newvalue)
Python: Boolean SNM_SetIntConfigVar(String varname, Int newvalue)

[S&M] Sets an integer preference (look in project prefs first, then in general prefs). Returns false if failed (e.g. varname not found).

Some variables are bitfields, where each bit represents e.g a checkbox in the preferences. The changed settings are usually only changed within the running Reaper, but not stored in the config-files, so you need to do it manually or they get lost after Reaper is closed!

see Reaper Config Variables for valid config-vars


Returnvalues:
boolean retval
true, if setting was successful, false if not

Parameters:
string varname
the name of the config-variable to be read; not case sensitive
integer newvalue
the newly set value for varname


^ Reaper version 5.62 SWS version 2.12.1SNM_SetLongConfigVar(SWS)

C: bool SNM_SetLongConfigVar(const char* varname, int newHighValue, int newLowValue)
EEL2: bool extension_api("SNM_SetLongConfigVar", "varname", int newHighValue, int newLowValue)
Lua: boolean retval = reaper.SNM_SetLongConfigVar(string varname, integer newHighValue, integer newLowValue)
Python: Boolean SNM_SetLongConfigVar(String varname, Int newHighValue, Int newLowValue)

[S&M] Sets a 64-bit integer preference from two 32-bit integers (look in project prefs first, then in general prefs). Returns false if failed (e.g. varname not found).

Some variables are bitfields, where each bit represents e.g a checkbox in the preferences. The changed settings are usually only changed within the running Reaper, but not stored in the config-files, so you need to do it manually or they get lost after Reaper is closed!

see Reaper Config Variables for valid config-vars


Returnvalues:
boolean retval
true, if setting was successful, false if not

Parameters:
string varname
the name of the config-variable to be read; not case sensitive
integer newHighValue
the newly set value for varname of the high-32bits
integer newLowValue
the newly set value for varname of the low-32bits


^ Reaper version 5.62SetToggleCommandState

C: bool SetToggleCommandState(int section_id, int command_id, int state)
EEL2: bool SetToggleCommandState(int section_id, int command_id, int state)
Lua: boolean retval = 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.


Returnvalues:
boolean retval
true, setting was successful; false, setting was unsuccessful

Parameters:
integer section_id
the section of the action
       0, Main  
       100, Main (alt recording)  
       32060, MIDI Editor  
       32061, MIDI Event List Editor  
       32062, MIDI Inline Editor  
       32063, Media Explorer  
integer command_id
the command-id of the action whose toggle command state you want to query
integer state
toggle-state
0, off
&1, on/checked in menus
&2, on/grayed out in menus
&16, on/bullet in front of the entry in menus
-1, NA because the action does not have on/off states.


^ Reaper version 5.62ShowActionList

C: void ShowActionList(KbdSectionInfo* caller, HWND callerWnd)
EEL2: ShowActionList(KbdSectionInfo caller, HWND callerWnd)
Lua: reaper.ShowActionList(KbdSectionInfo caller, optional HWND callerWnd)
Python: RPR_ShowActionList(KbdSectionInfo caller, HWND callerWnd)

shows the action-list

Parameters:
KbdSectionInfo caller
optional HWND callerWnd
the HWND that shall call the ActionList; can be nil


^ Reaper version 5.62ShowConsoleMsg

C: void ShowConsoleMsg(const char* msg)
EEL2: 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. See ClearConsole


Parameters:
string msg
a message to be shown in ReaConsole


^ Reaper version 5.62ToggleTrackSendUIMute

C: bool ToggleTrackSendUIMute(MediaTrack* track, int send_idx)
EEL2: bool ToggleTrackSendUIMute(MediaTrack track, int send_idx)
Lua: boolean retval = reaper.ToggleTrackSendUIMute(MediaTrack track, integer send_idx)
Python: Boolean RPR_ToggleTrackSendUIMute(MediaTrack track, Int send_idx)

send_idx<0 for receives, >=0 for hw ouputs, >=nb_of_hw_ouputs for sends.

Returnvalues:
boolean retval

Parameters:
MediaTrack track
integer send_idx


^ Reaper version 5.62ValidatePtr

C: bool ValidatePtr(void* pointer, const char* ctypename)
EEL2: bool ValidatePtr(void* pointer, "ctypename")
Lua: boolean retval = reaper.ValidatePtr(identifier pointer, string ctypename)
Python: Boolean RPR_ValidatePtr(void pointer, String ctypename)

Return true if the pointer is a valid object of the right type in proj (proj is ignored if pointer is itself a project). Supported types are: ReaProject*, MediaTrack*, MediaItem*, MediaItem_Take*, TrackEnvelope* and PCM_source*.

see ValidatePtr2


Returnvalues:
boolean retval
true, the object/pointer is of ctypename; false, it is not

Parameters:
identifier pointer
a pointer to the object to check for. In Lua or Python, you just give the object to check as this parameter.
string ctypename
the type of project to check for(given as a pointer)


^ Reaper version 5.62ValidatePtr2

C: bool ValidatePtr2(ReaProject* proj, void* pointer, const char* ctypename)
EEL2: bool ValidatePtr2(ReaProject proj, void* pointer, "ctypename")
Lua: boolean retval = reaper.ValidatePtr2(ReaProject proj, identifier pointer, string ctypename)
Python: Boolean RPR_ValidatePtr2(ReaProject proj, void pointer, String ctypename)

Return true if the pointer is a valid object of the right type in proj (proj is ignored if pointer is itself a project). Supported types are: ReaProject*, MediaTrack*, MediaItem*, MediaItem_Take*, TrackEnvelope* and PCM_source*.

Returnvalues:
boolean retval
true, the object/pointer is of ctypename; false, it is not

Parameters:
ReaProject proj
the project-number. 0 for the current project.
identifier pointer
a pointer to the object to check for. In Lua or Python, you just give the object to check as this parameter.
string ctypename
the type of project to check for(given as a pointer)


^ Reaper version 5.62format_timestr

C: void format_timestr(double tpos, char* buf, int buf_sz)
EEL2: format_timestr(tpos, #buf)
Lua: string formatted_time = reaper.format_timestr(number tpos, string buf)
Python: (Float tpos, String buf, Int buf_sz) = RPR_format_timestr(tpos, buf, buf_sz)

Creates a timestring and formats it as hh:mm:ss.sss. See format_timestr_pos, format_timestr_len.


Returnvalues:
string formatted_time
the formatted timestring

Parameters:
number tpos
the position in seconds, that you want to have formatted
string buf
needed by Reaper, just set it to ""


^ Reaper version 5.62format_timestr_len

C: void format_timestr_len(double tpos, char* buf, int buf_sz, double offset, int modeoverride)
EEL2: format_timestr_len(tpos, #buf, offset, int modeoverride)
Lua: string formatted_time = 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

Returnvalues:
string formatted_time

Parameters:
number tpos
string buf
number offset
integer modeoverride


^ Reaper version 5.62format_timestr_pos

C: void format_timestr_pos(double tpos, char* buf, int buf_sz, int modeoverride)
EEL2: format_timestr_pos(tpos, #buf, int modeoverride)
Lua: string formatted_time = 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

Returnvalues:
string formatted_time

Parameters:
number tpos
string buf
integer modeoverride


^ Reaper version 5.62genGuid

C: void genGuid(GUID* g)
EEL2: genGuid(#gGUID)
Lua: string gGUID = reaper.genGuid(string gGUID)
Python: RPR_genGuid(GUID g)

Generates a GUID.

Returnvalues:
string gGUID
the generated GUID

Parameters:
string gGUID
set it to ""


^ Reaper version 5.972get_config_var_string

C: bool get_config_var_string(const char* name, char* bufOut, int bufOut_sz)
EEL2: bool get_config_var_string("name", #buf)
Lua: boolean retval, string buf = reaper.get_config_var_string(string name)
Python: (Boolean retval, String name, String bufOut, Int bufOut_sz) = RPR_get_config_var_string(name, bufOut, bufOut_sz)

gets ini configuration variable value as string

see the configuration-variable documentation for more details


Returnvalues:
boolean retval
true, the configuration-variable is a valid string variable
string buf
the current value of the configuration-variable

Parameters:
string name
the config-var, whose value you want


^ Reaper version 5.62get_ini_file

C: const char* get_ini_file()
EEL2: bool get_ini_file(#retval)
Lua: string filename_with_path = reaper.get_ini_file()
Python: String RPR_get_ini_file()

Get reaper.ini full filename+path.

Returnvalues:
string filename_with_path
the reaper.ini with path


^ Reaper version 5.62guidToString

C: void guidToString(const GUID* g, char* destNeed64)
EEL2: 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

Returnvalues:
string destNeed64

Parameters:
string gGUID
string destNeed64


^ Reaper version 5.62image_resolve_fn

C: void image_resolve_fn(const char* in, char* out, int out_sz)
EEL2: 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)


Returnvalues:
string out

Parameters:
string in
string out


^ Reaper version 5.62mkpanstr

C: void mkpanstr(char* strNeed64, double pan)
EEL2: mkpanstr(#strNeed64, pan)
Lua: string strNeed64 = reaper.mkpanstr(string strNeed64, number pan)
Python: (String strNeed64, Float pan) = RPR_mkpanstr(strNeed64, pan)

Converts a double-number to its panstr-equivalent.

See parsepanstr for its counterpart.


Returnvalues:
string strNeed64
the converted panstring, from -100% over center to 100%

Parameters:
string strNeed64
just set this to ""
number pan
the pan-number which shall be converted to the panstring; valid numbers are -1.0 to 1.0 even if you can set higher ones


^ Reaper version 5.62mkvolpanstr

C: void mkvolpanstr(char* strNeed64, double vol, double pan)
EEL2: 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)

creates a vol-pan-string, which holds a readable representation of the vol and pan-values.

The format is like "+6.02db center" or "+inf +80R", etc

see mkpanstr and mkvolstr for the individual pan/vol-string functions.


Returnvalues:
string strNeed64
the converted volpan-string

Parameters:
string strNeed64
just set this to ""
number vol
the volume-value, which you want to convert into db
number pan
the pan-value, which you want to convert into its percentage value; valid -1.0 to 1.0


^ Reaper version 5.62mkvolstr

C: void mkvolstr(char* strNeed64, double vol)
EEL2: mkvolstr(#strNeed64, vol)
Lua: string strNeed64 = reaper.mkvolstr(string strNeed64, number vol)
Python: (String strNeed64, Float vol) = RPR_mkvolstr(strNeed64, vol)

Converts a volume-value into a string-representation of it as dB.

Note: Unlike panstr, there is no parsevolstr-string-function available!

Returnvalues:
string strNeed64
the converted vol-string

Parameters:
string strNeed64
just set this to ""
number vol
the volume-value, which shall be converted; 0, -inf; 1, 0dB; 1.412, +3dB


^ Reaper version 5.62parse_timestr

C: double parse_timestr(const char* buf)
EEL2: double parse_timestr("buf")
Lua: number timestr = reaper.parse_timestr(string buf)
Python: Float RPR_parse_timestr(String buf)

Parse hh:mm:ss.sss time string, return time in seconds (or 0.0 on error). See parse_timestr_pos, parse_timestr_len.


Returnvalues:
number timestr
the converted time in seconds

Parameters:
string buf
the timestring to convert (hh:mm:ss.sss). Each position of the time can be one digit only, means: "1:2:3.4" is valid. Milliseconds can be more than 3 digits. Hours, seconds, minutes with more than two digits will be converted correctly "1:120" will be converted to 180 seconds.


^ Reaper version 5.62parse_timestr_len

C: double parse_timestr_len(const char* buf, double offset, int modeoverride)
EEL2: double parse_timestr_len("buf", offset, int modeoverride)
Lua: number converted_time = reaper.parse_timestr_len(string buf, number offset, integer modeoverride)
Python: Float RPR_parse_timestr_len(String buf, Float offset, Int modeoverride)

Converts a time-string in its time-in-seconds-representation

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

Returnvalues:
number converted_time
the time, as interpreted from the buf-parameter

Parameters:
string buf
the time-string, which shall be converted into its time in seconds
number offset
??Buggy??
integer modeoverride
the format, in which the timestring is


^ Reaper version 5.62parse_timestr_pos

C: double parse_timestr_pos(const char* buf, int modeoverride)
EEL2: double parse_timestr_pos("buf", int modeoverride)
Lua: number converted_time = reaper.parse_timestr_pos(string buf, integer modeoverride)
Python: Float RPR_parse_timestr_pos(String buf, Int modeoverride)

Parse time string and convert it into seconds.

Returnvalues:
number converted_time
the converted time in seconds

Parameters:
string buf
the timestring to be parsed and converted into seconds
integer modeoverride
the format of the timestring to parse and convert
-1, proj default.
0, time
1, measures.beats + time
2, measures.beats
3, seconds
4, samples
5, h:m:s:f


^ Reaper version 5.62parsepanstr

C: double parsepanstr(const char* str)
EEL2: double parsepanstr("str")
Lua: number retval = reaper.parsepanstr(string str)
Python: Float RPR_parsepanstr(String str)

Converts a string created by mkpanstr back to it's double-number.


Returnvalues:
number retval
the double-value of the panstring

Parameters:
string str
a panstring, whose value you want to convert back to its double-equivalent


^ Reaper version 6.00reduce_open_files

C: int reduce_open_files(int flags)
EEL2: int reduce_open_files(int flags)
Lua: integer retval = reaper.reduce_open_files(integer flags)
Python: Int RPR_reduce_open_files(Int flags)

garbage-collects extra open files and closes them. if flags has 1 set, this is done incrementally (call this from a regular timer, if desired). if flags has 2 set, files are aggressively closed (they may need to be re-opened very soon).

returns number of files closed by this call.

Returnvalues:
integer retval
the number of closed files

Parameters:
integer flags
influences, how the garbage collection shall be
&1, incrementally
&2, aggressively(files need to be reopened after that, if needed)


^ Reaper version 5.62relative_fn

C: void relative_fn(const char* in, char* out, int out_sz)
EEL2: 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)

Makes a filename "in" relative to the current project, if any.

Returnvalues:
string out

Parameters:
string in
string out


^ Reaper version 5.62resolve_fn

C: void resolve_fn(const char* in, char* out, int out_sz)
EEL2: 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)

See resolve_fn2.


Returnvalues:
string out

Parameters:
string in
string out


^ Reaper version 5.62resolve_fn2

C: void resolve_fn2(const char* in, char* out, int out_sz, const char* checkSubDirOptional)
EEL2: resolve_fn2("in", #out, optional "checkSubDir")
Lua: string out = reaper.resolve_fn2(string in, string out, optional string checkSubDir)
Python: (String in, String out, Int out_sz, String checkSubDirOptional) = RPR_resolve_fn2(in, out, out_sz, checkSubDirOptional)

Resolves a filename "in" by using project settings etc. If no file found, out will be a copy of in.

Returnvalues:
string out

Parameters:
string in
string out
string checkSubDir


^ Reaper version 5.62stringToGuid

C: void stringToGuid(const char* str, GUID* g)
EEL2: stringToGuid("str", #gGUID)
Lua: string gGUID = reaper.stringToGuid(string str, string gGUID)
Python: RPR_stringToGuid(String str, GUID g)


Returnvalues:
string gGUID

Parameters:
string str
string gGUID


^ Reaper version 5.62time_precise

C: double time_precise()
Lua: number time_stamp = reaper.time_precise()
Python: Float RPR_time_precise()

Gets a precise system timestamp in seconds.

For EEL-programming, see eel_time_precise.


Returnvalues:
number time_stamp
the system-timestamp in seconds with a precision of 7 digits


^ Reaper version 5.62 SWS version 2.9.7BR_GetArrangeView(SWS)

C: void BR_GetArrangeView(ReaProject* proj, double* startTimeOut, double* endTimeOut)
EEL2: extension_api("BR_GetArrangeView", ReaProject proj, &startTime, &endTime)
Lua: number startTime retval, number endTime = reaper.BR_GetArrangeView(ReaProject proj)
Python: (ReaProject proj, Float startTimeOut, Float endTimeOut) = BR_GetArrangeView(proj, startTimeOut, endTimeOut)

[BR] Deprecated, see GetSet_ArrangeView2 (REAPER v5.12pre4+) -- Get start and end time position of arrange view. To set arrange view instead, see BR_SetArrangeView.


Returnvalues:
number startTime retval
the current starttime in the arrangeview in seconds
number endTime
the current endtime in the arrangeview in seconds

Parameters:
ReaProject proj
the project-number. 0 for the current project.


^ Reaper version 5.62 SWS version 2.9.7BR_SetArrangeView(SWS)

C: void BR_SetArrangeView(ReaProject* proj, double startTime, double endTime)
EEL2: extension_api("BR_SetArrangeView", ReaProject proj, startTime, endTime)
Lua: reaper.BR_SetArrangeView(ReaProject proj, number startTime, number endTime)
Python: BR_SetArrangeView(ReaProject proj, Float startTime, Float endTime)

[BR] Deprecated, see GetSet_ArrangeView2 (REAPER v5.12pre4+) -- Set start and end time position of arrange view. To get arrange view instead, see BR_GetArrangeView.


Parameters:
ReaProject proj
the project-number. 0 for the current project.
number startTime
the new starttime of the arrangewview in seconds
number endTime
the new endtime of the arrangewview in seconds


^ Reaper version 5.62CSurf_OnArrow

C: void CSurf_OnArrow(int whichdir, bool wantzoom)
EEL2: CSurf_OnArrow(int whichdir, bool wantzoom)
Lua: reaper.CSurf_OnArrow(integer whichdir, boolean wantzoom)
Python: RPR_CSurf_OnArrow(Int whichdir, Boolean wantzoom)

Zoom or scroll the Arrangeview vertically.
The stepsize with scrolling is track by track.

Parameters:
integer whichdir
into which (zoom-)direction to change
  0, move arrangeview upward(one track each step)/zoom in
  1, move arrangeview downward(one track each step)/zoom out
boolean wantzoom
true, adjust vertical zoom; false, adjust vertical scrolling


^ Reaper version 5.62CSurf_OnScroll

C: void CSurf_OnScroll(int xdir, int ydir)
EEL2: CSurf_OnScroll(int xdir, int ydir)
Lua: reaper.CSurf_OnScroll(integer xdir, integer ydir)
Python: RPR_CSurf_OnScroll(Int xdir, Int ydir)

Scroll arrangeview relative to it's current view-settings.

Parameters:
integer xdir
scroll horizontally(timeline) through the project.
Negative values toward the beginning, positive toward the end. The higher the values, the farther the movement.
integer ydir
scroll vertically(tracks) through the project.
Negative values toward the top, positive toward the bottom. The higher the values, the farther the movement.


^ Reaper version 5.62CSurf_OnZoom

C: void CSurf_OnZoom(int xdir, int ydir)
EEL2: CSurf_OnZoom(int xdir, int ydir)
Lua: reaper.CSurf_OnZoom(integer xdir, integer ydir)
Python: RPR_CSurf_OnZoom(Int xdir, Int ydir)

Changes horizontal/vertical zoom.

Parameters:
integer xdir
horizontal zoom; 0, no change; negative values, zoom out; positive values, zoom in; the higher the values, the bigger the zoom-stepsize.
integer ydir
vertical zoom; 0, no change; negative values, zoom out; positive values, zoom in; the higher the values, the bigger the zoom-stepsize.


^ Reaper version 5.62GetCursorContext

C: int GetCursorContext()
EEL2: int GetCursorContext()
Lua: integer context = reaper.GetCursorContext()
Python: Int RPR_GetCursorContext()

return the current cursor context.

Returnvalues:
integer context
the cursor context
  -1, unknown
   0, track panels
   1, items
   2, envelopes


^ Reaper version 5.62GetCursorContext2

C: int GetCursorContext2(bool want_last_valid)
EEL2: int GetCursorContext2(bool want_last_valid)
Lua: integer context = 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)

Returnvalues:
integer context
the cursor context
  -1, unknown
   0, track panels
   1, items
   2, envelopes

Parameters:
boolean want_last_valid
true, get the last valid context; false, get the current context


^ Reaper version 5.62GetHZoomLevel

C: double GetHZoomLevel()
EEL2: double GetHZoomLevel()
Lua: number pixels_per_second = reaper.GetHZoomLevel()
Python: Float RPR_GetHZoomLevel()

returns pixels/second

Returnvalues:
number pixels_per_second
pixels/shown per second visible in arrange-view


^ Reaper version 5.62GetSet_ArrangeView2

C: void GetSet_ArrangeView2(ReaProject* proj, bool isSet, int screen_x_start, int screen_x_end, double* start_timeOut, double* end_timeOut)
EEL2: GetSet_ArrangeView2(ReaProject proj, bool isSet, int screen_x_start, int screen_x_end, &start_time, &end_time)
Lua: number start_time, number end_time = reaper.GetSet_ArrangeView2(ReaProject proj, boolean isSet, integer screen_x_start, integer screen_x_end, number start_time, number end_time)
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)

Gets or sets the arrange view start/end time for screen coordinates. use screen_x_start=screen_x_end=0 to use the full arrange view's start/end time

If you want to get the arrangeviewposition by pixels, set isSet=false and pass the pixel-position of the start and endposition to screen_x_start and screen_x_end.

screen_x_start and screen_x_end will be ignored, when isSet=true

Returnvalues:
number start_time
the startposition of the arrangeview(left side) in seconds
number end_time
the startposition of the arrangeview(right side) in seconds

Parameters:
ReaProject proj
the project-number. 0 for the current project.
boolean isSet
true, set a new arrangeview-time position; false, only get the current arrangeview-time position
integer screen_x_start
if isSet=false, this parameter returns the start-time-position at screen-pixel-x position. set this and screen_x_end to 0 for the whole shown arrangeview start/endtime
integer screen_x_end
if isSet=false, this parameter returns the end-time-position at screen-pixel-x position. set this and screen_x_end to 0 for the whole shown arrangeview start/endtime
number start_time
if isSet=true, this is the startposition of the arrangeview(the left side) in seconds
number end_time
if isSet=true, this is the startposition of the arrangeview(the right side) in seconds


^ Reaper version 5.62SetCursorContext

C: void SetCursorContext(int mode, TrackEnvelope* envInOptional)
EEL2: SetCursorContext(int mode, TrackEnvelope envIn)
Lua: reaper.SetCursorContext(integer mode, TrackEnvelope envIn)
Python: RPR_SetCursorContext(Int mode, TrackEnvelope envInOptional)

Change the focus for the cursor.
You must use this to change the focus for the cursor programmatically.

mode=0 to focus track panels, 1 to focus the arrange window, 2 to focus the arrange window and select env (or envIn==NULL to clear the current track/take envelope selection)

Parameters:
integer mode
the focus to be changed to
0, track panels
1, arrange window
2, arrangewindow and env
TrackEnvelope envIn
TrackEnvelope-object of the envelope to select(only when mode=2, else set to nil); nil, clear current track/envelope-selection;


^ Reaper version 5.62UpdateArrange

C: void UpdateArrange()
EEL2: UpdateArrange()
Lua: reaper.UpdateArrange()
Python: RPR_UpdateArrange()

Redraw the arrange view


^ Reaper version 5.62UpdateTimeline

C: void UpdateTimeline()
EEL2: UpdateTimeline()
Lua: reaper.UpdateTimeline()
Python: RPR_UpdateTimeline()

Redraw the arrange view and ruler


^ Reaper version 5.62adjustZoom

C: void adjustZoom(double amt, int forceset, bool doupd, int centermode)
EEL2: 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)

Sets horizontal zoom in track view.

Parameters:
number amt
the zoom factor, positive values=zoom in, negative values=zoom out, 0=no zoom
integer forceset
forces one amt-zoomfactor(non zero) or allows repeatable zoom-in/zoomout(0)
boolean doupd
true, updates the track-view instantly; false, or only when mouse hovers over trackview
integer centermode
decides, what shall be in the center of the view. The following are available:
-1, default selection, as set in the reaper-prefs,
  0, edit-cursor or playcursor(if it's in the current zoomfactor of the view during playback/recording) in center,
  1, keeps edit-cursor in center of zoom
  2, keeps center of view in the center during zoom
  3, keeps in center of zoom, what is beneath the mousecursor


^ Reaper version 5.62AudioAccessorValidateState

C: bool AudioAccessorValidateState(AudioAccessor* accessor)
EEL2: bool AudioAccessorValidateState(AudioAccessor accessor)
Lua: boolean statechange = 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.

Returnvalues:
boolean statechange
true, if state has changed; false, if state hasn't changed

Parameters:
AudioAccessor accessor
the AudioAccessor for a MediaTrack or a MediaItem_Take


^ Reaper version 5.965 SWS version 2.10.0.1CF_EnumMediaSourceCues(SWS)

C: int CF_EnumMediaSourceCues(PCM_source* src, int index, double* timeOut, double* endTimeOut, bool* isRegionOut, char* nameOut, int nameOut_sz)
EEL2: int extension_api("CF_EnumMediaSourceCues", PCM_source src, int index, &time, &endTime, bool &isRegion, #name)
Lua: integer retval, number time, number endTime, boolean isRegion, string name = reaper.CF_EnumMediaSourceCues(PCM_source src, integer index)
Python: (Int retval, PCM_source src, Int index, Float timeOut, Float endTimeOut, Boolean isRegionOut, String nameOut, Int nameOut_sz) = CF_EnumMediaSourceCues(src, index, timeOut, endTimeOut, isRegionOut, nameOut, nameOut_sz)

Enumerate the source's media cues. Returns the next index or 0 when finished.

Returnvalues:
integer retval
number time
number endTime
boolean isRegion
string name

Parameters:
PCM_source src
integer index


^ Reaper version 5.965 SWS version 2.10.0.1CF_ExportMediaSource(SWS)

C: bool CF_ExportMediaSource(PCM_source* src, const char* fn)
EEL2: bool extension_api("CF_ExportMediaSource", PCM_source src, "fn")
Lua: boolean retval = reaper.CF_ExportMediaSource(PCM_source src, string fn)
Python: Boolean CF_ExportMediaSource(PCM_source src, String fn)

Export the source to the given file (MIDI only).

Returnvalues:
boolean retval

Parameters:
PCM_source src
string fn


^ Reaper version 5.965 SWS version 2.10.0.1CF_GetMediaSourceBitDepth(SWS)

C: int CF_GetMediaSourceBitDepth(PCM_source* src)
EEL2: int extension_api("CF_GetMediaSourceBitDepth", PCM_source src)
Lua: integer retval = reaper.CF_GetMediaSourceBitDepth(PCM_source src)
Python: Int CF_GetMediaSourceBitDepth(PCM_source src)

Returns the bit depth if available (0 otherwise).

Returnvalues:
integer retval

Parameters:
PCM_source src


^ Reaper version 5.965 SWS version 2.10.0.1CF_GetMediaSourceOnline(SWS)

C: bool CF_GetMediaSourceOnline(PCM_source* src)
EEL2: bool extension_api("CF_GetMediaSourceOnline", PCM_source src)
Lua: boolean retval = reaper.CF_GetMediaSourceOnline(PCM_source src)
Python: Boolean CF_GetMediaSourceOnline(PCM_source src)

Returns the online/offline status of the given source.

Returnvalues:
boolean retval

Parameters:
PCM_source src


^ Reaper version 5.965 SWS version 2.12.1.1CF_GetMediaSourceRPP(SWS)

C: bool CF_GetMediaSourceRPP(PCM_source* src, char* fnOut, int fnOut_sz)
EEL2: bool extension_api("CF_GetMediaSourceRPP", PCM_source src, #fn)
Lua: boolean retval, string fn = reaper.CF_GetMediaSourceRPP(PCM_source src)
Python: (Boolean retval, PCM_source src, String fnOut, Int fnOut_sz) = CF_GetMediaSourceRPP(src, fnOut, fnOut_sz)

Get the project associated with this source (BWF, subproject...).

Returnvalues:
boolean retval
string fn

Parameters:
PCM_source src


^ Reaper version 5.965 SWS version 2.10.0.1CF_SetMediaSourceOnline(SWS)

C: void CF_SetMediaSourceOnline(PCM_source* src, bool set)
EEL2: extension_api("CF_SetMediaSourceOnline", PCM_source src, bool set)
Lua: reaper.CF_SetMediaSourceOnline(PCM_source src, boolean set)
Python: CF_SetMediaSourceOnline(PCM_source src, Boolean set)

Set the online/offline status of the given source (closes files when set=false).

Parameters:
PCM_source src
boolean set


^ Reaper version 5.97CreateTakeAudioAccessor

C: AudioAccessor* CreateTakeAudioAccessor(MediaItem_Take* take)
EEL2: AudioAccessor CreateTakeAudioAccessor(MediaItem_Take take)
Lua: AudioAccessor acc = 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, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.


Returnvalues:
AudioAccessor acc
the newly created AudioAccessor

Parameters:
MediaItem_Take take
the take from a MediaItem-object, of which you want to create a new AudioAccessor


^ Reaper version 5.97CreateTrackAudioAccessor

C: AudioAccessor* CreateTrackAudioAccessor(MediaTrack* track)
EEL2: AudioAccessor CreateTrackAudioAccessor(MediaTrack track)
Lua: AudioAccessor acc = 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, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.


Returnvalues:
AudioAccessor acc
the newly created AudioAccessor for this MediaTrack

Parameters:
MediaTrack track
the MediaTrack, of which you want to create an AudioAccessor


^ Reaper version 5.97DestroyAudioAccessor

C: void DestroyAudioAccessor(AudioAccessor* accessor)
EEL2: 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, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.


Parameters:
AudioAccessor accessor
the AudioAccessor to be destroyed


^ Reaper version 5.97GetAudioAccessorEndTime

C: double GetAudioAccessorEndTime(AudioAccessor* accessor)
EEL2: double GetAudioAccessorEndTime(AudioAccessor accessor)
Lua: number length = 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, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorSamples.


Returnvalues:
number length
the length of the AudioAccessor

Parameters:
AudioAccessor accessor
the AudioAccessor, whose end-time you want to have


^ Reaper version 5.97GetAudioAccessorHash

C: void GetAudioAccessorHash(AudioAccessor* accessor, char* hashNeed128)
EEL2: 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.

Deprecated. See AudioAccessorStateChanged instead.


Returnvalues:
string hashNeed128

Parameters:
AudioAccessor accessor
string hashNeed128


^ Reaper version 5.97GetAudioAccessorSamples

C: int GetAudioAccessorSamples(AudioAccessor* accessor, int samplerate, int numchannels, double starttime_sec, int numsamplesperchannel, double* samplebuffer)
EEL2: int GetAudioAccessorSamples(AudioAccessor accessor, int samplerate, int numchannels, starttime_sec, int numsamplesperchannel, buffer_ptr samplebuffer)
Lua: integer samples = 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, AudioAccessorStateChanged, 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.

Returnvalues:
integer samples

Parameters:
AudioAccessor accessor
integer samplerate
integer numchannels
number starttime_sec
integer numsamplesperchannel
reaper.array samplebuffer


^ Reaper version 5.97GetAudioAccessorStartTime

C: double GetAudioAccessorStartTime(AudioAccessor* accessor)
EEL2: double GetAudioAccessorStartTime(AudioAccessor accessor)
Lua: number audio_start_time = 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, AudioAccessorStateChanged, GetAudioAccessorEndTime, GetAudioAccessorSamples.


Returnvalues:
number audio_start_time

Parameters:
AudioAccessor accessor


^ Reaper version 5.97GetItemEditingTime2

C: double GetItemEditingTime2(PCM_source** which_itemOut, int* flagsOut)
EEL2: double GetItemEditingTime2(PCM_source &which_item, int &flags)
Lua: number position, PCM_source which_item, integer flags = 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, 8 for item slip edit (edit cursor time or start of item)

Returnvalues:
number position
PCM_source which_item
integer flags


^ Reaper version 6.37GetMediaSourceFileName

C: void GetMediaSourceFileName(PCM_source* source, char* filenamebufOut, int filenamebufOut_sz)
EEL2: GetMediaSourceFileName(PCM_source source, #filenamebuf)
Lua: string filenamebuf = reaper.GetMediaSourceFileName(PCM_source source)
Python: (PCM_source source, String filenamebufOut, Int filenamebufOut_sz) = RPR_GetMediaSourceFileName(source, filenamebufOut, filenamebufOut_sz)

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


Returnvalues:
string filenamebuf
the filename of the source-file

Parameters:
PCM_source source
the source, whose source-filename you want to retrieve


^ Reaper version 5.62GetMediaSourceLength

C: double GetMediaSourceLength(PCM_source* source, bool* lengthIsQNOut)
EEL2: double GetMediaSourceLength(PCM_source source, bool &lengthIsQN)
Lua: number retval, boolean lengthIsQN = 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.

Returnvalues:
number retval
boolean lengthIsQN

Parameters:
PCM_source source


^ Reaper version 5.62GetMediaSourceNumChannels

C: int GetMediaSourceNumChannels(PCM_source* source)
EEL2: int GetMediaSourceNumChannels(PCM_source source)
Lua: integer mediasourcenumchans = reaper.GetMediaSourceNumChannels(PCM_source source)
Python: Int RPR_GetMediaSourceNumChannels(PCM_source source)

Returns the number of channels in the source media.

Returnvalues:
integer mediasourcenumchans

Parameters:
PCM_source source


^ Reaper version 5.62GetMediaSourceParent

C: PCM_source* GetMediaSourceParent(PCM_source* src)
EEL2: PCM_source GetMediaSourceParent(PCM_source src)
Lua: PCM_source parent_src = reaper.GetMediaSourceParent(PCM_source src)
Python: PCM_source RPR_GetMediaSourceParent(PCM_source src)

Returns the parent source, or NULL if src is the root source. This can be used to retrieve the parent properties of sections or reversed sources for example.

Returnvalues:
PCM_source parent_src

Parameters:
PCM_source src


^ Reaper version 5.62GetMediaSourceSampleRate

C: int GetMediaSourceSampleRate(PCM_source* source)
EEL2: int GetMediaSourceSampleRate(PCM_source source)
Lua: integer mediasourcesamplerate = reaper.GetMediaSourceSampleRate(PCM_source source)
Python: Int RPR_GetMediaSourceSampleRate(PCM_source source)

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

Returnvalues:
integer mediasourcesamplerate

Parameters:
PCM_source source


^ Reaper version 6.37GetMediaSourceType

C: void GetMediaSourceType(PCM_source* source, char* typebufOut, int typebufOut_sz)
EEL2: GetMediaSourceType(PCM_source source, #typebuf)
Lua: string typebuf = reaper.GetMediaSourceType(PCM_source source)
Python: (PCM_source source, String typebufOut, Int typebufOut_sz) = RPR_GetMediaSourceType(source, typebufOut, typebufOut_sz)

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

Returnvalues:
string typebuf
the source-type

Parameters:
PCM_source source
the source, whose source-type you want to get


^ Reaper version 6.37GetPeakFileName

C: void GetPeakFileName(const char* fn, char* bufOut, int bufOut_sz)
EEL2: GetPeakFileName("fn", #buf)
Lua: string peakfilename_with_path = reaper.GetPeakFileName(string fn)
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)

Returnvalues:
string peakfilename_with_path
the peakfilename with path

Parameters:
string fn
the filename of the mediafile


^ Reaper version 5.62GetPeakFileNameEx

C: void GetPeakFileNameEx(const char* fn, char* buf, int buf_sz, bool forWrite)
EEL2: 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)

Returnvalues:
string buf
the peak-filename

Parameters:
string fn
string buf
a string-buffer needed by the function, just give "" in Lua
boolean forWrite


^ Reaper version 5.62GetPeakFileNameEx2

C: void GetPeakFileNameEx2(const char* fn, char* buf, int buf_sz, bool forWrite, const char* peaksfileextension)
EEL2: 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"

Returnvalues:
string buf
the peak-filename

Parameters:
string fn
string buf
a string-buffer needed by the function, just give "" in Lua
boolean forWrite
string peaksfileextension


^ Reaper version 5.62GetSubProjectFromSource

C: ReaProject* GetSubProjectFromSource(PCM_source* src)
EEL2: ReaProject GetSubProjectFromSource(PCM_source src)
Lua: ReaProject sub_proj = reaper.GetSubProjectFromSource(PCM_source src)
Python: ReaProject RPR_GetSubProjectFromSource(PCM_source src)


Returnvalues:
ReaProject sub_proj
the project-number. 0 for the current project.

Parameters:
PCM_source src


^ Reaper version 5.62GetTempoMatchPlayRate

C: bool GetTempoMatchPlayRate(PCM_source* source, double srcscale, double position, double mult, double* rateOut, double* targetlenOut)
EEL2: bool GetTempoMatchPlayRate(PCM_source source, srcscale, position, mult, &rate, &targetlen)
Lua: boolean retval, number rate, number targetlen = 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

Returnvalues:
boolean retval
number rate
number targetlen

Parameters:
PCM_source source
number srcscale
number position
number mult


^ Reaper version 6.23InsertMedia

C: int InsertMedia(const char* file, int mode)
EEL2: int InsertMedia("file", int mode)
Lua: integer retval = reaper.InsertMedia(string file, integer mode)
Python: Int RPR_InsertMedia(String file, Int mode)

mode:
0=add to current track(last touched track when &512==0)
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
&512=use high word(&65536 and higher) as absolute track index if mode&3==0
&1024=insert into reasamplomatic on a new track
&2048=insert into open reasamplomatic instance
&4096=move to BWF source preferred position(BWF start offset)
&8192=reverse

Example:
To insert an item at a specific trackindex, use:

    TrackIndex=3              -- set this to the track you wanto
    TrackIndex=TrackIndex<<16 -- move the index to high-word-destination for further use
    reaper.InsertMedia("C:\\test3.mp3", 0+512+TrackIndex) -- insert at track; it is important to add 512 in this to mode!

Returnvalues:
integer retval
0, inserting was unsuccessful; 1, inserting was successful
Note: will always return 1, when mode=0 or mode=1, even if the file does not exist!

Parameters:
string file
the file to insert
integer mode
the mode, with which to insert the file(see description for more details)


^ Reaper version 5.62InsertMediaSection

C: int InsertMediaSection(const char* file, int mode, double startpct, double endpct, double pitchshift)
EEL2: int InsertMediaSection("file", int mode, startpct, endpct, pitchshift)
Lua: integer retval = 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)

see InsertMedia


Returnvalues:
integer retval

Parameters:
string file
integer mode
number startpct
number endpct
number pitchshift


^ Reaper version 5.965 SWS version 2.10.0.1NF_AnalyzeMediaItemPeakAndRMS(SWS)

C: bool NF_AnalyzeMediaItemPeakAndRMS(MediaItem* item, double windowSize, void* reaper.array_peaks, void* reaper.array_peakpositions, void* reaper.array_RMSs, void* reaper.array_RMSpositions)
EEL2: bool extension_api("NF_AnalyzeMediaItemPeakAndRMS", MediaItem item, windowSize, void* reaper.array_peaks, void* reaper.array_peakpositions, void* reaper.array_RMSs, void* reaper.array_RMSpositions)
Lua: boolean retval = reaper.NF_AnalyzeMediaItemPeakAndRMS(MediaItem item, number windowSize, identifier reaper.array_peaks, identifier reaper.array_peakpositions, identifier reaper.array_RMSs, identifier reaper.array_RMSpositions)
Python: Boolean NF_AnalyzeMediaItemPeakAndRMS(MediaItem item, Float windowSize, void reaper.array_peaks, void reaper.array_peakpositions, void reaper.array_RMSs, void reaper.array_RMSpositions)

This function combines all other NF_Peak/RMS functions in a single one and additionally returns peak RMS positions.

Lua example code here.

Note: It's recommended to use this function with ReaScript/Lua as it provides reaper.array objects. If using this function with other scripting languages, you must provide arrays in the reaper.array format.


Returnvalues:
boolean retval

Parameters:
MediaItem item
number windowSize
identifier reaper.array_peaks
identifier reaper.array_peakpositions
identifier reaper.array_RMSs
identifier reaper.array_RMSpositions


^ Reaper version 5.62 SWS version 2.9.7NF_AnalyzeTakeLoudness(SWS)

C: bool NF_AnalyzeTakeLoudness(MediaItem_Take* take, bool analyzeTruePeak, double* lufsIntegratedOut, double* rangeOut, double* truePeakOut, double* truePeakPosOut, double* shortTermMaxOut, double* momentaryMaxOut)
EEL2: bool extension_api("NF_AnalyzeTakeLoudness", MediaItem_Take take, bool analyzeTruePeak, &lufsIntegrated, &range, & truePeak, &truePeakPos, &shortTermMax, &momentaryMax)
Lua: boolean retval, number lufsIntegrated, number range, number truePeak, number truePeakPos, number shortTermMax, number momentaryMax = reaper.NF_AnalyzeTakeLoudness(MediaItem_Take take, boolean analyzeTruePeak)
Python: (Boolean retval, MediaItem_Take take, Boolean analyzeTruePeak, Float lufsIntegratedOut, Float rangeOut, Float truePeakOut, Float truePeakPosOut, Float shortTermMaxOut, Float momentaryMaxOut) = NF_AnalyzeTakeLoudness(take, analyzeTruePeak, lufsIntegratedOut, rangeOut, truePeakOut, truePeakPosOut, shortTermMaxOut, momentaryMaxOut)

Full loudness analysis. retval: returns true on successful analysis, false on MIDI take or when analysis failed for some reason. analyzeTruePeak=true: Also do true peak analysis. Returns true peak value and true peak position (relative to item position). Considerably slower than without true peak analysis (since it uses oversampling). Note: Short term uses a time window of 3 sec. for calculation. So for items shorter than this shortTermMaxOut can't be calculated correctly. Momentary uses a time window of 0.4 sec.

Returnvalues:
boolean retval
number lufsIntegrated
number range
number truePeak
number truePeakPos
number shortTermMax
number momentaryMax

Parameters:
MediaItem_Take take
boolean analyzeTruePeak


^ Reaper version 5.965 SWS version 2.10.0.1NF_AnalyzeTakeLoudness2(SWS)

C: bool NF_AnalyzeTakeLoudness2(MediaItem_Take* take, bool analyzeTruePeak, double* lufsIntegratedOut, double* rangeOut, double* truePeakOut, double* truePeakPosOut, double* shortTermMaxOut, double* momentaryMaxOut, double* shortTermMaxPosOut, double* momentaryMaxPosOut)
EEL2: bool extension_api("NF_AnalyzeTakeLoudness2", MediaItem_Take take, bool analyzeTruePeak, &lufsIntegrated, &range, & truePeak, &truePeakPos, &shortTermMax, &momentaryMax, &shortTermMaxPos, &momentaryMaxPos)
Lua: boolean retval, number lufsIntegrated, number range, number truePeak, number truePeakPos, number shortTermMax, number momentaryMax, number shortTermMaxPos, number momentaryMaxPos = reaper.NF_AnalyzeTakeLoudness2(MediaItem_Take take, boolean analyzeTruePeak)
Python: (Boolean retval, MediaItem_Take take, Boolean analyzeTruePeak, Float lufsIntegratedOut, Float rangeOut, Float truePeakOut, Float truePeakPosOut, Float shortTermMaxOut, Float momentaryMaxOut, Float shortTermMaxPosOut, Float momentaryMaxPosOut) = NF_AnalyzeTakeLoudness2(take, analyzeTruePeak, lufsIntegratedOut, rangeOut, truePeakOut, truePeakPosOut, shortTermMaxOut, momentaryMaxOut, shortTermMaxPosOut, momentaryMaxPosOut)

Same as NF_AnalyzeTakeLoudness but additionally returns shortTermMaxPos and momentaryMaxPos (in absolute project time). Note: shortTermMaxPos and momentaryMaxPos actually indicate the beginning of time intervalls, (3 sec. and 0.4 sec. resp.).


Returnvalues:
boolean retval
number lufsIntegrated
number range
number truePeak
number truePeakPos
number shortTermMax
number momentaryMax
number shortTermMaxPos
number momentaryMaxPos

Parameters:
MediaItem_Take take
boolean analyzeTruePeak


^ Reaper version 5.965 SWS version 2.10.0.1NF_AnalyzeTakeLoudness_IntegratedOnly(SWS)

C: bool NF_AnalyzeTakeLoudness_IntegratedOnly(MediaItem_Take* take, double* lufsIntegratedOut)
EEL2: bool extension_api("NF_AnalyzeTakeLoudness_IntegratedOnly", MediaItem_Take take, &lufsIntegrated)
Lua: boolean retval, number lufsIntegrated = reaper.NF_AnalyzeTakeLoudness_IntegratedOnly(MediaItem_Take take)
Python: (Boolean retval, MediaItem_Take take, Float lufsIntegratedOut) = NF_AnalyzeTakeLoudness_IntegratedOnly(take, lufsIntegratedOut)

Does LUFS integrated analysis only. Faster than full loudness analysis (NF_AnalyzeTakeLoudness) . Use this if only LUFS integrated is required. Take vol. env. is taken into account.

See: Signal flow.


Returnvalues:
boolean retval
number lufsIntegrated

Parameters:
MediaItem_Take take


^ Reaper version 5.62 SWS version 2.9.7NF_GetMediaItemAverageRMS(SWS)

C: double NF_GetMediaItemAverageRMS(MediaItem* item)
EEL2: double extension_api("NF_GetMediaItemAverageRMS", MediaItem item)
Lua: number retval = reaper.NF_GetMediaItemAverageRMS(MediaItem item)
Python: Float NF_GetMediaItemAverageRMS(MediaItem item)

Returns the average overall (non-windowed) RMS level of active channels of an audio item active take, post item gain, post take volume envelope, post-fade, pre fader, pre item FX.
Returns -150.0 if MIDI take or empty item.

Returnvalues:
number retval

Parameters:
MediaItem item


^ Reaper version 5.62 SWS version 2.9.7NF_GetMediaItemMaxPeak(SWS)

C: double NF_GetMediaItemMaxPeak(MediaItem* item)
EEL2: double extension_api("NF_GetMediaItemMaxPeak", MediaItem item)
Lua: number retval = reaper.NF_GetMediaItemMaxPeak(MediaItem item)
Python: Float NF_GetMediaItemMaxPeak(MediaItem item)

Returns the greatest max. peak value of all active channels of an audio item active take, post item gain, post take volume envelope, post-fade, pre fader, pre item FX.
Returns -150.0 if MIDI take or empty item.

Returnvalues:
number retval

Parameters:
MediaItem item


^ Reaper version 5.965 SWS version 2.10.0.1NF_GetMediaItemMaxPeakAndMaxPeakPos(SWS)

C: double NF_GetMediaItemMaxPeakAndMaxPeakPos(MediaItem* item, double* maxPeakPosOut)
EEL2: double extension_api("NF_GetMediaItemMaxPeakAndMaxPeakPos", MediaItem item, &maxPeakPos)
Lua: number retval, number maxPeakPos = reaper.NF_GetMediaItemMaxPeakAndMaxPeakPos(MediaItem item)
Python: (Float retval, MediaItem item, Float maxPeakPosOut) = NF_GetMediaItemMaxPeakAndMaxPeakPos(item, maxPeakPosOut)

See NF_GetMediaItemMaxPeak, additionally returns maxPeakPos (relative to item position).


Returnvalues:
number retval
number maxPeakPos

Parameters:
MediaItem item


^ Reaper version 5.62 SWS version 2.9.7NF_GetMediaItemPeakRMS_NonWindowed(SWS)

C: double NF_GetMediaItemPeakRMS_NonWindowed(MediaItem* item)
EEL2: double extension_api("NF_GetMediaItemPeakRMS_NonWindowed", MediaItem item)
Lua: number retval = reaper.NF_GetMediaItemPeakRMS_NonWindowed(MediaItem item)
Python: Float NF_GetMediaItemPeakRMS_NonWindowed(MediaItem item)

Returns the greatest overall (non-windowed) RMS peak level of all active channels of an audio item active take, post item gain, post take volume envelope, post-fade, pre fader, pre item FX.
Returns -150.0 if MIDI take or empty item.

Returnvalues:
number retval

Parameters:
MediaItem item


^ Reaper version 5.62 SWS version 2.9.7NF_GetMediaItemPeakRMS_Windowed(SWS)

C: double NF_GetMediaItemPeakRMS_Windowed(MediaItem* item)
EEL2: double extension_api("NF_GetMediaItemPeakRMS_Windowed", MediaItem item)
Lua: number retval = reaper.NF_GetMediaItemPeakRMS_Windowed(MediaItem item)
Python: Float NF_GetMediaItemPeakRMS_Windowed(MediaItem item)

Returns the average RMS peak level of all active channels of an audio item active take, post item gain, post take volume envelope, post-fade, pre fader, pre item FX.
Obeys 'Window size for peak RMS' setting in 'SWS: Set RMS analysis/normalize options' for calculation. Returns -150.0 if MIDI take or empty item.

Returnvalues:
number retval

Parameters:
MediaItem item


^ Reaper version 5.62PCM_Sink_Enum

C: unsigned int PCM_Sink_Enum(int idx, const char** descstrOut)
EEL2: uint PCM_Sink_Enum(int idx, #descstr)
Lua: integer retval, string descstr = reaper.PCM_Sink_Enum(integer idx)
Python: Int RPR_PCM_Sink_Enum(Int idx, String descstrOut)

enumerates the available PCM-sink-formats, which means, the output-formats available in Reaper

Returnvalues:
integer retval
a number, which represents the PCM-sink-format as an integer-representation
2002876005 - WAV (evaw)
1634297446 - AIFF (ffia)
1769172768 - Audio CD Image (CUE/BIN format) ( osi)
1684303904 - DDP ( pdd)
1718378851 - FLAC (calf)
1836069740 - MP3 (encoder by LAME project) (l3pm)
1869047670 - OGG Vorbis (vggo)
1332176723 - OGG Opus (SggO)
1179012432 - Video (ffmpeg/libav encoder) (PMFF)
1195984416 - Video (GIF) ( FIG)
1279477280 - Video (LCF) ( FCL)
2004250731 - WavPack lossless compressor (kpvw)
maybe others as well?
string descstr
the PCM-sink-format
0 - WAV
1 - AIFF
2 - Audio CD Image (CUE/BIN format)
3 - DDP
4 - FLAC
5 - MP3 (encoder by LAME project)
6 - OGG Vorbis
7 - OGG Opus
8 - Video (ffmpeg/libav encoder)
9 - Video (GIF)
10 - Video (LCF)
11 - WavPack lossless compressor
maybe others as well?

Parameters:
integer idx
the index of the sink-format, beginning with 0


^ Reaper version 5.62PCM_Sink_GetExtension

C: const char* PCM_Sink_GetExtension(const char* data, int data_sz)
EEL2: bool PCM_Sink_GetExtension(#retval, "data")
Lua: string extension = reaper.PCM_Sink_GetExtension(string data)
Python: String RPR_PCM_Sink_GetExtension(String data, Int data_sz)

allows you to retrieve the file-extension of a certain PCM-sink/fileformat available.

See PCM_Sink_Enum to enumerate available PCM-sink/fileformats.


Returnvalues:
string extension
the extension returned by a certain format passed as parameter data

Parameters:
string data
the format, whose extension-format you'd like to get:
evaw, extension: "wav"
ffia, extension: "aif"
osi, extension: "cue"
pdd, extension: "DAT"
calf, extension: "flac"
l3pm, extension: "mp3"
vggo, extension: "ogg"
SggO, extension: "opus"
PMFF, extension: "avi"
FIG, extension: "gif"
FCL, extension: "lcf"
kpvw, extension: "wv"
maybe others?


^ Reaper version 5.62PCM_Sink_ShowConfig

C: HWND PCM_Sink_ShowConfig(const char* cfg, int cfg_sz, HWND hwndParent)
EEL2: HWND PCM_Sink_ShowConfig("cfg", HWND hwndParent)
Lua: HWND hwnd = reaper.PCM_Sink_ShowConfig(string cfg, HWND hwndParent)
Python: HWND RPR_PCM_Sink_ShowConfig(String cfg, Int cfg_sz, HWND hwndParent)


Returnvalues:
HWND hwnd

Parameters:
string cfg
HWND hwndParent


^ Reaper version 6.35PCM_Source_BuildPeaks

C: int PCM_Source_BuildPeaks(PCM_source* src, int mode)
EEL2: int PCM_Source_BuildPeaks(PCM_source src, int mode)
Lua: integer retval = reaper.PCM_Source_BuildPeaks(PCM_source src, integer mode)
Python: Int RPR_PCM_Source_BuildPeaks(PCM_source src, Int mode)

The process to build a new peak is to use the modes in a certain order:

mode=0 starts the peak-building process(must be done once for this PCM_Source) returned values are: 0, no peaks need to be built; 1, peaks are building

mode=1 progresses the peak-building a bit each time you call PCM_Source_BuildPeaks with mode=1) call it repeatedly until it's finished and returns value 0! returned values are: how many percent the peak-building still needs to do until it is finished

mode=2, this finishes up peak-building(call this, when mode=1 returns 0 and only then!) returned value is 0 Running this before mode=1 returns 0 can cause broken peaks shown, until you click into a mediaitem that uses the PCM_Source.

After all peak-building is done, use reaper.UpdateArrange() to show them.

Note: All peaks of all takes that use a certain PCM_Source will be built!

Building peaks for multiple PCM_Sources simultaneously is allowed.

The following code builds a peak very simply. This is the easiest implementation. However, if the PCM_Source, whose peaks need to be build, is a very long one, this can cause Reaper's UI to hang. So use this on short PCM_Sources mainly.

    -- Meo-Ada Mespotine - 19th of August 2021 - licensed under MIT-license
    -- Rebuilt-Peak-Demo without defer, might cause hanging of Reaper's UI

    -- Get Item 1, Take 1 and Source of Take 1
    Item=reaper.GetMediaItem(0,0)
    Take=reaper.GetMediaItemTake(Item,0)
    Source=reaper.GetMediaItemTake_Source(Take)

    -- start peak-building process(mode must be 0)
    BuildStart=reaper.PCM_Source_BuildPeaks(Source, 0)

    -- build peaks, until PCM_Source_BuildPeaks returns 0(mode must be 1)
    while BuildProgress~=0 do
      BuildProgress=reaper.PCM_Source_BuildPeaks(Source, 1)
    end

    -- when build-process is done, finish build-process(mode must be 2)
    BuildXit=reaper.PCM_Source_BuildPeaks(Source, 2) 

    -- update the arrangeview, so the newly built peaks are shown
    reaper.UpdateArrange()

If you want to build peaks for longer files and maybe showing a status-bar, you can use the following code. It uses defer-loops instead of a while-loop. As each ReaScript can have up to 1024 defer-loops running at the same time(more or less), I use each of the 1024 defer-loops to build the peak a little further. This will prevent hanging UI but might be a little slower than the while-approach.

    -- Meo-Ada Mespotine - 19th of August 2021 - licensed under MIT-license
    -- Rebuilt-Peak-Demo using defer, might be a little slower but doesn't 
    -- cause hanging of Reaper's UI
    -- 
    -- set Build_Factor to speed up building process
    -- allowed values: 0(slow) and 1024(fast)
    -- Use 1024 only, if you don't have any other defer-loops running.
    -- If you have other defer-loops that need to be run now, set
    -- Build_Factor to Build_Factor minus number of running defer-loops.

    -- the number of defer-loops used to go through the peak build-process
    -- the higher, the faster.
    -- if you use other defer-loops at the time as well, set this lower than 1024 or the other defer-loop will not run
    Build_Factor=255

    -- Get Item 1, Take 1 and Source of Take 1
    Item=reaper.GetMediaItem(0,0)
    Take=reaper.GetMediaItemTake(Item,0)
    Source=reaper.GetMediaItemTake_Source(Take)

    -- start build-process of the peak(mode=0)
    BuildStart=reaper.PCM_Source_BuildPeaks(Source, 0)

    function main()
      -- build peaks, until PCM_Source_BuildPeaks returns 0(mode must be 1)
      BuildProgress=reaper.PCM_Source_BuildPeaks(Source, 1)
      
      if BuildProgress~=0 then 
        -- if PCM_Source_BuildPeaks returned anything else than 0, defer this function again
        reaper.defer(main) 
      else 
        -- if PCM_Source_BuildPeaks returned 0, finish building of the peaks(mode must be 2)
        -- and update the arrangeview for the newly built peaks to show
        BuildXit=reaper.PCM_Source_BuildPeaks(Source, 2) 
        reaper.UpdateArrange()
      end
    end

    -- run multiple defer-instances of the peak-build-function
    for i=0, Build_Factor do
      main()
    end

The following code combines both, defer-loops to cirvumvent possible hanging of Reaper's UI and a loop(for in this case) to build as many small peak-bits and pieces as possible within each defer-loop. You can influence the ratio between using defer-loops and for-loops by setting Build_Factor(defer) and Build_Progression(for). Experiment, how high you can go with the number of for-loops, until Reaper's UI becomes laggy.

    -- Meo-Ada Mespotine - 19th of August 2021 - licensed under MIT-license
    -- Rebuilt-Peak-Demo defer and a regular for-loop combined, doesn't 
    -- cause hanging of Reaper's UI
    -- 
    -- set Build_Factor to speed up building process
    -- allowed values: 0(slow) and 1024(fast)
    -- Use 1024 only, if you don't have any other defer-loops running.
    -- If you have other defer-loops that need to be run now, set
    -- Build_Factor to Build_Factor minus number of running defer-loops.

    -- build-speed factors
    Build_Factor=255     -- set to the number of defer-loops used
    Build_Progression=20 -- set to the number of peak-building-bits built within each defer-loop

    -- Get Item 1, Take 1 and Source of Take 1
    Item=reaper.GetMediaItem(0,0)
    Take=reaper.GetMediaItemTake(Item,0)
    Source=reaper.GetMediaItemTake_Source(Take)

    -- start build-process of the peak(mode=0)
    BuildStart=reaper.PCM_Source_BuildPeaks(Source,0)

    function main()
      -- build peaks, until PCM_Source_BuildPeaks returns 0(mode must be 1)
      -- do it for Build_Progression-times within this defer-loop.
      for i=0, Build_Progression do
        BuildProgress=reaper.PCM_Source_BuildPeaks(Source,1)
      end
      
      if BuildProgress~=0 then 
        -- if PCM_Source_BuildPeaks returned anything else than 0, defer this function again
        reaper.defer(main) 
      else 
        -- if PCM_Source_BuildPeaks returned 0, finish building of the peaks(mode must be 2)
        -- and update the arrangeview for the newly built peaks to show
        BuildXit=reaper.PCM_Source_BuildPeaks(Source,2) 
        reaper.UpdateArrange()
      end
    end


    -- run multiple defer-instances of the peak-build-function
    for i=0, Build_Factor do
      main()
    end

Returnvalues:
integer retval
a value that returns the current state of the peak-building-process, depending on parameter mode
when mode=0
  0, no peaks need to be built
  1, peaks are building
when mode=1
  the percentage, how much of the peaks still need to be built
  0, peak-building is finished
when mode=2
  0, peak building is successfully finished for this PCM_source

Parameters:
PCM_source src
the PCM_source, whose peaks you want to rebuild
integer mode
sets the current "phase" of the peak-building
0, starts the peak-building-process for this PCM_source(must be done once per PCM_Source)
1, process the peak-building-process a bit further; do repeatedly until retval=0
2, finish up peak-building for this PCM_source


^ Reaper version 5.62PCM_Source_CreateFromFile

C: PCM_source* PCM_Source_CreateFromFile(const char* filename)
EEL2: PCM_source PCM_Source_CreateFromFile("filename")
Lua: PCM_source src = reaper.PCM_Source_CreateFromFile(string filename)
Python: PCM_source RPR_PCM_Source_CreateFromFile(String filename)

See PCM_Source_CreateFromFileEx.


Returnvalues:
PCM_source src

Parameters:
string filename


^ Reaper version 5.62PCM_Source_CreateFromFileEx

C: PCM_source* PCM_Source_CreateFromFileEx(const char* filename, bool forcenoMidiImp)
EEL2: PCM_source PCM_Source_CreateFromFileEx("filename", bool forcenoMidiImp)
Lua: PCM_source src = reaper.PCM_Source_CreateFromFileEx(string filename, boolean forcenoMidiImp)
Python: PCM_source RPR_PCM_Source_CreateFromFileEx(String filename, Boolean forcenoMidiImp)

Create a PCM_source from filename, and override pref of MIDI files being imported as in-project MIDI events.

Returnvalues:
PCM_source src

Parameters:
string filename
boolean forcenoMidiImp


^ Reaper version 5.62PCM_Source_CreateFromType

C: PCM_source* PCM_Source_CreateFromType(const char* sourcetype)
EEL2: PCM_source PCM_Source_CreateFromType("sourcetype")
Lua: PCM_source src = reaper.PCM_Source_CreateFromType(string sourcetype)
Python: PCM_source RPR_PCM_Source_CreateFromType(String sourcetype)

Create a PCM_source from a "type" (use this if you're going to load its state via LoadState/ProjectStateContext).
Valid types include "WAVE", "MIDI", or whatever plug-ins define as well.

Returnvalues:
PCM_source src

Parameters:
string sourcetype


^ Reaper version 5.62PCM_Source_Destroy

C: void PCM_Source_Destroy(PCM_source* src)
EEL2: 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

Parameters:
PCM_source src
the source to be deleted


^ Reaper version 5.62PCM_Source_GetPeaks

C: int PCM_Source_GetPeaks(PCM_source* src, double peakrate, double starttime, int numchannels, int numsamplesperchannel, int want_extra_type, double* buf)
EEL2: int PCM_Source_GetPeaks(PCM_source src, peakrate, starttime, int numchannels, int numsamplesperchannel, int want_extra_type, buffer_ptr buf)
Lua: integer retval = reaper.PCM_Source_GetPeaks(PCM_source src, number peakrate, number starttime, integer numchannels, integer numsamplesperchannel, integer want_extra_type, reaper.array buf)
Python: (Int retval, PCM_source src, Float peakrate, Float starttime, Int numchannels, Int numsamplesperchannel, Int want_extra_type, Float buf) = RPR_PCM_Source_GetPeaks(src, peakrate, starttime, numchannels, numsamplesperchannel, want_extra_type, buf)

Gets block of peak samples to buf. Note that the peak samples are interleaved, but in two or three blocks (maximums, then minimums, then extra).
Return value has 20 bits of returned sample count, then 4 bits of output_mode (0xf00000), then a bit to signify whether extra_type was available (0x1000000).
extra_type can be 115 ('s') for spectral information, which will return peak samples as integers with the low 15 bits frequency, next 14 bits tonality.

Returnvalues:
integer retval

Parameters:
PCM_source src
number peakrate
number starttime
integer numchannels
integer numsamplesperchannel
integer want_extra_type
reaper.array buf


^ Reaper version 5.62PCM_Source_GetSectionInfo

C: bool PCM_Source_GetSectionInfo(PCM_source* src, double* offsOut, double* lenOut, bool* revOut)
EEL2: bool PCM_Source_GetSectionInfo(PCM_source src, &offs, &len, bool &rev)
Lua: boolean retval, number offs, number len, boolean rev = 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

Returnvalues:
boolean retval
number offs
number len
boolean rev

Parameters:
PCM_Source src


^ Reaper version 5.62Resample_EnumModes

C: const char* Resample_EnumModes(int mode)
EEL2: bool Resample_EnumModes(#retval, int mode)
Lua: string resample_mode = reaper.Resample_EnumModes(integer mode)
Python: String RPR_Resample_EnumModes(Int mode)

enumerates the existing resample-modes

Returnvalues:
string resample_mode
the resample-mode

Parameters:
integer mode
0, Medium (64pt Sinc)
1, Low (Linear Interpolation)
2, Lowest (Point Sampling)
3, Good (192pt Sinc)
4, Better (384pt Sinc)
5, Fast (IIR + Linear Interpolation)
6, Fast (IIRx2 + Linear Interpolation)
7, Fast (16pt Sinc)
8, HQ (512pt Sinc)
9, Extreme HQ (768pt HQ Sinc)


^ Reaper version 5.97AudioAccessorStateChanged

C: bool AudioAccessorStateChanged(AudioAccessor* accessor)
EEL2: bool AudioAccessorStateChanged(AudioAccessor accessor)
Lua: boolean changed_samples = reaper.AudioAccessorStateChanged(AudioAccessor accessor)
Python: Boolean RPR_AudioAccessorStateChanged(AudioAccessor accessor)

Returns true if the underlying samples (track or media item take) have changed, but does not update the audio accessor, so the user can selectively call AudioAccessorValidateState only when needed.

Returnvalues:
boolean changed_samples
true, underlying samples changed; false, underlying samples didn't change

Parameters:
AudioAccessor accessor
the AudioAccessor, whose sample-statechange you want to get


^ Reaper version 5.97AudioAccessorUpdate

C: void AudioAccessorUpdate(AudioAccessor* accessor)
EEL2: AudioAccessorUpdate(AudioAccessor accessor)
Lua: reaper.AudioAccessorUpdate(AudioAccessor accessor)
Python: RPR_AudioAccessorUpdate(AudioAccessor accessor)

Force the accessor to reload its state from the underlying track or media item take.

See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples.


Parameters:
AudioAccessor accessor


^ Reaper version 5.62Audio_Init

C: void Audio_Init()
EEL2: Audio_Init()
Lua: reaper.Audio_Init()
Python: RPR_Audio_Init()

open all audio and MIDI devices, if not open

So if the audio-device(s) are closed, you can use this to try to (re)-activate them.


^ Reaper version 5.62Audio_IsPreBuffer

C: int Audio_IsPreBuffer()
EEL2: int Audio_IsPreBuffer()
Lua: integer retval = reaper.Audio_IsPreBuffer()
Python: Int RPR_Audio_IsPreBuffer()

is in pre-buffer? threadsafe

Returnvalues:
integer retval


^ Reaper version 5.62Audio_IsRunning

C: int Audio_IsRunning()
EEL2: int Audio_IsRunning()
Lua: integer audio_running = reaper.Audio_IsRunning()
Python: Int RPR_Audio_IsRunning()

is audio running at all? threadsafe

It is an indicator, if the current audio-device is closed(0) or not(1).

Returnvalues:
integer audio_running
0, audio is not running; 1, audio is running


^ Reaper version 5.62Audio_Quit

C: void Audio_Quit()
EEL2: Audio_Quit()
Lua: reaper.Audio_Quit()
Python: RPR_Audio_Quit()

close all audio and MIDI devices, if open

This sets all audio-devices to closed.


^ Reaper version 6.37GetAudioDeviceInfo

C: bool GetAudioDeviceInfo(const char* attribute, char* descOut, int descOut_sz)
EEL2: bool GetAudioDeviceInfo("attribute", #desc)
Lua: boolean retval, string desc = reaper.GetAudioDeviceInfo(string attribute)
Python: (Boolean retval, String attribute, String descOut, Int descOut_sz) = RPR_GetAudioDeviceInfo(attribute, descOut, descOut_sz)

get information about the currently open audio device.
Attribute can be MODE, IDENT_IN, IDENT_OUT, BSIZE, SRATE, BPS.

returns false if unknown attribute or device not open.

Returnvalues:
boolean retval
true, if returning a value is possible; false, if not(unknown attribute or device not open)
string desc
the returned value; will not return a value, if Preferences are opened

Parameters:
string attribute
the attribute to get, as set in Preferences -> Device
MODE - the Audio system selected
IDENT_IN - the selected Input device
IDENT_OUT - the selected Output device
BSIZE - the Buffer-sample-size (not the multiplier!)
SRATE - the samplerate in Hz
BPS - the sample-format (e.g 16, 24, 32 bit)


^ Reaper version 5.62GetInputChannelName

C: const char* GetInputChannelName(int channelIndex)
EEL2: bool GetInputChannelName(#retval, int channelIndex)
Lua: string chan_name = reaper.GetInputChannelName(integer channelIndex)
Python: String RPR_GetInputChannelName(Int channelIndex)

Returns the name of a input-channel.

Returnvalues:
string chan_name
the name of the input-channel.

Parameters:
integer channelIndex
the index of the input-channels, with 0 for the first, 1 for the second, etc.


^ Reaper version 5.62GetInputOutputLatency

C: void GetInputOutputLatency(int* inputlatencyOut, int* outputLatencyOut)
EEL2: GetInputOutputLatency(int &inputlatency, int &outputLatency)
Lua: number inputlatency retval, number outputLatency = reaper.GetInputOutputLatency()
Python: (Int inputlatencyOut, Int outputLatencyOut) = RPR_GetInputOutputLatency(inputlatencyOut, outputLatencyOut)

Gets the audio device input/output latency in samples

Returnvalues:
integer inputlatency retval
the input-latency
integer outputLatency
the output-latency


^ Reaper version 5.62GetMIDIInputName

C: bool GetMIDIInputName(int dev, char* nameout, int nameout_sz)
EEL2: 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

Returnvalues:
boolean retval
string nameout

Parameters:
integer dev
string nameout


^ Reaper version 5.62GetMIDIOutputName

C: bool GetMIDIOutputName(int dev, char* nameout, int nameout_sz)
EEL2: 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

Returnvalues:
boolean retval
string nameout

Parameters:
integer dev
string nameout


^ Reaper version 5.62GetMaxMidiInputs

C: int GetMaxMidiInputs()
EEL2: int GetMaxMidiInputs()
Lua: integer max_midi_inputs = reaper.GetMaxMidiInputs()
Python: Int RPR_GetMaxMidiInputs()

returns max dev for midi inputs

Returnvalues:
integer max_midi_inputs
the number of max midi inputs


^ Reaper version 5.62GetMaxMidiOutputs

C: int GetMaxMidiOutputs()
EEL2: int GetMaxMidiOutputs()
Lua: integer max_midi_outputs = reaper.GetMaxMidiOutputs()
Python: Int RPR_GetMaxMidiOutputs()

returns max dev for midi outputs

Returnvalues:
integer max_midi_outputs
the number of max midi outputs


^ Reaper version 5.62GetNumAudioInputs

C: int GetNumAudioInputs()
EEL2: int GetNumAudioInputs()
Lua: integer numAudioIns = reaper.GetNumAudioInputs()
Python: Int RPR_GetNumAudioInputs()

Return number of normal audio hardware inputs available

Returnvalues:
integer numAudioIns
the number of audio hardware outputs available


^ Reaper version 5.62GetNumAudioOutputs

C: int GetNumAudioOutputs()
EEL2: int GetNumAudioOutputs()
Lua: integer numAudioOuts = reaper.GetNumAudioOutputs()
Python: Int RPR_GetNumAudioOutputs()

Return number of normal audio hardware outputs available

Returnvalues:
integer numAudioOuts
the number of audio hardware outputs available


^ Reaper version 5.62GetNumMIDIInputs

C: int GetNumMIDIInputs()
EEL2: int GetNumMIDIInputs()
Lua: integer numMidiIns = reaper.GetNumMIDIInputs()
Python: Int RPR_GetNumMIDIInputs()

returns max number of real midi hardware inputs

Returnvalues:
integer numMidiIns


^ Reaper version 5.62GetNumMIDIOutputs

C: int GetNumMIDIOutputs()
EEL2: int GetNumMIDIOutputs()
Lua: integer numMidiOuts = reaper.GetNumMIDIOutputs()
Python: Int RPR_GetNumMIDIOutputs()

returns max number of real midi hardware outputs

Returnvalues:
integer numMidiOuts
the number of real midi hardware outputs


^ Reaper version 5.62GetOutputChannelName

C: const char* GetOutputChannelName(int channelIndex)
EEL2: bool GetOutputChannelName(#retval, int channelIndex)
Lua: string outputchanname= reaper.GetOutputChannelName(integer channelIndex)
Python: String RPR_GetOutputChannelName(Int channelIndex)

Get the name of a specific output-channel.

Returnvalues:
string outputchanname
the name of the output-channel.

Parameters:
integer channelIndex
the index of the output-channel


^ Reaper version 5.62GetOutputLatency

C: double GetOutputLatency()
EEL2: double GetOutputLatency()
Lua: number outputlatency = reaper.GetOutputLatency()
Python: Float RPR_GetOutputLatency()

returns output latency in seconds

Returnvalues:
number outputlatency
output-latency in seconds


^ Reaper version 5.62GetUnderrunTime

C: void GetUnderrunTime(unsigned int* audio_xrunOutOptional, unsigned int* media_xrunOutOptional, unsigned int* curtimeOutOptional)
EEL2: GetUnderrunTime(optional unsigned int &audio_xrun, optional unsigned int &media_xrun, optional unsigned int &curtime)
Lua: optional integer audio_xrun, optional integer media_xrun, optional integer curtime = reaper.GetUnderrunTime()
Python: RPR_GetUnderrunTime(unsigned int audio_xrunOutOptional, unsigned int media_xrunOutOptional, unsigned int curtimeOutOptional)

retrieves the last timestamps of audio xrun (yellow-flash, if available), media xrun (red-flash), and the current time stamp (all milliseconds)

Returnvalues:
optional integer audio_xrun
optional integer media_xrun
optional integer curtime


^ Reaper version 5.62OscLocalMessageToHost

C: void OscLocalMessageToHost(const char* message, const double* valueInOptional)
EEL2: OscLocalMessageToHost("message", optional valueIn)
Lua: reaper.OscLocalMessageToHost(string message, optional number valueIn)
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.

This is not broadcast outside of Reaper, so you can't control devices, plugins, etc with it!

Messages sent via this function can be used for parameter-learn/modulation and as shortcuts for scripts.
The parameter valueIn can be retrieved with the returnvalue val of the function reaper.get_action_context, so sending values to a script is possible that way.

Parameters:
string message
the osc-message, which shall be sent to Reaper
optional number valueIn
a number, which can be sent to scripts who are started by the osc-message


^ Reaper version 5.62CountAutomationItems

C: int CountAutomationItems(TrackEnvelope* env)
EEL2: int CountAutomationItems(TrackEnvelope env)
Lua: integer ai_count = reaper.CountAutomationItems(TrackEnvelope env)
Python: Int RPR_CountAutomationItems(TrackEnvelope env)

Returns the number of automation items on this envelope. See GetSetAutomationItemInfo.


Returnvalues:
integer ai_count
number of automation items

Parameters:
TrackEnvelope env
the envelope-object for the envelope-lane


^ Reaper version 6.01GetSetAutomationItemInfo

C: double GetSetAutomationItemInfo(TrackEnvelope* env, int autoitem_idx, const char* desc, double value, bool is_set)
EEL2: double GetSetAutomationItemInfo(TrackEnvelope env, int autoitem_idx, "desc", value, bool is_set)
Lua: number retval = reaper.GetSetAutomationItemInfo(TrackEnvelope env, integer autoitem_idx, string desc, number value, boolean is_set)
Python: Float RPR_GetSetAutomationItemInfo(TrackEnvelope env, Int autoitem_idx, String desc, Float value, Boolean is_set)

Get or set automation item information. autoitem_idx=0 for the first automation item on an envelope, 1 for the second item, etc. desc can be any of the following:
D_POOL_ID : double * : automation item pool ID (as an integer); edits are propagated to all other automation items that share a pool ID
D_POSITION : double * : automation item timeline position in seconds
D_LENGTH : double * : automation item length in seconds
D_STARTOFFS : double * : automation item start offset in seconds
D_PLAYRATE : double * : automation item playback rate
D_BASELINE : double * : automation item baseline value in the range [0,1]
D_AMPLITUDE : double * : automation item amplitude in the range [-1,1]
D_LOOPSRC : double * : nonzero if the automation item contents are looped
D_UISEL : double * : nonzero if the automation item is selected in the arrange view
D_POOL_QNLEN : double * : automation item pooled source length in quarter notes (setting will affect all pooled instances)

Returnvalues:
number retval

Parameters:
TrackEnvelope env
the envelope, that contains the automation-item
integer autoitem_idx
the index of the automation-item, whose information-attribute you want to get/set
string desc
the attribute to get/set
number value
the new value to be set; write any value, when is_set=false
boolean is_set
true, set a new value; false, get the current value


^ Reaper version 6.30GetSetAutomationItemInfo_String

C: bool GetSetAutomationItemInfo_String(TrackEnvelope* env, int autoitem_idx, const char* desc, char* valuestrNeedBig, bool is_set)
EEL2: bool GetSetAutomationItemInfo_String(TrackEnvelope env, int autoitem_idx, "desc", #valuestrNeedBig, bool is_set)
Lua: boolean retval, string valuestrNeedBig = reaper.GetSetAutomationItemInfo_String(TrackEnvelope env, integer autoitem_idx, string desc, string valuestrNeedBig, boolean is_set)
Python: (Boolean retval, TrackEnvelope env, Int autoitem_idx, String desc, String valuestrNeedBig, Boolean is_set) = RPR_GetSetAutomationItemInfo_String(env, autoitem_idx, desc, valuestrNeedBig, is_set)

Get or set automation item information. autoitem_idx=0 for the first automation item on an envelope, 1 for the second item, etc. returns true on success. desc can be any of the following:

P_POOL_NAME : char * : name of the underlying automation item pool
P_POOL_EXT:xyz : char * : extension-specific persistent data

Returnvalues:
boolean retval
true, getting/setting the value was successful; falsem getting/setting the value was unsuccessful
string valuestrNeedBig
the current value set

Parameters:
TrackEnvelope env
the envelope, that contains the automation-item
integer autoitem_idx
the index of the automation-item, whose information-attribute you want to get/set
string desc
the attribute to get/set
string valuestrNeedBig
the new value to set; set it to "" when is_set=false
boolean is_set
true, set a new value; false, get the current value


^ Reaper version 5.96InsertAutomationItem

C: int InsertAutomationItem(TrackEnvelope* env, int pool_id, double position, double length)
EEL2: int InsertAutomationItem(TrackEnvelope env, int pool_id, position, length)
Lua: integer retval = reaper.InsertAutomationItem(TrackEnvelope env, integer pool_id, number position, number length)
Python: Int RPR_InsertAutomationItem(TrackEnvelope env, Int pool_id, Float position, Float length)

Insert a new automation item. pool_id < 0 collects existing envelope points into the automation item; if pool_id is >= 0 the automation item will be a new instance of that pool (which will be created as an empty instance if it does not exist). Returns the index of the item, suitable for passing to other automation item API functions. See GetSetAutomationItemInfo.


Returnvalues:
integer retval

Parameters:
TrackEnvelope env
integer pool_id
number position
number length


^ Reaper version 5.62 SWS version 2.9.7BR_EnvAlloc(SWS)

C: BR_Envelope* BR_EnvAlloc(TrackEnvelope* envelope, bool takeEnvelopesUseProjectTime)
EEL2: BR_Envelope extension_api("BR_EnvAlloc", TrackEnvelope envelope, bool takeEnvelopesUseProjectTime)
Lua: BR_Envelope env = reaper.BR_EnvAlloc(TrackEnvelope envelope, boolean takeEnvelopesUseProjectTime)
Python: BR_Envelope BR_EnvAlloc(TrackEnvelope envelope, Boolean takeEnvelopesUseProjectTime)

[BR] Create a BR_Envelope-object from a track-envelope pointer or take-envelope pointer. To apply changes to a BR_Envelope-object, always call BR_EnvFree to release the object and commit changes if needed. A BR_Envelope is not a TrackEnvelope-object and therefore can't be used as TrackEnvelope-object!

For manipulation see BR_EnvCountPoints, BR_EnvDeletePoint, BR_EnvFind, BR_EnvFindNext, BR_EnvFindPrevious, BR_EnvGetParentTake, BR_EnvGetParentTrack, BR_EnvGetPoint, BR_EnvGetProperties, BR_EnvSetPoint, BR_EnvSetProperties, BR_EnvValueAtPos.


Returnvalues:
BR_Envelope env
the requested Envelope as a BR_Envelope-object

Parameters:
TrackEnvelope envelope
a TrackEnvelope-object of the envelope, that you want to have as a BR_Envelope
boolean takeEnvelopesUseProjectTime
false, take envelope points' positions are counted from take position, not project start time; true, work with project time instead


^ Reaper version 5.62 SWS version 2.9.7BR_EnvCountPoints(SWS)

C: int BR_EnvCountPoints(BR_Envelope* envelope)
EEL2: int extension_api("BR_EnvCountPoints", BR_Envelope envelope)
Lua: integer retval = reaper.BR_EnvCountPoints(BR_Envelope envelope)
Python: Int BR_EnvCountPoints(BR_Envelope envelope)

[BR] Count envelope points in the envelope object allocated with BR_EnvAlloc.


Returnvalues:
integer retval
the number of envelope-points in the BR_Envelope-object

Parameters:
BR_Envelope envelope
the BR_Envelope-object, whose points you want to count


^ Reaper version 5.62 SWS version 2.9.7BR_EnvDeletePoint(SWS)

C: bool BR_EnvDeletePoint(BR_Envelope* envelope, int id)
EEL2: bool extension_api("BR_EnvDeletePoint", BR_Envelope envelope, int id)
Lua: boolean retval = reaper.BR_EnvDeletePoint(BR_Envelope envelope, integer id)
Python: Boolean BR_EnvDeletePoint(BR_Envelope envelope, Int id)

[BR] Delete envelope point by index (zero-based) in the envelope object allocated with BR_EnvAlloc.


Returnvalues:
boolean retval
true, deleting was successful; false, deleting was unsuccessful

Parameters:
BR_Envelope envelope
the BR_Envelope-object, where you want to delete an envelope-point
integer id
the envelope-point-idx, that you want to delete. 0, first envelope-point; 1, second envelope-point, etc


^ Reaper version 5.62 SWS version 2.9.7BR_EnvFind(SWS)

C: int BR_EnvFind(BR_Envelope* envelope, double position, double delta)
EEL2: int extension_api("BR_EnvFind", BR_Envelope envelope, position, delta)
Lua: integer retval = reaper.BR_EnvFind(BR_Envelope envelope, number position, number delta)
Python: Int BR_EnvFind(BR_Envelope envelope, Float position, Float delta)

[BR] Find envelope point at time position in the envelope object allocated with BR_EnvAlloc. Pass delta > 0 to search surrounding range - in that case the closest point to position within delta will be searched for. Returns envelope point id (zero-based) on success or -1 on failure.


Returnvalues:
integer retval
envelope-point-id or -1 on failure

Parameters:
BR_Envelope envelope
the BR_Envelope-object, in which you want to find an envelope-point
number position
the position in seconds, where you want to find from
number delta
delta > 0 to search surrounding range


^ Reaper version 5.62 SWS version 2.9.7BR_EnvFindNext(SWS)

C: int BR_EnvFindNext(BR_Envelope* envelope, double position)
EEL2: int extension_api("BR_EnvFindNext", BR_Envelope envelope, position)
Lua: integer retval = reaper.BR_EnvFindNext(BR_Envelope envelope, number position)
Python: Int BR_EnvFindNext(BR_Envelope envelope, Float position)

[BR] Find next envelope point after time position in the envelope object allocated with BR_EnvAlloc. Returns envelope point id (zero-based) on success or -1 on failure.


Returnvalues:
integer retval
envelope-point-id or -1 on failure

Parameters:
BR_Envelope envelope
the BR_Envelope-object, in which you want to find the next envelope-point
number position
the position in seconds, where you want to find the next envelope-point from


^ Reaper version 5.62 SWS version 2.9.7BR_EnvFindPrevious(SWS)

C: int BR_EnvFindPrevious(BR_Envelope* envelope, double position)
EEL2: int extension_api("BR_EnvFindPrevious", BR_Envelope envelope, position)
Lua: integer retval = reaper.BR_EnvFindPrevious(BR_Envelope envelope, number position)
Python: Int BR_EnvFindPrevious(BR_Envelope envelope, Float position)

[BR] Find previous envelope point before time position in the envelope object allocated with BR_EnvAlloc. Returns envelope point id (zero-based) on success or -1 on failure.


Returnvalues:
integer retval
envelope-point-id or -1 on failure

Parameters:
BR_Envelope envelope
the BR_Envelope-object, in which you want to find the previous envelope-point
number position
the position in seconds, where you want to find the previous envelope-point from


^ Reaper version 5.62 SWS version 2.9.7BR_EnvFree(SWS)

C: bool BR_EnvFree(BR_Envelope* envelope, bool commit)
EEL2: bool extension_api("BR_EnvFree", BR_Envelope envelope, bool commit)
Lua: boolean retval = reaper.BR_EnvFree(BR_Envelope envelope, boolean commit)
Python: Boolean BR_EnvFree(BR_Envelope envelope, Boolean commit)

[BR] Free envelope object allocated with BR_EnvAlloc and commit changes if needed. Returns true if changes were committed successfully. Note that when envelope object wasn't modified nothing will get committed even if commit = true - in that case function returns false.


Returnvalues:
boolean retval
true, committing was successful; false, committing was unsuccessful or no committing was necessary

Parameters:
BR_Envelope envelope
the BR_Envelope-object that you want to commit and be freed
boolean commit
true, commit changes when freeing the BR_Envelope-object; false, don't commit changes when freeing the BR_Envelope-object


^ Reaper version 5.62 SWS version 2.9.7BR_EnvGetParentTake(SWS)

C: MediaItem_Take* BR_EnvGetParentTake(BR_Envelope* envelope)
EEL2: MediaItem_Take extension_api("BR_EnvGetParentTake", BR_Envelope envelope)
Lua: MediaItem_Take take = reaper.BR_EnvGetParentTake(BR_Envelope envelope)
Python: MediaItem_Take BR_EnvGetParentTake(BR_Envelope envelope)

[BR] If envelope object allocated with BR_EnvAlloc is take envelope, returns parent media item take, otherwise NULL.


Returnvalues:
MediaItem_Take take

Parameters:
BR_Envelope envelope


^ Reaper version 5.62 SWS version 2.9.7BR_EnvGetParentTrack(SWS)

C: MediaTrack* BR_EnvGetParentTrack(BR_Envelope* envelope)
EEL2: MediaTrack extension_api("BR_EnvGetParentTrack", BR_Envelope envelope)
Lua: MediaTrack tr = reaper.BR_EnvGetParentTrack(BR_Envelope envelope)
Python: MediaTrack BR_EnvGetParentTrack(BR_Envelope envelope)

[BR] Get parent track of envelope object allocated with BR_EnvAlloc. If take envelope, returns NULL.


Returnvalues:
MediaTrack tr

Parameters:
BR_Envelope envelope


^ Reaper version 5.62 SWS version 2.9.7BR_EnvGetPoint(SWS)

C: bool BR_EnvGetPoint(BR_Envelope* envelope, int id, double* positionOut, double* valueOut, int* shapeOut, bool* selectedOut, double* bezierOut)
EEL2: bool extension_api("BR_EnvGetPoint", BR_Envelope envelope, int id, &position, &value, int &shape, bool &selected, &bezier)
Lua: boolean retval, number position, number value, integer shape, boolean selected, number bezier = reaper.BR_EnvGetPoint(BR_Envelope envelope, integer id)
Python: (Boolean retval, BR_Envelope envelope, Int id, Float positionOut, Float valueOut, Int shapeOut, Boolean selectedOut, Float bezierOut) = BR_EnvGetPoint(envelope, id, positionOut, valueOut, shapeOut, selectedOut, bezierOut)

[BR] Get envelope point by id (zero-based) from the envelope object allocated with BR_EnvAlloc. Returns true on success.


Returnvalues:
boolean retval
number position
number value
integer shape
boolean selected
number bezier

Parameters:
BR_Envelope envelope
integer id


^ Reaper version 5.62 SWS version 2.11.0BR_EnvGetProperties(SWS)

C: void BR_EnvGetProperties(BR_Envelope* envelope, bool* activeOut, bool* visibleOut, bool* armedOut, bool* inLaneOut, int* laneHeightOut, int* defaultShapeOut, double* minValueOut, double* maxValueOut, double* centerValueOut, int* typeOut, bool* faderScalingOut, int* automationItemsOptionsOutOptional)
EEL2: extension_api("BR_EnvGetProperties", BR_Envelope envelope, bool &active, bool &visible, bool &armed, bool &inLane, int &laneHeight, int &defaultShape, &minValue, &maxValue, ¢erValue, int &type, bool &faderScaling, optional int &automationItemsOptions)
Lua: boolean active, boolean visible, boolean armed, boolean inLane, integer laneHeight, integer defaultShape, number minValue, number maxValue, number centerValue, integer type, boolean faderScaling, optional integer automationItemsOptions = reaper.BR_EnvGetProperties(BR_Envelope envelope)
Python: (BR_Envelope envelope, Boolean activeOut, Boolean visibleOut, Boolean armedOut, Boolean inLaneOut, Int laneHeightOut, Int defaultShapeOut, Float minValueOut, Float maxValueOut, Float centerValueOut, Int typeOut, Boolean faderScalingOut, Int automationItemsOptionsOutOptional) = BR_EnvGetProperties(envelope, activeOut, visibleOut, armedOut, inLaneOut, laneHeightOut, defaultShapeOut, minValueOut, maxValueOut, centerValueOut, typeOut, faderScalingOut, automationItemsOptionsOutOptional)

[BR] Get envelope properties for the envelope object allocated with BR_EnvAlloc.

active: true if envelope is active visible: true if envelope is visible armed: true if envelope is armed inLane: true if envelope has it's own envelope lane laneHeight: envelope lane override height. 0 for none, otherwise size in pixels defaultShape: default point shape: 0->Linear, 1->Square, 2->Slow start/end, 3->Fast start, 4->Fast end, 5->Bezier minValue: minimum envelope value maxValue: maximum envelope value type: envelope type: 0->Volume, 1->Volume (Pre-FX), 2->Pan, 3->Pan (Pre-FX), 4->Width, 5->Width (Pre-FX), 6->Mute, 7->Pitch, 8->Playrate, 9->Tempo map, 10->Parameter faderScaling: true if envelope uses fader scaling automationItemsOptions: -1->project default, &1=0->don't attach to underl. env., &1->attach to underl. env. on right side, &2->attach to underl. env. on both sides, &4: bypass underl. env.


Returnvalues:
boolean active
boolean visible
boolean armed
boolean inLane
integer laneHeight
integer defaultShape
number minValue
number maxValue
number centerValue
integer type
boolean faderScaling
optional integer automationItemsOptions

Parameters:
BR_Envelope envelope


^ Reaper version 5.62 SWS version 2.9.7BR_EnvSetPoint(SWS)

C: bool BR_EnvSetPoint(BR_Envelope* envelope, int id, double position, double value, int shape, bool selected, double bezier)
EEL2: bool extension_api("BR_EnvSetPoint", BR_Envelope envelope, int id, position, value, int shape, bool selected, bezier)
Lua: boolean retval = reaper.BR_EnvSetPoint(BR_Envelope envelope, integer id, number position, number value, integer shape, boolean selected, number bezier)
Python: Boolean BR_EnvSetPoint(BR_Envelope envelope, Int id, Float position, Float value, Int shape, Boolean selected, Float bezier)

[BR] Set envelope point by id (zero-based) in the envelope object allocated with BR_EnvAlloc. To create point instead, pass id = -1. Note that if new point is inserted or existing point's time position is changed, points won't automatically get sorted. To do that, see BR_EnvSortPoints. Returns true on success.


Returnvalues:
boolean retval

Parameters:
BR_Envelope envelope
integer id
number position
number value
integer shape
boolean selected
number bezier


^ Reaper version 5.979 SWS version 2.11.0BR_EnvSetProperties(SWS)

C: void BR_EnvSetProperties(BR_Envelope* envelope, bool active, bool visible, bool armed, bool inLane, int laneHeight, int defaultShape, bool faderScaling, int* automationItemsOptionsInOptional)
EEL2: extension_api("BR_EnvSetProperties", BR_Envelope envelope, bool active, bool visible, bool armed, bool inLane, int laneHeight, int defaultShape, bool faderScaling, optional int automationItemsOptionsIn)
Lua: reaper.BR_EnvSetProperties(BR_Envelope envelope, boolean active, boolean visible, boolean armed, boolean inLane, integer laneHeight, integer defaultShape, boolean faderScaling, optional integer automationItemsOptionsIn)
Python: (BR_Envelope envelope, Boolean active, Boolean visible, Boolean armed, Boolean inLane, Int laneHeight, Int defaultShape, Boolean faderScaling, Int automationItemsOptionsInOptional) = BR_EnvSetProperties(envelope, active, visible, armed, inLane, laneHeight, defaultShape, faderScaling, automationItemsOptionsInOptional)

[BR] Set envelope properties for the envelope object allocated with BR_EnvAlloc. For parameter description see BR_EnvGetProperties. Setting automationItemsOptions requires REAPER 5.979+.


Parameters:
TrackEnvelope envelope
boolean active
boolean visible
boolean armed
boolean inLane
integer laneHeight
integer defaultShape
boolean faderScaling
optional integer automationItemsOptionsIn


^ Reaper version 5.62 SWS version 2.9.7BR_EnvSortPoints(SWS)

C: void BR_EnvSortPoints(BR_Envelope* envelope)
EEL2: extension_api("BR_EnvSortPoints", BR_Envelope envelope)
Lua: reaper.BR_EnvSortPoints(BR_Envelope envelope)
Python: BR_EnvSortPoints(BR_Envelope envelope)

[BR] Sort envelope points by position. The only reason to call this is if sorted points are explicitly needed after editing them with BR_EnvSetPoint. Note that you do not have to call this before doing BR_EnvFree since it does handle unsorted points too.


Parameters:
BR_Envelope envelope


^ Reaper version 5.62 SWS version 2.9.7BR_EnvValueAtPos(SWS)

C: double BR_EnvValueAtPos(BR_Envelope* envelope, double position)
EEL2: double extension_api("BR_EnvValueAtPos", BR_Envelope envelope, position)
Lua: number retval = reaper.BR_EnvValueAtPos(BR_Envelope envelope, number position)
Python: Float BR_EnvValueAtPos(BR_Envelope envelope, Float position)

[BR] Get envelope value at time position for the envelope object allocated with BR_EnvAlloc.


Returnvalues:
number retval

Parameters:
BR_Envelope envelope
number position


^ Reaper version 5.62CSurf_SetAutoMode

C: void CSurf_SetAutoMode(int mode, IReaperControlSurface* ignoresurf)
EEL2: CSurf_SetAutoMode(int mode, IReaperControlSurface ignoresurf)
Lua: reaper.CSurf_SetAutoMode(integer mode, IReaperControlSurface ignoresurf)
Python: RPR_CSurf_SetAutoMode(Int mode, IReaperControlSurface ignoresurf)


Parameters:
integer mode
IReaperControlSurface ignoresurf


^ Reaper version 5.979CountEnvelopePoints

C: int CountEnvelopePoints(TrackEnvelope* envelope)
EEL2: int CountEnvelopePoints(TrackEnvelope envelope)
Lua: integer count_envpoints = reaper.CountEnvelopePoints(TrackEnvelope envelope)
Python: Int RPR_CountEnvelopePoints(TrackEnvelope envelope)

Returns the number of points in the envelope. See #CountEnvelopePointsEx


Returnvalues:
integer count_envpoints
the number of envelope-points in the envelopeobject envelope

Parameters:
TrackEnvelope envelope
the TrackEnvelope-object, in which to count for the envelope-points


^ Reaper version 5.979CountEnvelopePointsEx

C: int CountEnvelopePointsEx(TrackEnvelope* envelope, int autoitem_idx)
EEL2: int CountEnvelopePointsEx(TrackEnvelope envelope, int autoitem_idx)
Lua: integer count_envpoints = reaper.CountEnvelopePointsEx(TrackEnvelope envelope, integer autoitem_idx)
Python: Int RPR_CountEnvelopePointsEx(TrackEnvelope envelope, Int autoitem_idx)

Returns the number of points in the envelope. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, even if the automation item is trimmed so that not all points are visible. Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations.

See GetEnvelopePointEx, SetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx.


Returnvalues:
integer count_envpoints
the number of envelope-points in the envelopeobject envelope

Parameters:
TrackEnvelope envelope
the TrackEnvelope-object, in which to count for the envelope-points
integer autoitem_idx
-1, for the underlying envelope, 0, for the first automation item on the envelope, etc.


^ Reaper version 5.62CountTrackEnvelopes

C: int CountTrackEnvelopes(MediaTrack* track)
EEL2: int CountTrackEnvelopes(MediaTrack track)
Lua: integer count_track_envs = reaper.CountTrackEnvelopes(MediaTrack track)
Python: Int RPR_CountTrackEnvelopes(MediaTrack track)

Counts the number of track-envelopes of a certain track. see GetTrackEnvelope


Returnvalues:
integer count_track_envs
the number of track-envelopes in a track

Parameters:
MediaTrack track
the object of the track to count it's envelopes


^ Reaper version 5.979DeleteEnvelopePointEx

C: bool DeleteEnvelopePointEx(TrackEnvelope* envelope, int autoitem_idx, int ptidx)
EEL2: bool DeleteEnvelopePointEx(TrackEnvelope envelope, int autoitem_idx, int ptidx)
Lua: boolean retval = reaper.DeleteEnvelopePointEx(TrackEnvelope envelope, integer autoitem_idx, integer ptidx)
Python: Boolean RPR_DeleteEnvelopePointEx(TrackEnvelope envelope, Int autoitem_idx, Int ptidx)

Delete an envelope point. If setting multiple points at once, set noSort=true, and call Envelope_SortPoints when done. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, even if the automation item is trimmed so that not all points are visible. Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations.

See CountEnvelopePointsEx, GetEnvelopePointEx, SetEnvelopePointEx, InsertEnvelopePointEx.


Returnvalues:
boolean retval
true, deleting was successful; false, deleting was unsuccessful

Parameters:
TrackEnvelope envelope
the envelope, in which the point lies, that you want to delete
integer autoitem_idx
-1, the underlying envelope;
0 to x, the 1st to x-1th automation-item
|0x10000000 to base ptidx on the number of points in one full loop iteration,
even if the automation item is trimmed so that not all points are visible.
Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations.
integer ptidx
the envelope-point to delete


^ Reaper version 5.979DeleteEnvelopePointRange

C: bool DeleteEnvelopePointRange(TrackEnvelope* envelope, double time_start, double time_end)
EEL2: bool DeleteEnvelopePointRange(TrackEnvelope envelope, time_start, time_end)
Lua: boolean retval = 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.

See DeleteEnvelopePointRangeEx, DeleteEnvelopePointEx.


Returnvalues:
boolean retval
true, if it succeeded

Parameters:
TrackEnvelope envelope
the envelope-point-object, in which to delete the envelope-points
number time_start
the starttime of the deletionrange in seconds
number time_end
the endtime of the deletionrange in seconds


^ Reaper version 5.975DeleteEnvelopePointRangeEx

C: bool DeleteEnvelopePointRangeEx(TrackEnvelope* envelope, int autoitem_idx, double time_start, double time_end)
EEL2: bool DeleteEnvelopePointRangeEx(TrackEnvelope envelope, int autoitem_idx, time_start, time_end)
Lua: boolean retval = reaper.DeleteEnvelopePointRangeEx(TrackEnvelope envelope, integer autoitem_idx, number time_start, number time_end)
Python: Boolean RPR_DeleteEnvelopePointRangeEx(TrackEnvelope envelope, Int autoitem_idx, Float time_start, Float time_end)

Delete a range of envelope points. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc.

Returnvalues:
boolean retval
true, if deleting was successful; false, if not

Parameters:
TrackEnvelope envelope
the envelope-point-object, in which to delete the envelope-points
integer autoitem_idx
the automation item to be affected by deletion; -1, for the underlying envelope itself; 0, for the first automation item on the envelope; 1 for the second, etc
number time_start
the starttime of the deletionrange in seconds
number time_end
the endtime of the deletionrange in seconds


^ Reaper version 5.987Envelope_Evaluate

C: int Envelope_Evaluate(TrackEnvelope* envelope, double time, double samplerate, int samplesRequested, double* valueOutOptional, double* dVdSOutOptional, double* ddVdSOutOptional, double* dddVdSOutOptional)
EEL2: int Envelope_Evaluate(TrackEnvelope envelope, time, samplerate, int samplesRequested, optional &value, optional &dVdS, optional &ddVdS, optional &dddVdS)
Lua: integer retval, optional number value, optional number dVdS, optional number ddVdS, optional number dddVdS = 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 second derivative, dddVdS is the third derivative.

See GetEnvelopeScalingMode.


Returnvalues:
integer retval
optional number value
optional number dVdS
the change in value per sample (first derivative)
optional number ddVdS
the second derivative
optional number dddVdS
is the third derivative

Parameters:
TrackEnvelope envelope
number time
number samplerate
integer samplesRequested


^ Reaper version 5.62Envelope_FormatValue

C: void Envelope_FormatValue(TrackEnvelope* env, double value, char* bufOut, int bufOut_sz)
EEL2: Envelope_FormatValue(TrackEnvelope env, value, #buf)
Lua: string formatted_value = reaper.Envelope_FormatValue(TrackEnvelope env, number value)
Python: (TrackEnvelope env, Float value, String bufOut, Int bufOut_sz) = RPR_Envelope_FormatValue(env, value, bufOut, bufOut_sz)

Formats the value of an envelope to a user-readable form

Returnvalues:
string formatted_value

Parameters:
TrackEnvelope env
number value


^ Reaper version 5.62Envelope_GetParentTake

C: MediaItem_Take* Envelope_GetParentTake(TrackEnvelope* env, int* indexOutOptional, int* index2OutOptional)
EEL2: MediaItem_Take Envelope_GetParentTake(TrackEnvelope env, optional int &index, optional int &index2)
Lua: MediaItem_Take retval, optional integer index, optional integer index2 = reaper.Envelope_GetParentTake(TrackEnvelope env)
Python: (MediaItem_Take retval, TrackEnvelope env, Int indexOutOptional, Int index2OutOptional) = RPR_Envelope_GetParentTake(env, indexOutOptional, index2OutOptional)

If take envelope, gets the take from the envelope. If FX, indexOutOptional set to FX index, index2OutOptional set to parameter index, otherwise -1.

Returnvalues:
MediaItem_Take retval
optional integer index
optional integer index2

Parameters:
TrackEnvelope env


^ Reaper version 5.62Envelope_GetParentTrack

C: MediaTrack* Envelope_GetParentTrack(TrackEnvelope* env, int* indexOutOptional, int* index2OutOptional)
EEL2: MediaTrack Envelope_GetParentTrack(TrackEnvelope env, optional int &index, optional int &index2)
Lua: MediaTrack retval, optional integer index, optional integer index2 = reaper.Envelope_GetParentTrack(TrackEnvelope env)
Python: (MediaTrack retval, TrackEnvelope env, Int indexOutOptional, Int index2OutOptional) = RPR_Envelope_GetParentTrack(env, indexOutOptional, index2OutOptional)

If track envelope, gets the track from the envelope. If FX, indexOutOptional set to FX index, index2OutOptional set to parameter index, otherwise -1.

Returnvalues:
MediaTrack retval
optional integer index
optional integer index2

Parameters:
TrackEnvelope env


^ Reaper version 5.62Envelope_SortPoints

C: bool Envelope_SortPoints(TrackEnvelope* envelope)
EEL2: bool Envelope_SortPoints(TrackEnvelope envelope)
Lua: boolean retval = reaper.Envelope_SortPoints(TrackEnvelope envelope)
Python: Boolean RPR_Envelope_SortPoints(TrackEnvelope envelope)

Sort envelope points by time. See SetEnvelopePoint, InsertEnvelopePoint.


Returnvalues:
boolean retval

Parameters:
TrackEnvelope envelope


^ Reaper version 5.975Envelope_SortPointsEx

C: bool Envelope_SortPointsEx(TrackEnvelope* envelope, int autoitem_idx)
EEL2: bool Envelope_SortPointsEx(TrackEnvelope envelope, int autoitem_idx)
Lua: boolean retval = reaper.Envelope_SortPointsEx(TrackEnvelope envelope, integer autoitem_idx)
Python: Boolean RPR_Envelope_SortPointsEx(TrackEnvelope envelope, Int autoitem_idx)

Sort envelope points by time. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. See SetEnvelopePoint, InsertEnvelopePoint.


Returnvalues:
boolean retval

Parameters:
TrackEnvelope envelope
integer autoitem_idx


^ Reaper version 6.30GetEnvelopeInfo_Value

C: double GetEnvelopeInfo_Value(TrackEnvelope* env, const char* parmname)
EEL2: double GetEnvelopeInfo_Value(TrackEnvelope env, "parmname")
Lua: number retval = reaper.GetEnvelopeInfo_Value(TrackEnvelope env, string parmname)
Python: Float RPR_GetEnvelopeInfo_Value(TrackEnvelope env, String parmname)

Gets an envelope numerical-value attribute:
    I_TCPY : int : Y offset of envelope relative to parent track (may be separate lane or overlap with track contents)
    I_TCPH : int : visible height of envelope
    I_TCPY_USED : int : Y offset of envelope relative to parent track, exclusive of padding
    I_TCPH_USED : int : visible height of envelope, exclusive of padding
    P_TRACK : MediaTrack * : parent track pointer (if any)
    P_DESTTRACK : MediaTrack * : destination track pointer, if on a send
    P_ITEM : MediaItem * : parent item pointer (if any)
    P_TAKE : MediaItem_Take * : parent take pointer (if any)
    I_SEND_IDX : int : 1-based index of send in P_TRACK, or 0 if not a send
    I_HWOUT_IDX : int : 1-based index of hardware output in P_TRACK or 0 if not a hardware output
    I_RECV_IDX : int : 1-based index of receive in P_DESTTRACK or 0 if not a send/receive

Returnvalues:
number retval
the returned value of the attribute

Parameters:
TrackEnvelope env
the TrackEnvelope, of which you want to retrieve the attribute-value
string parmname
the attribute, whose value you want;
see description for the attributes you can use for more details


^ Reaper version 5.974GetEnvelopeName

C: bool GetEnvelopeName(TrackEnvelope* env, char* bufOut, int bufOut_sz)
EEL2: bool GetEnvelopeName(TrackEnvelope env, #buf)
Lua: boolean retval, string buf = reaper.GetEnvelopeName(TrackEnvelope env, string buf)
Python: (Boolean retval, TrackEnvelope env, String bufOut, Int bufOut_sz) = RPR_GetEnvelopeName(env, bufOut, bufOut_sz)


Returnvalues:
boolean retval
string buf

Parameters:
TrackEnvelope env
string buf


^ Reaper version 5.979GetEnvelopePoint

C: bool GetEnvelopePoint(TrackEnvelope* envelope, int ptidx, double* timeOutOptional, double* valueOutOptional, int* shapeOutOptional, double* tensionOutOptional, bool* selectedOutOptional)
EEL2: bool GetEnvelopePoint(TrackEnvelope envelope, int ptidx, optional &time, optional &value, optional int &shape, optional &tension, optional bool &selected)
Lua: boolean retval, optional number time, optional number value, optional integer shape, optional number tension, optional boolean selected = 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 GetEnvelopePointEx


Returnvalues:
boolean retval
optional number time
optional number value
optional integer shape
optional number tension
optional boolean selected

Parameters:
TrackEnvelope envelope
integer ptidx


^ Reaper version 5.979GetEnvelopePointByTime

C: int GetEnvelopePointByTime(TrackEnvelope* envelope, double time)
EEL2: int GetEnvelopePointByTime(TrackEnvelope envelope, time)
Lua: integer envelope_index = 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 GetEnvelopePointByTimeEx


Returnvalues:
integer envelope_index

Parameters:
TrackEnvelope envelope
number time


^ Reaper version 5.979GetEnvelopePointByTimeEx

C: int GetEnvelopePointByTimeEx(TrackEnvelope* envelope, int autoitem_idx, double time)
EEL2: int GetEnvelopePointByTimeEx(TrackEnvelope envelope, int autoitem_idx, time)
Lua: integer envelope_index = reaper.GetEnvelopePointByTimeEx(TrackEnvelope envelope, integer autoitem_idx, number time)
Python: Int RPR_GetEnvelopePointByTimeEx(TrackEnvelope envelope, Int autoitem_idx, Float time)

Returns the envelope point at or immediately prior to the given time position. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, even if the automation item is trimmed so that not all points are visible. Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations.

See GetEnvelopePointEx, SetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx.


Returnvalues:
integer envelope_index

Parameters:
TrackEnvelope envelope
integer autoitem_idx
number time


^ Reaper version 5.979GetEnvelopePointEx

C: bool GetEnvelopePointEx(TrackEnvelope* envelope, int autoitem_idx, int ptidx, double* timeOutOptional, double* valueOutOptional, int* shapeOutOptional, double* tensionOutOptional, bool* selectedOutOptional)
EEL2: bool GetEnvelopePointEx(TrackEnvelope envelope, int autoitem_idx, int ptidx, optional &time, optional &value, optional int &shape, optional &tension, optional bool &selected)
Lua: boolean retval, optional number time, optional number value, optional integer shape, optional number tension, optional boolean selected = reaper.GetEnvelopePointEx(TrackEnvelope envelope, integer autoitem_idx, integer ptidx)
Python: (Boolean retval, TrackEnvelope envelope, Int autoitem_idx, Int ptidx, Float timeOutOptional, Float valueOutOptional, Int shapeOutOptional, Float tensionOutOptional, Boolean selectedOutOptional) = RPR_GetEnvelopePointEx(envelope, autoitem_idx, ptidx, timeOutOptional, valueOutOptional, shapeOutOptional, tensionOutOptional, selectedOutOptional)

Get the attributes of an envelope point. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, even if the automation item is trimmed so that not all points are visible. Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations.

See CountEnvelopePointsEx, SetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx.


Returnvalues:
boolean retval
optional number time
optional number value
optional integer shape
optional number tension
optional boolean selected

Parameters:
TrackEnvelope envelope
integer autoitem_idx
integer ptidx


^ Reaper version 5.62GetEnvelopeScalingMode

C: int GetEnvelopeScalingMode(TrackEnvelope* env)
EEL2: int GetEnvelopeScalingMode(TrackEnvelope env)
Lua: integer scaling_mode = 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.


Returnvalues:
integer scaling_mode

Parameters:
TrackEnvelope env


^ Reaper version 5.982GetEnvelopeStateChunk

C: bool GetEnvelopeStateChunk(TrackEnvelope* env, char* strNeedBig, int strNeedBig_sz, bool isundoOptional)
EEL2: bool GetEnvelopeStateChunk(TrackEnvelope env, #str, bool isundo)
Lua: boolean retval, string str = reaper.GetEnvelopeStateChunk(TrackEnvelope env, string str, boolean isundo)
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.

Returnvalues:
boolean retval
true, if it's successful; false, if unsuccessful
string str
the state-chunk

Parameters:
TrackEnvelope env
the Track-Envelope-object, whose trackstate you want to have
string str
just pass "" to it
boolean isundo
Undo flag is a performance/caching hint.


^ Reaper version 5.62GetFXEnvelope

C: TrackEnvelope* GetFXEnvelope(MediaTrack* track, int fxindex, int parameterindex, bool create)
EEL2: TrackEnvelope GetFXEnvelope(MediaTrack track, int fxindex, int parameterindex, bool create)
Lua: TrackEnvelope env = 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.

Returnvalues:
TrackEnvelope env

Parameters:
MediaTrack track
integer fxindex
integer parameterindex
boolean create


^ Reaper version 5.62GetGlobalAutomationOverride

C: int GetGlobalAutomationOverride()
EEL2: int GetGlobalAutomationOverride()
Lua: integer automation_override = reaper.GetGlobalAutomationOverride()
Python: Int RPR_GetGlobalAutomationOverride()

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

Returnvalues:
integer automation_override
global automation override-mode
  -1, no override
  0, trim/read
  1, read
  2, touch
  3, write
  4, latch
  5, bypass


^ Reaper version 6.14GetSelectedEnvelope

C: TrackEnvelope* GetSelectedEnvelope(ReaProject* proj)
EEL2: TrackEnvelope GetSelectedEnvelope(ReaProject proj)
Lua: TrackEnvelope env = reaper.GetSelectedEnvelope(ReaProject proj)
Python: TrackEnvelope RPR_GetSelectedEnvelope(ReaProject proj)

get the currently selected envelope, returns NULL/nil if no envelope is selected

Returnvalues:
TrackEnvelope env
the TrackEnvelope-object of the selected envelope-lane requested; 0, if no envelope is selected

Parameters:
ReaProject proj
the project-number. 0 for the current project.


^ Reaper version 6.14GetSelectedTrackEnvelope

C: TrackEnvelope* GetSelectedTrackEnvelope(ReaProject* proj)
EEL2: TrackEnvelope GetSelectedTrackEnvelope(ReaProject proj)
Lua: TrackEnvelope sel_env = reaper.GetSelectedTrackEnvelope(ReaProject proj)
Python: TrackEnvelope RPR_GetSelectedTrackEnvelope(ReaProject proj)

get the currently selected track envelope, returns NULL/nil if no envelope is selected

Returnvalues:
TrackEnvelope sel_env
the selected TrackEnvelope as an object; nil if no TrackEnvelope is selected

Parameters:
ReaProject proj
the project-number. 0 for the current project.


^ Reaper version 6.24GetSetEnvelopeInfo_String

C: bool GetSetEnvelopeInfo_String(TrackEnvelope* env, const char* parmname, char* stringNeedBig, bool setNewValue)
EEL2: bool GetSetEnvelopeInfo_String(TrackEnvelope env, "parmname", #stringNeedBig, bool setNewValue)
Lua: boolean retval, string stringNeedBig = reaper.GetSetEnvelopeInfo_String(TrackEnvelope env, string parmname_attribute, string valueStringNeedBig, boolean setNewValue)
Python: (Boolean retval, TrackEnvelope env, String parmname, String stringNeedBig, Boolean setNewValue) = RPR_GetSetEnvelopeInfo_String(env, parmname, stringNeedBig, setNewValue)

Gets/sets an attribute string:
P_EXT:xyz : char * : extension-specific persistent data
GUID : GUID * : 16-byte GUID, can query only, not set. If using a _String() function, GUID is a string {xyz-...}.

This is basically a key-value-store for envelopes.

Returnvalues:
boolean retval
true, getting/setting the value was successful; falsem getting/setting the value was unsuccessful
string valuestrNeedBig
the current value set

Parameters:
TrackEnvelope env
the envelope, whose ext-attributes you want to get/set
string parmname_attribute
the name of the parameter and attribute. For instance, "P_EXT:FooBar" will put the value into the envelope-ext-store named "FooBar"; you can have multiple ones with different names
string valueStringNeedBig
the new value to set; set it to "", when setNewValue=false
boolean setNewValue
true, set a new value; false, just return the current value


^ Reaper version 5.62GetSetEnvelopeState

C: bool GetSetEnvelopeState(TrackEnvelope* env, char* str, int str_sz)
EEL2: 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


Returnvalues:
boolean retval
true, getting/setting was successful; false, getting/setting was unsuccessful
string str
the value currently set

Parameters:
TrackEnvelope env
the envelope, of which you want to get/set the value
string str
the new value to set


^ Reaper version 5.62GetSetEnvelopeState2

C: bool GetSetEnvelopeState2(TrackEnvelope* env, char* str, int str_sz, bool isundo)
EEL2: 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


Returnvalues:
boolean retval
true, getting/setting was successful; false, getting/setting was unsuccessful
string str
the value currently set

Parameters:
TrackEnvelope env
the envelope to get/set the state of
string str
the new value to set
boolean isundo
true, undo; false, don't undo


^ Reaper version 5.62GetTakeEnvelope

C: TrackEnvelope* GetTakeEnvelope(MediaItem_Take* take, int envidx)
EEL2: TrackEnvelope GetTakeEnvelope(MediaItem_Take take, int envidx)
Lua: TrackEnvelope env = reaper.GetTakeEnvelope(MediaItem_Take take, integer envidx)
Python: TrackEnvelope RPR_GetTakeEnvelope(MediaItem_Take take, Int envidx)


Returnvalues:
TrackEnvelope env

Parameters:
MediaItem_Take take
integer envidx


^ Reaper version 5.62GetTakeEnvelopeByName

C: TrackEnvelope* GetTakeEnvelopeByName(MediaItem_Take* take, const char* envname)
EEL2: TrackEnvelope GetTakeEnvelopeByName(MediaItem_Take take, "envname")
Lua: TrackEnvelope env = reaper.GetTakeEnvelopeByName(MediaItem_Take take, string envname)
Python: TrackEnvelope RPR_GetTakeEnvelopeByName(MediaItem_Take take, String envname)


Returnvalues:
TrackEnvelope env

Parameters:
MediaItem_Take take
string envname


^ Reaper version 5.62GetTrackAutomationMode

C: int GetTrackAutomationMode(MediaTrack* tr)
EEL2: int GetTrackAutomationMode(MediaTrack tr)
Lua: integer automation_mode = reaper.GetTrackAutomationMode(MediaTrack tr)
Python: Int RPR_GetTrackAutomationMode(MediaTrack tr)

return the track mode, regardless of global override

Returnvalues:
integer automation_mode

Parameters:
MediaTrack tr


^ Reaper version 5.62GetTrackEnvelope

C: TrackEnvelope* GetTrackEnvelope(MediaTrack* track, int envidx)
EEL2: TrackEnvelope GetTrackEnvelope(MediaTrack track, int envidx)
Lua: TrackEnvelope env = reaper.GetTrackEnvelope(MediaTrack track, integer envidx)
Python: TrackEnvelope RPR_GetTrackEnvelope(MediaTrack track, Int envidx)


Returnvalues:
TrackEnvelope env

Parameters:
MediaTrack track
integer envidx


^ Reaper version 6.24GetTrackEnvelopeByChunkName

C: TrackEnvelope* GetTrackEnvelopeByChunkName(MediaTrack* tr, const char* cfgchunkname_or_guid)
EEL2: TrackEnvelope GetTrackEnvelopeByChunkName(MediaTrack tr, "cfgchunkname_or_guid")
Lua: TrackEnvelope env = reaper.GetTrackEnvelopeByChunkName(MediaTrack tr, string cfgchunkname_or_guid)
Python: TrackEnvelope RPR_GetTrackEnvelopeByChunkName(MediaTrack tr, String cfgchunkname_or_guid)

Gets a built-in track envelope by configuration chunk name, e.g. "<VOLENV" or GUID string, like "{B577250D-146F-B544-9B34-F24FBE488F1F}".

Returnvalues:
TrackEnvelope env

Parameters:
MediaTrack tr
string cfgchunkname_or_guid


^ Reaper version 5.62GetTrackEnvelopeByName

C: TrackEnvelope* GetTrackEnvelopeByName(MediaTrack* track, const char* envname)
EEL2: TrackEnvelope GetTrackEnvelopeByName(MediaTrack track, "envname")
Lua: TrackEnvelope = reaper.GetTrackEnvelopeByName(MediaTrack track, string envname)
Python: TrackEnvelope RPR_GetTrackEnvelopeByName(MediaTrack track, String envname)


Returnvalues:
TrackEnvelope env

Parameters:
MediaTrack track
string envname


^ Reaper version 5.979InsertEnvelopePoint

C: bool InsertEnvelopePoint(TrackEnvelope* envelope, double time, double value, int shape, double tension, bool selected, bool* noSortInOptional)
EEL2: bool InsertEnvelopePoint(TrackEnvelope envelope, time, value, int shape, tension, bool selected, optional bool noSortIn)
Lua: boolean retval = reaper.InsertEnvelopePoint(TrackEnvelope envelope, number time, number value, integer shape, number tension, boolean selected, optional boolean noSortIn)
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 InsertEnvelopePointEx.


Returnvalues:
boolean retval

Parameters:
TrackEnvelope envelope
number time
number value
integer shape
number tension
boolean selected
optional boolean noSortIn


^ Reaper version 5.979InsertEnvelopePointEx

C: bool InsertEnvelopePointEx(TrackEnvelope* envelope, int autoitem_idx, double time, double value, int shape, double tension, bool selected, bool* noSortInOptional)
EEL2: bool InsertEnvelopePointEx(TrackEnvelope envelope, int autoitem_idx, time, value, int shape, tension, bool selected, optional bool noSortIn)
Lua: boolean retval = reaper.InsertEnvelopePointEx(TrackEnvelope envelope, integer autoitem_idx, number time, number value, integer shape, number tension, boolean selected, optional boolean noSortIn)
Python: (Boolean retval, TrackEnvelope envelope, Int autoitem_idx, Float time, Float value, Int shape, Float tension, Boolean selected, Boolean noSortInOptional) = RPR_InsertEnvelopePointEx(envelope, autoitem_idx, 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. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, even if the automation item is trimmed so that not all points are visible. Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations.

See CountEnvelopePointsEx, GetEnvelopePointEx, SetEnvelopePointEx, DeleteEnvelopePointEx.


Returnvalues:
boolean retval

Parameters:
TrackEnvelope envelope
integer autoitem_idx
number time
number value
integer shape
number tension
boolean selected
optional boolean noSortIn


^ Reaper version 5.62ScaleFromEnvelopeMode

C: double ScaleFromEnvelopeMode(int scaling_mode, double val)
EEL2: double ScaleFromEnvelopeMode(int scaling_mode, val)
Lua: number retval = reaper.ScaleFromEnvelopeMode(integer scaling_mode, number val)
Python: Float RPR_ScaleFromEnvelopeMode(Int scaling_mode, Float val)

See GetEnvelopeScalingMode.


Returnvalues:
number retval

Parameters:
integer scaling_mode
number val


^ Reaper version 5.62ScaleToEnvelopeMode

C: double ScaleToEnvelopeMode(int scaling_mode, double val)
EEL2: double ScaleToEnvelopeMode(int scaling_mode, val)
Lua: number retval = reaper.ScaleToEnvelopeMode(integer scaling_mode, number val)
Python: Float RPR_ScaleToEnvelopeMode(Int scaling_mode, Float val)

See GetEnvelopeScalingMode.


Returnvalues:
number retval

Parameters:
integer scaling_mode
number val


^ Reaper version 5.62SetAutomationMode

C: void SetAutomationMode(int mode, bool onlySel)
EEL2: 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.

Includes the master-track.

Parameters:
integer mode
the automation-mode
0, Trim/read
1, Read
2, Touch
3, Write
4, Latch
5 and higher no mode selected
boolean onlySel
true, only selected tracks; false, all tracks including master-track


^ Reaper version 5.979SetEnvelopePoint

C: bool SetEnvelopePoint(TrackEnvelope* envelope, int ptidx, double* timeInOptional, double* valueInOptional, int* shapeInOptional, double* tensionInOptional, bool* selectedInOptional, bool* noSortInOptional)
EEL2: bool SetEnvelopePoint(TrackEnvelope envelope, int ptidx, optional timeIn, optional valueIn, optional int shapeIn, optional tensionIn, optional bool selectedIn, optional bool noSortIn)
Lua: boolean retval = reaper.SetEnvelopePoint(TrackEnvelope envelope, integer ptidx, optional number timeIn, optional number valueIn, optional integer shapeIn, optional number tensionIn, optional boolean selectedIn, optional boolean noSortIn)
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 SetEnvelopePointEx.


Returnvalues:
boolean retval

Parameters:
TrackEnvelope envelope
integer ptidx
optional number timeIn
optional number valueIn
optional integer shapeIn
optional number tensionIn
optional boolean selectedIn
optional boolean noSortIn


^ Reaper version 5.979SetEnvelopePointEx

C: bool SetEnvelopePointEx(TrackEnvelope* envelope, int autoitem_idx, int ptidx, double* timeInOptional, double* valueInOptional, int* shapeInOptional, double* tensionInOptional, bool* selectedInOptional, bool* noSortInOptional)
EEL2: bool SetEnvelopePointEx(TrackEnvelope envelope, int autoitem_idx, int ptidx, optional timeIn, optional valueIn, optional int shapeIn, optional tensionIn, optional bool selectedIn, optional bool noSortIn)
Lua: boolean retval = reaper.SetEnvelopePointEx(TrackEnvelope envelope, integer autoitem_idx, integer ptidx, optional number timeIn, optional number valueIn, optional integer shapeIn, optional number tensionIn, optional boolean selectedIn, optional boolean noSortIn)
Python: (Boolean retval, TrackEnvelope envelope, Int autoitem_idx, Int ptidx, Float timeInOptional, Float valueInOptional, Int shapeInOptional, Float tensionInOptional, Boolean selectedInOptional, Boolean noSortInOptional) = RPR_SetEnvelopePointEx(envelope, autoitem_idx, 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. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, even if the automation item is trimmed so that not all points are visible. Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations. See CountEnvelopePointsEx, GetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx.


Returnvalues:
boolean retval

Parameters:
TrackEnvelope envelope
integer autoitem_idx
integer ptidx
optional number timeIn
optional number valueIn
optional integer shapeIn
optional number tensionIn
optional boolean selectedIn
optional boolean noSortIn


^ Reaper version 5.62SetEnvelopeStateChunk

C: bool SetEnvelopeStateChunk(TrackEnvelope* env, const char* str, bool isundoOptional)
EEL2: bool SetEnvelopeStateChunk(TrackEnvelope env, "str", bool isundo)
Lua: boolean retval = reaper.SetEnvelopeStateChunk(TrackEnvelope env, string str, boolean isundo)
Python: Boolean RPR_SetEnvelopeStateChunk(TrackEnvelope env, String str, Boolean isundoOptional)

Sets the RPPXML state of an envelope, returns true if successful.

Returnvalues:
boolean retval
true, setting worked; false, setting didn't work

Parameters:
TrackEnvelope env
the TrackEnvelope, whose statechunk you want to set
string str
the new statechunk, that you want to set
boolean isundo
undo flag is a performance/caching hint.


^ Reaper version 5.62SetGlobalAutomationOverride

C: void SetGlobalAutomationOverride(int mode)
EEL2: SetGlobalAutomationOverride(int mode)
Lua: reaper.SetGlobalAutomationOverride(integer mode)
Python: RPR_SetGlobalAutomationOverride(Int mode)

mode: see GetGlobalAutomationOverride


Parameters:
integer mode


^ Reaper version 5.62SetTrackAutomationMode

C: void SetTrackAutomationMode(MediaTrack* tr, int mode)
EEL2: SetTrackAutomationMode(MediaTrack tr, int mode)
Lua: reaper.SetTrackAutomationMode(MediaTrack tr, integer mode)
Python: RPR_SetTrackAutomationMode(MediaTrack tr, Int mode)

Set automation-mode for a specific MediaTrack.

Parameters:
MediaTrack tr
the MediaTrack, whose automation-mode you want to set
integer mode
the automation-mode
0, Trim/read
1, Read
2, Touch
3, Write
4, Latch
5 and higher no mode selected


^ Reaper version 5.62DeleteExtState

C: void DeleteExtState(const char* section, const char* key, bool persist)
EEL2: 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. If persistent, the value will be deleted from the file reaper-extstate.ini in the ressources-folder. See SetExtState, GetExtState, HasExtState.


Parameters:
string section
the section, in which the value is stored
string key
the key, with which the value is stored
boolean persist
true, the value shall be deleted permanently; false, delete it only temporarily.


^ Reaper version 5.62GetExtState

C: const char* GetExtState(const char* section, const char* key)
EEL2: bool GetExtState(#retval, "section", "key")
Lua: string extstate_value= 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.


Returnvalues:
string extstate_value
the value of the extstate

Parameters:
string section
the section, in which the key and value is stored
string key
the key, that contains the value


^ Reaper version 5.62HasExtState

C: bool HasExtState(const char* section, const char* key)
EEL2: bool HasExtState("section", "key")
Lua: boolean retval = 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.


Returnvalues:
boolean retval

Parameters:
string section
string key


^ Reaper version 5.62SetExtState

C: void SetExtState(const char* section, const char* key, const char* value, bool persist)
EEL2: 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.

Persistant states are stored into the reaper-extstate.ini in the resources-folder.

See GetExtState, DeleteExtState, HasExtState.


Parameters:
string section
the section, in which the key-value is stored
string key
the key, which stores the value
string value
the new value to be set
boolean persist
true, means the value should be stored and reloaded the next time REAPER is opened


^ Reaper version 5.62 SWS version 2.9.7BR_GetTakeFXCount(SWS)

C: int BR_GetTakeFXCount(MediaItem_Take* take)
EEL2: int extension_api("BR_GetTakeFXCount", MediaItem_Take take)
Lua: integer retval = reaper.BR_GetTakeFXCount(MediaItem_Take take)
Python: Int BR_GetTakeFXCount(MediaItem_Take take)

[BR] Returns FX count for supplied take

Returnvalues:
integer retval

Parameters:
MediaItem_Take take


^ Reaper version 5.62 SWS version 2.12.1.1BR_TrackFX_GetFXModuleName(SWS)

C: bool BR_TrackFX_GetFXModuleName(MediaTrack* track, int fx, char* nameOut, int nameOut_sz)
EEL2: bool extension_api("BR_TrackFX_GetFXModuleName", MediaTrack track, int fx, #name)
Lua: boolean retval, string name = reaper.BR_TrackFX_GetFXModuleName(MediaTrack track, integer fx)
Python: (Boolean retval, MediaTrack track, Int fx, String nameOut, Int nameOut_sz) = BR_TrackFX_GetFXModuleName(track, fx, nameOut, nameOut_sz)

[BR] Get the exact name (like effect.dll, effect.vst3, etc...) of an FX.

Returnvalues:
boolean retval
string name

Parameters:
MediaTrack track
integer fx


^ Reaper version 5.965 SWS version 2.10.0.1CF_EnumSelectedFX(SWS)

C: int CF_EnumSelectedFX(FxChain* hwnd, int index)
EEL2: int extension_api("CF_EnumSelectedFX", FxChain hwnd, int index)
Lua: integer retval = reaper.CF_EnumSelectedFX(FxChain hwnd, integer index)
Python: Int CF_EnumSelectedFX(FxChain hwnd, Int index)

Return the index of the next selected effect in the given FX chain. Start index should be -1. Returns -1 if there are no more selected effects.

Returnvalues:
integer retval

Parameters:
FxChain hwnd
integer index


^ Reaper version 5.965 SWS version 2.10.0.1CF_GetFocusedFXChain(SWS)

C: FxChain* CF_GetFocusedFXChain()
EEL2: FxChain extension_api("CF_GetFocusedFXChain")
Lua: FxChain = reaper.CF_GetFocusedFXChain()
Python: FxChain CF_GetFocusedFXChain()

Return a handle to the currently focused FX chain window.

Returnvalues:
FxChain


^ Reaper version 5.965 SWS version 2.10.0.1CF_GetTakeFXChain(SWS)

C: FxChain* CF_GetTakeFXChain(MediaItem_Take* take)
EEL2: FxChain extension_api("CF_GetTakeFXChain", MediaItem_Take take)
Lua: FxChain hwnd = reaper.CF_GetTakeFXChain(MediaItem_Take take)
Python: FxChain CF_GetTakeFXChain(MediaItem_Take take)

Return a handle to the given take FX chain window. HACK: This temporarily renames the take in order to disambiguate the take FX chain window from similarily named takes.

Returnvalues:
FxChain hwnd
the hwnd-window-handler of the FX-chain of the item

Parameters:
MediaItem_Take take
the take, whose FXChain-window-handler you want to get


^ Reaper version 5.965 SWS version 2.10.0.1CF_GetTrackFXChain(SWS)

C: FxChain* CF_GetTrackFXChain(MediaTrack* track)
EEL2: FxChain extension_api("CF_GetTrackFXChain", MediaTrack track)
Lua: FxChain hwnd = reaper.CF_GetTrackFXChain(MediaTrack track)
Python: FxChain CF_GetTrackFXChain(MediaTrack track)

Return a handle to the given track FX chain window.

Returnvalues:
FxChain hwnd
the hwnd-window-handler of the FX-chain of the track

Parameters:
MediaTrack track
the track, whose FXChain-window-handler you want to get


^ Reaper version 5.965 SWS version 2.10.1.1CF_SelectTrackFX(SWS)

C: bool CF_SelectTrackFX(MediaTrack* track, int index)
EEL2: bool extension_api("CF_SelectTrackFX", MediaTrack track, int index)
Lua: boolean retval = reaper.CF_SelectTrackFX(MediaTrack track, integer index)
Python: Boolean CF_SelectTrackFX(MediaTrack track, Int index)

Set which track effect is active in the track's FX chain. The FX chain window does not have to be open.

Returnvalues:
boolean retval

Parameters:
MediaTrack track
the track, of which you want to set an fx active
integer index
the index of the fx that shall be active


^ Reaper version 5.979GetFocusedFX

C: int GetFocusedFX(int* tracknumberOut, int* itemnumberOut, int* fxnumberOut)
EEL2: int GetFocusedFX(int &tracknumber, int &itemnumber, int &fxnumber)
Lua: integer retval, integer tracknumber, integer itemnumber, integer fxnumber = reaper.GetFocusedFX()
Python: (Int retval, Int tracknumberOut, Int itemnumberOut, Int fxnumberOut) = RPR_GetFocusedFX(tracknumberOut, itemnumberOut, fxnumberOut)

Get focused FX.

!!Deprecated, use GetFocusedFX2 instead

See GetLastTouchedFX.


Returnvalues:
integer retval
0, if no FX window has focus
1, if a track FX window has focus or was the last focused and still open
2, if an item FX window has focus or was the last focused and still open
integer tracknumber
tracknumber; 0, master track; 1, track 1; etc.
integer itemnumber
-1, if it's a track-fx; 0 and higher, the mediaitem-number
integer fxnumber
If item FX, fxnumber will have the high word be the take index, the low word the FX index


^ Reaper version 6.16GetFocusedFX2

C: int GetFocusedFX2(int* tracknumberOut, int* itemnumberOut, int* fxnumberOut)
EEL2: int GetFocusedFX2(int &tracknumber, int &itemnumber, int &fxnumber)
Lua: integer retval, number tracknumber, number itemnumber, number fxnumber = reaper.GetFocusedFX2()
Python: (Int retval, Int tracknumberOut, Int itemnumberOut, Int fxnumberOut) = RPR_GetFocusedFX2(tracknumberOut, itemnumberOut, fxnumberOut)

Return value has 1 set if track FX, 2 if take/item FX, 4 set if FX is no longer focused but still open.

tracknumber==0 means the master track, 1 means track 1, etc. itemnumber is zero-based (or -1 if not an item).

For interpretation of fxnumber, see GetLastTouchedFX.


Returnvalues:
integer retval
0, if no FX window has focus
1, if a track FX window has focus or was the last focused and still open
2, if an item FX window has focus or was the last focused and still open
4, if FX is no longer focused but still open
integer tracknumber
tracknumber; 0, master track; 1, track 1; etc.
integer itemnumber
-1, if it's a track-fx; 0 and higher, the mediaitem-number
integer fxnumber
If item FX, fxnumber will have the high word be the take index, the low word the FX index


^ Reaper version 5.979GetLastTouchedFX

C: bool GetLastTouchedFX(int* tracknumberOut, int* fxnumberOut, int* paramnumberOut)
EEL2: bool GetLastTouchedFX(int &tracknumber, int &fxnumber, int &paramnumber)
Lua: boolean retval, integer tracknumber, integer fxnumber, integer paramnumber = reaper.GetLastTouchedFX()
Python: (Boolean retval, Int tracknumberOut, Int fxnumberOut, Int paramnumberOut) = RPR_GetLastTouchedFX(tracknumberOut, fxnumberOut, paramnumberOut)

Returns the last touched track, it's last touched parameter and tracknumber.

The low word of tracknumber is the 1-based track index -- 0 means the master track, 1 means track 1, etc.

See GetFocusedFX2.


Returnvalues:
boolean retval
true, if last touched FX parameter is valid; false, if otherwise
integer tracknumber
the tracknumber; 0 means the master track, 1 means track 1, etc.
If the high word of tracknumber is nonzero, it refers to the 1-based item index (1 is the first item on the track, etc).
integer fxnumber
the id of the FX in the track tracknumber, zero-based
For track FX, the low 24 bits of fxnumber refer to the FX index in the chain, and if the next 8 bits are 01, then the FX is record FX.
For item FX, the low word defines the FX index in the chain, and the high word defines the take number.
integer paramnumber
the id of the last parameter touched, zero-based


^ Reaper version 5.62GetTCPFXParm

C: bool GetTCPFXParm(ReaProject* project, MediaTrack* track, int index, int* fxindexOut, int* parmidxOut)
EEL2: bool GetTCPFXParm(ReaProject project, MediaTrack track, int index, int &fxindex, int &parmidx)
Lua: boolean retval, integer fxindex, integer parmidx = 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).


Returnvalues:
boolean retval
integer fxindex
integer parmidx

Parameters:
ReaProject project
the project-number. 0 for the current project.
MediaTrack track
integer index


^ Reaper version 5.62PluginWantsAlwaysRunFx

C: void PluginWantsAlwaysRunFx(int amt)
EEL2: PluginWantsAlwaysRunFx(int amt)
Lua: reaper.PluginWantsAlwaysRunFx(integer amt)
Python: RPR_PluginWantsAlwaysRunFx(Int amt)


Parameters:
integer amt


^ Reaper version 5.62 SWS version 2.9.7SNM_AddTCPFXParm(SWS)

C: bool SNM_AddTCPFXParm(MediaTrack* tr, int fxId, int prmId)
EEL2: bool extension_api("SNM_AddTCPFXParm", MediaTrack tr, int fxId, int prmId)
Lua: boolean retval = reaper.SNM_AddTCPFXParm(MediaTrack tr, integer fxId, integer prmId)
Python: Boolean SNM_AddTCPFXParm(MediaTrack tr, Int fxId, Int prmId)

[S&M] Add an FX parameter knob in the TCP. Returns false if nothing updated (invalid parameters, knob already present, etc..)

Returnvalues:
boolean retval

Parameters:
MediaTrack tr
integer fxId
integer prmId


^ Reaper version 5.965 SWS version 2.10.0.1SNM_MoveOrRemoveTrackFX(SWS)

C: bool SNM_MoveOrRemoveTrackFX(MediaTrack* tr, int fxId, int what)
EEL2: bool extension_api("SNM_MoveOrRemoveTrackFX", MediaTrack tr, int fxId, int what)
Lua: boolean retval = reaper.SNM_MoveOrRemoveTrackFX(MediaTrack tr, integer fxId, integer what)
Python: Boolean SNM_MoveOrRemoveTrackFX(MediaTrack tr, Int fxId, Int what)

[S&M] Deprecated, see TakeFX_/TrackFX_ CopyToTrack/Take, TrackFX/TakeFX _Delete (v5.95pre2+). Move or removes a track FX. Returns true if tr has been updated.
fxId: fx index in chain or -1 for the selected fx. what: 0 to remove, -1 to move fx up in chain, 1 to move fx down in chain.

Returnvalues:
boolean retval

Parameters:
MediaTrack tr
integer fxId
integer what


^ Reaper version 6.12TakeFX_AddByName

C: int TakeFX_AddByName(MediaItem_Take* take, const char* fxname, int instantiate)
EEL2: int TakeFX_AddByName(MediaItem_Take take, "fxname", int instantiate)
Lua: integer retval = reaper.TakeFX_AddByName(MediaItem_Take take, string fxname, integer instantiate)
Python: Int RPR_TakeFX_AddByName(MediaItem_Take take, String fxname, Int instantiate)

Adds or queries the position of a named FX in a take. See TrackFX_AddByName() for information on fxname and instantiate.


Returnvalues:
integer retval

Parameters:
MediaItem_Take take
string fxname
integer instantiate


^ Reaper version 5.95TakeFX_CopyToTake

C: void TakeFX_CopyToTake(MediaItem_Take* src_take, int src_fx, MediaItem_Take* dest_take, int dest_fx, bool is_move)
EEL2: TakeFX_CopyToTake(MediaItem_Take src_take, int src_fx, MediaItem_Take dest_take, int dest_fx, bool is_move)
Lua: reaper.TakeFX_CopyToTake(MediaItem_Take src_take, integer src_fx, MediaItem_Take dest_take, integer dest_fx, boolean is_move)
Python: RPR_TakeFX_CopyToTake(MediaItem_Take src_take, Int src_fx, MediaItem_Take dest_take, Int dest_fx, Boolean is_move)

Copies (or moves) FX from src_take to dest_take. Can be used with src_take=dest_take to reorder.

Parameters:
MediaItem_Take src_take
the source-take, from which you want to copy an fx
integer src_fx
the index of the source-fx
MediaItem_Take dest_take
the destination-take, to which you want to copy an fx
integer dest_fx
the index of the target-fx
boolean is_move
true, move fx from source to destination-take; false, just copy fx from source to destination-take


^ Reaper version 5.95TakeFX_CopyToTake

C: void TakeFX_CopyToTake(MediaItem_Take* src_take, int src_fx, MediaItem_Take* dest_take, int dest_fx, bool is_move)
EEL2: TakeFX_CopyToTake(MediaItem_Take src_take, int src_fx, MediaItem_Take dest_take, int dest_fx, bool is_move)
Lua: reaper.TakeFX_CopyToTake(MediaItem_Take src_take, integer src_fx, MediaItem_Take dest_take, integer dest_fx, boolean is_move)
Python: RPR_TakeFX_CopyToTake(MediaItem_Take src_take, Int src_fx, MediaItem_Take dest_take, Int dest_fx, Boolean is_move)

Copies (or moves) FX from src_take to dest_take. Can be used with src_take=dest_take to reorder.

Parameters:
MediaItem_Take src_take
the source-take, from which you want to copy an fx
integer src_fx
the index of the source-fx
MediaItem_Take dest_take
the destination-take, to which you want to copy an fx
integer dest_fx
the index of the target-fx
boolean is_move
true, move fx from source to destination-take; false, just copy fx from source to destination-take


^ Reaper version 5.95TakeFX_CopyToTrack

C: void TakeFX_CopyToTrack(MediaItem_Take* src_take, int src_fx, MediaTrack* dest_track, int dest_fx, bool is_move)
EEL2: TakeFX_CopyToTrack(MediaItem_Take src_take, int src_fx, MediaTrack dest_track, int dest_fx, bool is_move)
Lua: reaper.TakeFX_CopyToTrack(MediaItem_Take src_take, integer src_fx, MediaTrack dest_track, integer dest_fx, boolean is_move)
Python: RPR_TakeFX_CopyToTrack(MediaItem_Take src_take, Int src_fx, MediaTrack dest_track, Int dest_fx, Boolean is_move)

Copies (or moves) FX from src_take to dest_track.

Note:
To use global monitoring inputFX, use the master-track, any other track will access the track's rec-input-fx.
Add 0x1000000 to the fx-indices to address monitoringFX/rec-inputFX.

Parameters:
MediaItem_Take src_take
integer src_fx
MediaTrack dest_track
integer dest_fx
boolean is_move


^ Reaper version 5.95TakeFX_CopyToTrack

C: void TakeFX_CopyToTrack(MediaItem_Take* src_take, int src_fx, MediaTrack* dest_track, int dest_fx, bool is_move)
EEL2: TakeFX_CopyToTrack(MediaItem_Take src_take, int src_fx, MediaTrack dest_track, int dest_fx, bool is_move)
Lua: reaper.TakeFX_CopyToTrack(MediaItem_Take src_take, integer src_fx, MediaTrack dest_track, integer dest_fx, boolean is_move)
Python: RPR_TakeFX_CopyToTrack(MediaItem_Take src_take, Int src_fx, MediaTrack dest_track, Int dest_fx, Boolean is_move)

Copies (or moves) FX from src_take to dest_track.

Note:
To use global monitoring inputFX, use the master-track, any other track will access the track's rec-input-fx.
Add 0x1000000 to the fx-indices to address monitoringFX/rec-inputFX.

Parameters:
MediaItem_Take src_take
integer src_fx
MediaTrack dest_track
integer dest_fx
boolean is_move


^ Reaper version 5.95TakeFX_Delete

C: bool TakeFX_Delete(MediaItem_Take* take, int fx)
EEL2: bool TakeFX_Delete(MediaItem_Take take, int fx)
Lua: boolean retval = reaper.TakeFX_Delete(MediaItem_Take take, integer fx)
Python: Boolean RPR_TakeFX_Delete(MediaItem_Take take, Int fx)

Remove a FX from take chain (returns true on success)

Returnvalues:
boolean retval

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.62TakeFX_EndParamEdit

C: bool TakeFX_EndParamEdit(MediaItem_Take* take, int fx, int param)
EEL2: bool TakeFX_EndParamEdit(MediaItem_Take take, int fx, int param)
Lua: boolean retval = reaper.TakeFX_EndParamEdit(MediaItem_Take take, integer fx, integer param)
Python: Boolean RPR_TakeFX_EndParamEdit(MediaItem_Take take, Int fx, Int param)


Returnvalues:
boolean retval

Parameters:
MediaItem_Take take
integer fx
integer param


^ Reaper version 6.37TakeFX_FormatParamValue

C: bool TakeFX_FormatParamValue(MediaItem_Take* take, int fx, int param, double val, char* bufOut, int bufOut_sz)
EEL2: bool TakeFX_FormatParamValue(MediaItem_Take take, int fx, int param, val, #buf)
Lua: boolean retval, string buf = reaper.TakeFX_FormatParamValue(MediaItem_Take take, integer fx, integer param, number val)
Python: (Boolean retval, MediaItem_Take take, Int fx, Int param, Float val, String bufOut, Int bufOut_sz) = RPR_TakeFX_FormatParamValue(take, fx, param, val, bufOut, bufOut_sz)

Note: only works with FX that support Cockos VST extensions.

Returnvalues:
boolean retval
string buf

Parameters:
MediaItem_Take take
integer fx
integer param
number val


^ Reaper version 5.62TakeFX_FormatParamValueNormalized

C: bool TakeFX_FormatParamValueNormalized(MediaItem_Take* take, int fx, int param, double value, char* buf, int buf_sz)
EEL2: bool TakeFX_FormatParamValueNormalized(MediaItem_Take take, int fx, int param, value, #buf)
Lua: boolean retval, string buf = reaper.TakeFX_FormatParamValueNormalized(MediaItem_Take take, integer fx, integer param, number value, string buf)
Python: (Boolean retval, MediaItem_Take take, Int fx, Int param, Float value, String buf, Int buf_sz) = RPR_TakeFX_FormatParamValueNormalized(take, fx, param, value, buf, buf_sz)

Note: only works with FX that support Cockos VST extensions.

Returnvalues:
boolean retval
string buf

Parameters:
MediaItem_Take take
integer fx
integer param
number value
string buf


^ Reaper version 5.62TakeFX_GetChainVisible

C: int TakeFX_GetChainVisible(MediaItem_Take* take)
EEL2: int TakeFX_GetChainVisible(MediaItem_Take take)
Lua: integer retval = reaper.TakeFX_GetChainVisible(MediaItem_Take take)
Python: Int RPR_TakeFX_GetChainVisible(MediaItem_Take take)

returns index of effect visible in chain, or -1 for chain hidden, or -2 for chain visible but no effect selected

Returnvalues:
integer retval

Parameters:
MediaItem_Take take


^ Reaper version 5.62TakeFX_GetCount

C: int TakeFX_GetCount(MediaItem_Take* take)
EEL2: int TakeFX_GetCount(MediaItem_Take take)
Lua: integer retval = reaper.TakeFX_GetCount(MediaItem_Take take)
Python: Int RPR_TakeFX_GetCount(MediaItem_Take take)


Returnvalues:
integer retval

Parameters:
MediaItem_Take take


^ Reaper version 5.62TakeFX_GetEnabled

C: bool TakeFX_GetEnabled(MediaItem_Take* take, int fx)
EEL2: bool TakeFX_GetEnabled(MediaItem_Take take, int fx)
Lua: boolean retval = reaper.TakeFX_GetEnabled(MediaItem_Take take, integer fx)
Python: Boolean RPR_TakeFX_GetEnabled(MediaItem_Take take, Int fx)

See TakeFX_SetEnabled


Returnvalues:
boolean retval

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.62TakeFX_GetEnvelope

C: TrackEnvelope* TakeFX_GetEnvelope(MediaItem_Take* take, int fxindex, int parameterindex, bool create)
EEL2: TrackEnvelope TakeFX_GetEnvelope(MediaItem_Take take, int fxindex, int parameterindex, bool create)
Lua: TrackEnvelope env = reaper.TakeFX_GetEnvelope(MediaItem_Take take, integer fxindex, integer parameterindex, boolean create)
Python: TrackEnvelope RPR_TakeFX_GetEnvelope(MediaItem_Take take, 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.

Returnvalues:
TrackEnvelope env

Parameters:
MediaItem_Take take
integer fxindex
integer parameterindex
boolean create


^ Reaper version 5.62TakeFX_GetFXGUID

C: GUID* TakeFX_GetFXGUID(MediaItem_Take* take, int fx)
EEL2: bool TakeFX_GetFXGUID(#retguid, MediaItem_Take take, int fx)
Lua: string GUID = reaper.TakeFX_GetFXGUID(MediaItem_Take take, integer fx)
Python: GUID RPR_TakeFX_GetFXGUID(MediaItem_Take take, Int fx)


Returnvalues:
string GUID

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 6.37TakeFX_GetFXName

C: bool TakeFX_GetFXName(MediaItem_Take* take, int fx, char* bufOut, int bufOut_sz)
EEL2: bool TakeFX_GetFXName(MediaItem_Take take, int fx, #buf)
Lua: boolean retval, string buf = reaper.TakeFX_GetFXName(MediaItem_Take take, integer fx)
Python: (Boolean retval, MediaItem_Take take, Int fx, String bufOut, Int bufOut_sz) = RPR_TakeFX_GetFXName(take, fx, bufOut, bufOut_sz)


Returnvalues:
boolean retval
string buf

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.62TakeFX_GetFloatingWindow

C: HWND TakeFX_GetFloatingWindow(MediaItem_Take* take, int index)
EEL2: HWND TakeFX_GetFloatingWindow(MediaItem_Take take, int index)
Lua: HWND hwnd = reaper.TakeFX_GetFloatingWindow(MediaItem_Take take, integer index)
Python: HWND RPR_TakeFX_GetFloatingWindow(MediaItem_Take take, Int index)

returns HWND of floating window for effect index, if any

Returnvalues:
HWND hwd

Parameters:
MediaItem_Take take
integer index


^ Reaper version 5.62TakeFX_GetFormattedParamValue

C: bool TakeFX_GetFormattedParamValue(MediaItem_Take* take, int fx, int param, char* buf, int buf_sz)
EEL2: bool TakeFX_GetFormattedParamValue(MediaItem_Take take, int fx, int param, #buf)
Lua: boolean retval, string buf = reaper.TakeFX_GetFormattedParamValue(MediaItem_Take take, integer fx, integer param, string buf)
Python: (Boolean retval, MediaItem_Take take, Int fx, Int param, String buf, Int buf_sz) = RPR_TakeFX_GetFormattedParamValue(take, fx, param, buf, buf_sz)


Returnvalues:
boolean retval
string buf

Parameters:
MediaItem_Take take
integer fx
integer param
string buf


^ Reaper version 5.62TakeFX_GetIOSize

C: int TakeFX_GetIOSize(MediaItem_Take* take, int fx, int* inputPinsOutOptional, int* outputPinsOutOptional)
EEL2: int TakeFX_GetIOSize(MediaItem_Take take, int fx, optional int &inputPins, optional int &outputPins)
Lua: integer retval, optional integer inputPins, optional integer outputPins = reaper.TakeFX_GetIOSize(MediaItem_Take take, integer fx)
Python: (Int retval, MediaItem_Take take, Int fx, Int inputPinsOutOptional, Int outputPinsOutOptional) = RPR_TakeFX_GetIOSize(take, fx, inputPinsOutOptional, outputPinsOutOptional)

gets the number of input/output pins for FX if available, returns plug-in type or -1 on error

Returnvalues:
integer retval
optional integer inputPins
optional integer outputPins

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.62TakeFX_GetNamedConfigParm

C: bool TakeFX_GetNamedConfigParm(MediaItem_Take* take, int fx, const char* parmname, char* bufOut, int bufOut_sz)
EEL2: bool TakeFX_GetNamedConfigParm(MediaItem_Take take, int fx, "parmname", #buf)
Lua: boolean retval, string buf = reaper.TakeFX_GetNamedConfigParm(MediaItem_Take take, integer fx, string parmname)
Python: (Boolean retval, MediaItem_Take take, Int fx, String parmname, String bufOut, Int bufOut_sz) = RPR_TakeFX_GetNamedConfigParm(take, fx, parmname, bufOut, bufOut_sz)

gets plug-in specific named configuration value (returns true on success)

Returnvalues:
boolean retval
string buf

Parameters:
MediaItem_Take take
integer fx
string parmname


^ Reaper version 5.62TakeFX_GetNumParams

C: int TakeFX_GetNumParams(MediaItem_Take* take, int fx)
EEL2: int TakeFX_GetNumParams(MediaItem_Take take, int fx)
Lua: integer retval = reaper.TakeFX_GetNumParams(MediaItem_Take take, integer fx)
Python: Int RPR_TakeFX_GetNumParams(MediaItem_Take take, Int fx)


Returnvalues:
integer retval

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.95TakeFX_GetOffline

C: bool TakeFX_GetOffline(MediaItem_Take* take, int fx)
EEL2: bool TakeFX_GetOffline(MediaItem_Take take, int fx)
Lua: boolean retval = reaper.TakeFX_GetOffline(MediaItem_Take take, integer fx)
Python: Boolean RPR_TakeFX_GetOffline(MediaItem_Take take, Int fx)

See TakeFX_SetOffline


Returnvalues:
boolean retval

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.62TakeFX_GetOpen

C: bool TakeFX_GetOpen(MediaItem_Take* take, int fx)
EEL2: bool TakeFX_GetOpen(MediaItem_Take take, int fx)
Lua: boolean retval = reaper.TakeFX_GetOpen(MediaItem_Take take, integer fx)
Python: Boolean RPR_TakeFX_GetOpen(MediaItem_Take take, Int fx)

Returns true if this FX UI is open in the FX chain window or a floating window. See TakeFX_SetOpen


Returnvalues:
boolean retval

Parameters:
MediaItem_Take take
integer fx


^ Reaper version 5.62TakeFX_GetParam

C: double TakeFX_GetParam(MediaItem_Take* take, int fx, int param, double* minvalOut, double* maxvalOut)
EEL2: double TakeFX_GetParam(MediaItem_Take take, int fx, int param, &minval, &maxval)
Lua: number retval, number minval, number maxval = reaper.TakeFX_GetParam(MediaItem_Take take, integer fx, integer param)
Python: (Float retval, MediaItem_Take take, Int fx, Int param, Float minvalOut, Float maxvalOut) = RPR_TakeFX_GetParam(take, fx, param, minvalOut, maxvalOut)


Returnvalues:
number retval
number minval
number maxval

Parameters:
MediaItem_Take take
integer fx
integer param


^ Reaper version 5.62TakeFX_GetParamEx

C: double TakeFX_GetParamEx(MediaItem_Take* take, int fx, int param, double* minvalOut, double* maxvalOut, double* midvalOut)
EEL2: double TakeFX_GetParamEx(MediaItem_Take take, int fx, int param, &minval, &maxval, &midval)
Lua: number retval, number minval, number maxval, number midval = reaper.TakeFX_GetParamEx(MediaItem_Take take, integer fx, integer param)
Python: (Float retval, MediaItem_Take take, Int fx, Int param, Float minvalOut, Float maxvalOut, Float midvalOut) = RPR_TakeFX_GetParamEx(take, fx, param, minvalOut, maxvalOut, midvalOut)


Returnvalues:
number retval
number minval
number maxval
number midval

Parameters:
MediaItem_Take take
integer fx
integer param


^ Reaper version 6.37TakeFX_GetParamFromIdent

C: int TakeFX_GetParamFromIdent(MediaItem_Take* take, int fx, const char* ident_str)
EEL2: int TakeFX_GetParamFromIdent(MediaItem_Take take, int fx, "ident_str")
Lua: integer param = reaper.TakeFX_GetParamFromIdent(MediaItem_Take take, integer fx, string ident_str)
Python: Int RPR_TakeFX_GetParamFromIdent(MediaItem_Take take, Int fx, String ident_str)

gets the parameter index from an identifying string (:wet, :bypass, or a string returned from GetParamIdent), or -1 if unknown.

Returnvalues:
integer param

Parameters:
MediaItem_Take take
integer fx
string ident_str


^ Reaper version 6.37TakeFX_GetParamIdent

C: bool TakeFX_GetParamIdent(MediaItem_Take* take, int fx, int param, char* bufOut, int bufOut_sz)
EEL2: bool TakeFX_GetParamIdent(MediaItem_Take take, int fx, int param, #buf)
Lua: boolean retval, string buf = reaper.TakeFX_GetParamIdent(MediaItem_Take take, integer fx, integer param)
Python: (Boolean retval, MediaItem_Take take, Int fx, Int param, String bufOut, Int bufOut_sz) = RPR_TakeFX_GetParamIdent(take, fx, param, bufOut, bufOut_sz)

gets an identifying string for the parameter

Returnvalues:
boolean retval
string buf

Parameters:
MediaItem_Take take
integer fx
integer param


^ Reaper version 6.37TakeFX_GetParamName<