ReaScript API

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(CountTracks())
(Undo revision 13212 by Ucokane (Talk) - spam/vandalism)
 
(100 intermediate revisions not shown)
Line 1: Line 1:
 +
__NOTOC__
 +
[[ReaScript|Back to main ReaScript page]]<br>
 +
[[REAPER API|Back to main REAPER API page]]
 +
=ReaScript API Documentation=
=ReaScript API Documentation=
-
The API documentation is limited at the moment, as API calls are documented they are given their own wiki page with short examples using both Python & Perl.
+
This page documents the ReaScript API functions.
-
Don't forget - Call API functions using RPR_functionname() - Don't forget the RPR_
+
ReaScript uses a large part of The API (available in CC++).
-
API functions that cannot return information in the parameter list will return a single value.
+
=Using these functions=
-
API functions that can return information in the parameter list will return a list of values.
+
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:
-
 
+
-
=AddMediaItemToTrack()=
+
-
creates a new media item.
+
-
 
+
-
MediaItem* AddMediaItemToTrack(MediaTrack* tr)
+
-
 
+
-
=AddTakeToMediaItem()=
+
-
creates a new take in an item
+
-
 
+
-
MediaItem_Take* AddTakeToMediaItem(MediaItem* item)
+
-
 
+
-
=adjustZoom()=
+
-
 
+
-
forceset=0,doupd=true,centermode=-1 for default
+
-
 
+
-
void adjustZoom(double amt, int forceset, bool doupd, int centermode)
+
-
 
+
-
=APITest()=
+
-
 
+
-
void APITest()
+
-
 
+
-
Example - Perl
+
<pre>
<pre>
-
#
+
x = MyFunc(&var);
-
# APITest.pl
+
-
#
+
-
 
+
-
use strict;
+
-
use warnings;
+
-
 
+
-
RPR_APITest();
+
</pre>
</pre>
 +
the var variable might well have a different value to the one it started with...
-
=Audio_IsPreBuffer()=
+
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 [[RPR_GetUserInputs|GetUserInputs()]] Go and look at it now if you haven't already done so. It will bite you if you don't understand it.
-
 
+
-
is in pre-buffer? threadsafe
+
-
 
+
-
int Audio_IsPreBuffer()
+
-
 
+
-
 
+
-
=Audio_IsRunning()=
+
-
 
+
-
is audio running at all? threadsafe
+
-
 
+
-
int Audio_IsRunning()
+
-
 
+
-
 
+
-
=Audio_RegHardwareHook()=
+
-
 
+
-
return >0 on success
+
-
 
+
-
int Audio_RegHardwareHook(bool isAdd, audio_hook_register_t* reg)
+
-
 
+
-
=BypassFxAllTracks()=
+
-
 
+
-
-1 = bypass all if not all bypassed,otherwise unbypass all
+
-
 
+
-
void BypassFxAllTracks(int bypass)
+
-
<pre>
+
-
#
+
-
# BypassFxAllTracks.pl
+
-
#
+
-
 
+
-
use strict;
+
-
use warnings;
+
-
 
+
-
RPR_BypassFxAllTracks(1);
+
-
RPR_ShowMessageBox("All FX bypassed", "BypassFxAllTracks", 1); #
+
-
RPR_BypassFxAllTracks(0);
+
-
RPR_ShowMessageBox("All FX UN-bypassed", "BypassFxAllTracks", 1); #
+
-
</pre>
+
-
=CalculatePeaks()=
+
-
 
+
-
int CalculatePeaks(PCM_source_transfer_t* srcBlock, PCM_source_peaktransfer_t* pksBlock)
+
-
 
+
-
 
+
-
=ClearAllRecArmed()=
+
-
 
+
-
void ClearAllRecArmed()
+
-
 
+
-
 
+
-
=ClearPeakCache()=
+
-
 
+
-
resets the global peak caches
+
-
 
+
-
void ClearPeakCache()
+
-
 
+
-
 
+
-
=CountMediaItems()=
+
-
 
+
-
count the number of items in the project (proj=0 for active project)
+
-
 
+
-
int CountMediaItems(ReaProject* proj)
+
-
 
+
-
 
+
-
=CountSelectedMediaItems()=
+
-
 
+
-
count the number of selected items in the project (proj=0 for active project)
+
-
 
+
-
int CountSelectedMediaItems(ReaProject* proj)
+
-
 
+
-
 
+
-
=CountSelectedTracks()=
+
-
 
+
-
count the number of selected tracks in the project (proj=0 for active project)
+
-
 
+
-
int CountSelectedTracks(ReaProject* proj)
+
-
 
+
-
=CountTakes()=
+
-
 
+
-
count the number of takes in the item
+
-
 
+
-
int CountTakes(MediaItem* item)
+
-
 
+
-
=CountTrackMediaItems()=
+
-
 
+
-
count the number of items in the track
+
-
 
+
-
int CountTrackMediaItems(MediaTrack* track)
+
-
 
+
-
 
+
-
=CountTracks()=
+
-
 
+
-
count the number of tracks in the project (proj=0 for active project)
+
-
 
+
-
int CountTracks(ReaProject* proj)
+
-
 
+
-
Perl example
+
-
<pre>
+
-
#
+
-
# CountTracks.pl
+
-
#
+
-
 
+
-
use strict;
+
-
use warnings;
+
-
 
+
-
my $num_tracks = RPR_CountTracks(0);
+
-
 
+
-
RPR_ShowConsoleMsg("There are $num_tracks tracks in the current project");
+
-
</pre>
+
-
 
+
-
=CreateMIDIInput()=
+
-
 
+
-
midi_Input* CreateMIDIInput(int dev)
+
-
 
+
-
=CreateMIDIOutput()=
+
-
 
+
-
midi_Output* CreateMIDIOutput(int dev, bool streamMode, int* msoffset100)
+
-
 
+
-
=CSurf_FlushUndo()=
+
-
 
+
-
call this to force flushing of the undo states after using CSurf_On*Change()
+
-
 
+
-
void CSurf_FlushUndo(bool force)
+
-
 
+
-
=CSurf_GetTouchState()=
+
-
 
+
-
bool CSurf_GetTouchState(MediaTrack* trackid, int isPan)
+
-
 
+
-
=CSurf_GoEnd()=
+
-
 
+
-
void CSurf_GoEnd()
+
-
 
+
-
 
+
-
=CSurf_GoStart()=
+
-
 
+
-
void CSurf_GoStart()
+
-
 
+
-
 
+
-
=CSurf_NumTracks()=
+
-
 
+
-
int CSurf_NumTracks(bool mcpView)
+
-
 
+
-
 
+
-
=CSurf_OnArrow()=
+
-
 
+
-
void CSurf_OnArrow(int whichdir, bool wantzoom)
+
-
 
+
-
 
+
-
=CSurf_OnFwd()=
+
-
 
+
-
void CSurf_OnFwd(int seekplay)
+
-
 
+
-
 
+
-
=CSurf_OnFXChange()=
+
-
 
+
-
bool CSurf_OnFXChange(MediaTrack* trackid, int en)
+
-
 
+
-
 
+
-
=CSurf_OnMuteChange()=
+
-
 
+
-
bool CSurf_OnMuteChange(MediaTrack* trackid, int mute)
+
-
 
+
-
 
+
-
=CSurf_OnPanChange()=
+
-
 
+
-
double CSurf_OnPanChange(MediaTrack* trackid, double pan, bool relative)
+
-
 
+
-
 
+
-
=CSurf_OnPanChangeEx()=
+
-
 
+
-
double CSurf_OnPanChangeEx(MediaTrack* trackid, double pan, bool relative, bool allowGang)
+
-
 
+
-
 
+
-
=CSurf_OnPlay()=
+
-
 
+
-
void CSurf_OnPlay()
+
-
 
+
-
 
+
-
=CSurf_OnRecArmChange()=
+
-
 
+
-
bool CSurf_OnRecArmChange(MediaTrack* trackid, int recarm)
+
-
 
+
-
 
+
-
=CSurf_OnRecord()=
+
-
 
+
-
void CSurf_OnRecord()
+
-
 
+
-
 
+
-
=CSurf_OnRew()=
+
-
void CSurf_OnRew(int seekplay)
+
-
 
+
-
 
+
-
=CSurf_OnSelectedChange()=
+
-
 
+
-
bool CSurf_OnSelectedChange(MediaTrack* trackid, int selected)
+
-
 
+
-
 
+
-
=CSurf_OnSoloChange()=
+
-
bool CSurf_OnSoloChange(MediaTrack* trackid, int solo)
+
-
 
+
-
 
+
-
=CSurf_OnStop()=
+
-
void CSurf_OnStop()
+
-
 
+
-
 
+
-
=CSurf_OnTrackSelection()=
+
-
void CSurf_OnTrackSelection(MediaTrack* trackid)
+
-
 
+
-
 
+
-
=CSurf_OnVolumeChange()=
+
-
double CSurf_OnVolumeChange(MediaTrack* trackid, double volume, bool relative)
+
-
 
+
-
 
+
-
=CSurf_OnVolumeChangeEx()=
+
-
double CSurf_OnVolumeChangeEx(MediaTrack* trackid, double volume, bool relative, bool allowGang)
+
-
 
+
-
 
+
-
=CSurf_ResetAllCachedVolPanStates()=
+
-
void CSurf_ResetAllCachedVolPanStates()
+
-
 
+
-
 
+
-
=CSurf_ScrubAmt()=
+
-
void CSurf_ScrubAmt(double amt)
+
-
 
+
-
 
