ReaScript API

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(The ReaScript API Functions)
(The ReaScript API Functions)
Line 31: Line 31:
=The ReaScript API Functions=
=The ReaScript API Functions=
-
Generated from 3.15 by [[mkReaScriptAPITable.pl]]
+
Generated from REAPER v3.15 by [[mkReaScriptAPITable.pl]]
{|class="wikitable"
{|class="wikitable"

Revision as of 15:00, 14 December 2009

Back to main ReaScript page
Back to main REAPER API page

Contents

ReaScript API Documentation

Don't forget - Call API functions using RPR_functionname() - Don't forget the RPR_

Using these functions

These functions each map onto a C++ function. C++ allows "pass by reference", which lets you pass a variable to a function in the parameter list and have the function change that parameter, so after this function call:

x = MyFunc(&var);

the var variable might well have a different value to the one it started with...

Perl and Python don't have compatible pass by reference mechanisms so when ReaScript sees a modifiable variable in the parameter list it returns all the values in the parameter list and the return value (if there is one) in an array, as in GetUserInputs() Go and look at it now if you haven't already done so. It will bite you if you don't understand it.

Specific REAPER type pointers, like MediaItem*, are not considered modifiable by ReaScript when deciding whether to return a scalar or array from a particular function.

Who is Allowed to Add to and Edit this Documentation?

You.

No, really - you are. Don't hesitate to get stuck in if you think you know something that even might be of help to some poor muso feeling his or her way around the API.

Anything in the API documentation that is marked with a '?' is an assumption - or something the writer just isn't sure about. If you happen to know whatever it is for certain - please correct or confirm the entry.

Please add a brief note or correction if you see anything that's wrong or incomplete or if you've used the function and know something that might be of use to the next user.

Don't worry about making it look good if you're hurried; someone will be along in a while with the time. (Don't hesitate to make it look good if you *do* have the time... :o)

The ReaScript API Functions

Generated from REAPER v3.15 by mkReaScriptAPITable.pl

AddMediaItemToTrack format_timestr GetTrackEnvelopeByName PluginWantsAlwaysRunFx
AddProjectMarker format_timestr_len GetTrackGUID projectconfig_var_addr
AddTakeToMediaItem format_timestr_pos GetTrackMediaItem projectconfig_var_getoffs
adjustZoom get_config_var GetTrackMIDINoteName ReaperGetPitchShiftAPI
APITest get_ini_file GetTrackMIDINoteNameEx relative_fn
Audio_IsPreBuffer GetActiveTake GetTrackNumMediaItems Resample_EnumModes
Audio_IsRunning GetColorThemeStruct GetTrackState Resampler_Create
Audio_RegHardwareHook GetCursorPosition GetTrackUIVolPan resolve_fn
BypassFxAllTracks GetCursorPositionEx GetUserInputs screenset_register
CalculatePeaks GetEnvelopeName GSC_mainwnd screenset_unregister
ClearAllRecArmed GetExePath guidToString screenset_unregisterByParam
ClearPeakCache GetHZoomLevel HasTrackMIDIPrograms SelectProjectInstance
CountMediaItems GetIconThemePointer HasTrackMIDIProgramsEx SetAutomationMode
CountSelectedMediaItems GetIconThemeStruct HiresPeaksFromSource SetEditCurPos
CountSelectedTracks GetInputChannelName InsertMedia SetEditCurPos2
CountTakes GetItemProjectContext InsertTrackAtIndex SetMediaItemInfo_Value
CountTrackEnvelopes GetLastTouchedTrack IsInRealTimeAudio SetMediaItemTakeInfo_Value
CountTrackMediaItems GetMainHwnd IsMediaExtension SetMediaTrackInfo_Value
CountTracks GetMasterMuteSoloFlags kbd_OnMidiEvent SetProjectMarker
CreateMIDIInput GetMaxMidiInputs kbd_OnMidiList SetProjectMarker2
CreateMIDIOutput GetMaxMidiOutputs LICE_Blit SetTrackAutomationMode
CSurf_FlushUndo GetMediaItem LICE_ClipLine SetTrackMIDINoteName
CSurf_GetTouchState GetMediaItem_Track LICE_Line SetTrackMIDINoteNameEx
CSurf_GoEnd GetMediaItemInfo_Value LICE_LineInt SetTrackSelected
CSurf_GoStart GetMediaItemNumTakes Main_OnCommand ShowActionList
CSurf_NumTracks GetMediaItemTake Main_OnCommandEx ShowConsoleMsg
CSurf_OnArrow GetMediaItemTake_Item Main_openProject ShowMessageBox
CSurf_OnFwd GetMediaItemTake_Source Main_UpdateLoopInfo SLIDER2DB
CSurf_OnFXChange GetMediaItemTake_Track Master_GetPlayRateAtTime SoloAllTracks
CSurf_OnMuteChange GetMediaItemTakeInfo_Value MB SplitMediaItem
CSurf_OnPanChange GetMediaTrackInfo_Value MIDI_eventlist_Create StopPreview
CSurf_OnPanChangeEx GetMidiInput MIDI_eventlist_Destroy StopTrackPreview
CSurf_OnPlay GetMIDIInputName MIDIEditor_GetActive StopTrackPreview2
CSurf_OnRecArmChange GetMidiOutput MIDIEditor_GetMode stringToGuid
CSurf_OnRecord GetMIDIOutputName MIDIEditor_OnCommand TimeMap2_beatsToTime
CSurf_OnRew GetNumMIDIInputs mkpanstr TimeMap2_GetDividedBpmAtTime
CSurf_OnSelectedChange GetNumMIDIOutputs mkvolpanstr TimeMap2_GetNextChangeTime
CSurf_OnSoloChange GetNumTracks mkvolstr TimeMap2_QNToTime
CSurf_OnStop GetOutputChannelName MoveEditCursor TimeMap2_timeToBeats
CSurf_OnTrackSelection GetOutputLatency MoveMediaItemToTrack TimeMap2_timeToQN
CSurf_OnVolumeChange GetPeakFileName MuteAllTracks TimeMap_GetDividedBpmAtTime
CSurf_OnVolumeChangeEx GetPeaksBitmap my_getViewport TimeMap_QNToTime
CSurf_ResetAllCachedVolPanStates GetPlayPosition NamedCommandLookup TimeMap_timeToQN
CSurf_ScrubAmt GetPlayPosition2 OnPauseButton Track_GetPeakInfo
CSurf_SetAutoMode GetPlayPosition2Ex OnPauseButtonEx TrackFX_FormatParamValue
CSurf_SetPlayState GetPlayPositionEx OnPlayButton TrackFX_GetCount
CSurf_SetRepeatState GetPlayState OnPlayButtonEx TrackFX_GetFXName
CSurf_SetSurfaceMute GetPlayStateEx OnStopButton TrackFX_GetNumParams
CSurf_SetSurfacePan GetProjectPath OnStopButtonEx TrackFX_GetParam
CSurf_SetSurfaceRecArm GetProjectPathEx parse_timestr TrackFX_GetParamName
CSurf_SetSurfaceSelected GetProjectTimeSignature parse_timestr_len TrackFX_SetParam
CSurf_SetSurfaceSolo GetProjectTimeSignature2 parse_timestr_pos TrackList_AdjustWindows
CSurf_SetSurfaceVolume GetSelectedMediaItem parsepanstr TrackList_UpdateAllExternalSurfaces
CSurf_SetTrackListChange GetSelectedTrack PCM_Sink_Create Undo_BeginBlock
CSurf_TrackFromID GetSelectedTrackEnvelope PCM_Sink_CreateEx Undo_BeginBlock2
CSurf_TrackToID GetSet_ArrangeView2 PCM_Sink_CreateMIDIFile Undo_CanRedo2
DB2SLIDER GetSet_LoopTimeRange PCM_Sink_CreateMIDIFileEx Undo_CanUndo2
DeleteProjectMarker GetSet_LoopTimeRange2 PCM_Sink_Enum Undo_DoRedo2
DeleteTrack GetSetEnvelopeState PCM_Sink_GetExtension Undo_DoUndo2
DeleteTrackMediaItem GetSetItemState PCM_Sink_ShowConfig Undo_EndBlock
DockWindowActivate GetSetMediaItemTakeInfo_String PCM_Source_CreateFromFile Undo_EndBlock2
DockWindowAdd GetSetMediaTrackInfo_String PCM_Source_CreateFromFileEx Undo_OnStateChange
DockWindowRemove GetSetRepeat PCM_Source_CreateFromSimple Undo_OnStateChange2
EnsureNotCompletelyOffscreen GetSetRepeatEx PCM_Source_CreateFromType Undo_OnStateChange_Item
EnumPitchShiftModes GetSetTrackState PeakBuild_Create Undo_OnStateChangeEx
EnumPitchShiftSubModes GetTake PeakGet_Create Undo_OnStateChangeEx2
EnumProjectMarkers GetTakeEnvelopeByName PlayPreview UpdateItemInProject
EnumProjectMarkers2 GetTooltipWindow PlayTrackPreview UpdateTimeline
EnumProjects GetTrack PlayTrackPreview2 ValidatePtr
EnumTrackMIDIProgramNames GetTrackAutomationMode plugin_getFilterList WDL_VirtualWnd_ScaledBlitBG
EnumTrackMIDIProgramNamesEx GetTrackEnvelope plugin_getImportableProjectFilterList
Personal tools