ReaScript API
From CockosWiki
(→The ReaScript API Functions) |
|||
(12 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
[[ReaScript|Back to main ReaScript page]]<br> | [[ReaScript|Back to main ReaScript page]]<br> | ||
[[REAPER API|Back to main REAPER API page]] | [[REAPER API|Back to main REAPER API page]] | ||
Line 4: | Line 5: | ||
=ReaScript API Documentation= | =ReaScript API Documentation= | ||
- | + | This page documents the ReaScript API functions. | |
+ | |||
+ | ReaScript uses a large part of The API (available in CC++). | ||
=Using these functions= | =Using these functions= | ||
Line 14: | Line 17: | ||
the var variable might well have a different value to the one it started with... | 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 [[RPR_GetUserInputs|GetUserInputs]] Go and look at it now if you haven't already done so | + | 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. |
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. | 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. | ||
Line 23: | Line 26: | ||
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. | 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.'' | + | ''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.'' | ''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.'' | ||
Line 30: | Line 33: | ||
=The ReaScript API Functions= | =The ReaScript API Functions= | ||
+ | |||
+ | ==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. | ||
+ | |} | ||
+ | |||
+ | ==Functions== | ||
+ | Generated from REAPER v3.21 by [[mkReaScriptAPITable.pl]] | ||
{|class="wikitable" | {|class="wikitable" | ||
| [[RPR_AddMediaItemToTrack|AddMediaItemToTrack]] | | [[RPR_AddMediaItemToTrack|AddMediaItemToTrack]] | ||
| [[RPR_format_timestr|format_timestr]] | | [[RPR_format_timestr|format_timestr]] | ||
- | | [[ | + | | [[RPR_GetTrackEnvelopeByName|GetTrackEnvelopeByName]] |
| [[RPR_plugin_getImportableProjectFilterList|plugin_getImportableProjectFilterList]] | | [[RPR_plugin_getImportableProjectFilterList|plugin_getImportableProjectFilterList]] | ||
|- | |- | ||
| [[RPR_AddProjectMarker|AddProjectMarker]] | | [[RPR_AddProjectMarker|AddProjectMarker]] | ||
| [[RPR_format_timestr_len|format_timestr_len]] | | [[RPR_format_timestr_len|format_timestr_len]] | ||
- | | [[ | + | | [[RPR_GetTrackGUID|GetTrackGUID]] |
| [[RPR_PluginWantsAlwaysRunFx|PluginWantsAlwaysRunFx]] | | [[RPR_PluginWantsAlwaysRunFx|PluginWantsAlwaysRunFx]] | ||
|- | |- | ||
| [[RPR_AddTakeToMediaItem|AddTakeToMediaItem]] | | [[RPR_AddTakeToMediaItem|AddTakeToMediaItem]] | ||
| [[RPR_format_timestr_pos|format_timestr_pos]] | | [[RPR_format_timestr_pos|format_timestr_pos]] | ||
- | | [[ | + | | [[RPR_GetTrackMediaItem|GetTrackMediaItem]] |
| [[RPR_projectconfig_var_addr|projectconfig_var_addr]] | | [[RPR_projectconfig_var_addr|projectconfig_var_addr]] | ||
|- | |- | ||
| [[RPR_adjustZoom|adjustZoom]] | | [[RPR_adjustZoom|adjustZoom]] | ||
- | | [[ | + | | [[RPR_get_config_var|get_config_var]] |
- | | [[ | + | | [[RPR_GetTrackMIDINoteName|GetTrackMIDINoteName]] |
| [[RPR_projectconfig_var_getoffs|projectconfig_var_getoffs]] | | [[RPR_projectconfig_var_getoffs|projectconfig_var_getoffs]] | ||
|- | |- | ||
| [[RPR_APITest|APITest]] | | [[RPR_APITest|APITest]] | ||
- | | [[ | + | | [[RPR_get_ini_file|get_ini_file]] |
- | | [[ | + | | [[RPR_GetTrackMIDINoteNameEx|GetTrackMIDINoteNameEx]] |
| [[RPR_ReaperGetPitchShiftAPI|ReaperGetPitchShiftAPI]] | | [[RPR_ReaperGetPitchShiftAPI|ReaperGetPitchShiftAPI]] | ||
|- | |- | ||
| [[RPR_Audio_IsPreBuffer|Audio_IsPreBuffer]] | | [[RPR_Audio_IsPreBuffer|Audio_IsPreBuffer]] | ||
- | | [[ | + | | [[RPR_GetActiveTake|GetActiveTake]] |
- | | [[ | + | | [[RPR_GetTrackNumMediaItems|GetTrackNumMediaItems]] |
| [[RPR_relative_fn|relative_fn]] | | [[RPR_relative_fn|relative_fn]] | ||
|- | |- | ||
| [[RPR_Audio_IsRunning|Audio_IsRunning]] | | [[RPR_Audio_IsRunning|Audio_IsRunning]] | ||
- | | [[ | + | | [[RPR_GetColorThemeStruct|GetColorThemeStruct]] |
- | | [[ | + | | [[RPR_GetTrackState|GetTrackState]] |
| [[RPR_Resample_EnumModes|Resample_EnumModes]] | | [[RPR_Resample_EnumModes|Resample_EnumModes]] | ||
|- | |- | ||
| [[RPR_Audio_RegHardwareHook|Audio_RegHardwareHook]] | | [[RPR_Audio_RegHardwareHook|Audio_RegHardwareHook]] | ||
- | | [[ | + | | [[RPR_GetCursorPosition|GetCursorPosition]] |
- | | [[ | + | | [[RPR_GetTrackUIVolPan|GetTrackUIVolPan]] |
| [[RPR_Resampler_Create|Resampler_Create]] | | [[RPR_Resampler_Create|Resampler_Create]] | ||
|- | |- | ||
| [[RPR_BypassFxAllTracks|BypassFxAllTracks]] | | [[RPR_BypassFxAllTracks|BypassFxAllTracks]] | ||
- | | [[ | + | | [[RPR_GetCursorPositionEx|GetCursorPositionEx]] |
- | | [[ | + | | [[RPR_GetUserFileNameForRead|GetUserFileNameForRead]] |
| [[RPR_resolve_fn|resolve_fn]] | | [[RPR_resolve_fn|resolve_fn]] | ||
|- | |- | ||
| [[RPR_CalculatePeaks|CalculatePeaks]] | | [[RPR_CalculatePeaks|CalculatePeaks]] | ||
- | | [[ | + | | [[RPR_GetEnvelopeName|GetEnvelopeName]] |
| [[RPR_GetUserInputs|GetUserInputs]] | | [[RPR_GetUserInputs|GetUserInputs]] | ||
| [[RPR_screenset_register|screenset_register]] | | [[RPR_screenset_register|screenset_register]] | ||
|- | |- | ||
| [[RPR_ClearAllRecArmed|ClearAllRecArmed]] | | [[RPR_ClearAllRecArmed|ClearAllRecArmed]] | ||
- | | [[ | + | | [[RPR_GetExePath|GetExePath]] |
| [[RPR_GSC_mainwnd|GSC_mainwnd]] | | [[RPR_GSC_mainwnd|GSC_mainwnd]] | ||
| [[RPR_screenset_unregister|screenset_unregister]] | | [[RPR_screenset_unregister|screenset_unregister]] | ||
|- | |- | ||
| [[RPR_ClearPeakCache|ClearPeakCache]] | | [[RPR_ClearPeakCache|ClearPeakCache]] | ||
- | | [[ | + | | [[RPR_GetHZoomLevel|GetHZoomLevel]] |
| [[RPR_guidToString|guidToString]] | | [[RPR_guidToString|guidToString]] | ||
| [[RPR_screenset_unregisterByParam|screenset_unregisterByParam]] | | [[RPR_screenset_unregisterByParam|screenset_unregisterByParam]] | ||
|- | |- | ||
| [[RPR_CountMediaItems|CountMediaItems]] | | [[RPR_CountMediaItems|CountMediaItems]] | ||
- | | [[ | + | | [[RPR_GetIconThemePointer|GetIconThemePointer]] |
| [[RPR_HasTrackMIDIPrograms|HasTrackMIDIPrograms]] | | [[RPR_HasTrackMIDIPrograms|HasTrackMIDIPrograms]] | ||
| [[RPR_SelectProjectInstance|SelectProjectInstance]] | | [[RPR_SelectProjectInstance|SelectProjectInstance]] | ||
|- | |- | ||
| [[RPR_CountSelectedMediaItems|CountSelectedMediaItems]] | | [[RPR_CountSelectedMediaItems|CountSelectedMediaItems]] | ||
- | | [[ | + | | [[RPR_GetIconThemeStruct|GetIconThemeStruct]] |
| [[RPR_HasTrackMIDIProgramsEx|HasTrackMIDIProgramsEx]] | | [[RPR_HasTrackMIDIProgramsEx|HasTrackMIDIProgramsEx]] | ||
| [[RPR_SetAutomationMode|SetAutomationMode]] | | [[RPR_SetAutomationMode|SetAutomationMode]] | ||
|- | |- | ||
| [[RPR_CountSelectedTracks|CountSelectedTracks]] | | [[RPR_CountSelectedTracks|CountSelectedTracks]] | ||
- | | [[ | + | | [[RPR_GetInputChannelName|GetInputChannelName]] |
| [[RPR_HiresPeaksFromSource|HiresPeaksFromSource]] | | [[RPR_HiresPeaksFromSource|HiresPeaksFromSource]] | ||
| [[RPR_SetEditCurPos|SetEditCurPos]] | | [[RPR_SetEditCurPos|SetEditCurPos]] | ||
|- | |- | ||
| [[RPR_CountTakes|CountTakes]] | | [[RPR_CountTakes|CountTakes]] | ||
- | | [[ | + | | [[RPR_GetItemProjectContext|GetItemProjectContext]] |
| [[RPR_InsertMedia|InsertMedia]] | | [[RPR_InsertMedia|InsertMedia]] | ||
| [[RPR_SetEditCurPos2|SetEditCurPos2]] | | [[RPR_SetEditCurPos2|SetEditCurPos2]] | ||
|- | |- | ||
| [[RPR_CountTrackEnvelopes|CountTrackEnvelopes]] | | [[RPR_CountTrackEnvelopes|CountTrackEnvelopes]] | ||
- | | [[ | + | | [[RPR_GetLastTouchedTrack|GetLastTouchedTrack]] |
| [[RPR_InsertTrackAtIndex|InsertTrackAtIndex]] | | [[RPR_InsertTrackAtIndex|InsertTrackAtIndex]] | ||
| [[RPR_SetMediaItemInfo_Value|SetMediaItemInfo_Value]] | | [[RPR_SetMediaItemInfo_Value|SetMediaItemInfo_Value]] | ||
|- | |- | ||
| [[RPR_CountTrackMediaItems|CountTrackMediaItems]] | | [[RPR_CountTrackMediaItems|CountTrackMediaItems]] | ||
- | | [[ | + | | [[RPR_GetMainHwnd|GetMainHwnd]] |
| [[RPR_IsInRealTimeAudio|IsInRealTimeAudio]] | | [[RPR_IsInRealTimeAudio|IsInRealTimeAudio]] | ||
| [[RPR_SetMediaItemTakeInfo_Value|SetMediaItemTakeInfo_Value]] | | [[RPR_SetMediaItemTakeInfo_Value|SetMediaItemTakeInfo_Value]] | ||
|- | |- | ||
| [[RPR_CountTracks|CountTracks]] | | [[RPR_CountTracks|CountTracks]] | ||
- | | [[ | + | | [[RPR_GetMasterMuteSoloFlags|GetMasterMuteSoloFlags]] |
| [[RPR_IsMediaExtension|IsMediaExtension]] | | [[RPR_IsMediaExtension|IsMediaExtension]] | ||
| [[RPR_SetMediaTrackInfo_Value|SetMediaTrackInfo_Value]] | | [[RPR_SetMediaTrackInfo_Value|SetMediaTrackInfo_Value]] | ||
|- | |- | ||
| [[RPR_CreateMIDIInput|CreateMIDIInput]] | | [[RPR_CreateMIDIInput|CreateMIDIInput]] | ||
- | | [[ | + | | [[RPR_GetMaxMidiInputs|GetMaxMidiInputs]] |
| [[RPR_kbd_OnMidiEvent|kbd_OnMidiEvent]] | | [[RPR_kbd_OnMidiEvent|kbd_OnMidiEvent]] | ||
| [[RPR_SetProjectMarker|SetProjectMarker]] | | [[RPR_SetProjectMarker|SetProjectMarker]] | ||
|- | |- | ||
| [[RPR_CreateMIDIOutput|CreateMIDIOutput]] | | [[RPR_CreateMIDIOutput|CreateMIDIOutput]] | ||
- | | [[ | + | | [[RPR_GetMaxMidiOutputs|GetMaxMidiOutputs]] |
| [[RPR_kbd_OnMidiList|kbd_OnMidiList]] | | [[RPR_kbd_OnMidiList|kbd_OnMidiList]] | ||
| [[RPR_SetProjectMarker2|SetProjectMarker2]] | | [[RPR_SetProjectMarker2|SetProjectMarker2]] | ||
|- | |- | ||
| [[RPR_CSurf_FlushUndo|CSurf_FlushUndo]] | | [[RPR_CSurf_FlushUndo|CSurf_FlushUndo]] | ||
- | | [[ | + | | [[RPR_GetMediaItem|GetMediaItem]] |
| [[RPR_LICE_Blit|LICE_Blit]] | | [[RPR_LICE_Blit|LICE_Blit]] | ||
| [[RPR_SetTrackAutomationMode|SetTrackAutomationMode]] | | [[RPR_SetTrackAutomationMode|SetTrackAutomationMode]] | ||
|- | |- | ||
| [[RPR_CSurf_GetTouchState|CSurf_GetTouchState]] | | [[RPR_CSurf_GetTouchState|CSurf_GetTouchState]] | ||
- | | [[ | + | | [[RPR_GetMediaItem_Track|GetMediaItem_Track]] |
| [[RPR_LICE_ClipLine|LICE_ClipLine]] | | [[RPR_LICE_ClipLine|LICE_ClipLine]] | ||
| [[RPR_SetTrackMIDINoteName|SetTrackMIDINoteName]] | | [[RPR_SetTrackMIDINoteName|SetTrackMIDINoteName]] | ||
|- | |- | ||
| [[RPR_CSurf_GoEnd|CSurf_GoEnd]] | | [[RPR_CSurf_GoEnd|CSurf_GoEnd]] | ||
- | | [[ | + | | [[RPR_GetMediaItemInfo_Value|GetMediaItemInfo_Value]] |
| [[RPR_LICE_Line|LICE_Line]] | | [[RPR_LICE_Line|LICE_Line]] | ||
| [[RPR_SetTrackMIDINoteNameEx|SetTrackMIDINoteNameEx]] | | [[RPR_SetTrackMIDINoteNameEx|SetTrackMIDINoteNameEx]] | ||
|- | |- | ||
| [[RPR_CSurf_GoStart|CSurf_GoStart]] | | [[RPR_CSurf_GoStart|CSurf_GoStart]] | ||
- | | [[ | + | | [[RPR_GetMediaItemNumTakes|GetMediaItemNumTakes]] |
| [[RPR_LICE_LineInt|LICE_LineInt]] | | [[RPR_LICE_LineInt|LICE_LineInt]] | ||
| [[RPR_SetTrackSelected|SetTrackSelected]] | | [[RPR_SetTrackSelected|SetTrackSelected]] | ||
|- | |- | ||
| [[RPR_CSurf_NumTracks|CSurf_NumTracks]] | | [[RPR_CSurf_NumTracks|CSurf_NumTracks]] | ||
- | | [[ | + | | [[RPR_GetMediaItemTake|GetMediaItemTake]] |
| [[RPR_Main_OnCommand|Main_OnCommand]] | | [[RPR_Main_OnCommand|Main_OnCommand]] | ||
| [[RPR_ShowActionList|ShowActionList]] | | [[RPR_ShowActionList|ShowActionList]] | ||
|- | |- | ||
| [[RPR_CSurf_OnArrow|CSurf_OnArrow]] | | [[RPR_CSurf_OnArrow|CSurf_OnArrow]] | ||
- | | [[ | + | | [[RPR_GetMediaItemTake_Item|GetMediaItemTake_Item]] |
| [[RPR_Main_OnCommandEx|Main_OnCommandEx]] | | [[RPR_Main_OnCommandEx|Main_OnCommandEx]] | ||
| [[RPR_ShowConsoleMsg|ShowConsoleMsg]] | | [[RPR_ShowConsoleMsg|ShowConsoleMsg]] | ||
|- | |- | ||
| [[RPR_CSurf_OnFwd|CSurf_OnFwd]] | | [[RPR_CSurf_OnFwd|CSurf_OnFwd]] | ||
- | | [[ | + | | [[RPR_GetMediaItemTake_Source|GetMediaItemTake_Source]] |
| [[RPR_Main_openProject|Main_openProject]] | | [[RPR_Main_openProject|Main_openProject]] | ||
| [[RPR_ShowMessageBox|ShowMessageBox]] | | [[RPR_ShowMessageBox|ShowMessageBox]] | ||
|- | |- | ||
| [[RPR_CSurf_OnFXChange|CSurf_OnFXChange]] | | [[RPR_CSurf_OnFXChange|CSurf_OnFXChange]] | ||
- | | [[ | + | | [[RPR_GetMediaItemTake_Track|GetMediaItemTake_Track]] |
| [[RPR_Main_UpdateLoopInfo|Main_UpdateLoopInfo]] | | [[RPR_Main_UpdateLoopInfo|Main_UpdateLoopInfo]] | ||
| [[RPR_SLIDER2DB|SLIDER2DB]] | | [[RPR_SLIDER2DB|SLIDER2DB]] | ||
|- | |- | ||
| [[RPR_CSurf_OnMuteChange|CSurf_OnMuteChange]] | | [[RPR_CSurf_OnMuteChange|CSurf_OnMuteChange]] | ||
- | | [[ | + | | [[RPR_GetMediaItemTakeInfo_Value|GetMediaItemTakeInfo_Value]] |
| [[RPR_Master_GetPlayRateAtTime|Master_GetPlayRateAtTime]] | | [[RPR_Master_GetPlayRateAtTime|Master_GetPlayRateAtTime]] | ||
| [[RPR_SoloAllTracks|SoloAllTracks]] | | [[RPR_SoloAllTracks|SoloAllTracks]] | ||
|- | |- | ||
| [[RPR_CSurf_OnPanChange|CSurf_OnPanChange]] | | [[RPR_CSurf_OnPanChange|CSurf_OnPanChange]] | ||
- | | [[ | + | | [[RPR_GetMediaTrackInfo_Value|GetMediaTrackInfo_Value]] |
| [[RPR_MB|MB]] | | [[RPR_MB|MB]] | ||
| [[RPR_SplitMediaItem|SplitMediaItem]] | | [[RPR_SplitMediaItem|SplitMediaItem]] | ||
|- | |- | ||
| [[RPR_CSurf_OnPanChangeEx|CSurf_OnPanChangeEx]] | | [[RPR_CSurf_OnPanChangeEx|CSurf_OnPanChangeEx]] | ||
- | | [[ | + | | [[RPR_GetMidiInput|GetMidiInput]] |
| [[RPR_MIDI_eventlist_Create|MIDI_eventlist_Create]] | | [[RPR_MIDI_eventlist_Create|MIDI_eventlist_Create]] | ||
| [[RPR_StopPreview|StopPreview]] | | [[RPR_StopPreview|StopPreview]] | ||
|- | |- | ||
| [[RPR_CSurf_OnPlay|CSurf_OnPlay]] | | [[RPR_CSurf_OnPlay|CSurf_OnPlay]] | ||
- | | [[ | + | | [[RPR_GetMIDIInputName|GetMIDIInputName]] |
| [[RPR_MIDI_eventlist_Destroy|MIDI_eventlist_Destroy]] | | [[RPR_MIDI_eventlist_Destroy|MIDI_eventlist_Destroy]] | ||
| [[RPR_StopTrackPreview|StopTrackPreview]] | | [[RPR_StopTrackPreview|StopTrackPreview]] | ||
|- | |- | ||
| [[RPR_CSurf_OnRecArmChange|CSurf_OnRecArmChange]] | | [[RPR_CSurf_OnRecArmChange|CSurf_OnRecArmChange]] | ||
- | | [[ | + | | [[RPR_GetMidiOutput|GetMidiOutput]] |
| [[RPR_MIDIEditor_GetActive|MIDIEditor_GetActive]] | | [[RPR_MIDIEditor_GetActive|MIDIEditor_GetActive]] | ||
| [[RPR_StopTrackPreview2|StopTrackPreview2]] | | [[RPR_StopTrackPreview2|StopTrackPreview2]] | ||
|- | |- | ||
| [[RPR_CSurf_OnRecord|CSurf_OnRecord]] | | [[RPR_CSurf_OnRecord|CSurf_OnRecord]] | ||
- | | [[ | + | | [[RPR_GetMIDIOutputName|GetMIDIOutputName]] |
| [[RPR_MIDIEditor_GetMode|MIDIEditor_GetMode]] | | [[RPR_MIDIEditor_GetMode|MIDIEditor_GetMode]] | ||
| [[RPR_stringToGuid|stringToGuid]] | | [[RPR_stringToGuid|stringToGuid]] | ||
|- | |- | ||
| [[RPR_CSurf_OnRew|CSurf_OnRew]] | | [[RPR_CSurf_OnRew|CSurf_OnRew]] | ||
- | | [[ | + | | [[RPR_GetNumMIDIInputs|GetNumMIDIInputs]] |
| [[RPR_MIDIEditor_OnCommand|MIDIEditor_OnCommand]] | | [[RPR_MIDIEditor_OnCommand|MIDIEditor_OnCommand]] | ||
| [[RPR_TimeMap2_beatsToTime|TimeMap2_beatsToTime]] | | [[RPR_TimeMap2_beatsToTime|TimeMap2_beatsToTime]] | ||
|- | |- | ||
| [[RPR_CSurf_OnSelectedChange|CSurf_OnSelectedChange]] | | [[RPR_CSurf_OnSelectedChange|CSurf_OnSelectedChange]] | ||
- | | [[ | + | | [[RPR_GetNumMIDIOutputs|GetNumMIDIOutputs]] |
| [[RPR_mkpanstr|mkpanstr]] | | [[RPR_mkpanstr|mkpanstr]] | ||
| [[RPR_TimeMap2_GetDividedBpmAtTime|TimeMap2_GetDividedBpmAtTime]] | | [[RPR_TimeMap2_GetDividedBpmAtTime|TimeMap2_GetDividedBpmAtTime]] | ||
|- | |- | ||
| [[RPR_CSurf_OnSoloChange|CSurf_OnSoloChange]] | | [[RPR_CSurf_OnSoloChange|CSurf_OnSoloChange]] | ||
- | | [[ | + | | [[RPR_GetNumTracks|GetNumTracks]] |
| [[RPR_mkvolpanstr|mkvolpanstr]] | | [[RPR_mkvolpanstr|mkvolpanstr]] | ||
| [[RPR_TimeMap2_GetNextChangeTime|TimeMap2_GetNextChangeTime]] | | [[RPR_TimeMap2_GetNextChangeTime|TimeMap2_GetNextChangeTime]] | ||
|- | |- | ||
| [[RPR_CSurf_OnStop|CSurf_OnStop]] | | [[RPR_CSurf_OnStop|CSurf_OnStop]] | ||
- | | [[ | + | | [[RPR_GetOutputChannelName|GetOutputChannelName]] |
| [[RPR_mkvolstr|mkvolstr]] | | [[RPR_mkvolstr|mkvolstr]] | ||
| [[RPR_TimeMap2_QNToTime|TimeMap2_QNToTime]] | | [[RPR_TimeMap2_QNToTime|TimeMap2_QNToTime]] | ||
|- | |- | ||
| [[RPR_CSurf_OnTrackSelection|CSurf_OnTrackSelection]] | | [[RPR_CSurf_OnTrackSelection|CSurf_OnTrackSelection]] | ||
- | | [[ | + | | [[RPR_GetOutputLatency|GetOutputLatency]] |
| [[RPR_MoveEditCursor|MoveEditCursor]] | | [[RPR_MoveEditCursor|MoveEditCursor]] | ||
| [[RPR_TimeMap2_timeToBeats|TimeMap2_timeToBeats]] | | [[RPR_TimeMap2_timeToBeats|TimeMap2_timeToBeats]] | ||
|- | |- | ||
| [[RPR_CSurf_OnVolumeChange|CSurf_OnVolumeChange]] | | [[RPR_CSurf_OnVolumeChange|CSurf_OnVolumeChange]] | ||
- | | [[ | + | | [[RPR_GetPeakFileName|GetPeakFileName]] |
| [[RPR_MoveMediaItemToTrack|MoveMediaItemToTrack]] | | [[RPR_MoveMediaItemToTrack|MoveMediaItemToTrack]] | ||
| [[RPR_TimeMap2_timeToQN|TimeMap2_timeToQN]] | | [[RPR_TimeMap2_timeToQN|TimeMap2_timeToQN]] | ||
|- | |- | ||
| [[RPR_CSurf_OnVolumeChangeEx|CSurf_OnVolumeChangeEx]] | | [[RPR_CSurf_OnVolumeChangeEx|CSurf_OnVolumeChangeEx]] | ||
- | | [[ | + | | [[RPR_GetPeaksBitmap|GetPeaksBitmap]] |
| [[RPR_MuteAllTracks|MuteAllTracks]] | | [[RPR_MuteAllTracks|MuteAllTracks]] | ||
| [[RPR_TimeMap_GetDividedBpmAtTime|TimeMap_GetDividedBpmAtTime]] | | [[RPR_TimeMap_GetDividedBpmAtTime|TimeMap_GetDividedBpmAtTime]] | ||
|- | |- | ||
| [[RPR_CSurf_ResetAllCachedVolPanStates|CSurf_ResetAllCachedVolPanStates]] | | [[RPR_CSurf_ResetAllCachedVolPanStates|CSurf_ResetAllCachedVolPanStates]] | ||
- | | [[ | + | | [[RPR_GetPlayPosition|GetPlayPosition]] |
| [[RPR_my_getViewport|my_getViewport]] | | [[RPR_my_getViewport|my_getViewport]] | ||
| [[RPR_TimeMap_QNToTime|TimeMap_QNToTime]] | | [[RPR_TimeMap_QNToTime|TimeMap_QNToTime]] | ||
|- | |- | ||
| [[RPR_CSurf_ScrubAmt|CSurf_ScrubAmt]] | | [[RPR_CSurf_ScrubAmt|CSurf_ScrubAmt]] | ||
- | | [[ | + | | [[RPR_GetPlayPosition2|GetPlayPosition2]] |
| [[RPR_NamedCommandLookup|NamedCommandLookup]] | | [[RPR_NamedCommandLookup|NamedCommandLookup]] | ||
| [[RPR_TimeMap_timeToQN|TimeMap_timeToQN]] | | [[RPR_TimeMap_timeToQN|TimeMap_timeToQN]] | ||
|- | |- | ||
| [[RPR_CSurf_SetAutoMode|CSurf_SetAutoMode]] | | [[RPR_CSurf_SetAutoMode|CSurf_SetAutoMode]] | ||
- | | [[ | + | | [[RPR_GetPlayPosition2Ex|GetPlayPosition2Ex]] |
| [[RPR_OnPauseButton|OnPauseButton]] | | [[RPR_OnPauseButton|OnPauseButton]] | ||
| [[RPR_Track_GetPeakInfo|Track_GetPeakInfo]] | | [[RPR_Track_GetPeakInfo|Track_GetPeakInfo]] | ||
|- | |- | ||
| [[RPR_CSurf_SetPlayState|CSurf_SetPlayState]] | | [[RPR_CSurf_SetPlayState|CSurf_SetPlayState]] | ||
- | | [[ | + | | [[RPR_GetPlayPositionEx|GetPlayPositionEx]] |
| [[RPR_OnPauseButtonEx|OnPauseButtonEx]] | | [[RPR_OnPauseButtonEx|OnPauseButtonEx]] | ||
| [[RPR_TrackFX_FormatParamValue|TrackFX_FormatParamValue]] | | [[RPR_TrackFX_FormatParamValue|TrackFX_FormatParamValue]] | ||
|- | |- | ||
| [[RPR_CSurf_SetRepeatState|CSurf_SetRepeatState]] | | [[RPR_CSurf_SetRepeatState|CSurf_SetRepeatState]] | ||
- | | [[ | + | | [[RPR_GetPlayState|GetPlayState]] |
| [[RPR_OnPlayButton|OnPlayButton]] | | [[RPR_OnPlayButton|OnPlayButton]] | ||
| [[RPR_TrackFX_GetCount|TrackFX_GetCount]] | | [[RPR_TrackFX_GetCount|TrackFX_GetCount]] | ||
|- | |- | ||
| [[RPR_CSurf_SetSurfaceMute|CSurf_SetSurfaceMute]] | | [[RPR_CSurf_SetSurfaceMute|CSurf_SetSurfaceMute]] | ||
- | | [[ | + | | [[RPR_GetPlayStateEx|GetPlayStateEx]] |
| [[RPR_OnPlayButtonEx|OnPlayButtonEx]] | | [[RPR_OnPlayButtonEx|OnPlayButtonEx]] | ||
| [[RPR_TrackFX_GetFXName|TrackFX_GetFXName]] | | [[RPR_TrackFX_GetFXName|TrackFX_GetFXName]] | ||
|- | |- | ||
| [[RPR_CSurf_SetSurfacePan|CSurf_SetSurfacePan]] | | [[RPR_CSurf_SetSurfacePan|CSurf_SetSurfacePan]] | ||
- | | [[ | + | | [[RPR_GetProjectPath|GetProjectPath]] |
| [[RPR_OnStopButton|OnStopButton]] | | [[RPR_OnStopButton|OnStopButton]] | ||
| [[RPR_TrackFX_GetNumParams|TrackFX_GetNumParams]] | | [[RPR_TrackFX_GetNumParams|TrackFX_GetNumParams]] | ||
|- | |- | ||
| [[RPR_CSurf_SetSurfaceRecArm|CSurf_SetSurfaceRecArm]] | | [[RPR_CSurf_SetSurfaceRecArm|CSurf_SetSurfaceRecArm]] | ||
- | | [[ | + | | [[RPR_GetProjectPathEx|GetProjectPathEx]] |
| [[RPR_OnStopButtonEx|OnStopButtonEx]] | | [[RPR_OnStopButtonEx|OnStopButtonEx]] | ||
| [[RPR_TrackFX_GetParam|TrackFX_GetParam]] | | [[RPR_TrackFX_GetParam|TrackFX_GetParam]] | ||
|- | |- | ||
| [[RPR_CSurf_SetSurfaceSelected|CSurf_SetSurfaceSelected]] | | [[RPR_CSurf_SetSurfaceSelected|CSurf_SetSurfaceSelected]] | ||
- | | [[ | + | | [[RPR_GetProjectTimeSignature|GetProjectTimeSignature]] |
| [[RPR_parse_timestr|parse_timestr]] | | [[RPR_parse_timestr|parse_timestr]] | ||
| [[RPR_TrackFX_GetParamName|TrackFX_GetParamName]] | | [[RPR_TrackFX_GetParamName|TrackFX_GetParamName]] | ||
|- | |- | ||
| [[RPR_CSurf_SetSurfaceSolo|CSurf_SetSurfaceSolo]] | | [[RPR_CSurf_SetSurfaceSolo|CSurf_SetSurfaceSolo]] | ||
- | | [[ | + | | [[RPR_GetProjectTimeSignature2|GetProjectTimeSignature2]] |
| [[RPR_parse_timestr_len|parse_timestr_len]] | | [[RPR_parse_timestr_len|parse_timestr_len]] | ||
| [[RPR_TrackFX_SetParam|TrackFX_SetParam]] | | [[RPR_TrackFX_SetParam|TrackFX_SetParam]] | ||
|- | |- | ||
| [[RPR_CSurf_SetSurfaceVolume|CSurf_SetSurfaceVolume]] | | [[RPR_CSurf_SetSurfaceVolume|CSurf_SetSurfaceVolume]] | ||
- | | [[ | + | | [[RPR_GetSelectedMediaItem|GetSelectedMediaItem]] |
| [[RPR_parse_timestr_pos|parse_timestr_pos]] | | [[RPR_parse_timestr_pos|parse_timestr_pos]] | ||
| [[RPR_TrackList_AdjustWindows|TrackList_AdjustWindows]] | | [[RPR_TrackList_AdjustWindows|TrackList_AdjustWindows]] | ||
|- | |- | ||
| [[RPR_CSurf_SetTrackListChange|CSurf_SetTrackListChange]] | | [[RPR_CSurf_SetTrackListChange|CSurf_SetTrackListChange]] | ||
- | | [[ | + | | [[RPR_GetSelectedTrack|GetSelectedTrack]] |
| [[RPR_parsepanstr|parsepanstr]] | | [[RPR_parsepanstr|parsepanstr]] | ||
| [[RPR_TrackList_UpdateAllExternalSurfaces|TrackList_UpdateAllExternalSurfaces]] | | [[RPR_TrackList_UpdateAllExternalSurfaces|TrackList_UpdateAllExternalSurfaces]] | ||
|- | |- | ||
| [[RPR_CSurf_TrackFromID|CSurf_TrackFromID]] | | [[RPR_CSurf_TrackFromID|CSurf_TrackFromID]] | ||
- | | [[ | + | | [[RPR_GetSelectedTrackEnvelope|GetSelectedTrackEnvelope]] |
| [[RPR_PCM_Sink_Create|PCM_Sink_Create]] | | [[RPR_PCM_Sink_Create|PCM_Sink_Create]] | ||
| [[RPR_Undo_BeginBlock|Undo_BeginBlock]] | | [[RPR_Undo_BeginBlock|Undo_BeginBlock]] | ||
|- | |- | ||
| [[RPR_CSurf_TrackToID|CSurf_TrackToID]] | | [[RPR_CSurf_TrackToID|CSurf_TrackToID]] | ||
- | | [[ | + | | [[RPR_GetSet_ArrangeView2|GetSet_ArrangeView2]] |
| [[RPR_PCM_Sink_CreateEx|PCM_Sink_CreateEx]] | | [[RPR_PCM_Sink_CreateEx|PCM_Sink_CreateEx]] | ||
| [[RPR_Undo_BeginBlock2|Undo_BeginBlock2]] | | [[RPR_Undo_BeginBlock2|Undo_BeginBlock2]] | ||
|- | |- | ||
| [[RPR_DB2SLIDER|DB2SLIDER]] | | [[RPR_DB2SLIDER|DB2SLIDER]] | ||
- | | [[ | + | | [[RPR_GetSet_LoopTimeRange|GetSet_LoopTimeRange]] |
| [[RPR_PCM_Sink_CreateMIDIFile|PCM_Sink_CreateMIDIFile]] | | [[RPR_PCM_Sink_CreateMIDIFile|PCM_Sink_CreateMIDIFile]] | ||
| [[RPR_Undo_CanRedo2|Undo_CanRedo2]] | | [[RPR_Undo_CanRedo2|Undo_CanRedo2]] | ||
|- | |- | ||
| [[RPR_DeleteProjectMarker|DeleteProjectMarker]] | | [[RPR_DeleteProjectMarker|DeleteProjectMarker]] | ||
- | | [[ | + | | [[RPR_GetSet_LoopTimeRange2|GetSet_LoopTimeRange2]] |
| [[RPR_PCM_Sink_CreateMIDIFileEx|PCM_Sink_CreateMIDIFileEx]] | | [[RPR_PCM_Sink_CreateMIDIFileEx|PCM_Sink_CreateMIDIFileEx]] | ||
| [[RPR_Undo_CanUndo2|Undo_CanUndo2]] | | [[RPR_Undo_CanUndo2|Undo_CanUndo2]] | ||
|- | |- | ||
| [[RPR_DeleteTrack|DeleteTrack]] | | [[RPR_DeleteTrack|DeleteTrack]] | ||
- | | [[ | + | | [[RPR_GetSetEnvelopeState|GetSetEnvelopeState]] |
| [[RPR_PCM_Sink_Enum|PCM_Sink_Enum]] | | [[RPR_PCM_Sink_Enum|PCM_Sink_Enum]] | ||
| [[RPR_Undo_DoRedo2|Undo_DoRedo2]] | | [[RPR_Undo_DoRedo2|Undo_DoRedo2]] | ||
|- | |- | ||
| [[RPR_DeleteTrackMediaItem|DeleteTrackMediaItem]] | | [[RPR_DeleteTrackMediaItem|DeleteTrackMediaItem]] | ||
- | | [[ | + | | [[RPR_GetSetItemState|GetSetItemState]] |
| [[RPR_PCM_Sink_GetExtension|PCM_Sink_GetExtension]] | | [[RPR_PCM_Sink_GetExtension|PCM_Sink_GetExtension]] | ||
| [[RPR_Undo_DoUndo2|Undo_DoUndo2]] | | [[RPR_Undo_DoUndo2|Undo_DoUndo2]] | ||
|- | |- | ||
| [[RPR_DockWindowActivate|DockWindowActivate]] | | [[RPR_DockWindowActivate|DockWindowActivate]] | ||
- | | [[ | + | | [[RPR_GetSetMediaItemTakeInfo_String|GetSetMediaItemTakeInfo_String]] |
| [[RPR_PCM_Sink_ShowConfig|PCM_Sink_ShowConfig]] | | [[RPR_PCM_Sink_ShowConfig|PCM_Sink_ShowConfig]] | ||
| [[RPR_Undo_EndBlock|Undo_EndBlock]] | | [[RPR_Undo_EndBlock|Undo_EndBlock]] | ||
|- | |- | ||
| [[RPR_DockWindowAdd|DockWindowAdd]] | | [[RPR_DockWindowAdd|DockWindowAdd]] | ||
- | | [[ | + | | [[RPR_GetSetMediaTrackInfo_String|GetSetMediaTrackInfo_String]] |
| [[RPR_PCM_Source_CreateFromFile|PCM_Source_CreateFromFile]] | | [[RPR_PCM_Source_CreateFromFile|PCM_Source_CreateFromFile]] | ||
| [[RPR_Undo_EndBlock2|Undo_EndBlock2]] | | [[RPR_Undo_EndBlock2|Undo_EndBlock2]] | ||
|- | |- | ||
| [[RPR_DockWindowRemove|DockWindowRemove]] | | [[RPR_DockWindowRemove|DockWindowRemove]] | ||
- | | [[ | + | | [[RPR_GetSetRepeat|GetSetRepeat]] |
| [[RPR_PCM_Source_CreateFromFileEx|PCM_Source_CreateFromFileEx]] | | [[RPR_PCM_Source_CreateFromFileEx|PCM_Source_CreateFromFileEx]] | ||
| [[RPR_Undo_OnStateChange|Undo_OnStateChange]] | | [[RPR_Undo_OnStateChange|Undo_OnStateChange]] | ||
|- | |- | ||
| [[RPR_EnsureNotCompletelyOffscreen|EnsureNotCompletelyOffscreen]] | | [[RPR_EnsureNotCompletelyOffscreen|EnsureNotCompletelyOffscreen]] | ||
- | | [[ | + | | [[RPR_GetSetRepeatEx|GetSetRepeatEx]] |
| [[RPR_PCM_Source_CreateFromSimple|PCM_Source_CreateFromSimple]] | | [[RPR_PCM_Source_CreateFromSimple|PCM_Source_CreateFromSimple]] | ||
| [[RPR_Undo_OnStateChange2|Undo_OnStateChange2]] | | [[RPR_Undo_OnStateChange2|Undo_OnStateChange2]] | ||
|- | |- | ||
| [[RPR_EnumPitchShiftModes|EnumPitchShiftModes]] | | [[RPR_EnumPitchShiftModes|EnumPitchShiftModes]] | ||
- | | [[ | + | | [[RPR_GetSetTrackState|GetSetTrackState]] |
| [[RPR_PCM_Source_CreateFromType|PCM_Source_CreateFromType]] | | [[RPR_PCM_Source_CreateFromType|PCM_Source_CreateFromType]] | ||
| [[RPR_Undo_OnStateChange_Item|Undo_OnStateChange_Item]] | | [[RPR_Undo_OnStateChange_Item|Undo_OnStateChange_Item]] | ||
|- | |- | ||
| [[RPR_EnumPitchShiftSubModes|EnumPitchShiftSubModes]] | | [[RPR_EnumPitchShiftSubModes|EnumPitchShiftSubModes]] | ||
- | | [[ | + | | [[RPR_GetTake|GetTake]] |
| [[RPR_PeakBuild_Create|PeakBuild_Create]] | | [[RPR_PeakBuild_Create|PeakBuild_Create]] | ||
| [[RPR_Undo_OnStateChangeEx|Undo_OnStateChangeEx]] | | [[RPR_Undo_OnStateChangeEx|Undo_OnStateChangeEx]] | ||
|- | |- | ||
| [[RPR_EnumProjectMarkers|EnumProjectMarkers]] | | [[RPR_EnumProjectMarkers|EnumProjectMarkers]] | ||
- | | [[ | + | | [[RPR_GetTakeEnvelopeByName|GetTakeEnvelopeByName]] |
| [[RPR_PeakGet_Create|PeakGet_Create]] | | [[RPR_PeakGet_Create|PeakGet_Create]] | ||
| [[RPR_Undo_OnStateChangeEx2|Undo_OnStateChangeEx2]] | | [[RPR_Undo_OnStateChangeEx2|Undo_OnStateChangeEx2]] | ||
|- | |- | ||
| [[RPR_EnumProjectMarkers2|EnumProjectMarkers2]] | | [[RPR_EnumProjectMarkers2|EnumProjectMarkers2]] | ||
- | | [[ | + | | [[RPR_GetTooltipWindow|GetTooltipWindow]] |
| [[RPR_PlayPreview|PlayPreview]] | | [[RPR_PlayPreview|PlayPreview]] | ||
| [[RPR_UpdateItemInProject|UpdateItemInProject]] | | [[RPR_UpdateItemInProject|UpdateItemInProject]] | ||
|- | |- | ||
| [[RPR_EnumProjects|EnumProjects]] | | [[RPR_EnumProjects|EnumProjects]] | ||
- | | [[ | + | | [[RPR_GetTrack|GetTrack]] |
| [[RPR_PlayTrackPreview|PlayTrackPreview]] | | [[RPR_PlayTrackPreview|PlayTrackPreview]] | ||
| [[RPR_UpdateTimeline|UpdateTimeline]] | | [[RPR_UpdateTimeline|UpdateTimeline]] | ||
|- | |- | ||
| [[RPR_EnumTrackMIDIProgramNames|EnumTrackMIDIProgramNames]] | | [[RPR_EnumTrackMIDIProgramNames|EnumTrackMIDIProgramNames]] | ||
- | | [[ | + | | [[RPR_GetTrackAutomationMode|GetTrackAutomationMode]] |
| [[RPR_PlayTrackPreview2|PlayTrackPreview2]] | | [[RPR_PlayTrackPreview2|PlayTrackPreview2]] | ||
| [[RPR_ValidatePtr|ValidatePtr]] | | [[RPR_ValidatePtr|ValidatePtr]] | ||
|- | |- | ||
| [[RPR_EnumTrackMIDIProgramNamesEx|EnumTrackMIDIProgramNamesEx]] | | [[RPR_EnumTrackMIDIProgramNamesEx|EnumTrackMIDIProgramNamesEx]] | ||
- | | [[ | + | | [[RPR_GetTrackEnvelope|GetTrackEnvelope]] |
| [[RPR_plugin_getFilterList|plugin_getFilterList]] | | [[RPR_plugin_getFilterList|plugin_getFilterList]] | ||
| [[RPR_WDL_VirtualWnd_ScaledBlitBG|WDL_VirtualWnd_ScaledBlitBG]] | | [[RPR_WDL_VirtualWnd_ScaledBlitBG|WDL_VirtualWnd_ScaledBlitBG]] |
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
Directive | Description |
---|---|
include | Include 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