+
-
=CSurf_SetAutoMode()=
+
-
void CSurf_SetAutoMode(int mode, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetPlayState()=
+
-
void CSurf_SetPlayState(bool play, bool pause, bool rec, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetRepeatState()=
+
-
void CSurf_SetRepeatState(bool rep, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetSurfaceMute()=
+
-
void CSurf_SetSurfaceMute(MediaTrack* trackid, bool mute, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetSurfacePan()=
+
-
void CSurf_SetSurfacePan(MediaTrack* trackid, double pan, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetSurfaceRecArm()=
+
-
void CSurf_SetSurfaceRecArm(MediaTrack* trackid, bool recarm, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetSurfaceSelected()=
+
-
void CSurf_SetSurfaceSelected(MediaTrack* trackid, bool selected, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetSurfaceSolo()=
+
-
void CSurf_SetSurfaceSolo(MediaTrack* trackid, bool solo, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetSurfaceVolume()=
+
-
void CSurf_SetSurfaceVolume(MediaTrack* trackid, double volume, IReaperControlSurface* ignoresurf)
+
-
 
+
-
 
+
-
=CSurf_SetTrackListChange()=
+
-
void CSurf_SetTrackListChange()
+
-
 
+
-
 
+
-
=CSurf_TrackFromID()=
+
-
MediaTrack* CSurf_TrackFromID(int idx, bool mcpView)
+
-
 
+
-
 
+
-
=CSurf_TrackToID()=
+
-
int CSurf_TrackToID(MediaTrack* track, bool mcpView)
+
-
 
+
-
=DeleteTrack()=
+
-
 
+
-
deletes a track
+
-
 
+
-
void DeleteTrack(MediaTrack* tr)
+
-
 
+
-
 
+
-
=DeleteTrackMediaItem()=
+
-
bool DeleteTrackMediaItem(MediaTrack* tr, MediaItem* it)
+
-
 
+
-
 
+
-
=DockWindowActivate()=
+
-
void DockWindowActivate(HWND hwnd)
+
-
 
+
-
 
+
-
=DockWindowAdd()=
+
-
void DockWindowAdd(HWND hwnd, char* name, int pos, bool allowShow)
+
-
 
+
-
 
+
-
=DockWindowRemove()=
+
-
void DockWindowRemove(HWND hwnd)
+
-
 
+
-
=EnsureNotCompletelyOffscreen()=
+
-
 
+
-
call with a saved window rect for your window and it'll correct any positioning info.
+
-
 
+
-
void EnsureNotCompletelyOffscreen(RECT* r)
+
-
 
+
-
 
+
-
=EnumPitchShiftModes()=
+
-
returns FALSE when done,sets out to NULL if a mode is currently unsupported
+
-
 
+
-
bool EnumPitchShiftModes(int idx, char** out)
+
-
 
+
-
 
+
-
=EnumPitchShiftSubModes()=
+
-
const char* EnumPitchShiftSubModes(int idx, int submode)
+
-
 
+
-
 
+
-
=EnumProjectMarkers()=
+
-
int EnumProjectMarkers(int idx, bool* isrgn, double* pos, double* rgnend, char** name, int* markrgnindexnumber)
+
-
 
+
-
 
+
-
=EnumProjectMarkers2()=
+
-
int EnumProjectMarkers2(void* proj, int idx, bool* isrgn, double* pos, double* rgnend, char** name, int* markrgnindexnumber)
+
-
 
+
-
 
+
-
=EnumProjects()=
+
-
idx=-1 for current project,projfn can be NULL if not interested in filename
+
-
 
+
-
void* EnumProjects(int idx, char* projfn, int projfnlen)
+
-
 
+
-
 
+
-
=EnumTrackMIDIProgramNames()=
+
-
returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated
+
-
 
+
-
bool EnumTrackMIDIProgramNames(int track, int programNumber, char* programName, int maxnamelen)
+
-
 
+
-
 
+
-
=EnumTrackMIDIProgramNamesEx()=
+
-
returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated
+
-
 
+
-
bool EnumTrackMIDIProgramNamesEx(void* proj, void* track, int programNumber, char* programName, int maxnamelen)
+
-
 
+
-
=format_timestr()=
+
-
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
+
-
 
+
-
void format_timestr(double tpos, char* buf, int buflen)
+
-
 
+
-
 
+
-
=format_timestr_len()=
+
-
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
+
-
 
+
-
void format_timestr_len(double tpos, char* buf, int buflen, double offset, int modeoverride)
+
-
 
+
-
 
+
-
format_timestr_pos()=
+
-
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
+
-
 
+
-
void format_timestr_pos(double tpos, char* buf, int buflen, int modeoverride)
+
-
 
+
-
 
+
-
=FreeHeapPtr()=
+
-
free heap memory returned from a Reaper API function
+
-
 
+
-
void FreeHeapPtr(void* ptr)
+
-
 
+
-
 
+
-
=genGuid()=
+
-
void genGuid(GUID* g)
+
-
 
+
-
 
+
-
=get_config_var()=
+
-
void* get_config_var(const char* name, int* szout)
+
-
 
+
-
 
+
-
=get_ini_file()=
+
-
const char* get_ini_file()
+
-
 
+
-
 
+
-
=GetActiveTake()=
+
-
get the active take in this item
+
-
 
+
-
MediaItem_Take* GetActiveTake(MediaItem* item)
+
-
 
+
-
 
+
-
=GetColorThemeStruct()=
+
-
returns the whole color theme (icontheme.h) and the size
+
-
 
+
-
void* GetColorThemeStruct(int* sz)
+
-
 
+
-
 
+
-
=GetCursorPosition()=
+
-
=GetCursorPositionEx()=
+
-
edit cursor position
+
-
 
+
-
double GetCursorPosition()
+
-
double GetCursorPositionEx(void* proj)
+
-
 
+
-
 
+
-
=GetExePath()=
+
-
returns path of REAPER.exe (not including EXE),i.e. C:\Program Files\REAPER
+
-
 
+
-
const char* GetExePath()
+
-
 
+
-
 
+
-
=GetHZoomLevel()=
+
-
returns pixels/second
+
-
 
+
-
double GetHZoomLevel()
+
-
 
+
-
 
+
-
=GetIconThemePointer()=
+
-
returns a named icontheme entry
+
-
 
+
-
void* GetIconThemePointer(const char* name)
+
-
 
+
-
 
+
-
=GetIconThemeStruct()=
+
-
returns the whole icon theme (icontheme.h) and the size
+
-
 
+
-
void* GetIconThemeStruct(int* sz)
+
-
 
+
-
 
+
-
=GetInputChannelName()=
+
-
const char* GetInputChannelName(int idx)
+
-
 
+
-
 
+
-
=GetItemProjectContext()=
+
-
void* GetItemProjectContext(MediaItem* item)
+
-
 
+
-
 
+
-
=GetLastTouchedTrack()=
+
-
MediaTrack* GetLastTouchedTrack()
+
-
 
+
-
 
+
-
=GetMainHwnd()=
+
-
HWND GetMainHwnd()
+
-
 
+
-
 
+
-
=GetMasterMuteSoloFlags()=
+
-
&1=master mute,&2=master solo. This is deprecated as you can just query the master track as well.
+
-
 
+
-
int GetMasterMuteSoloFlags()
+
-
 
+
-
 
+
-
=GetMaxMidiInputs()=
+
-
returns max dev for midi inputs/outputs
+
-
 
+
-
int GetMaxMidiInputs()
+
-
 
+
-
 
+
-
=GetMaxMidiOutputs()=
+
-
int GetMaxMidiOutputs()
+
-
 
+
-
 
+
-
=GetMediaItem()=
+
-
get an item from a project by item count (zero-based) (proj=0 for active project)
+
-
 
+
-
MediaItem* GetMediaItem(ReaProject* proj, int itemidx)
+
-
 
+
-
 
+
-
=GetMediaItem_Track()=
+
-
Get parent track of media item
+
-
 
+
-
MediaTrack* GetMediaItem_Track(MediaItem* item)
+
-
 
+
-
 
+
-
=GetMediaItemInfo_Value()=
+
-
Get media item numerical-value attributes.
+
-
*B_MUTE : bool * to muted state
+
-
*B_LOOPSRC : bool * to loop source
+
-
*B_ALLTAKESPLAY : bool * to all takes play
+
-
*B_UISEL : bool * to ui selected
+
-
*C_BEATATTACHMODE : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsosonly
+
-
*C_LOCK : char * to one char of lock flags (&1 is locked, currently)
+
-
*D_VOL : double * of item volume (volume bar)
+
-
*D_POSITION : double * of item position (seconds)
+
-
*D_LENGTH : double * of item length (seconds)
+
-
*D_SNAPOFFSET : double * of item snap offset (seconds)
+
-
*D_FADEINLEN : double * of item fade in length (manual, seconds)
+
-
*D_FADEOUTLEN : double * of item fade out length (manual, seconds)
+
-
*D_FADEINLEN_AUTO : double * of item autofade in length (seconds, -1 for no autofade set)
+
-
*D_FADEOUTLEN_AUTO : double * of item autofade out length (seconds, -1 for no autofade set)
+
-
*I_FADEINSHAPE : int * to fadein shape, 0=linear, ...
+
-
*I_FADEOUTSHAPE : int * to fadeout shape
+
-
*I_GROUPID : int * to group ID (0 = no group)
+
-
*I_LASTY : int * to last y position in track (readonly)
+
-
*I_LASTH : int * to last height in track (readonly)
+
-
*I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
+
-
*I_CURTAKE : int * to active take
+
-
*F_FREEMODE_Y : float * to free mode y position (0..1)
+
-
*F_FREEMODE_H : float * to free mode height (0..1)
+
-
 
+
-
double GetMediaItemInfo_Value(MediaItem* item, const char* parmname)
+
-
 
+
-
=GetMediaItemNumTakes()=
+
-
int GetMediaItemNumTakes(MediaItem* item)
+
-
 
+
-
 
+
-
=GetMediaItemTake()=
+
-
MediaItem_Take* GetMediaItemTake(MediaItem* item, int tk)
+
-
 
+
-
 
+
-
=GetMediaItemTake_Item()=
+
-
Get parent item of media item take
+
-
 
+
-
MediaItem* GetMediaItemTake_Item(MediaItem_Take* take)
+
-
 
+
-
 
+
-
=GetMediaItemTake_Source()=
+
-
Get media source of media item take
+
-
 
+
-
PCM_source* GetMediaItemTake_Source(MediaItem_Take* take)
+
-
 
+
-
 
+
-
=GetMediaItemTake_Track()=
+
-
Get parent track of media item take
+
-
 
+
-
MediaTrack* GetMediaItemTake_Track(MediaItem_Take* take)
+
-
 
+
-
 
+
-
=GetMediaItemTakeInfo_Value()=
+
-
Get media item take numerical-value attributes.
+
-
*D_STARTOFFS : double *, start offset in take of item
+
-
*D_VOL : double *, take volume
+
-
*D_PAN : double *, take pan
+
-
*D_PANLAW : double *, take pan law (-1.0=default, 0.5=-6dB, 1.0=+0dB, etc)
+
-
*D_PLAYRATE : double *, take play rate (1.0=normal, 2.0=doublespeed, etc)
+
-
*D_PITCH : double *, take pitch adjust (in semitones, 0.0=normal, +12 = one octave up, etc)
+
-
*B_PPITCH, bool *, preserve pitch when changing rate
+
-
*I_CHANMODE, int *, channel mode (0=normal, 1=revstereo, 2=downmix, 3=l, 4=r)
+
-
*I_PITCHMODE, int *, pitch shifter mode, -1=proj default, otherwise high word=shifter low word = parameter
+
-
 
+
-
double GetMediaItemTakeInfo_Value(MediaItem_Take* take, const char* parmname)
+
-
 
+
-
=GetMediaTrackInfo_Value()=
+
-
Get track numerical-value attributes.
+
-
*B_MUTE : bool * : mute flag
+
-
*B_PHASE : bool * : invert track phase
+
-
*IP_TRACKNUMBER : int : track number (returns zero if not found, -1 for master track) (read-only, returns the int directly)
+
-
*I_SOLO : int * : 0=not soloed, 1=solo, 2=soloed in place
+
-
*I_FXEN : int * : 0=fx bypassed, nonzero = fx active
+
-
*I_RECARM : int * : 0=not record armed, 1=record armed
+
-
*I_RECINPUT : int * : record input. 0..n = mono hardware input, 512+n = rearoute input, 1024 set for stereo input pair. 4096 set for MIDI input, if set, then low 5 bits represent channel (0=all, 1-16=only chan), then next 5 bits represent physical input (31=all, 30=VKB)
+
-
*I_RECMODE : int * : record mode (0=input, 1=stereo out, 2=none, 3=stereo out w/latcomp, 4=midi output, 5=mono out, 6=mono out w/ lat comp, 7=midi overdub, 8=midi replace
+
-
*I_RECMON : int * : record monitor (0=off, 1=normal, 2=not when playing (tapestyle))
+
-
*I_RECMONITEMS : int * : monitor items while recording (0=off, 1=on)
+
-
*I_AUTOMODE : int * : track automation mode (0=trim/off, 1=read, 2=touch, 3=write, 4=latch
+
-
*I_NCHAN : int * : number of track channels, must be 2-64, even
+
-
*I_SELECTED : int * : track selected? 0 or 1
+
-
*I_WNDH : int * : current TCP window height (Read-only)
+
-
*I_ISFOLDER : int * : folder status (1=folder, 0=normal, 2=last track in folder)
+
-
*I_FOLDERCOMPACT : int * : folder compacting (only valid on folders), 0=normal, 1=small, 2=tiny children
+
-
*I_MIDIHWOUT : int * : track midi hardware output index (<0 for disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31))
+
-
*I_PERFFLAGS : int * : track perf flags (&1=no media buffering, &2=no anticipative FX)
+
-
*I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
+
-
*I_HEIGHTOVERRIDE : int * : custom height override for TCP window. 0 for none, otherwise size in pixels
+
-
*D_VOL : double * : trim volume of track (0 (-inf)..1 (+0dB) .. 2 (+6dB) etc ..)
+
-
*D_PAN : double * : trim pan of track (-1..1)
+
-
*D_PANLAW : double * : pan law of track. <0 for project default, 1.0 for +0dB, etc
+
-
*B_SHOWINMIXER : bool * : show track panel in mixer -- do not use on master
+
-
*B_SHOWINTCP : bool * : show track panel in tcp -- do not use on master
+
-
*B_MAINSEND : bool * : track sends audio to parent
+
-
*B_FREEMODE : bool * : track free-mode enabled (requires UpdateTimeline() after changing etc)
+
-
*C_BEATATTACHMODE : char * : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsposonly
+
-
*F_MCP_FXSEND_SCALE : float * : scale of fx+send area in MCP (0.0=smallest allowed, 1=max allowed)
+
-
*F_MCP_SENDRGN_SCALE : float * : scale of send area as proportion of the fx+send total area (0=min allow, 1=max)
+
-
 
+
-
double GetMediaTrackInfo_Value(MediaTrack* tr, const char* parmname)
+
-
 
+
-
=GetMidiInput()=
+
-
midi_Input* GetMidiInput(int idx)
+
-
 
+
-
 
+
-
=GetMaxMidiInputs()=
+
-
returns max dev for midi inputs/outputs
+
-
 
+
-
int GetMaxMidiInputs()
+
-
 
+
-
 
+
-
=GetMaxMidiOutputs()=
+
-
int GetMaxMidiOutputs()
+
-
 
+
-
 
+
-
=GetMediaItem()=
+
-
get an item from a project by item count (zero-based) (proj=0 for active project)
+
-
 
+
-
MediaItem* GetMediaItem(ReaProject* proj, int itemidx)
+
-
 
+
-
 
+
-
=GetMediaItem_Track()=
+
-
Get parent track of media item
+
-
 
+
-
MediaTrack* GetMediaItem_Track(MediaItem* item)
+
-
 
+
-
 
+
-
=GetMediaItemInfo_Value()=
+
-
Get media item numerical-value attributes.
+
-
*B_MUTE : bool * to muted state
+
-
*B_LOOPSRC : bool * to loop source
+
-
*B_ALLTAKESPLAY : bool * to all takes play
+
-
*B_UISEL : bool * to ui selected
+
-
*C_BEATATTACHMODE : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsosonly
+
-
*C_LOCK : char * to one char of lock flags (&1 is locked, currently)
+
-
*D_VOL : double * of item volume (volume bar)
+
-
*D_POSITION : double * of item position (seconds)
+
-
*D_LENGTH : double * of item length (seconds)
+
-
*D_SNAPOFFSET : double * of item snap offset (seconds)
+
-
*D_FADEINLEN : double * of item fade in length (manual, seconds)
+
-
*D_FADEOUTLEN : double * of item fade out length (manual, seconds)
+
-
*D_FADEINLEN_AUTO : double * of item autofade in length (seconds, -1 for no autofade set)
+
-
*D_FADEOUTLEN_AUTO : double * of item autofade out length (seconds, -1 for no autofade set)
+
-
*I_FADEINSHAPE : int * to fadein shape, 0=linear, ...
+
-
*I_FADEOUTSHAPE : int * to fadeout shape
+
-
*I_GROUPID : int * to group ID (0 = no group)
+
-
*I_LASTY : int * to last y position in track (readonly)
+
-
*I_LASTH : int * to last height in track (readonly)
+
-
*I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
+
-
*I_CURTAKE : int * to active take
+
-
*F_FREEMODE_Y : float * to free mode y position (0..1)
+
-
*F_FREEMODE_H : float * to free mode height (0..1)
+
-
 
+
-
double GetMediaItemInfo_Value(MediaItem* item, const char* parmname)
+
-
 
+
-
=GetMediaItemNumTakes()=
+
-
int GetMediaItemNumTakes(MediaItem* item)
+
-
 
+
-
 
+
-
=GetMediaItemTake()=
+
-
MediaItem_Take* GetMediaItemTake(MediaItem* item, int tk)
+
-
 
+
-
 
+
-
=GetMediaItemTake_Item()=
+
-
Get parent item of media item take
+
-
 
+
-
MediaItem* GetMediaItemTake_Item(MediaItem_Take* take)
+
-
 
+
-
 
+
-
=GetMediaItemTake_Source()=
+
-
Get media source of media item take
+
-
 
+
-
PCM_source* GetMediaItemTake_Source(MediaItem_Take* take)
+
-
 
+
-
 
+
-
=GetMediaItemTake_Track()=
+
-
Get parent track of media item take
+
-
 
+
-
MediaTrack* GetMediaItemTake_Track(MediaItem_Take* take)
+
-
 
+
-
 
+
-
=GetMediaItemTakeInfo_Value()=
+
-
Get media item take numerical-value attributes.
+
-
*D_STARTOFFS : double *, start offset in take of item
+
-
*D_VOL : double *, take volume
+
-
*D_PAN : double *, take pan
+
-
*D_PANLAW : double *, take pan law (-1.0=default, 0.5=-6dB, 1.0=+0dB, etc)
+
-
*D_PLAYRATE : double *, take play rate (1.0=normal, 2.0=doublespeed, etc)
+
-
*D_PITCH : double *, take pitch adjust (in semitones, 0.0=normal, +12 = one octave up, etc)
+
-
*B_PPITCH, bool *, preserve pitch when changing rate
+
-
*I_CHANMODE, int *, channel mode (0=normal, 1=revstereo, 2=downmix, 3=l, 4=r)
+
-
*I_PITCHMODE, int *, pitch shifter mode, -1=proj default, otherwise high word=shifter low word = parameter
+
-
 
+
-
double GetMediaItemTakeInfo_Value(MediaItem_Take* take, const char* parmname)
+
-
 
+
-
=GetMediaTrackInfo_Value()=
+
-
Get track numerical-value attributes.
+
-
*B_MUTE : bool * : mute flag
+
-
*B_PHASE : bool * : invert track phase
+
-
*IP_TRACKNUMBER : int : track number (returns zero if not found, -1 for master track) (read-only, returns the int directly)
+
-
*I_SOLO : int * : 0=not soloed, 1=solo, 2=soloed in place
+
-
*I_FXEN : int * : 0=fx bypassed, nonzero = fx active
+
-
*I_RECARM : int * : 0=not record armed, 1=record armed
+
-
*I_RECINPUT : int * : record input. 0..n = mono hardware input, 512+n = rearoute input, 1024 set for stereo input pair. 4096 set for MIDI input, if set, then low 5 bits represent channel (0=all, 1-16=only chan), then next 5 bits represent physical input (31=all, 30=VKB)
+
-
*I_RECMODE : int * : record mode (0=input, 1=stereo out, 2=none, 3=stereo out w/latcomp, 4=midi output, 5=mono out, 6=mono out w/ lat comp, 7=midi overdub, 8=midi replace
+
-
*I_RECMON : int * : record monitor (0=off, 1=normal, 2=not when playing (tapestyle))
+
-
*I_RECMONITEMS : int * : monitor items while recording (0=off, 1=on)
+
-
*I_AUTOMODE : int * : track automation mode (0=trim/off, 1=read, 2=touch, 3=write, 4=latch
+
-
*I_NCHAN : int * : number of track channels, must be 2-64, even
+
-
*I_SELECTED : int * : track selected? 0 or 1
+
-
*I_WNDH : int * : current TCP window height (Read-only)
+
-
*I_ISFOLDER : int * : folder status (1=folder, 0=normal, 2=last track in folder)
+
-
*I_FOLDERCOMPACT : int * : folder compacting (only valid on folders), 0=normal, 1=small, 2=tiny children
+
-
*I_MIDIHWOUT : int * : track midi hardware output index (<0 for disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31))
+
-
*I_PERFFLAGS : int * : track perf flags (&1=no media buffering, &2=no anticipative FX)
+
-
*I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
+
-
*I_HEIGHTOVERRIDE : int * : custom height override for TCP window. 0 for none, otherwise size in pixels
+
-
*D_VOL : double * : trim volume of track (0 (-inf)..1 (+0dB) .. 2 (+6dB) etc ..)
+
-
*D_PAN : double * : trim pan of track (-1..1)
+
-
*D_PANLAW : double * : pan law of track. <0 for project default, 1.0 for +0dB, etc
+
-
*B_SHOWINMIXER : bool * : show track panel in mixer -- do not use on master
+
-
*B_SHOWINTCP : bool * : show track panel in tcp -- do not use on master
+
-
*B_MAINSEND : bool * : track sends audio to parent
+
-
*B_FREEMODE : bool * : track free-mode enabled (requires UpdateTimeline() after changing etc)
+
-
*C_BEATATTACHMODE : char * : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsposonly
+
-
*F_MCP_FXSEND_SCALE : float * : scale of fx+send area in MCP (0.0=smallest allowed, 1=max allowed)
+
-
*F_MCP_SENDRGN_SCALE : float * : scale of send area as proportion of the fx+send total area (0=min allow, 1=max)
+
-
 
+
-
double GetMediaTrackInfo_Value(MediaTrack* tr, const char* parmname)
+
-
 
+
-
=GetMidiInput()=
+
-
midi_Input* GetMidiInput(int idx)
+
-
 
+
-
 
+
-
=GetMIDIInputName()=
+
-
returns true if device present
+
-
 
+
-
bool GetMIDIInputName(int dev, char* nameout, int nameoutlen)
+
-
 
+
-
 
+
-
=GetMidiOutput()=
+
-
midi_Output* GetMidiOutput(int idx)
+
-
 
+
-
 
+
-
=GetMIDIOutputName()=
+
-
returns true if device present
+
-
 
+
-
bool GetMIDIOutputName(int dev, char* nameout, int nameoutlen)
+
-
 
+
-
 
+
-
=GetNumMIDIInputs()=
+
-
returns actual number of midi inputs (slower)
+
-
 
+
-
int GetNumMIDIInputs()
+
-
 
+
-
 
+
-
=GetNumMIDIOutputs()=
+
-
returns actual number of midi outputs (slower)
+
-
 
+
-
int GetNumMIDIOutputs()
+
-
 
+
-
 
+
-
=GetNumTracks()=
+
-
int GetNumTracks()
+
-
 
+
-
 
+
-
=GetOutputChannelName()=
+
-
const char* GetOutputChannelName(int idx)
+
-
 
+
-
 
+
-
=GetPeakFileName()=
+
-
get the peak file name for a given file (can be either filename.reapeaks,or a hashed filename in another path)
+
-
 
+
-
void GetPeakFileName(const char* fn, char* buf, int bufmax)
+
-
 
+
-
 
+
-
=GetPeaksBitmap()=
+
-
see note in reaper_plugin.h about PCM_source_peaktransfer_t::samplerate
+
-
 
+
-
void* GetPeaksBitmap(PCM_source_peaktransfer_t* pks, double maxamp, int w, int h, LICE_IBitmap* bmp)
+
-
 
+
-
 
+
-
=GetPlayPosition()=
+
-
=GetPlayPositionEx()=
+
-
returns latency-compensated actual-what-you-hear position
+
-
 
+
-
double GetPlayPosition()
+
-
double GetPlayPositionEx(void* proj)
+
-
 
+
-
 
+
-
=GetPlayPosition2()=
+
-
=GetPlayPosition2Ex()=
+
-
returns position of next audio block being processed
+
-
 
+
-
double GetPlayPosition2()
+
-
double GetPlayPosition2Ex(void* proj)
+
-
 
+
-
 
+
-
=GetPlayState()=
+
-
=GetPlayStateEx()=
+
-
&1=playing,&2=pause,&=4 is recording
+
-
 
+
-
int GetPlayState()
+
-
int GetPlayStateEx(void* proj)
+
-
 
+
-
=GetProjectPath()=
+
-
=GetProjectPathEx()=
+
-
 
+
-
void GetProjectPath(char* buf, int bufsz)
+
-
void GetProjectPathEx(void* proj, char* buf, int bufsz)
+
-
 
+
-
 
+
-
=GetProjectTimeSignature()=
+
-
deprecated
+
-
 
+
-
void GetProjectTimeSignature(double* bpm, double* bpi)
+
-
 
+
-
 
+
-
=GetProjectTimeSignature2()=
+
-
Gets basic time signature (beats per minute, numerator of time signature in bpi)
+
-
this does not reflect tempo envelopes but is purely what is set in the project settings.
+
-
 
+
-
void GetProjectTimeSignature2(void* proj, double* bpm, double* bpi)
+
-
 
+
-
 
+
-
=GetSelectedMediaItem()=
+
-
get a selected item by selected item count (zero-based) (proj=0 for active project)
+
-
 
+
-
MediaItem* GetSelectedMediaItem(ReaProject* proj, int selitem)
+
-
 
+
-
 
+
-
=GetSelectedTrack()=
+
-
get a selected track from a project by selected track count (zero-based) (proj=0 for active project)
+
-
 
+
-
MediaTrack* GetSelectedTrack(ReaProject* proj, int seltrackidx)
+
-
 
+
-
 
+
-
=GetSelectedTrackEnvelope()=
+
-
get the currently selected track envelope as an opaque pointer (can be passed to GetSetObjectState),returns 0 if no envelope is selected
+
-
 
+
-
void* GetSelectedTrackEnvelope(ReaProject* proj)
+
-
 
+
-
 
+
-
=GetSet_ArrangeView2()=
+
-
void GetSet_ArrangeView2(void* proj, bool isSet, int screen_x_start, int screen_x_end, double* start_time, double* end_time)
+
-
 
+
-
 
+
-
=GetSet_LoopTimeRange()=
+
-
void GetSet_LoopTimeRange(bool isSet, bool isLoop, double* start, double* end, bool allowautoseek)
+
-
 
+
-
 
+
-
GetSet_LoopTimeRange2()=
+
-
void GetSet_LoopTimeRange2(void* proj, bool isSet, bool isLoop, double* start, double* end, bool allowautoseek)
+
-
 
+
-
 
+
-
=GetSetMediaItemTakeInfo_String()=
+
-
P_NAME : char * to take name
+
-
 
+
-
bool GetSetMediaItemTakeInfo_String(MediaItem_Take* tk, const char* parmname, char* string, bool setnewvalue)
+
-
 
+
-
 
+
-
=GetSetMediaTrackInfo_String()=
+
-
Get or set track string attributes.
+
-
P_NAME : char * : track name (on master returns NULL)
+
-
 
+
-
 
+
-
bool GetSetMediaTrackInfo_String(MediaTrack* tr, const char* parmname, char* string, bool setnewvalue)
+
-
 
+
-
 
+
-
=GetSetObjectState()=
+
-
get or set the state of a {track,item,envelope} as an xml/rpp chunk,str=0 to get the chunk string returned (must call FreeHeapPtr when done),str!=0 to set the state (returns zero)
+
-
 
+
-
char* GetSetObjectState(void* obj, char* str)
+
-
 
+
-
 
+
-
=GetSetRepeat()=
+
-
=GetSetRepeatEx()=
+
-
-1 == query,0=clear,1=set,>1=toggle . returns new value
+
-
 
+
-
int GetSetRepeat(int val)
+
-
int GetSetRepeatEx(void* proj, int val)
+
-
 
+
-
 
+
-
=GetTake()=
+
-
get a take from an item by take count (zero-based)
+
-
 
+
-
MediaItem_Take* GetTake(MediaItem* item, int takeidx)
+
-
 
+
-
 
+
-
=GetTooltipWindow()=
+
-
gets a tooltip window,in case you want to ask it for font information. Can return NULL.
+
-
 
+
-
HWND GetTooltipWindow()
+
-
 
+
-
 
+
-
=GetTrack()=
+
-
get a track from a project by track count (zero-based) (proj=0 for active project)
+
-
 
+
-
MediaTrack* GetTrack(ReaProject* proj, int trackidx)
+
-
 
+
-
 
+
-
=GetTrackAutomationMode()=
+
-
int GetTrackAutomationMode(MediaTrack* tr)
+
-
 
+
-
 
+
-
=GetTrackGUID()=
+
-
GUID* GetTrackGUID(MediaTrack* tr)
+
-
 
+
-
 
+
-
=GetTrackInfo()=
+
-
gets track info (returns name).
+
-
track index, -1=master, 0..n, or cast a MediaTrack* to int
+
-
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
+
-
 
+
-
const char* GetTrackInfo(INT_PTR track, int* flags)
+
-
 
+
-
 
+
-
=GetTrackMediaItem()=
+
-
MediaItem* GetTrackMediaItem(MediaTrack* tr, int itemidx)
+
-
 
+
-
 
+
-
=GetTrackMIDINoteName()=
+
-
const char* GetTrackMIDINoteName(int track, int note, int chan)
+
-
 
+
-
 
+
-
=GetTrackMIDINoteNameEx()=
+
-
const char* GetTrackMIDINoteNameEx(void* proj, void* track, int note, int chan)
+
-
 
+
-
 
+
-
=GetTrackNumMediaItems()=
+
-
int GetTrackNumMediaItems(MediaTrack* tr)
+
-
 
+
-
 
+
-
=GetTrackUIVolPan()=
+
-
bool GetTrackUIVolPan(MediaTrack* tr, double* vol, double* pan)
+
-
 
+
-
=GetTrackState()=
+
-
 
+
-
Gets track state, returns track name, flags will be set to:<br/>
+
-
&1=folder<br/>
+
-
&2=selected<br/>
+
-
&4=has fx enabled<br/>
+
-
&8=muted<br/>
+
-
&16=soloed<br/>
+
-
&32=SIP'd (with &16)<br/>
+
-
&64=rec armed<br/>
+
-
<br/>
+
-
const char* GetTrackState(MediaTrack* track, int* flags)
+
-
 
+
-
=GetUserInputs()=
+
-
Get values from the user.
+
-
Values are returned as a comma-separated string. Returns false if the user canceled the dialog.
+
-
 
+
-
bool GetUserInputs(const char* title, int num_inputs, const char* captions_csv, char* retvals_csv, int max_retval_len)
+
-
 
+
-
 
+
-
=GSC_mainwnd()=
+
-
this is just like win32 GetSysColor() but can have overrides.
+
-
 
+
-
int GSC_mainwnd(int t)
+
-
 
+
-
 
+
-
=guidToString()=
+
-
dest should be at least 64 chars long to be safe
+
-
 
+
-
void guidToString(GUID* g, char* dest)
+
-
 
+
-
 
+
-
=HasTrackMIDIPrograms()=
+
-
=HasTrackMIDIProgramsEx()=
+
-
returns name of track plugin that is supplying MIDI programs,or NULL if there is none
+
-
 
+
-
const char* HasTrackMIDIPrograms(int track)
+
-
const char* HasTrackMIDIProgramsEx(void* proj, void* track)
+
-
 
+
-
 
+
-
=HiresPeaksFromSource()=
+
-
void HiresPeaksFromSource(PCM_source* src, PCM_source_peaktransfer_t* block)
+
-
 
+
-
 
+
-
=InsertMedia()=
+
-
int InsertMedia(char* file, int mode)
+
-
 
+
-
 
+
-
=InsertTrackAtIndex()=
+
-
inserts a track at idx,of course this will be clamped to 0..GetNumTracks(). wantDefaults=TRUE for default envelopes/FX,otherwise no enabled fx/env
+
-
 
+
-
void InsertTrackAtIndex(int idx, bool wantDefaults)
+
-
 
+
-
 
+
-
=IsInRealTimeAudio()=
+
-
are we in a realtime audio thread (between OnAudioBuffer calls,not in some worker/anticipative FX thread)? threadsafe
+
-
 
+
-
int IsInRealTimeAudio()
+
-
 
+
-
 
+
-
=IsMediaExtension()=
+
-
bool IsMediaExtension(const char* ext, bool wantOthers)
+
-
 
+
-
 
+
-
can be called from anywhere (threadsafe)
+
-
 
+
-
=kbd_OnMidiEvent()=
+
-
void kbd_OnMidiEvent(MIDI_event_t* evt, int dev_index)
+
-
 
+
-
 
+
-
=kbd_OnMidiList()=
+
-
can be called from anywhere (threadsafe)
+
-
 
+
-
void kbd_OnMidiList(MIDI_eventlist* list, int dev_index)
+
-
 
+
-
 
+
-
=LICE_ClipLine()=
+
-
Returns false if the line is entirely offscreen.
+
-
 
+
-
bool LICE_ClipLine(int* pX1, int* pY1, int* pX2, int* pY2, int xLo, int yLo, int xHi, int yHi)
+
-
 
+
-
 
+
-
=Main_OnCommand()=
+
-
=Main_OnCommandEx()=
+
-
 
+
-
void Main_OnCommand(int command, int flag)
+
-
void Main_OnCommandEx(int command, int flag, void* proj)
+
-
 
+
-
 
+
-
=Main_openProject()=
+
-
opens a project. will prompt the user to save, etc.
+
-
if you pass a .RTrackTemplate file then it adds that to the project instead.
+
-
 
+
-
void Main_openProject(char* name)
+
-
 
+
-
 
+
-
=Main_UpdateLoopInfo()=
+
-
void Main_UpdateLoopInfo(int ignoremask)
+
-
 
+
-
 
+
-
=Master_GetPlayRateAtTime()=
+
-
double Master_GetPlayRateAtTime(double time_s, void* __proj)
+
-
 
+
-
 
+
-
=MB()=
+
-
type
+
-
0=OK,2=OKCANCEL,
+
-
2=ABORTRETRYIGNORE,
+
-
3=YESNOCANCEL,
+
-
4=YESNO,
+
-
5=RETRYCANCEL
+
-
ret
+
-
1=OK,
+
-
2=CANCEL,
+
-
3=ABORT,
+
-
4=RETRY,
+
-
5=IGNORE,
+
-
6=YES,
+
-
7=NO
+
-
 
+
-
int MB(const char* msg, const char* title, int type)
+
-
 
+
-
 
+
-
=mkpanstr()=
+
-
void mkpanstr(char* str, double pan)
+
-
 
+
-
 
+
-
=mkvolpanstr()=
+
-
void mkvolpanstr(char* str, double vol, double pan)
+
-
 
+
-
 
+
-
=mkvolstr()=
+
-
void mkvolstr(char* str, double vol)
+
-
 
+
-
 
+
-
=MoveEditCursor()=
+
-
void MoveEditCursor(double adjamt, bool dosel)
+
-
 
+
-
 
+
-
=MoveMediaItemToTrack()=
+
-
returns TRUE if move succeeded
+
-
 
+
-
bool MoveMediaItemToTrack(MediaItem* item, MediaTrack* desttr)
+
-
 
+
-
 
+
-
=MuteAllTracks(bool mute)=
+
-
void MuteAllTracks(bool mute)
+
-
 
+
-
 
+
-
=OnPauseButton()=
+
-
direct way to simulate pause button hit
+
-
 
+
-
void OnPauseButton()
+
-
 
+
-
 
+
-
=OnPauseButtonEx()=
+
-
direct way to simulate pause button hit
+
-
 
+
-
void OnPauseButtonEx(void* proj)
+
-
 
+
-
 
+
-
=OnPlayButton()=
+
-
=OnPlayButtonEx()=
+
-
direct way to simulate play button hit
+
-
 
+
-
void OnPlayButton()
+
-
void OnPlayButtonEx(void* proj)
+
-
 
+
-
=OnStopButton()=
+
-
=OnStopButtonEx()=
+
-
direct way to simulate stop button hit
+
-
 
+
-
void OnStopButton()
+
-
void OnStopButtonEx(void* proj)
+
-
 
+
-
 
+
-
=parse_timestr()=
+
-
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
+
-
 
+
-
double parse_timestr(const char* buf)
+
-
 
+
-
 
+
-
=parse_timestr_len()=
+
-
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
+
-
 
+
-
double parse_timestr_len(const char* buf, double offset, int modeoverride)
+
-
 
+
-
 
+
-
=parse_timestr_pos()=
+
-
parses time string,modeoverride see above
+
-
 
+
-
double parse_timestr_pos(const char* buf, int modeoverride)
+
-
 
+
-
 
+
-
=parsepanstr()=
+
-
double parsepanstr(char* str)
+
-
 
+
-
 
+
-
=PCM_Sink_Create()=
+
-
PCM_sink* PCM_Sink_Create(const char* filename, const char* cfg, int cfgl, int nch, int srate, bool buildpeaks)
+
-
 
+
-
 
+
-
=PCM_Sink_CreateEx()=
+
-
PCM_sink* PCM_Sink_CreateEx(void* proj, const char* filename, const char* cfg, int cfgl, int nch, int srate, bool buildpeaks)
+
-
 
+
-
 
+
-
=PCM_Sink_CreateMIDIFile()=
+
-
=PCM_Sink_CreateMIDIFileEx()=
+
-
 
+
-
PCM_sink* PCM_Sink_CreateMIDIFile(const char* filename, const char* cfg, int cfgl, double bpm, int div)
+
-
PCM_sink* PCM_Sink_CreateMIDIFileEx(void* proj, const char* filename, const char* cfg, int cfgl, double bpm, int div)
+
-
 
+
-
 
+
-
=PCM_Sink_Enum()=
+
-
unsigned int PCM_Sink_Enum(int id, char** descstr)
+
-
 
+
-
=PCM_Sink_GetExtension()=
+
-
const char* PCM_Sink_GetExtension(const void* data, int data_size)
+
-
 
+
-
=PCM_Sink_ShowConfig()=
+
-
HWND PCM_Sink_ShowConfig(const void* cfg, int cfg_l, HWND hwndParent)
+
-
 
+
-
=PCM_Source_CreateFromFile()=
+
-
PCM_source* PCM_Source_CreateFromFile(const char* filename)
+
-
 
+
-
=PCM_Source_CreateFromFileEx()=
+
-
PCM_source* PCM_Source_CreateFromFileEx(const char* filename, bool forcenoMidiImp)
+
-
 
+
-
=PCM_Source_CreateFromSimple()=
+
-
Creates a PCM_source from a ISimpleMediaDecoder
+
-
(if fn is non-null, it will open the file in dec)
+
-
 
+
-
PCM_source* PCM_Source_CreateFromSimple(ISimpleMediaDecoder* dec, const char* fn)
+
-
 
+
-
=PCM_Source_CreateFromType()=
+
-
PCM_source* PCM_Source_CreateFromType(const char* sourcetype)
+
-
 
+
-
=PeakBuild_Create()=
+
-
REAPER_PeakBuild_Interface* PeakBuild_Create(PCM_source* src, const char* fn, int srate, int nch)
+
-
 
+
-
=PeakGet_Create()=
+
-
REAPER_PeakGet_Interface* PeakGet_Create(const char* fn, int srate, int nch)
+
-
 
+
-
=PlayPreview()=
+
-
return nonzero on success
+
-
 
+
-
int PlayPreview(preview_register_t* preview)
+
-
 
+
-
=PlayTrackPreview()=
+
-
int PlayTrackPreview(preview_register_t* preview)
+
-
return nonzero on success,in these,m_out_chan is a track index (0-n)
+
-
 
+
-
=PlayTrackPreview2()=
+
-
int PlayTrackPreview2(void* proj, preview_register_t* preview)
+
-
return nonzero on success,in these,m_out_chan is a track index (0-n)
+
-
 
+
-
=plugin_getFilterList()=
+
-
char* plugin_getFilterList()
+
-
 
+
-
 
+
-
=plugin_getImportableProjectFilterList()=
+
-
char* plugin_getImportableProjectFilterList()
+
-
 
+
-
 
+
-
=PluginWantsAlwaysRunFx()=
+
-
void PluginWantsAlwaysRunFx(int amt)
+
-
 
+
-
=projectconfig_var_addr()=
+
-
void* projectconfig_var_addr(ReaProject* proj, int idx)
+
-
 
+
-
=projectconfig_var_getoffs()=
+
-
int projectconfig_var_getoffs(const char* name, int* szout)
+
-
makes filename relative to the current project, if any
+
-
 
+
-
=ReaperGetPitchShiftAPI()=
+
-
version must be REAPER_PITCHSHIFT_API_VER
+
-
IReaperPitchShift* ReaperGetPitchShiftAPI(int version)
+
-
 
+
-
=relative_fn()=
+
-
void relative_fn(const char* in, char* out, int outlen)
+
-
 
+
-
=Resample_EnumModes()=
+
-
const char* Resample_EnumModes(int mode)
+
-
 
+
-
 
+
-
=Resampler_Create()=
+
-
REAPER_Resample_Interface* Resampler_Create()
+
-
 
+
-
=resolve_fn()=
+
-
void resolve_fn(const char* in, char* out, int outlen)
+
-
 
+
-
=screenset_register()=
+
-
void screenset_register(char* id, screensetCallbackFunc callbackFunc, void* param)
+
-
 
+
-
=screenset_unregister()=
+
-
void screenset_unregister(char* id)
+
-
 
+
-
=screenset_unregisterByParam()=
+
-
void screenset_unregisterByParam(void* param)
+
-
 
+
-
=SelectProjectInstance()=
+
-
void SelectProjectInstance(ReaProject* proj)
+
-
 
+
-
=SetAutomationMode()=
+
-
void SetAutomationMode(int mode, bool onlySel)
+
-
sets all or selected tracks to mode.
+
-
 
+
-
=SetEditCurPos()=
+
-
void SetEditCurPos(double time, bool moveview, bool seekplay)
+
-
 
+
-
=SetEditCurPos2()=
+
-
void SetEditCurPos2(void* proj, double time, bool moveview, bool seekplay)
+
-
 
+
-
=SetMediaItemInfo_Value()=
+
-
Set media item numerical-value attributes.
+
-
*B_MUTE : bool * to muted state
+
-
*B_LOOPSRC : bool * to loop source
+
-
*B_ALLTAKESPLAY : bool * to all takes play
+
-
*B_UISEL : bool * to ui selected
+
-
*C_BEATATTACHMODE : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsosonly
+
-
*C_LOCK : char * to one char of lock flags (&1 is locked, currently)
+
-
*D_VOL : double * of item volume (volume bar)
+
-
*D_POSITION : double * of item position (seconds)
+
-
*D_LENGTH : double * of item length (seconds)
+
-
*D_SNAPOFFSET : double * of item snap offset (seconds)
+
-
*D_FADEINLEN : double * of item fade in length (manual, seconds)
+
-
*D_FADEOUTLEN : double * of item fade out length (manual, seconds)
+
-
*D_FADEINLEN_AUTO : double * of item autofade in length (seconds, -1 for no autofade set)
+
-
*D_FADEOUTLEN_AUTO : double * of item autofade out length (seconds, -1 for no autofade set)
+
-
*I_FADEINSHAPE : int * to fadein shape, 0=linear, ...
+
-
*I_FADEOUTSHAPE : int * to fadeout shape
+
-
*I_GROUPID : int * to group ID (0 = no group)
+
-
*I_LASTY : int * to last y position in track (readonly)
+
-
*I_LASTH : int * to last height in track (readonly)
+
-
*I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
+
-
*I_CURTAKE : int * to active take
+
-
*F_FREEMODE_Y : float * to free mode y position (0..1)
+
-
*F_FREEMODE_H : float * to free mode height (0..1)
+
-
 
+
-
bool SetMediaItemInfo_Value(MediaItem* item, const char* parmname, double newvalue)
+
-
 
+
-
=SetMediaItemTakeInfo_Value()=
+
-
Set media item take numerical-value attributes.
+
-
*D_STARTOFFS : double *, start offset in take of item
+
-
*D_VOL : double *, take volume
+
-
*D_PAN : double *, take pan
+
-
*D_PANLAW : double *, take pan law (-1.0=default, 0.5=-6dB, 1.0=+0dB, etc)
+
-
*D_PLAYRATE : double *, take play rate (1.0=normal, 2.0=doublespeed, etc)
+
-
*D_PITCH : double *, take pitch adjust (in semitones, 0.0=normal, +12 = one octave up, etc)
+
-
*B_PPITCH, bool *, preserve pitch when changing rate
+
-
*I_CHANMODE, int *, channel mode (0=normal, 1=revstereo, 2=downmix, 3=l, 4=r)
+
-
*I_PITCHMODE, int *, pitch shifter mode, -1=proj default, otherwise high word=shifter low word = parameter
+
-
 
+
-
bool SetMediaItemTakeInfo_Value(MediaItem_Take* take, const char* parmname, double newvalue)
+
-
 
+
-
=SetMediaTrackInfo_Value()=
+
-
Set track numerical-value attributes.
+
-
*B_MUTE : bool * : mute flag
+
-
*B_PHASE : bool * : invert track phase
+
-
*IP_TRACKNUMBER : int : track number (returns zero if not found, -1 for master track) (read-only, returns the int directly)
+
-
*I_SOLO : int * : 0=not soloed, 1=solo, 2=soloed in place
+
-
*I_FXEN : int * : 0=fx bypassed, nonzero = fx active
+
-
*I_RECARM : int * : 0=not record armed, 1=record armed
+
-
*I_RECINPUT : int * : record input. 0..n = mono hardware input, 512+n = rearoute input, 1024 set for stereo input pair. 4096 set for MIDI input, if set, then low 5 bits represent channel (0=all, 1-16=only chan), then next 5 bits represent physical input (31=all, 30=VKB)
+
-
*I_RECMODE : int * : record mode (0=input, 1=stereo out, 2=none, 3=stereo out w/latcomp, 4=midi output, 5=mono out, 6=mono out w/ lat comp, 7=midi overdub, 8=midi replace
+
-
*I_RECMON : int * : record monitor (0=off, 1=normal, 2=not when playing (tapestyle))
+
-
*I_RECMONITEMS : int * : monitor items while recording (0=off, 1=on)
+
-
*I_AUTOMODE : int * : track automation mode (0=trim/off, 1=read, 2=touch, 3=write, 4=latch
+
-
*I_NCHAN : int * : number of track channels, must be 2-64, even
+
-
*I_SELECTED : int * : track selected? 0 or 1
+
-
*I_WNDH : int * : current TCP window height (Read-only)
+
-
*I_ISFOLDER : int * : folder status (1=folder, 0=normal, 2=last track in folder)
+
-
*I_FOLDERCOMPACT : int * : folder compacting (only valid on folders), 0=normal, 1=small, 2=tiny children
+
-
*I_MIDIHWOUT : int * : track midi hardware output index (<0 for disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31))
+
-
*I_PERFFLAGS : int * : track perf flags (&1=no media buffering, &2=no anticipative FX)
+
-
*I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
+
-
*I_HEIGHTOVERRIDE : int * : custom height override for TCP window. 0 for none, otherwise size in pixels
+
-
*D_VOL : double * : trim volume of track (0 (-inf)..1 (+0dB) .. 2 (+6dB) etc ..)
+
-
*D_PAN : double * : trim pan of track (-1..1)
+
-
*D_PANLAW : double * : pan law of track. <0 for project default, 1.0 for +0dB, etc
+
-
*B_SHOWINMIXER : bool * : show track panel in mixer -- do not use on master
+
-
*B_SHOWINTCP : bool * : show track panel in tcp -- do not use on master
+
-
*B_MAINSEND : bool * : track sends audio to parent
+
-
*B_FREEMODE : bool * : track free-mode enabled (requires UpdateTimeline() after changing etc)
+
-
*C_BEATATTACHMODE : char * : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsposonly
+
-
*F_MCP_FXSEND_SCALE : float * : scale of fx+send area in MCP (0.0=smallest allowed, 1=max allowed)
+
-
*F_MCP_SENDRGN_SCALE : float * : scale of send area as proportion of the fx+send total area (0=min allow, 1=max)
+
-
 
+
-
bool SetMediaTrackInfo_Value(MediaTrack* tr, const char* parmname, double newvalue)
+
-
 
+
-
 
+
-
=SetProjectMarker()=
+
-
bool SetProjectMarker(int markrgnindexnumber, bool isrgn, double pos, double rgnend, const char* name)
+
-
 
+
-
 
+
-
=SetProjectMarker2()=
+
-
bool SetProjectMarker2(void* proj, int markrgnindexnumber, bool isrgn, double pos, double rgnend, const char* name)
+
-
 
+
-
 
+
-
=SetTrackAutomationMode()=
+
-
void SetTrackAutomationMode(MediaTrack* tr, int mode)
+
-
 
+
-
 
+
-
=SetTrackMIDINoteName()=
+
-
const char* SetTrackMIDINoteName(int track, int note, int chan, const char* name)
+
-
 
+
-
 
+
-
=SetTrackMIDINoteNameEx()=
+
-
const char* SetTrackMIDINoteNameEx(void* proj, void* track, int note, int chan, const char* name)
+
-
 
+
-
 
+
-
=SetTrackSelected()=
+
-
void SetTrackSelected(MediaTrack* tr, bool sel)
+
-
 
+
-
 
+
-
=ShowActionList()=
+
-
void ShowActionList(KbdSectionInfo* caller, HWND callerWnd)
+
-
 
+
-
 
+
-
=ShowConsoleMsg()=
+
-
Show a message to the user (also useful for debugging). Send "" to clear the console window.
+
-
void ShowConsoleMsg(const char* msg)
+
-
 
+
-
 
+
-
=ShowMessageBox()=
+
-
int ShowMessageBox(const char* msg, const char* title, int type)
+
-
type 0=OK,2=OKCANCEL,2=ABORTRETRYIGNORE,3=YESNOCANCEL,4=YESNO,5=RETRYCANCEL : ret 1=OK,2=CANCEL,3=ABORT,4=RETRY,5=IGNORE,6=YES,7=NO
+
-
 
+
-
 
+
-
=SoloAllTracks()=
+
-
void SoloAllTracks(int solo)
+
-
double SLIDER2DB(double y)
+
-
solo=2 for SIP
+
-
 
+
-
 
+
-
=SplitMediaItem()=
+
-
MediaItem* SplitMediaItem(MediaItem* item, double position)
+
-
the original item becomes the left-hand split, the function returns the right-hand split (or NULL if the split failed)
+
-
 
+
-
 
+
-
=StopPreview()=
+
-
int StopPreview(preview_register_t* preview)
+
-
return nonzero on success
+
-
 
+
-
 
+
-
=StopTrackPreview()=
+
-
return nonzero on success
+
-
int StopTrackPreview(preview_register_t* preview)
+
-
 
+
-
 
+
-
=StopTrackPreview2()=
+
-
return nonzero on success
+
-
int StopTrackPreview2(void* proj, preview_register_t* preview)
+
-
 
+
-
 
+
-
=stringToGuid()=
+
-
void stringToGuid(const char* str, GUID* g)
+
-
 
+
-
 
+
-
=TimeMap2_beatsToTime()=
+
-
convert a beat position (or optionally a beats+measures if measures is non-NULL) to time.
+
-
double TimeMap2_beatsToTime(ReaProject* proj, double tpos, int* measures)
+
-
 
+
-
 
+
-
=TimeMap2_GetDividedBpmAtTime()=
+
-
get the effective BPM at the time (seconds) position (i.e. 2x in /8 signatures)
+
-
double TimeMap2_GetDividedBpmAtTime(ReaProject* proj, double time)
+
-
 
+
-
 
+
-
=TimeMap2_GetNextChangeTime()=
+
-
when does the next time map (tempo or time sig) change occur
+
-
double TimeMap2_GetNextChangeTime(ReaProject* proj, double time)
+
-
 
+
-
 
+
-
=TimeMap2_QNToTime()=
+
-
converts project QN position to time.
+
-
double TimeMap2_QNToTime(ReaProject* proj, double qn)
+
-
 
+
-
 
+
-
=TimeMap2_timeToBeats()=
+
-
convert a time into beats.
+
-
if measures is non-NULL, measures will be set to the measure count, return value will be beats since measure.
+
-
if cml is non-NULL, will be set to current measure length in beats (i.e. time signature numerator)
+
-
if fullbeats is non-NULL, and measures is non-NULL, fullbeats will get the full beat count (same value returned if measures is NULL).
+
-
if cdenom is non-NULL, will be set to the current time signature denominator.
+
-
 
+
-
double TimeMap2_timeToBeats(ReaProject* proj, double tpos, int* measures, int* cml, double* fullbeats, int* cdenom)
+
-
 
+
-
 
+
-
=TimeMap2_timeToQN()=
+
-
converts project time position to QN position.
+
-
double TimeMap2_timeToQN(ReaProject* proj, double tpos)
+
-
 
+
-
 
+
-
=TimeMap_GetDividedBpmAtTime()=
+
-
get the effective BPM at the time (seconds) position (i.e. 2x in /8 signatures)
+
-
double TimeMap_GetDividedBpmAtTime(double time)
+
-
 
+
-
 
+
-
=TimeMap_QNToTime()=
+
-
converts project QN position to time.
+
-
double TimeMap_QNToTime(double qn)
+
-
 
+
-
 
+
-
=TimeMap_timeToQN()=
+
-
converts project QN position to time.
+
-
double TimeMap_timeToQN(double qn)
+
-
 
+
-
 
+
-
=Track_GetPeakInfo()=
+
-
double Track_GetPeakInfo(MediaTrack* tr, int chidx)
+
-
 
+
-
 
+
-
=TrackFX_FormatParamValue()=
+
-
bool TrackFX_FormatParamValue(MediaTrack* tr, int fx, int param, double val, char* buf, int buflen)
+
-
 
+
-
 
+
-
=TrackFX_GetCount()=
+
-
int TrackFX_GetCount(MediaTrack* tr)
+
-
 
+
-
 
+
-
=TrackFX_GetFXName()=
+
-
bool TrackFX_GetFXName(MediaTrack* tr, int fx, char* buf, int buflen)
+
-
 
+
-
 
+
-
=TrackFX_GetNumParams()=
+
-
int TrackFX_GetNumParams(MediaTrack* tr, int fx)
+
-
 
+
-
 
+
-
=TrackFX_GetParam()=
+
-
double TrackFX_GetParam(MediaTrack* tr, int fx, int param, double* minval, double* maxval)
+
-
 
+
-
 
+
-
=TrackFX_GetParamName()=
+
-
bool TrackFX_GetParamName(MediaTrack* tr, int fx, int param, char* buf, int buflen)
+
-
 
+
-
 
+
-
=TrackFX_SetParam()=
+
-
bool TrackFX_SetParam(MediaTrack* tr, int fx, int param, double val)
+
-
 
+
-
 
+
-
=TrackList_AdjustWindows(bool isMajor)=
+
-
void TrackList_AdjustWindows(bool isMajor)
+
-
 
+
-
 
+
-
=TrackList_UpdateAllExternalSurfaces()=
+
-
void TrackList_UpdateAllExternalSurfaces()
+
-
 
+
-
 
+
-
=Undo_BeginBlock()=
+
-
call to start a new block
+
-
void Undo_BeginBlock()
+
-
 
+
-
 
+
-
=Undo_BeginBlock2()=
+
-
call to start a new block
+
-
void Undo_BeginBlock2(void* proj)
+
-
 
+
-
 
+
-
=Undo_CanRedo2()=
+
-
returns string of next action,if able,NULL if not
+
-
const char* Undo_CanRedo2(void* proj)
+
-
 
+
-
 
+
-
=Undo_CanUndo2()=
+
-
returns string of last action,if able,NULL if not
+
-
const char* Undo_CanUndo2(void* proj)
+
-
 
+
-
 
+
-
=Undo_DoRedo2()=
+
-
nonzero if success
+
-
int Undo_DoRedo2(void* proj)
+
-
 
+
-
 
+
-
=Undo_DoUndo2()=
+
-
nonzero if success
+
-
int Undo_DoUndo2(void* proj)
+
-
 
+
-
 
+
-
=Undo_EndBlock()=
+
-
call to end the block,with extra flags if any,and a description
+
-
void Undo_EndBlock(const char* descchange, int extraflags)
+
-
 
+
-
 
+
-
=Undo_EndBlock2()=
+
-
call to end the block,with extra flags if any,and a description
+
-
void Undo_EndBlock2(void* proj, const char* descchange, int extraflags)
+
-
 
+
-
 
+
-
=Undo_OnStateChange()=
+
-
limited state change to items
+
-
void Undo_OnStateChange(const char* descchange)
+
-
 
+
-
 
+
-
=Undo_OnStateChange2()=
+
-
limited state change to items
+
-
void Undo_OnStateChange2(void* proj, const char* descchange)
+
-
 
+
-
 
+
-
=Undo_OnStateChange_Item()=
+
-
void Undo_OnStateChange_Item(ReaProject* proj, const char* name, MediaItem* item)
+
-
 
+
-
=Undo_OnStateChangeEx()=
+
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.
-
trackparm=-1 by default,or if updating one fx chain,you can specify track index
+
-
void Undo_OnStateChangeEx(const char* descchange, int whichStates, int trackparm)
+
 +
=Who is Allowed to Add to and Edit this Documentation?=
 +
You.
-
=Undo_OnStateChangeEx2()=
+
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.
-
trackparm=-1 by default,or if updating one fx chain,you can specify track index
+
-
void Undo_OnStateChangeEx2(void* proj, const char* descchange, int whichStates, int trackparm)
+
 +
''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. If you're not sure either but you have different ideas to the author - then use the "discussion" tab at the top of each page and start a conversation with the author or authors of that page.''
-
=UpdateItemInProject()=
+
''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.''
-
void UpdateItemInProject(MediaItem* item)
+
 +
''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)''
-
=UpdateTimeline()=
+
=The ReaScript API Functions=
-
void UpdateTimeline()
+
 +
==ReaScript directives==
 +
{|class="wikitable"
 +
! Directive!!Description
 +
|-
 +
| [[RPR_include|include]]||Include another file in a script; it works in the same way as the #include directive in the C programming language.
 +
|}
-
=ValidatePtr()=
+
==Functions==
-
returns true if the pointer is a valid object of the right type
+
Generated from REAPER v3.21 by [[mkReaScriptAPITable.pl]]
-
bool ValidatePtr(void* pointer, const char* typename)
+
 +
{|class="wikitable"
 +
| [[RPR_AddMediaItemToTrack|AddMediaItemToTrack]]
 +
| [[RPR_format_timestr|format_timestr]]
 +
| [[RPR_GetTrackEnvelopeByName|GetTrackEnvelopeByName]]
 +
| [[RPR_plugin_getImportableProjectFilterList|plugin_getImportableProjectFilterList]]
 +
|-
 +
| [[RPR_AddProjectMarker|AddProjectMarker]]
 +
| [[RPR_format_timestr_len|format_timestr_len]]
 +
| [[RPR_GetTrackGUID|GetTrackGUID]]
 +
| [[RPR_PluginWantsAlwaysRunFx|PluginWantsAlwaysRunFx]]
 +
|-
 +
| [[RPR_AddTakeToMediaItem|AddTakeToMediaItem]]
 +
| [[RPR_format_timestr_pos|format_timestr_pos]]
 +
| [[RPR_GetTrackMediaItem|GetTrackMediaItem]]
 +
| [[RPR_projectconfig_var_addr|projectconfig_var_addr]]
 +
|-
 +
| [[RPR_adjustZoom|adjustZoom]]
 +
| [[RPR_get_config_var|get_config_var]]
 +
| [[RPR_GetTrackMIDINoteName|GetTrackMIDINoteName]]
 +
| [[RPR_projectconfig_var_getoffs|projectconfig_var_getoffs]]
 +
|-
 +
| [[RPR_APITest|APITest]]
 +
| [[RPR_get_ini_file|get_ini_file]]
 +
| [[RPR_GetTrackMIDINoteNameEx|GetTrackMIDINoteNameEx]]
 +
| [[RPR_ReaperGetPitchShiftAPI|ReaperGetPitchShiftAPI]]
 +
|-
 +
| [[RPR_Audio_IsPreBuffer|Audio_IsPreBuffer]]
 +
| [[RPR_GetActiveTake|GetActiveTake]]
 +
| [[RPR_GetTrackNumMediaItems|GetTrackNumMediaItems]]
 +
| [[RPR_relative_fn|relative_fn]]
 +
|-
 +
| [[RPR_Audio_IsRunning|Audio_IsRunning]]
 +
| [[RPR_GetColorThemeStruct|GetColorThemeStruct]]
 +
| [[RPR_GetTrackState|GetTrackState]]
 +
| [[RPR_Resample_EnumModes|Resample_EnumModes]]
 +
|-
 +
| [[RPR_Audio_RegHardwareHook|Audio_RegHardwareHook]]
 +
| [[RPR_GetCursorPosition|GetCursorPosition]]
 +
| [[RPR_GetTrackUIVolPan|GetTrackUIVolPan]]
 +
| [[RPR_Resampler_Create|Resampler_Create]]
 +
|-
 +
| [[RPR_BypassFxAllTracks|BypassFxAllTracks]]
 +
| [[RPR_GetCursorPositionEx|GetCursorPositionEx]]
 +
| [[RPR_GetUserFileNameForRead|GetUserFileNameForRead]]
 +
| [[RPR_resolve_fn|resolve_fn]]
 +
|-
 +
| [[RPR_CalculatePeaks|CalculatePeaks]]
 +
| [[RPR_GetEnvelopeName|GetEnvelopeName]]
 +
| [[RPR_GetUserInputs|GetUserInputs]]
 +
| [[RPR_screenset_register|screenset_register]]
 +
|-
 +
| [[RPR_ClearAllRecArmed|ClearAllRecArmed]]
 +
| [[RPR_GetExePath|GetExePath]]
 +
| [[RPR_GSC_mainwnd|GSC_mainwnd]]
 +
| [[RPR_screenset_unregister|screenset_unregister]]
 +
|-
 +
| [[RPR_ClearPeakCache|ClearPeakCache]]
 +
| [[RPR_GetHZoomLevel|GetHZoomLevel]]
 +
| [[RPR_guidToString|guidToString]]
 +
| [[RPR_screenset_unregisterByParam|screenset_unregisterByParam]]
 +
|-
 +
| [[RPR_CountMediaItems|CountMediaItems]]
 +
| [[RPR_GetIconThemePointer|GetIconThemePointer]]
 +
| [[RPR_HasTrackMIDIPrograms|HasTrackMIDIPrograms]]
 +
| [[RPR_SelectProjectInstance|SelectProjectInstance]]
 +
|-
 +
| [[RPR_CountSelectedMediaItems|CountSelectedMediaItems]]
 +
| [[RPR_GetIconThemeStruct|GetIconThemeStruct]]
 +
| [[RPR_HasTrackMIDIProgramsEx|HasTrackMIDIProgramsEx]]
 +
| [[RPR_SetAutomationMode|SetAutomationMode]]
 +
|-
 +
| [[RPR_CountSelectedTracks|CountSelectedTracks]]
 +
| [[RPR_GetInputChannelName|GetInputChannelName]]
 +
| [[RPR_HiresPeaksFromSource|HiresPeaksFromSource]]
 +
| [[RPR_SetEditCurPos|SetEditCurPos]]
 +
|-
 +
| [[RPR_CountTakes|CountTakes]]
 +
| [[RPR_GetItemProjectContext|GetItemProjectContext]]
 +
| [[RPR_InsertMedia|InsertMedia]]
 +
| [[RPR_SetEditCurPos2|SetEditCurPos2]]
 +
|-
 +
| [[RPR_CountTrackEnvelopes|CountTrackEnvelopes]]
 +
| [[RPR_GetLastTouchedTrack|GetLastTouchedTrack]]
 +
| [[RPR_InsertTrackAtIndex|InsertTrackAtIndex]]
 +
| [[RPR_SetMediaItemInfo_Value|SetMediaItemInfo_Value]]
 +
|-
 +
| [[RPR_CountTrackMediaItems|CountTrackMediaItems]]
 +
| [[RPR_GetMainHwnd|GetMainHwnd]]
 +
| [[RPR_IsInRealTimeAudio|IsInRealTimeAudio]]
 +
| [[RPR_SetMediaItemTakeInfo_Value|SetMediaItemTakeInfo_Value]]
 +
|-
 +
| [[RPR_CountTracks|CountTracks]]
 +
| [[RPR_GetMasterMuteSoloFlags|GetMasterMuteSoloFlags]]
 +
| [[RPR_IsMediaExtension|IsMediaExtension]]
 +
| [[RPR_SetMediaTrackInfo_Value|SetMediaTrackInfo_Value]]
 +
|-
 +
| [[RPR_CreateMIDIInput|CreateMIDIInput]]
 +
| [[RPR_GetMaxMidiInputs|GetMaxMidiInputs]]
 +
| [[RPR_kbd_OnMidiEvent|kbd_OnMidiEvent]]
 +
| [[RPR_SetProjectMarker|SetProjectMarker]]
 +
|-
 +
| [[RPR_CreateMIDIOutput|CreateMIDIOutput]]
 +
| [[RPR_GetMaxMidiOutputs|GetMaxMidiOutputs]]
 +
| [[RPR_kbd_OnMidiList|kbd_OnMidiList]]
 +
| [[RPR_SetProjectMarker2|SetProjectMarker2]]
 +
|-
 +
| [[RPR_CSurf_FlushUndo|CSurf_FlushUndo]]
 +
| [[RPR_GetMediaItem|GetMediaItem]]
 +
| [[RPR_LICE_Blit|LICE_Blit]]
 +
| [[RPR_SetTrackAutomationMode|SetTrackAutomationMode]]
 +
|-
 +
| [[RPR_CSurf_GetTouchState|CSurf_GetTouchState]]
 +
| [[RPR_GetMediaItem_Track|GetMediaItem_Track]]
 +
| [[RPR_LICE_ClipLine|LICE_ClipLine]]
 +
| [[RPR_SetTrackMIDINoteName|SetTrackMIDINoteName]]
 +
|-
 +
| [[RPR_CSurf_GoEnd|CSurf_GoEnd]]
 +
| [[RPR_GetMediaItemInfo_Value|GetMediaItemInfo_Value]]
 +
| [[RPR_LICE_Line|LICE_Line]]
 +
| [[RPR_SetTrackMIDINoteNameEx|SetTrackMIDINoteNameEx]]
 +
|-
 +
| [[RPR_CSurf_GoStart|CSurf_GoStart]]
 +
| [[RPR_GetMediaItemNumTakes|GetMediaItemNumTakes]]
 +
| [[RPR_LICE_LineInt|LICE_LineInt]]
 +
| [[RPR_SetTrackSelected|SetTrackSelected]]
 +
|-
 +
| [[RPR_CSurf_NumTracks|CSurf_NumTracks]]
 +
| [[RPR_GetMediaItemTake|GetMediaItemTake]]
 +
| [[RPR_Main_OnCommand|Main_OnCommand]]
 +
| [[RPR_ShowActionList|ShowActionList]]
 +
|-
 +
| [[RPR_CSurf_OnArrow|CSurf_OnArrow]]
 +
| [[RPR_GetMediaItemTake_Item|GetMediaItemTake_Item]]
 +
| [[RPR_Main_OnCommandEx|Main_OnCommandEx]]
 +
| [[RPR_ShowConsoleMsg|ShowConsoleMsg]]
 +
|-
 +
| [[RPR_CSurf_OnFwd|CSurf_OnFwd]]
 +
| [[RPR_GetMediaItemTake_Source|GetMediaItemTake_Source]]
 +
| [[RPR_Main_openProject|Main_openProject]]
 +
| [[RPR_ShowMessageBox|ShowMessageBox]]
 +
|-
 +
| [[RPR_CSurf_OnFXChange|CSurf_OnFXChange]]
 +
| [[RPR_GetMediaItemTake_Track|GetMediaItemTake_Track]]
 +
| [[RPR_Main_UpdateLoopInfo|Main_UpdateLoopInfo]]
 +
| [[RPR_SLIDER2DB|SLIDER2DB]]
 +
|-
 +
| [[RPR_CSurf_OnMuteChange|CSurf_OnMuteChange]]
 +
| [[RPR_GetMediaItemTakeInfo_Value|GetMediaItemTakeInfo_Value]]
 +
| [[RPR_Master_GetPlayRateAtTime|Master_GetPlayRateAtTime]]
 +
| [[RPR_SoloAllTracks|SoloAllTracks]]
 +
|-
 +
| [[RPR_CSurf_OnPanChange|CSurf_OnPanChange]]
 +
| [[RPR_GetMediaTrackInfo_Value|GetMediaTrackInfo_Value]]
 +
| [[RPR_MB|MB]]
 +
| [[RPR_SplitMediaItem|SplitMediaItem]]
 +
|-
 +
| [[RPR_CSurf_OnPanChangeEx|CSurf_OnPanChangeEx]]
 +
| [[RPR_GetMidiInput|GetMidiInput]]
 +
| [[RPR_MIDI_eventlist_Create|MIDI_eventlist_Create]]
 +
| [[RPR_StopPreview|StopPreview]]
 +
|-
 +
| [[RPR_CSurf_OnPlay|CSurf_OnPlay]]
 +
| [[RPR_GetMIDIInputName|GetMIDIInputName]]
 +
| [[RPR_MIDI_eventlist_Destroy|MIDI_eventlist_Destroy]]
 +
| [[RPR_StopTrackPreview|StopTrackPreview]]
 +
|-
 +
| [[RPR_CSurf_OnRecArmChange|CSurf_OnRecArmChange]]
 +
| [[RPR_GetMidiOutput|GetMidiOutput]]
 +
| [[RPR_MIDIEditor_GetActive|MIDIEditor_GetActive]]
 +
| [[RPR_StopTrackPreview2|StopTrackPreview2]]
 +
|-
 +
| [[RPR_CSurf_OnRecord|CSurf_OnRecord]]
 +
| [[RPR_GetMIDIOutputName|GetMIDIOutputName]]
 +
| [[RPR_MIDIEditor_GetMode|MIDIEditor_GetMode]]
 +
| [[RPR_stringToGuid|stringToGuid]]
 +
|-
 +
| [[RPR_CSurf_OnRew|CSurf_OnRew]]
 +
| [[RPR_GetNumMIDIInputs|GetNumMIDIInputs]]
 +
| [[RPR_MIDIEditor_OnCommand|MIDIEditor_OnCommand]]
 +
| [[RPR_TimeMap2_beatsToTime|TimeMap2_beatsToTime]]
 +
|-
 +
| [[RPR_CSurf_OnSelectedChange|CSurf_OnSelectedChange]]
 +
| [[RPR_GetNumMIDIOutputs|GetNumMIDIOutputs]]
 +
| [[RPR_mkpanstr|mkpanstr]]
 +
| [[RPR_TimeMap2_GetDividedBpmAtTime|TimeMap2_GetDividedBpmAtTime]]
 +
|-
 +
| [[RPR_CSurf_OnSoloChange|CSurf_OnSoloChange]]
 +
| [[RPR_GetNumTracks|GetNumTracks]]
 +
| [[RPR_mkvolpanstr|mkvolpanstr]]
 +
| [[RPR_TimeMap2_GetNextChangeTime|TimeMap2_GetNextChangeTime]]
 +
|-
 +
| [[RPR_CSurf_OnStop|CSurf_OnStop]]
 +
| [[RPR_GetOutputChannelName|GetOutputChannelName]]
 +
| [[RPR_mkvolstr|mkvolstr]]
 +
| [[RPR_TimeMap2_QNToTime|TimeMap2_QNToTime]]
 +
|-
 +
| [[RPR_CSurf_OnTrackSelection|CSurf_OnTrackSelection]]
 +
| [[RPR_GetOutputLatency|GetOutputLatency]]
 +
| [[RPR_MoveEditCursor|MoveEditCursor]]
 +
| [[RPR_TimeMap2_timeToBeats|TimeMap2_timeToBeats]]
 +
|-
 +
| [[RPR_CSurf_OnVolumeChange|CSurf_OnVolumeChange]]
 +
| [[RPR_GetPeakFileName|GetPeakFileName]]
 +
| [[RPR_MoveMediaItemToTrack|MoveMediaItemToTrack]]
 +
| [[RPR_TimeMap2_timeToQN|TimeMap2_timeToQN]]
 +
|-
 +
| [[RPR_CSurf_OnVolumeChangeEx|CSurf_OnVolumeChangeEx]]
 +
| [[RPR_GetPeaksBitmap|GetPeaksBitmap]]
 +
| [[RPR_MuteAllTracks|MuteAllTracks]]
 +
| [[RPR_TimeMap_GetDividedBpmAtTime|TimeMap_GetDividedBpmAtTime]]
 +
|-
 +
| [[RPR_CSurf_ResetAllCachedVolPanStates|CSurf_ResetAllCachedVolPanStates]]
 +
| [[RPR_GetPlayPosition|GetPlayPosition]]
 +
| [[RPR_my_getViewport|my_getViewport]]
 +
| [[RPR_TimeMap_QNToTime|TimeMap_QNToTime]]
 +
|-
 +
| [[RPR_CSurf_ScrubAmt|CSurf_ScrubAmt]]
 +
| [[RPR_GetPlayPosition2|GetPlayPosition2]]
 +
| [[RPR_NamedCommandLookup|NamedCommandLookup]]
 +
| [[RPR_TimeMap_timeToQN|TimeMap_timeToQN]]
 +
|-
 +
| [[RPR_CSurf_SetAutoMode|CSurf_SetAutoMode]]
 +
| [[RPR_GetPlayPosition2Ex|GetPlayPosition2Ex]]
 +
| [[RPR_OnPauseButton|OnPauseButton]]
 +
| [[RPR_Track_GetPeakInfo|Track_GetPeakInfo]]
 +
|-
 +
| [[RPR_CSurf_SetPlayState|CSurf_SetPlayState]]
 +
| [[RPR_GetPlayPositionEx|GetPlayPositionEx]]
 +
| [[RPR_OnPauseButtonEx|OnPauseButtonEx]]
 +
| [[RPR_TrackFX_FormatParamValue|TrackFX_FormatParamValue]]
 +
|-
 +
| [[RPR_CSurf_SetRepeatState|CSurf_SetRepeatState]]
 +
| [[RPR_GetPlayState|GetPlayState]]
 +
| [[RPR_OnPlayButton|OnPlayButton]]
 +
| [[RPR_TrackFX_GetCount|TrackFX_GetCount]]
 +
|-
 +
| [[RPR_CSurf_SetSurfaceMute|CSurf_SetSurfaceMute]]
 +
| [[RPR_GetPlayStateEx|GetPlayStateEx]]
 +
| [[RPR_OnPlayButtonEx|OnPlayButtonEx]]
 +
| [[RPR_TrackFX_GetFXName|TrackFX_GetFXName]]
 +
|-
 +
| [[RPR_CSurf_SetSurfacePan|CSurf_SetSurfacePan]]
 +
| [[RPR_GetProjectPath|GetProjectPath]]
 +
| [[RPR_OnStopButton|OnStopButton]]
 +
| [[RPR_TrackFX_GetNumParams|TrackFX_GetNumParams]]
 +
|-
 +
| [[RPR_CSurf_SetSurfaceRecArm|CSurf_SetSurfaceRecArm]]
 +
| [[RPR_GetProjectPathEx|GetProjectPathEx]]
 +
| [[RPR_OnStopButtonEx|OnStopButtonEx]]
 +
| [[RPR_TrackFX_GetParam|TrackFX_GetParam]]
 +
|-
 +
| [[RPR_CSurf_SetSurfaceSelected|CSurf_SetSurfaceSelected]]
 +
| [[RPR_GetProjectTimeSignature|GetProjectTimeSignature]]
 +
| [[RPR_parse_timestr|parse_timestr]]
 +
| [[RPR_TrackFX_GetParamName|TrackFX_GetParamName]]
 +
|-
 +
| [[RPR_CSurf_SetSurfaceSolo|CSurf_SetSurfaceSolo]]
 +
| [[RPR_GetProjectTimeSignature2|GetProjectTimeSignature2]]
 +
| [[RPR_parse_timestr_len|parse_timestr_len]]
 +
| [[RPR_TrackFX_SetParam|TrackFX_SetParam]]
 +
|-
 +
| [[RPR_CSurf_SetSurfaceVolume|CSurf_SetSurfaceVolume]]
 +
| [[RPR_GetSelectedMediaItem|GetSelectedMediaItem]]
 +
| [[RPR_parse_timestr_pos|parse_timestr_pos]]
 +
| [[RPR_TrackList_AdjustWindows|TrackList_AdjustWindows]]
 +
|-
 +
| [[RPR_CSurf_SetTrackListChange|CSurf_SetTrackListChange]]
 +
| [[RPR_GetSelectedTrack|GetSelectedTrack]]
 +
| [[RPR_parsepanstr|parsepanstr]]
 +
| [[RPR_TrackList_UpdateAllExternalSurfaces|TrackList_UpdateAllExternalSurfaces]]
 +
|-
 +
| [[RPR_CSurf_TrackFromID|CSurf_TrackFromID]]
 +
| [[RPR_GetSelectedTrackEnvelope|GetSelectedTrackEnvelope]]
 +
| [[RPR_PCM_Sink_Create|PCM_Sink_Create]]
 +
| [[RPR_Undo_BeginBlock|Undo_BeginBlock]]
 +
|-
 +
| [[RPR_CSurf_TrackToID|CSurf_TrackToID]]
 +
| [[RPR_GetSet_ArrangeView2|GetSet_ArrangeView2]]
 +
| [[RPR_PCM_Sink_CreateEx|PCM_Sink_CreateEx]]
 +
| [[RPR_Undo_BeginBlock2|Undo_BeginBlock2]]
 +
|-
 +
| [[RPR_DB2SLIDER|DB2SLIDER]]
 +
| [[RPR_GetSet_LoopTimeRange|GetSet_LoopTimeRange]]
 +
| [[RPR_PCM_Sink_CreateMIDIFile|PCM_Sink_CreateMIDIFile]]
 +
| [[RPR_Undo_CanRedo2|Undo_CanRedo2]]
 +
|-
 +
| [[RPR_DeleteProjectMarker|DeleteProjectMarker]]
 +
| [[RPR_GetSet_LoopTimeRange2|GetSet_LoopTimeRange2]]
 +
| [[RPR_PCM_Sink_CreateMIDIFileEx|PCM_Sink_CreateMIDIFileEx]]
 +
| [[RPR_Undo_CanUndo2|Undo_CanUndo2]]
 +
|-
 +
| [[RPR_DeleteTrack|DeleteTrack]]
 +
| [[RPR_GetSetEnvelopeState|GetSetEnvelopeState]]
 +
| [[RPR_PCM_Sink_Enum|PCM_Sink_Enum]]
 +
| [[RPR_Undo_DoRedo2|Undo_DoRedo2]]
 +
|-
 +
| [[RPR_DeleteTrackMediaItem|DeleteTrackMediaItem]]
 +
| [[RPR_GetSetItemState|GetSetItemState]]
 +
| [[RPR_PCM_Sink_GetExtension|PCM_Sink_GetExtension]]
 +
| [[RPR_Undo_DoUndo2|Undo_DoUndo2]]
 +
|-
 +
| [[RPR_DockWindowActivate|DockWindowActivate]]
 +
| [[RPR_GetSetMediaItemTakeInfo_String|GetSetMediaItemTakeInfo_String]]
 +
| [[RPR_PCM_Sink_ShowConfig|PCM_Sink_ShowConfig]]
 +
| [[RPR_Undo_EndBlock|Undo_EndBlock]]
 +
|-
 +
| [[RPR_DockWindowAdd|DockWindowAdd]]
 +
| [[RPR_GetSetMediaTrackInfo_String|GetSetMediaTrackInfo_String]]
 +
| [[RPR_PCM_Source_CreateFromFile|PCM_Source_CreateFromFile]]
 +
| [[RPR_Undo_EndBlock2|Undo_EndBlock2]]
 +
|-
 +
| [[RPR_DockWindowRemove|DockWindowRemove]]
 +
| [[RPR_GetSetRepeat|GetSetRepeat]]
 +
| [[RPR_PCM_Source_CreateFromFileEx|PCM_Source_CreateFromFileEx]]
 +
| [[RPR_Undo_OnStateChange|Undo_OnStateChange]]
 +
|-
 +
| [[RPR_EnsureNotCompletelyOffscreen|EnsureNotCompletelyOffscreen]]
 +
| [[RPR_GetSetRepeatEx|GetSetRepeatEx]]
 +
| [[RPR_PCM_Source_CreateFromSimple|PCM_Source_CreateFromSimple]]
 +
| [[RPR_Undo_OnStateChange2|Undo_OnStateChange2]]
 +
|-
 +
| [[RPR_EnumPitchShiftModes|EnumPitchShiftModes]]
 +
| [[RPR_GetSetTrackState|GetSetTrackState]]
 +
| [[RPR_PCM_Source_CreateFromType|PCM_Source_CreateFromType]]
 +
| [[RPR_Undo_OnStateChange_Item|Undo_OnStateChange_Item]]
 +
|-
 +
| [[RPR_EnumPitchShiftSubModes|EnumPitchShiftSubModes]]
 +
| [[RPR_GetTake|GetTake]]
 +
| [[RPR_PeakBuild_Create|PeakBuild_Create]]
 +
| [[RPR_Undo_OnStateChangeEx|Undo_OnStateChangeEx]]
 +
|-
 +
| [[RPR_EnumProjectMarkers|EnumProjectMarkers]]
 +
| [[RPR_GetTakeEnvelopeByName|GetTakeEnvelopeByName]]
 +
| [[RPR_PeakGet_Create|PeakGet_Create]]
 +
| [[RPR_Undo_OnStateChangeEx2|Undo_OnStateChangeEx2]]
 +
|-
 +
| [[RPR_EnumProjectMarkers2|EnumProjectMarkers2]]
 +
| [[RPR_GetTooltipWindow|GetTooltipWindow]]
 +
| [[RPR_PlayPreview|PlayPreview]]
 +
| [[RPR_UpdateItemInProject|UpdateItemInProject]]
 +
|-
 +
| [[RPR_EnumProjects|EnumProjects]]
 +
| [[RPR_GetTrack|GetTrack]]
 +
| [[RPR_PlayTrackPreview|PlayTrackPreview]]
 +
| [[RPR_UpdateTimeline|UpdateTimeline]]
 +
|-
 +
| [[RPR_EnumTrackMIDIProgramNames|EnumTrackMIDIProgramNames]]
 +
| [[RPR_GetTrackAutomationMode|GetTrackAutomationMode]]
 +
| [[RPR_PlayTrackPreview2|PlayTrackPreview2]]
 +
| [[RPR_ValidatePtr|ValidatePtr]]
 +
|-
 +
| [[RPR_EnumTrackMIDIProgramNamesEx|EnumTrackMIDIProgramNamesEx]]
 +
| [[RPR_GetTrackEnvelope|GetTrackEnvelope]]
 +
| [[RPR_plugin_getFilterList|plugin_getFilterList]]
 +
| [[RPR_WDL_VirtualWnd_ScaledBlitBG|WDL_VirtualWnd_ScaledBlitBG]]
 +
|-
 +
|}
-
=WDL_VirtualWnd_ScaledBlitBG()=
+
[[Category:ReaScript]]
-
bool 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)
+
[[Category:API]]

Latest revision as of 21:13, 2 January 2011

Back to main ReaScript page
Back to main REAPER API page

ReaScript API Documentation

This page documents the ReaScript API functions.

ReaScript uses a large part of The API (available in CC++).

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. If you're not sure either but you have different ideas to the author - then use the "discussion" tab at the top of each page and start a conversation with the author or authors of that page.

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

ReaScript directives

DirectiveDescription
includeInclude another file in a script; it works in the same way as the #include directive in the C programming language.

Functions

Generated from REAPER v3.21 by mkReaScriptAPITable.pl

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