#ifndef _REAPER_PLUGIN_FUNCTIONS_H_ #define _REAPER_PLUGIN_FUNCTIONS_H_ // REAPER API functions // Generated by REAPER v7.77 /* * Copyright 2006 and later, Cockos Incorporated * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ // Note: the C++ pure virtual interfaces used require the MSVC-compatible C++ ABI on Win32. Sorry, mingw users. // // Reaper extensions: see http://www.cockos.com/reaper/sdk/plugin/plugin.php and reaper_plugin.h. // The API functions in this header can be retrieved using reaper_plugin_info_t.GetFunc(). // // VST plugins: see http://www.cockos.com/reaper/sdk/vst/vst_ext.php // The API functions in this header can be retrieved using audioMasterCallback. // // Because the API is dynamic, callers should never assume a function exists. // Check that a non-NULL function pointer was returned before using it (unless // loaded functions are verified using REAPERAPI_LoadAPI(), see note below). // 1) most source files should just #include "reaper_plugin_functions.h" as is. // 2) one file should #define REAPERAPI_IMPLEMENT before including this file. // 3) the plug-in should call REAPERAPI_LoadAPI(rec->GetFunc) from REAPER_PLUGIN_ENTRYPOINT // and check the return value for errors (REAPERAPI_LoadAPI will return 0 on success). // By default, all functions listed in this file are loaded. This means that an older version // of REAPER may not succeed in loading, and also it may bloat your plug-in. If you wish to only load // needed functions, #define REAPERAPI_MINIMAL and various #define REAPERAPI_WANT_ lines // before including this file. You must put these definitions where REAPERAPI_IMPLEMENT is defined // and you can optionally put them elsewhere (to detect needed REAPERAPI_WANT_xxx lines at compile- // time rather than link-time). // #if !defined(_LICE_H) && !defined(REAPERAPI_NO_LICE) typedef unsigned int LICE_pixel; typedef unsigned char LICE_pixel_chan; class LICE_IBitmap; class LICE_IFont; #endif class WDL_VirtualWnd_BGCfg; class ProjectMarker; class AudioAccessor; class joystick_device; // easiest to include reaper_plugin.h before reaper_plugin_functions.h in your application code. // if not, you may need to edit this path. #ifndef _REAPER_PLUGIN_H_ #include "reaper_plugin.h" #endif #ifdef REAPERAPI_DEF #undef REAPERAPI_DEF #endif #ifdef REAPERAPI_IMPLEMENT #define REAPERAPI_DEF #else #define REAPERAPI_DEF extern #endif #ifndef REAPERAPI_FUNCNAME #define REAPERAPI_FUNCNAME(x) x #endif #if defined(REAPERAPI_WANT___mergesort) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // __mergesort // __mergesort is a stable sorting function with an API similar to qsort(). // HOWEVER, it requires some temporary space, equal to the size of the data being sorted, so you can pass it as the last parameter, // or NULL and it will allocate and free space internally. void (*REAPERAPI_FUNCNAME(__mergesort))(void* base, size_t nmemb, size_t size, int (*cmpfunc)(const void*,const void*), void* tmpspace); #endif #if defined(REAPERAPI_WANT_AddCustomizableMenu) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddCustomizableMenu // menuidstr is some unique identifying string (must be a persistent pointer) // menuname is for main menus only (displayed in a menu bar somewhere), NULL otherwise // kbdsecname is the name of the KbdSectionInfo registered by this plugin, or NULL for the main actions section bool (*REAPERAPI_FUNCNAME(AddCustomizableMenu))(const char* menuidstr, const char* menuname, const char* kbdsecname, bool addtomainmenu); #endif #if defined(REAPERAPI_WANT_AddExtensionsMainMenu) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddExtensionsMainMenu // Add an Extensions main menu, which the extension can populate/modify with plugin_register("hookcustommenu") bool (*REAPERAPI_FUNCNAME(AddExtensionsMainMenu))(); #endif #if defined(REAPERAPI_WANT_AddMediaItemToTrack) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddMediaItemToTrack // creates a new media item. MediaItem* (*REAPERAPI_FUNCNAME(AddMediaItemToTrack))(MediaTrack* tr); #endif #if defined(REAPERAPI_WANT_AddProjectMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddProjectMarker // Returns the index of the created marker/region, or -1 on failure. Supply wantidx>=0 if you want a particular index number, but you'll get a different index number if wantidx is already in use.discouraged. see AddRegionOrMarker, GetNumRegionsOrMarkers, GetRegionOrMarker, SetRegionOrMarkerInfo_Value, GetSetRegionOrMarkerInfo_String. Note: this function can't clear a marker's name (an empty string will leave the name unchanged), see SetProjectMarker4. int (*REAPERAPI_FUNCNAME(AddProjectMarker))(ReaProject* proj, bool isrgn, double pos, double rgnend, const char* name, int wantidx); #endif #if defined(REAPERAPI_WANT_AddProjectMarker2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddProjectMarker2 // Returns the index of the created marker/region, or -1 on failure. Supply wantidx>=0 if you want a particular index number, but you'll get a different index number if wantidx is already in use. color should be 0 (default color), or ColorToNative(r,g,b)|0x1000000. discouraged. see AddRegionOrMarker, GetNumRegionsOrMarkers, GetRegionOrMarker, SetRegionOrMarkerInfo_Value, GetSetRegionOrMarkerInfo_String. Note: this function can't clear a marker's name (an empty string will leave the name unchanged), see SetProjectMarker4. int (*REAPERAPI_FUNCNAME(AddProjectMarker2))(ReaProject* proj, bool isrgn, double pos, double rgnend, const char* name, int wantidx, int color); #endif #if defined(REAPERAPI_WANT_AddRegionOrMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddRegionOrMarker // Supply wantidx>=0 if you want a particular index number, but you'll get a different index number if wantidx is already in use. color should be 0 (default color), or ColorToNative(r,g,b)|0x1000000 ProjectMarker* (*REAPERAPI_FUNCNAME(AddRegionOrMarker))(ReaProject* proj, bool isrgn, double pos, double rgnend, const char* name, int wantidx, int color); #endif #if defined(REAPERAPI_WANT_AddRemoveReaScript) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddRemoveReaScript // Add a ReaScript (return the new command ID, or 0 if failed) or remove a ReaScript (return >0 on success). Use commit==true when adding/removing a single script. When bulk adding/removing n scripts, you can optimize the n-1 first calls with commit==false and commit==true for the last call. int (*REAPERAPI_FUNCNAME(AddRemoveReaScript))(bool add, int sectionID, const char* scriptfn, bool commit); #endif #if defined(REAPERAPI_WANT_AddTakeToMediaItem) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddTakeToMediaItem // creates a new take in an item MediaItem_Take* (*REAPERAPI_FUNCNAME(AddTakeToMediaItem))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_AddTempoTimeSigMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AddTempoTimeSigMarker // Deprecated. Use SetTempoTimeSigMarker with ptidx=-1. bool (*REAPERAPI_FUNCNAME(AddTempoTimeSigMarker))(ReaProject* proj, double timepos, double bpm, int timesig_num, int timesig_denom, bool lineartempochange); #endif #if defined(REAPERAPI_WANT_adjustZoom) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // adjustZoom // forceset=0,doupd=true,centermode=-1 for default void (*REAPERAPI_FUNCNAME(adjustZoom))(double amt, int forceset, bool doupd, int centermode); #endif #if defined(REAPERAPI_WANT_AdvancePlaybackPosition) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AdvancePlaybackPosition // Steps through audio blocks for project. opos is start of current block in seconds, *npos should be set to start of estimated next block, will be updated with new start. loopcnt should be set to GetPlayLoopCnt initially, will be updated if discontinuity. max_spls may be updated to shorter block length if discontinuity. sflags should be 0 initially and is the running state used internally. returns 1 if looped sel, 2 if looped project, 4 if loopendskip, 8 if smoothseek, 16 if fade audition (all during this block). Typically called with code something like: // // int asflags = 0; // INT64 lc = GetPlayLoopCnt(proj, NULL); // double oldpos = GetPlayPosition2Ex(proj); // loop: // double nextpos = old_pos + len / srate; // int thislen = len; // int ret = AdvancePlaybackPosition(proj, old_pos, &nextpos, &lc, srate, &thislen, &asflags); // oldpos = nextpos; // goto loop // int (*REAPERAPI_FUNCNAME(AdvancePlaybackPosition))(ReaProject* proj, double opos, double* npos, INT64* loopcnt, double srate, int* max_spls, int* sflags); #endif #if defined(REAPERAPI_WANT_AnyTrackSolo) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AnyTrackSolo bool (*REAPERAPI_FUNCNAME(AnyTrackSolo))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_APIExists) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // APIExists // Returns true if function_name exists in the REAPER API bool (*REAPERAPI_FUNCNAME(APIExists))(const char* function_name); #endif #if defined(REAPERAPI_WANT_APITest) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // APITest // Displays a message window if the API was successfully called. void (*REAPERAPI_FUNCNAME(APITest))(); #endif #if defined(REAPERAPI_WANT_ApplyNudge) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ApplyNudge // nudgeflag: &1=set to value (otherwise nudge by value), &2=snap // nudgewhat: 0=position, 1=left trim, 2=left edge, 3=right edge, 4=contents, 5=duplicate, 6=edit cursor // nudgeunit: 0=ms, 1=seconds, 2=grid, 3=256th notes, ..., 15=whole notes, 16=measures.beats (1.15 = 1 measure + 1.5 beats), 17=samples, 18=frames, 19=pixels, 20=item lengths, 21=item selections // value: amount to nudge by, or value to set to // reverse: in nudge mode, nudges left (otherwise ignored) // copies: in nudge duplicate mode, number of copies (otherwise ignored) bool (*REAPERAPI_FUNCNAME(ApplyNudge))(ReaProject* project, int nudgeflag, int nudgewhat, int nudgeunits, double value, bool reverse, int copies); #endif #if defined(REAPERAPI_WANT_ArmCommand) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ArmCommand // arms a command (or disarms if 0 passed) in section sectionname (empty string for main) void (*REAPERAPI_FUNCNAME(ArmCommand))(int cmd, const char* sectionname); #endif #if defined(REAPERAPI_WANT_Audio_Init) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Audio_Init // open all audio and MIDI devices, if not open void (*REAPERAPI_FUNCNAME(Audio_Init))(); #endif #if defined(REAPERAPI_WANT_Audio_IsPreBuffer) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Audio_IsPreBuffer // is in pre-buffer? threadsafe int (*REAPERAPI_FUNCNAME(Audio_IsPreBuffer))(); #endif #if defined(REAPERAPI_WANT_Audio_IsRunning) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Audio_IsRunning // is audio running at all? threadsafe int (*REAPERAPI_FUNCNAME(Audio_IsRunning))(); #endif #if defined(REAPERAPI_WANT_Audio_Quit) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Audio_Quit // close all audio and MIDI devices, if open void (*REAPERAPI_FUNCNAME(Audio_Quit))(); #endif #if defined(REAPERAPI_WANT_Audio_RegHardwareHook) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Audio_RegHardwareHook // return >0 on success int (*REAPERAPI_FUNCNAME(Audio_RegHardwareHook))(bool isAdd, audio_hook_register_t* reg); #endif #if defined(REAPERAPI_WANT_AudioAccessorStateChanged) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AudioAccessorStateChanged // Returns true if the underlying samples (track or media item take) have changed, but does not update the audio accessor, so the user can selectively call AudioAccessorValidateState only when needed. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, GetAudioAccessorEndTime, GetAudioAccessorSamples. bool (*REAPERAPI_FUNCNAME(AudioAccessorStateChanged))(AudioAccessor* accessor); #endif #if defined(REAPERAPI_WANT_AudioAccessorUpdate) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AudioAccessorUpdate // Force the accessor to reload its state from the underlying track or media item take. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples. void (*REAPERAPI_FUNCNAME(AudioAccessorUpdate))(AudioAccessor* accessor); #endif #if defined(REAPERAPI_WANT_AudioAccessorValidateState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // AudioAccessorValidateState // Validates the current state of the audio accessor -- must ONLY call this from the main thread. Returns true if the state changed. bool (*REAPERAPI_FUNCNAME(AudioAccessorValidateState))(AudioAccessor* accessor); #endif #if defined(REAPERAPI_WANT_BypassFxAllTracks) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // BypassFxAllTracks // -1 = bypass all if not all bypassed,otherwise unbypass all void (*REAPERAPI_FUNCNAME(BypassFxAllTracks))(int bypass); #endif #if defined(REAPERAPI_WANT_CalcMediaSrcLoudness) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CalcMediaSrcLoudness // Calculates loudness statistics of media via dry run render. Statistics will be displayed to the user; call GetSetProjectInfo_String("RENDER_STATS") to retrieve via API. Returns 1 if loudness was calculated successfully, -1 if user canceled the dry run render. int (*REAPERAPI_FUNCNAME(CalcMediaSrcLoudness))(PCM_source* mediasource); #endif #if defined(REAPERAPI_WANT_CalculateNormalization) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CalculateNormalization // Calculate normalize adjustment for source media. normalizeTo: 0=LUFS-I, 1=RMS-I, 2=peak, 3=true peak, 4=LUFS-M max, 5=LUFS-S max. normalizeTarget: dBFS or LUFS value. normalizeStart, normalizeEnd: time bounds within source media for normalization calculation. If normalizationStart=0 and normalizationEnd=0, the full duration of the media will be used for the calculation. double (*REAPERAPI_FUNCNAME(CalculateNormalization))(PCM_source* source, int normalizeTo, double normalizeTarget, double normalizeStart, double normalizeEnd); #endif #if defined(REAPERAPI_WANT_CalculatePeaks) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CalculatePeaks int (*REAPERAPI_FUNCNAME(CalculatePeaks))(PCM_source_transfer_t* srcBlock, PCM_source_peaktransfer_t* pksBlock); #endif #if defined(REAPERAPI_WANT_CalculatePeaksFloatSrcPtr) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CalculatePeaksFloatSrcPtr // NOTE: source samples field is a pointer to floats instead int (*REAPERAPI_FUNCNAME(CalculatePeaksFloatSrcPtr))(PCM_source_transfer_t* srcBlock, PCM_source_peaktransfer_t* pksBlock); #endif #if defined(REAPERAPI_WANT_ClearAllRecArmed) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ClearAllRecArmed void (*REAPERAPI_FUNCNAME(ClearAllRecArmed))(); #endif #if defined(REAPERAPI_WANT_ClearConsole) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ClearConsole // Clear the ReaScript console. See ShowConsoleMsg void (*REAPERAPI_FUNCNAME(ClearConsole))(); #endif #if defined(REAPERAPI_WANT_ClearPeakCache) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ClearPeakCache // resets the global peak caches void (*REAPERAPI_FUNCNAME(ClearPeakCache))(); #endif #if defined(REAPERAPI_WANT_ColorFromNative) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ColorFromNative // Extract RGB values from an OS dependent color. See ColorToNative. void (*REAPERAPI_FUNCNAME(ColorFromNative))(int col, int* rOut, int* gOut, int* bOut); #endif #if defined(REAPERAPI_WANT_ColorToNative) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ColorToNative // Make an OS dependent color from RGB values (e.g. RGB() macro on Windows). r,g and b are in [0..255]. See ColorFromNative. int (*REAPERAPI_FUNCNAME(ColorToNative))(int r, int g, int b); #endif #if defined(REAPERAPI_WANT_CountActionShortcuts) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountActionShortcuts // Returns the number of shortcuts that exist for the given command ID. // see GetActionShortcutDesc, DeleteActionShortcut, DoActionShortcutDialog. int (*REAPERAPI_FUNCNAME(CountActionShortcuts))(KbdSectionInfo* section, int cmdID); #endif #if defined(REAPERAPI_WANT_CountAutomationItems) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountAutomationItems // Returns the number of automation items on this envelope. See GetSetAutomationItemInfo int (*REAPERAPI_FUNCNAME(CountAutomationItems))(TrackEnvelope* env); #endif #if defined(REAPERAPI_WANT_CountEnvelopePoints) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountEnvelopePoints // Returns the number of points in the envelope. See CountEnvelopePointsEx. int (*REAPERAPI_FUNCNAME(CountEnvelopePoints))(TrackEnvelope* envelope); #endif #if defined(REAPERAPI_WANT_CountEnvelopePointsEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountEnvelopePointsEx // Returns the number of points in the envelope. // autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. // For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, // even if the automation item is trimmed so that not all points are visible. // Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations. // See GetEnvelopePointEx, SetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx. int (*REAPERAPI_FUNCNAME(CountEnvelopePointsEx))(TrackEnvelope* envelope, int autoitem_idx); #endif #if defined(REAPERAPI_WANT_CountMediaItems) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountMediaItems // count the number of items in the project (proj=0 for active project) int (*REAPERAPI_FUNCNAME(CountMediaItems))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_CountProjectMarkers) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountProjectMarkers // discouraged. see GetNumRegionsOrMarkers, GetRegionOrMarker. num_markersOut and num_regionsOut may be NULL. int (*REAPERAPI_FUNCNAME(CountProjectMarkers))(ReaProject* proj, int* num_markersOut, int* num_regionsOut); #endif #if defined(REAPERAPI_WANT_CountSelectedMediaItems) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountSelectedMediaItems // Discouraged, because GetSelectedMediaItem can be inefficient if media items are added, rearranged, or deleted in between calls. Instead see CountMediaItems, GetMediaItem, IsMediaItemSelected. int (*REAPERAPI_FUNCNAME(CountSelectedMediaItems))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_CountSelectedTracks) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountSelectedTracks // Count the number of selected tracks in the project (proj=0 for active project). This function ignores the master track, see CountSelectedTracks2. int (*REAPERAPI_FUNCNAME(CountSelectedTracks))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_CountSelectedTracks2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountSelectedTracks2 // Count the number of selected tracks in the project (proj=0 for active project). int (*REAPERAPI_FUNCNAME(CountSelectedTracks2))(ReaProject* proj, bool wantmaster); #endif #if defined(REAPERAPI_WANT_CountTakeEnvelopes) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTakeEnvelopes // See GetTakeEnvelope int (*REAPERAPI_FUNCNAME(CountTakeEnvelopes))(MediaItem_Take* take); #endif #if defined(REAPERAPI_WANT_CountTakes) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTakes // count the number of takes in the item int (*REAPERAPI_FUNCNAME(CountTakes))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_CountTCPFXParms) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTCPFXParms // Count the number of FX parameter knobs displayed on the track control panel. int (*REAPERAPI_FUNCNAME(CountTCPFXParms))(ReaProject* project, MediaTrack* track); #endif #if defined(REAPERAPI_WANT_CountTempoTimeSigMarkers) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTempoTimeSigMarkers // Count the number of tempo/time signature markers in the project. See GetTempoTimeSigMarker, SetTempoTimeSigMarker, AddTempoTimeSigMarker. int (*REAPERAPI_FUNCNAME(CountTempoTimeSigMarkers))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_CountTrackEnvelopes) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTrackEnvelopes // see GetTrackEnvelope int (*REAPERAPI_FUNCNAME(CountTrackEnvelopes))(MediaTrack* track); #endif #if defined(REAPERAPI_WANT_CountTrackMediaItems) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTrackMediaItems // count the number of items in the track int (*REAPERAPI_FUNCNAME(CountTrackMediaItems))(MediaTrack* track); #endif #if defined(REAPERAPI_WANT_CountTracks) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CountTracks // count the number of tracks in the project (proj=0 for active project) int (*REAPERAPI_FUNCNAME(CountTracks))(ReaProject* projOptional); #endif #if defined(REAPERAPI_WANT_CreateLocalOscHandler) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateLocalOscHandler // callback is a function pointer: void (*callback)(void* obj, const char* msg, int msglen), which handles OSC messages sent from REAPER. The function return is a local osc handler. See SendLocalOscMessage, DestroyOscHandler. void* (*REAPERAPI_FUNCNAME(CreateLocalOscHandler))(void* obj, void* callback); #endif #if defined(REAPERAPI_WANT_CreateMIDIInput) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateMIDIInput // Can only reliably create midi access for devices not already opened in prefs/MIDI, suitable for control surfaces etc. midi_Input* (*REAPERAPI_FUNCNAME(CreateMIDIInput))(int dev); #endif #if defined(REAPERAPI_WANT_CreateMIDIOutput) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateMIDIOutput // Can only reliably create midi access for devices not already opened in prefs/MIDI, suitable for control surfaces etc. If streamMode is set, msoffset100 points to a persistent variable that can change and reflects added delay to output in 100ths of a millisecond. midi_Output* (*REAPERAPI_FUNCNAME(CreateMIDIOutput))(int dev, bool streamMode, int* msoffset100); #endif #if defined(REAPERAPI_WANT_CreateNewMIDIItemInProj) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateNewMIDIItemInProj // Create a new MIDI media item, containing no MIDI events. Time is in seconds unless qn is set. MediaItem* (*REAPERAPI_FUNCNAME(CreateNewMIDIItemInProj))(MediaTrack* track, double starttime, double endtime, const bool* qnInOptional); #endif #if defined(REAPERAPI_WANT_CreateTakeAudioAccessor) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateTakeAudioAccessor // Create an audio accessor object for this take. Must only call from the main thread. See CreateTrackAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples. AudioAccessor* (*REAPERAPI_FUNCNAME(CreateTakeAudioAccessor))(MediaItem_Take* take); #endif #if defined(REAPERAPI_WANT_CreateTrackAudioAccessor) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateTrackAudioAccessor // Create an audio accessor object for this track. Must only call from the main thread. See CreateTakeAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples. AudioAccessor* (*REAPERAPI_FUNCNAME(CreateTrackAudioAccessor))(MediaTrack* track); #endif #if defined(REAPERAPI_WANT_CreateTrackSend) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CreateTrackSend // Create a send/receive (desttrInOptional!=NULL), or a hardware output (desttrInOptional==NULL) with default properties, return >=0 on success (== new send/receive index). See RemoveTrackSend, GetSetTrackSendInfo, GetTrackSendInfo_Value, SetTrackSendInfo_Value. int (*REAPERAPI_FUNCNAME(CreateTrackSend))(MediaTrack* tr, MediaTrack* desttrInOptional); #endif #if defined(REAPERAPI_WANT_CrossfadeEditor_OnCommand) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CrossfadeEditor_OnCommand // Run a command from the Crossfade Editor section of the actions list. void (*REAPERAPI_FUNCNAME(CrossfadeEditor_OnCommand))(int command); #endif #if defined(REAPERAPI_WANT_CrossfadeEditor_Show) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CrossfadeEditor_Show // Show or hide the Crossfade Editor window void (*REAPERAPI_FUNCNAME(CrossfadeEditor_Show))(bool show); #endif #if defined(REAPERAPI_WANT_CSurf_FlushUndo) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_FlushUndo // call this to force flushing of the undo states after using CSurf_On*Change() void (*REAPERAPI_FUNCNAME(CSurf_FlushUndo))(bool force); #endif #if defined(REAPERAPI_WANT_CSurf_GetTouchState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_GetTouchState bool (*REAPERAPI_FUNCNAME(CSurf_GetTouchState))(MediaTrack* trackid, int isPan); #endif #if defined(REAPERAPI_WANT_CSurf_GoEnd) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_GoEnd void (*REAPERAPI_FUNCNAME(CSurf_GoEnd))(); #endif #if defined(REAPERAPI_WANT_CSurf_GoStart) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_GoStart void (*REAPERAPI_FUNCNAME(CSurf_GoStart))(); #endif #if defined(REAPERAPI_WANT_CSurf_NumTracks) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_NumTracks int (*REAPERAPI_FUNCNAME(CSurf_NumTracks))(bool mcpView); #endif #if defined(REAPERAPI_WANT_CSurf_OnArrow) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnArrow void (*REAPERAPI_FUNCNAME(CSurf_OnArrow))(int whichdir, bool wantzoom); #endif #if defined(REAPERAPI_WANT_CSurf_OnFwd) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnFwd void (*REAPERAPI_FUNCNAME(CSurf_OnFwd))(int seekplay); #endif #if defined(REAPERAPI_WANT_CSurf_OnFXChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnFXChange bool (*REAPERAPI_FUNCNAME(CSurf_OnFXChange))(MediaTrack* trackid, int en); #endif #if defined(REAPERAPI_WANT_CSurf_OnInputMonitorChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnInputMonitorChange int (*REAPERAPI_FUNCNAME(CSurf_OnInputMonitorChange))(MediaTrack* trackid, int monitor); #endif #if defined(REAPERAPI_WANT_CSurf_OnInputMonitorChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnInputMonitorChangeEx int (*REAPERAPI_FUNCNAME(CSurf_OnInputMonitorChangeEx))(MediaTrack* trackid, int monitor, bool allowgang); #endif #if defined(REAPERAPI_WANT_CSurf_OnMuteChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnMuteChange bool (*REAPERAPI_FUNCNAME(CSurf_OnMuteChange))(MediaTrack* trackid, int mute); #endif #if defined(REAPERAPI_WANT_CSurf_OnMuteChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnMuteChangeEx bool (*REAPERAPI_FUNCNAME(CSurf_OnMuteChangeEx))(MediaTrack* trackid, int mute, bool allowgang); #endif #if defined(REAPERAPI_WANT_CSurf_OnOscControlMessage) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnOscControlMessage void (*REAPERAPI_FUNCNAME(CSurf_OnOscControlMessage))(const char* msg, const float* arg); #endif #if defined(REAPERAPI_WANT_CSurf_OnOscControlMessage2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnOscControlMessage2 void (*REAPERAPI_FUNCNAME(CSurf_OnOscControlMessage2))(const char* msg, const float* arg, const char* argstr); #endif #if defined(REAPERAPI_WANT_CSurf_OnPanChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnPanChange double (*REAPERAPI_FUNCNAME(CSurf_OnPanChange))(MediaTrack* trackid, double pan, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnPanChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnPanChangeEx double (*REAPERAPI_FUNCNAME(CSurf_OnPanChangeEx))(MediaTrack* trackid, double pan, bool relative, bool allowGang); #endif #if defined(REAPERAPI_WANT_CSurf_OnPause) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnPause void (*REAPERAPI_FUNCNAME(CSurf_OnPause))(); #endif #if defined(REAPERAPI_WANT_CSurf_OnPlay) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnPlay void (*REAPERAPI_FUNCNAME(CSurf_OnPlay))(); #endif #if defined(REAPERAPI_WANT_CSurf_OnPlayRateChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnPlayRateChange void (*REAPERAPI_FUNCNAME(CSurf_OnPlayRateChange))(double playrate); #endif #if defined(REAPERAPI_WANT_CSurf_OnRecArmChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRecArmChange bool (*REAPERAPI_FUNCNAME(CSurf_OnRecArmChange))(MediaTrack* trackid, int recarm); #endif #if defined(REAPERAPI_WANT_CSurf_OnRecArmChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRecArmChangeEx bool (*REAPERAPI_FUNCNAME(CSurf_OnRecArmChangeEx))(MediaTrack* trackid, int recarm, bool allowgang); #endif #if defined(REAPERAPI_WANT_CSurf_OnRecord) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRecord void (*REAPERAPI_FUNCNAME(CSurf_OnRecord))(); #endif #if defined(REAPERAPI_WANT_CSurf_OnRecvPanChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRecvPanChange double (*REAPERAPI_FUNCNAME(CSurf_OnRecvPanChange))(MediaTrack* trackid, int recv_index, double pan, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnRecvVolumeChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRecvVolumeChange double (*REAPERAPI_FUNCNAME(CSurf_OnRecvVolumeChange))(MediaTrack* trackid, int recv_index, double volume, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnRew) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRew void (*REAPERAPI_FUNCNAME(CSurf_OnRew))(int seekplay); #endif #if defined(REAPERAPI_WANT_CSurf_OnRewFwd) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnRewFwd void (*REAPERAPI_FUNCNAME(CSurf_OnRewFwd))(int seekplay, int dir); #endif #if defined(REAPERAPI_WANT_CSurf_OnScroll) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnScroll void (*REAPERAPI_FUNCNAME(CSurf_OnScroll))(int xdir, int ydir); #endif #if defined(REAPERAPI_WANT_CSurf_OnSelectedChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnSelectedChange bool (*REAPERAPI_FUNCNAME(CSurf_OnSelectedChange))(MediaTrack* trackid, int selected); #endif #if defined(REAPERAPI_WANT_CSurf_OnSendPanChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnSendPanChange // // Add 0x10000000 to the send index in order to access the ordering of the sends/hardware outputs in the mixer, which may be sparsely populated. // double (*REAPERAPI_FUNCNAME(CSurf_OnSendPanChange))(MediaTrack* trackid, int send_index, double pan, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnSendVolumeChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnSendVolumeChange // // Add 0x10000000 to the send index in order to access the ordering of the sends/hardware outputs in the mixer, which may be sparsely populated. // double (*REAPERAPI_FUNCNAME(CSurf_OnSendVolumeChange))(MediaTrack* trackid, int send_index, double volume, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnSoloChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnSoloChange bool (*REAPERAPI_FUNCNAME(CSurf_OnSoloChange))(MediaTrack* trackid, int solo); #endif #if defined(REAPERAPI_WANT_CSurf_OnSoloChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnSoloChangeEx bool (*REAPERAPI_FUNCNAME(CSurf_OnSoloChangeEx))(MediaTrack* trackid, int solo, bool allowgang); #endif #if defined(REAPERAPI_WANT_CSurf_OnStop) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnStop void (*REAPERAPI_FUNCNAME(CSurf_OnStop))(); #endif #if defined(REAPERAPI_WANT_CSurf_OnTempoChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnTempoChange void (*REAPERAPI_FUNCNAME(CSurf_OnTempoChange))(double bpm); #endif #if defined(REAPERAPI_WANT_CSurf_OnTrackSelection) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnTrackSelection void (*REAPERAPI_FUNCNAME(CSurf_OnTrackSelection))(MediaTrack* trackid); #endif #if defined(REAPERAPI_WANT_CSurf_OnVolumeChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnVolumeChange double (*REAPERAPI_FUNCNAME(CSurf_OnVolumeChange))(MediaTrack* trackid, double volume, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnVolumeChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnVolumeChangeEx double (*REAPERAPI_FUNCNAME(CSurf_OnVolumeChangeEx))(MediaTrack* trackid, double volume, bool relative, bool allowGang); #endif #if defined(REAPERAPI_WANT_CSurf_OnWidthChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnWidthChange double (*REAPERAPI_FUNCNAME(CSurf_OnWidthChange))(MediaTrack* trackid, double width, bool relative); #endif #if defined(REAPERAPI_WANT_CSurf_OnWidthChangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnWidthChangeEx double (*REAPERAPI_FUNCNAME(CSurf_OnWidthChangeEx))(MediaTrack* trackid, double width, bool relative, bool allowGang); #endif #if defined(REAPERAPI_WANT_CSurf_OnZoom) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_OnZoom void (*REAPERAPI_FUNCNAME(CSurf_OnZoom))(int xdir, int ydir); #endif #if defined(REAPERAPI_WANT_CSurf_ResetAllCachedVolPanStates) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_ResetAllCachedVolPanStates void (*REAPERAPI_FUNCNAME(CSurf_ResetAllCachedVolPanStates))(); #endif #if defined(REAPERAPI_WANT_CSurf_ScrubAmt) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_ScrubAmt void (*REAPERAPI_FUNCNAME(CSurf_ScrubAmt))(double amt); #endif #if defined(REAPERAPI_WANT_CSurf_SetAutoMode) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetAutoMode void (*REAPERAPI_FUNCNAME(CSurf_SetAutoMode))(int mode, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetPlayState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetPlayState void (*REAPERAPI_FUNCNAME(CSurf_SetPlayState))(bool play, bool pause, bool rec, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetRepeatState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetRepeatState void (*REAPERAPI_FUNCNAME(CSurf_SetRepeatState))(bool rep, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetSurfaceMute) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetSurfaceMute void (*REAPERAPI_FUNCNAME(CSurf_SetSurfaceMute))(MediaTrack* trackid, bool mute, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetSurfacePan) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetSurfacePan void (*REAPERAPI_FUNCNAME(CSurf_SetSurfacePan))(MediaTrack* trackid, double pan, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetSurfaceRecArm) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetSurfaceRecArm void (*REAPERAPI_FUNCNAME(CSurf_SetSurfaceRecArm))(MediaTrack* trackid, bool recarm, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetSurfaceSelected) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetSurfaceSelected void (*REAPERAPI_FUNCNAME(CSurf_SetSurfaceSelected))(MediaTrack* trackid, bool selected, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetSurfaceSolo) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetSurfaceSolo void (*REAPERAPI_FUNCNAME(CSurf_SetSurfaceSolo))(MediaTrack* trackid, bool solo, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetSurfaceVolume) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetSurfaceVolume void (*REAPERAPI_FUNCNAME(CSurf_SetSurfaceVolume))(MediaTrack* trackid, double volume, IReaperControlSurface* ignoresurf); #endif #if defined(REAPERAPI_WANT_CSurf_SetTrackListChange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_SetTrackListChange void (*REAPERAPI_FUNCNAME(CSurf_SetTrackListChange))(); #endif #if defined(REAPERAPI_WANT_CSurf_TrackFromID) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_TrackFromID MediaTrack* (*REAPERAPI_FUNCNAME(CSurf_TrackFromID))(int idx, bool mcpView); #endif #if defined(REAPERAPI_WANT_CSurf_TrackToID) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // CSurf_TrackToID int (*REAPERAPI_FUNCNAME(CSurf_TrackToID))(MediaTrack* track, bool mcpView); #endif #if defined(REAPERAPI_WANT_DB2SLIDER) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DB2SLIDER double (*REAPERAPI_FUNCNAME(DB2SLIDER))(double x); #endif #if defined(REAPERAPI_WANT_DeleteActionShortcut) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteActionShortcut // Delete the specific shortcut for the given command ID. // See CountActionShortcuts, GetActionShortcutDesc, DoActionShortcutDialog. bool (*REAPERAPI_FUNCNAME(DeleteActionShortcut))(KbdSectionInfo* section, int cmdID, int shortcutidx); #endif #if defined(REAPERAPI_WANT_DeleteEnvelopePointEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteEnvelopePointEx // Delete an envelope point. If setting multiple points at once, set noSort=true, and call Envelope_SortPoints when done. // autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. // For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, // even if the automation item is trimmed so that not all points are visible. // Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations. // Prior to REAPER v7.46, this function interpreted the 0x10000000 autoitem_idx flag backwards. // See CountEnvelopePointsEx, GetEnvelopePointEx, SetEnvelopePointEx, InsertEnvelopePointEx. bool (*REAPERAPI_FUNCNAME(DeleteEnvelopePointEx))(TrackEnvelope* envelope, int autoitem_idx, int ptidx); #endif #if defined(REAPERAPI_WANT_DeleteEnvelopePointRange) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteEnvelopePointRange // Delete a range of envelope points. See DeleteEnvelopePointRangeEx, DeleteEnvelopePointEx. bool (*REAPERAPI_FUNCNAME(DeleteEnvelopePointRange))(TrackEnvelope* envelope, double time_start, double time_end); #endif #if defined(REAPERAPI_WANT_DeleteEnvelopePointRangeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteEnvelopePointRangeEx // Delete a range of envelope points. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. bool (*REAPERAPI_FUNCNAME(DeleteEnvelopePointRangeEx))(TrackEnvelope* envelope, int autoitem_idx, double time_start, double time_end); #endif #if defined(REAPERAPI_WANT_DeleteExtState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteExtState // Delete the extended state value for a specific section and key. persist=true means the value should remain deleted the next time REAPER is opened. See SetExtState, GetExtState, HasExtState. void (*REAPERAPI_FUNCNAME(DeleteExtState))(const char* section, const char* key, bool persist); #endif #if defined(REAPERAPI_WANT_DeleteProjectMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteProjectMarker // Delete a marker. proj==NULL for the active project. bool (*REAPERAPI_FUNCNAME(DeleteProjectMarker))(ReaProject* proj, int markrgnindexnumber, bool isrgn); #endif #if defined(REAPERAPI_WANT_DeleteProjectMarkerByIndex) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteProjectMarkerByIndex // Differs from DeleteProjectMarker only in that markrgnidx is 0 for the first marker/region, 1 for the next, etc (see EnumProjectMarkers3), rather than representing the displayed marker/region ID number (see SetProjectMarker4). bool (*REAPERAPI_FUNCNAME(DeleteProjectMarkerByIndex))(ReaProject* proj, int markrgnidx); #endif #if defined(REAPERAPI_WANT_DeleteTakeMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteTakeMarker // Delete a take marker. Note that idx will change for all following take markers. See GetNumTakeMarkers, GetTakeMarker, SetTakeMarker bool (*REAPERAPI_FUNCNAME(DeleteTakeMarker))(MediaItem_Take* take, int idx); #endif #if defined(REAPERAPI_WANT_DeleteTakeStretchMarkers) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteTakeStretchMarkers // Deletes one or more stretch markers. Returns number of stretch markers deleted. int (*REAPERAPI_FUNCNAME(DeleteTakeStretchMarkers))(MediaItem_Take* take, int idx, const int* countInOptional); #endif #if defined(REAPERAPI_WANT_DeleteTempoTimeSigMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteTempoTimeSigMarker // Delete a tempo/time signature marker. bool (*REAPERAPI_FUNCNAME(DeleteTempoTimeSigMarker))(ReaProject* project, int markerindex); #endif #if defined(REAPERAPI_WANT_DeleteTrack) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteTrack // deletes a track void (*REAPERAPI_FUNCNAME(DeleteTrack))(MediaTrack* tr); #endif #if defined(REAPERAPI_WANT_DeleteTrackMediaItem) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DeleteTrackMediaItem bool (*REAPERAPI_FUNCNAME(DeleteTrackMediaItem))(MediaTrack* tr, MediaItem* it); #endif #if defined(REAPERAPI_WANT_DestroyAudioAccessor) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DestroyAudioAccessor // Destroy an audio accessor. Must only call from the main thread. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime, GetAudioAccessorSamples. void (*REAPERAPI_FUNCNAME(DestroyAudioAccessor))(AudioAccessor* accessor); #endif #if defined(REAPERAPI_WANT_DestroyLocalOscHandler) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DestroyLocalOscHandler // See CreateLocalOscHandler, SendLocalOscMessage. void (*REAPERAPI_FUNCNAME(DestroyLocalOscHandler))(void* local_osc_handler); #endif #if defined(REAPERAPI_WANT_DoActionShortcutDialog) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DoActionShortcutDialog // Open the action shortcut dialog to edit or add a shortcut for the given command ID. If (shortcutidx >= 0 && shortcutidx < CountActionShortcuts()), that specific shortcut will be replaced, otherwise a new shortcut will be added. // See CountActionShortcuts, GetActionShortcutDesc, DeleteActionShortcut. bool (*REAPERAPI_FUNCNAME(DoActionShortcutDialog))(HWND hwnd, KbdSectionInfo* section, int cmdID, int shortcutidx); #endif #if defined(REAPERAPI_WANT_Dock_UpdateDockID) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Dock_UpdateDockID // updates preference for docker window ident_str to be in dock whichDock on next open void (*REAPERAPI_FUNCNAME(Dock_UpdateDockID))(const char* ident_str, int whichDock); #endif #if defined(REAPERAPI_WANT_DockGetPosition) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockGetPosition // -1=not found, 0=bottom, 1=left, 2=top, 3=right, 4=floating int (*REAPERAPI_FUNCNAME(DockGetPosition))(int whichDock); #endif #if defined(REAPERAPI_WANT_DockIsChildOfDock) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockIsChildOfDock // returns dock index that contains hwnd, or -1 int (*REAPERAPI_FUNCNAME(DockIsChildOfDock))(HWND hwnd, bool* isFloatingDockerOut); #endif #if defined(REAPERAPI_WANT_DockWindowActivate) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockWindowActivate void (*REAPERAPI_FUNCNAME(DockWindowActivate))(HWND hwnd); #endif #if defined(REAPERAPI_WANT_DockWindowAdd) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockWindowAdd void (*REAPERAPI_FUNCNAME(DockWindowAdd))(HWND hwnd, const char* name, int pos, bool allowShow); #endif #if defined(REAPERAPI_WANT_DockWindowAddEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockWindowAddEx void (*REAPERAPI_FUNCNAME(DockWindowAddEx))(HWND hwnd, const char* name, const char* identstr, bool allowShow); #endif #if defined(REAPERAPI_WANT_DockWindowRefresh) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockWindowRefresh void (*REAPERAPI_FUNCNAME(DockWindowRefresh))(); #endif #if defined(REAPERAPI_WANT_DockWindowRefreshForHWND) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockWindowRefreshForHWND void (*REAPERAPI_FUNCNAME(DockWindowRefreshForHWND))(HWND hwnd); #endif #if defined(REAPERAPI_WANT_DockWindowRemove) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DockWindowRemove void (*REAPERAPI_FUNCNAME(DockWindowRemove))(HWND hwnd); #endif #if defined(REAPERAPI_WANT_DuplicateCustomizableMenu) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // DuplicateCustomizableMenu // Populate destmenu with all the entries and submenus found in srcmenu bool (*REAPERAPI_FUNCNAME(DuplicateCustomizableMenu))(void* srcmenu, void* destmenu); #endif #if defined(REAPERAPI_WANT_EditTempoTimeSigMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EditTempoTimeSigMarker // Open the tempo/time signature marker editor dialog. bool (*REAPERAPI_FUNCNAME(EditTempoTimeSigMarker))(ReaProject* project, int markerindex); #endif #if defined(REAPERAPI_WANT_EnsureNotCompletelyOffscreen) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnsureNotCompletelyOffscreen // call with a saved window rect for your window and it'll correct any positioning info. void (*REAPERAPI_FUNCNAME(EnsureNotCompletelyOffscreen))(RECT* rInOut); #endif #if defined(REAPERAPI_WANT_EnumerateFiles) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumerateFiles // List the files in the "path" directory. Returns NULL/nil when all files have been listed. Use fileindex = -1 to force re-read of directory (invalidate cache). See EnumerateSubdirectories const char* (*REAPERAPI_FUNCNAME(EnumerateFiles))(const char* path, int fileindex); #endif #if defined(REAPERAPI_WANT_EnumerateSubdirectories) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumerateSubdirectories // List the subdirectories in the "path" directory. Use subdirindex = -1 to force re-read of directory (invalidate cache). Returns NULL/nil when all subdirectories have been listed. See EnumerateFiles const char* (*REAPERAPI_FUNCNAME(EnumerateSubdirectories))(const char* path, int subdirindex); #endif #if defined(REAPERAPI_WANT_EnumInstalledFX) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumInstalledFX // Enumerates installed FX. Returns true if successful, sets nameOut and identOut to name and ident of FX at index. In REAPER 7.42+, use index=-1 to re-read JSFX info. bool (*REAPERAPI_FUNCNAME(EnumInstalledFX))(int index, const char** nameOut, const char** identOut); #endif #if defined(REAPERAPI_WANT_EnumPitchShiftModes) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumPitchShiftModes // Start querying modes at 0, returns FALSE when no more modes possible, sets strOut to NULL if a mode is currently unsupported bool (*REAPERAPI_FUNCNAME(EnumPitchShiftModes))(int mode, const char** strOut); #endif #if defined(REAPERAPI_WANT_EnumPitchShiftSubModes) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumPitchShiftSubModes // Returns submode name, or NULL const char* (*REAPERAPI_FUNCNAME(EnumPitchShiftSubModes))(int mode, int submode); #endif #if defined(REAPERAPI_WANT_EnumProjectMarkers) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumProjectMarkers // discouraged. see GetNumRegionsOrMarkers, GetRegionOrMarker int (*REAPERAPI_FUNCNAME(EnumProjectMarkers))(int idx, bool* isrgnOut, double* posOut, double* rgnendOut, const char** nameOut, int* markrgnindexnumberOut); #endif #if defined(REAPERAPI_WANT_EnumProjectMarkers2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumProjectMarkers2 // discouraged. see GetNumRegionsOrMarkers, GetRegionOrMarker int (*REAPERAPI_FUNCNAME(EnumProjectMarkers2))(ReaProject* proj, int idx, bool* isrgnOut, double* posOut, double* rgnendOut, const char** nameOut, int* markrgnindexnumberOut); #endif #if defined(REAPERAPI_WANT_EnumProjectMarkers3) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumProjectMarkers3 // discouraged. see GetNumRegionsOrMarkers, GetRegionOrMarker int (*REAPERAPI_FUNCNAME(EnumProjectMarkers3))(ReaProject* proj, int idx, bool* isrgnOut, double* posOut, double* rgnendOut, const char** nameOut, int* markrgnindexnumberOut, int* colorOut); #endif #if defined(REAPERAPI_WANT_EnumProjects) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumProjects // idx=-1 for current project,projfn can be NULL if not interested in filename. use idx 0x40000000 for currently rendering project, if any. ReaProject* (*REAPERAPI_FUNCNAME(EnumProjects))(int idx, char* projfnOutOptional, int projfnOutOptional_sz); #endif #if defined(REAPERAPI_WANT_EnumProjExtState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumProjExtState // Enumerate the data stored with the project for a specific extname. Returns false when there is no more data. See SetProjExtState, GetProjExtState. bool (*REAPERAPI_FUNCNAME(EnumProjExtState))(ReaProject* proj, const char* extname, int idx, char* keyOutOptional, int keyOutOptional_sz, char* valOutOptional, int valOutOptional_sz); #endif #if defined(REAPERAPI_WANT_EnumRegionRenderMatrix) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumRegionRenderMatrix // Enumerate which tracks will be rendered within this region when using the region render matrix. When called with rendertrack==0, the function returns the first track that will be rendered (which may be the master track); rendertrack==1 will return the next track rendered, and so on. The function returns NULL when there are no more tracks that will be rendered within this region. MediaTrack* (*REAPERAPI_FUNCNAME(EnumRegionRenderMatrix))(ReaProject* proj, int regionindex, int rendertrack); #endif #if defined(REAPERAPI_WANT_EnumTrackMIDIProgramNames) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumTrackMIDIProgramNames // returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated bool (*REAPERAPI_FUNCNAME(EnumTrackMIDIProgramNames))(int track, int programNumber, char* programName, int programName_sz); #endif #if defined(REAPERAPI_WANT_EnumTrackMIDIProgramNamesEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // EnumTrackMIDIProgramNamesEx // returns false if there are no plugins on the track that support MIDI programs,or if all programs have been enumerated bool (*REAPERAPI_FUNCNAME(EnumTrackMIDIProgramNamesEx))(ReaProject* proj, MediaTrack* track, int programNumber, char* programName, int programName_sz); #endif #if defined(REAPERAPI_WANT_Envelope_Evaluate) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Envelope_Evaluate // Get the effective envelope value at a given time position. samplesRequested is how long the caller expects until the next call to Envelope_Evaluate (often, the buffer block size). The return value is how many samples beyond that time position that the returned values are valid. dVdS is the change in value per sample (first derivative), ddVdS is the second derivative, dddVdS is the third derivative. See GetEnvelopeScalingMode. int (*REAPERAPI_FUNCNAME(Envelope_Evaluate))(TrackEnvelope* envelope, double time, double samplerate, int samplesRequested, double* valueOut, double* dVdSOut, double* ddVdSOut, double* dddVdSOut); #endif #if defined(REAPERAPI_WANT_Envelope_FormatValue) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Envelope_FormatValue // Formats the value of an envelope to a user-readable form void (*REAPERAPI_FUNCNAME(Envelope_FormatValue))(TrackEnvelope* env, double value, char* bufOut, int bufOut_sz); #endif #if defined(REAPERAPI_WANT_Envelope_GetParentTake) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Envelope_GetParentTake // If take envelope, gets the take from the envelope. If FX, indexOut set to FX index, index2Out set to parameter index, otherwise -1. MediaItem_Take* (*REAPERAPI_FUNCNAME(Envelope_GetParentTake))(TrackEnvelope* env, int* indexOut, int* index2Out); #endif #if defined(REAPERAPI_WANT_Envelope_GetParentTrack) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Envelope_GetParentTrack // If track envelope, gets the track from the envelope. If FX, indexOut set to FX index, index2Out set to parameter index, otherwise -1. MediaTrack* (*REAPERAPI_FUNCNAME(Envelope_GetParentTrack))(TrackEnvelope* env, int* indexOut, int* index2Out); #endif #if defined(REAPERAPI_WANT_Envelope_SortPoints) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Envelope_SortPoints // Sort envelope points by time. See SetEnvelopePoint, InsertEnvelopePoint. bool (*REAPERAPI_FUNCNAME(Envelope_SortPoints))(TrackEnvelope* envelope); #endif #if defined(REAPERAPI_WANT_Envelope_SortPointsEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // Envelope_SortPointsEx // Sort envelope points by time. autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. See SetEnvelopePoint, InsertEnvelopePoint. bool (*REAPERAPI_FUNCNAME(Envelope_SortPointsEx))(TrackEnvelope* envelope, int autoitem_idx); #endif #if defined(REAPERAPI_WANT_ExecProcess) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // ExecProcess // Executes command line, returns NULL on total failure, otherwise the return value, a newline, and then the output of the command. If timeoutmsec is 0, command will be allowed to run indefinitely (recommended for large amounts of returned output). timeoutmsec is -1 for no wait/terminate, -2 for no wait and minimize const char* (*REAPERAPI_FUNCNAME(ExecProcess))(const char* cmdline, int timeoutmsec); #endif #if defined(REAPERAPI_WANT_file_exists) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // file_exists // returns true if path points to a valid, readable file bool (*REAPERAPI_FUNCNAME(file_exists))(const char* path); #endif #if defined(REAPERAPI_WANT_FindTempoTimeSigMarker) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // FindTempoTimeSigMarker // Find the tempo/time signature marker that falls at or before this time position (the marker that is in effect as of this time position). int (*REAPERAPI_FUNCNAME(FindTempoTimeSigMarker))(ReaProject* project, double time); #endif #if defined(REAPERAPI_WANT_format_timestr) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // format_timestr // Format tpos (which is time in seconds) as hh:mm:ss.sss. See format_timestr_pos, format_timestr_len. void (*REAPERAPI_FUNCNAME(format_timestr))(double tpos, char* buf, int buf_sz); #endif #if defined(REAPERAPI_WANT_format_timestr_len) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // 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 (*REAPERAPI_FUNCNAME(format_timestr_len))(double tpos, char* buf, int buf_sz, double offset, int modeoverride); #endif #if defined(REAPERAPI_WANT_format_timestr_pos) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // 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 (*REAPERAPI_FUNCNAME(format_timestr_pos))(double tpos, char* buf, int buf_sz, int modeoverride); #endif #if defined(REAPERAPI_WANT_FreeHeapPtr) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // FreeHeapPtr // free heap memory returned from a Reaper API function void (*REAPERAPI_FUNCNAME(FreeHeapPtr))(void* ptr); #endif #if defined(REAPERAPI_WANT_genGuid) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // genGuid void (*REAPERAPI_FUNCNAME(genGuid))(GUID* g); #endif #if defined(REAPERAPI_WANT_get_config_var) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // get_config_var // gets ini configuration variable by name, raw, returns size of variable in szOut and pointer to variable. special values queryable are also: // __numcpu (int) cpu count. // __fx_loadstate_ctx (char): 0 if unknown, or during FX state loading: 'u' (instantiating via undo), 'U' (updating via undo), 'P' (loading preset). __langpack_filename can query langpack filename. If empty or <> then no langpack loaded; if relative pathname, then langpack is not yet loaded. void* (*REAPERAPI_FUNCNAME(get_config_var))(const char* name, int* szOut); #endif #if defined(REAPERAPI_WANT_get_config_var_string) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // get_config_var_string // gets ini configuration variable value as string bool (*REAPERAPI_FUNCNAME(get_config_var_string))(const char* name, char* bufOut, int bufOut_sz); #endif #if defined(REAPERAPI_WANT_get_ini_file) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // get_ini_file // Get reaper.ini full filename. const char* (*REAPERAPI_FUNCNAME(get_ini_file))(); #endif #if defined(REAPERAPI_WANT_get_midi_config_var) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // get_midi_config_var // Deprecated. void* (*REAPERAPI_FUNCNAME(get_midi_config_var))(const char* name, int* szOut); #endif #if defined(REAPERAPI_WANT_GetActionShortcutDesc) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetActionShortcutDesc // Get the text description of a specific shortcut for the given command ID. // See CountActionShortcuts,DeleteActionShortcut,DoActionShortcutDialog. bool (*REAPERAPI_FUNCNAME(GetActionShortcutDesc))(KbdSectionInfo* section, int cmdID, int shortcutidx, char* descOut, int descOut_sz); #endif #if defined(REAPERAPI_WANT_GetActiveTake) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetActiveTake // get the active take in this item MediaItem_Take* (*REAPERAPI_FUNCNAME(GetActiveTake))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_GetAllProjectPlayStates) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAllProjectPlayStates // returns the bitwise OR of all project play states (1=playing, 2=pause, 4=recording) int (*REAPERAPI_FUNCNAME(GetAllProjectPlayStates))(ReaProject* ignoreProject); #endif #if defined(REAPERAPI_WANT_GetAppVersion) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAppVersion // Returns app version which may include an OS/arch signifier, such as: "6.17" (windows 32-bit), "6.17/x64" (windows 64-bit), "6.17/OSX64" (macOS 64-bit Intel), "6.17/OSX" (macOS 32-bit), "6.17/macOS-arm64", "6.17/linux-x86_64", "6.17/linux-i686", "6.17/linux-aarch64", "6.17/linux-armv7l", etc const char* (*REAPERAPI_FUNCNAME(GetAppVersion))(); #endif #if defined(REAPERAPI_WANT_GetArmedCommand) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetArmedCommand // gets the currently armed command and section name (returns 0 if nothing armed). section name is empty-string for main section. int (*REAPERAPI_FUNCNAME(GetArmedCommand))(char* secOut, int secOut_sz); #endif #if defined(REAPERAPI_WANT_GetAudioAccessorEndTime) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAudioAccessorEndTime // Get the end time of the audio that can be returned from this accessor. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorSamples. double (*REAPERAPI_FUNCNAME(GetAudioAccessorEndTime))(AudioAccessor* accessor); #endif #if defined(REAPERAPI_WANT_GetAudioAccessorHash) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAudioAccessorHash // Deprecated. See AudioAccessorStateChanged instead. void (*REAPERAPI_FUNCNAME(GetAudioAccessorHash))(AudioAccessor* accessor, char* hashNeed128); #endif #if defined(REAPERAPI_WANT_GetAudioAccessorSamples) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAudioAccessorSamples // Get a block of samples from the audio accessor. Samples are extracted immediately pre-FX, and returned interleaved (first sample of first channel, first sample of second channel...). Returns 0 if no audio, 1 if audio, -1 on error. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorStartTime, GetAudioAccessorEndTime.// // // This function has special handling in Python, and only returns two objects, the API function return value, and the sample buffer. Example usage: // // tr = RPR_GetTrack(0, 0) // aa = RPR_CreateTrackAudioAccessor(tr) // buf = list([0]*2*1024) # 2 channels, 1024 samples each, initialized to zero // pos = 0.0 // (ret, buf) = GetAudioAccessorSamples(aa, 44100, 2, pos, 1024, buf) // # buf now holds the first 2*1024 audio samples from the track. // # typically GetAudioAccessorSamples() would be called within a loop, increasing pos each time. // int (*REAPERAPI_FUNCNAME(GetAudioAccessorSamples))(AudioAccessor* accessor, int samplerate, int numchannels, double starttime_sec, int numsamplesperchannel, double* samplebuffer); #endif #if defined(REAPERAPI_WANT_GetAudioAccessorStartTime) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAudioAccessorStartTime // Get the start time of the audio that can be returned from this accessor. See CreateTakeAudioAccessor, CreateTrackAudioAccessor, DestroyAudioAccessor, AudioAccessorStateChanged, GetAudioAccessorEndTime, GetAudioAccessorSamples. double (*REAPERAPI_FUNCNAME(GetAudioAccessorStartTime))(AudioAccessor* accessor); #endif #if defined(REAPERAPI_WANT_GetAudioDeviceInfo) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetAudioDeviceInfo // get information about the currently open audio device. attribute can be MODE, IDENT_IN, IDENT_OUT, BSIZE, SRATE, BPS. returns false if unknown attribute or device not open. bool (*REAPERAPI_FUNCNAME(GetAudioDeviceInfo))(const char* attribute, char* descOut, int descOut_sz); #endif #if defined(REAPERAPI_WANT_GetColorTheme) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetColorTheme // Deprecated, see GetColorThemeStruct. INT_PTR (*REAPERAPI_FUNCNAME(GetColorTheme))(int idx, int defval); #endif #if defined(REAPERAPI_WANT_GetColorThemeStruct) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetColorThemeStruct // returns the whole color theme (icontheme.h) and the size void* (*REAPERAPI_FUNCNAME(GetColorThemeStruct))(int* szOut); #endif #if defined(REAPERAPI_WANT_GetConfigWantsDock) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetConfigWantsDock // gets the dock ID desired by ident_str, if any int (*REAPERAPI_FUNCNAME(GetConfigWantsDock))(const char* ident_str); #endif #if defined(REAPERAPI_WANT_GetContextMenu) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetContextMenu // gets context menus. submenu 0:trackctl, 1:mediaitems, 2:ruler, 3:empty track area HMENU (*REAPERAPI_FUNCNAME(GetContextMenu))(int idx); #endif #if defined(REAPERAPI_WANT_GetCurrentProjectInLoadSave) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetCurrentProjectInLoadSave // returns current project if in load/save (usually only used from project_config_extension_t) ReaProject* (*REAPERAPI_FUNCNAME(GetCurrentProjectInLoadSave))(); #endif #if defined(REAPERAPI_WANT_GetCursorContext) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetCursorContext // return the current cursor context: 0 if track panels, 1 if items, 2 if envelopes, otherwise unknown int (*REAPERAPI_FUNCNAME(GetCursorContext))(); #endif #if defined(REAPERAPI_WANT_GetCursorContext2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetCursorContext2 // 0 if track panels, 1 if items, 2 if envelopes, otherwise unknown (unlikely when want_last_valid is true) int (*REAPERAPI_FUNCNAME(GetCursorContext2))(bool want_last_valid); #endif #if defined(REAPERAPI_WANT_GetCursorPosition) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetCursorPosition // edit cursor position double (*REAPERAPI_FUNCNAME(GetCursorPosition))(); #endif #if defined(REAPERAPI_WANT_GetCursorPositionEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetCursorPositionEx // edit cursor position double (*REAPERAPI_FUNCNAME(GetCursorPositionEx))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_GetDisplayedMediaItemColor) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetDisplayedMediaItemColor // see GetDisplayedMediaItemColor2. int (*REAPERAPI_FUNCNAME(GetDisplayedMediaItemColor))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_GetDisplayedMediaItemColor2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetDisplayedMediaItemColor2 // Returns the custom take, item, or track color that is used (according to the user preference) to color the media item. The returned color is OS dependent|0x01000000 (i.e. ColorToNative(r,g,b)|0x01000000), so a return of zero means "no color", not black. int (*REAPERAPI_FUNCNAME(GetDisplayedMediaItemColor2))(MediaItem* item, MediaItem_Take* take); #endif #if defined(REAPERAPI_WANT_GetEnvelopeInfo_Value) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopeInfo_Value // Gets an envelope numerical-value attribute: // I_TCPY : int : Y offset of envelope relative to parent track (may be separate lane or overlap with track contents) // I_TCPH : int : visible height of envelope // I_TCPY_USED : int : Y offset of envelope relative to parent track, exclusive of padding // I_TCPH_USED : int : visible height of envelope, exclusive of padding // P_TRACK : MediaTrack * : parent track pointer (if any) // P_DESTTRACK : MediaTrack * : destination track pointer, if on a send // P_ITEM : MediaItem * : parent item pointer (if any) // P_TAKE : MediaItem_Take * : parent take pointer (if any) // I_SEND_IDX : int : 1-based index of send in P_TRACK, or 0 if not a send // I_HWOUT_IDX : int : 1-based index of hardware output in P_TRACK or 0 if not a hardware output // I_RECV_IDX : int : 1-based index of receive in P_DESTTRACK or 0 if not a send/receive // I_DISPLAYEDCOLOR : int : displayed envelope color // double (*REAPERAPI_FUNCNAME(GetEnvelopeInfo_Value))(TrackEnvelope* env, const char* parmname); #endif #if defined(REAPERAPI_WANT_GetEnvelopeName) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopeName bool (*REAPERAPI_FUNCNAME(GetEnvelopeName))(TrackEnvelope* env, char* bufOut, int bufOut_sz); #endif #if defined(REAPERAPI_WANT_GetEnvelopePoint) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopePoint // Get the attributes of an envelope point. See GetEnvelopePointEx. bool (*REAPERAPI_FUNCNAME(GetEnvelopePoint))(TrackEnvelope* envelope, int ptidx, double* timeOut, double* valueOut, int* shapeOut, double* tensionOut, bool* selectedOut); #endif #if defined(REAPERAPI_WANT_GetEnvelopePointByTime) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopePointByTime // Returns the envelope point at or immediately prior to the given time position. See GetEnvelopePointByTimeEx. int (*REAPERAPI_FUNCNAME(GetEnvelopePointByTime))(TrackEnvelope* envelope, double time); #endif #if defined(REAPERAPI_WANT_GetEnvelopePointByTimeEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopePointByTimeEx // Returns the envelope point at or immediately prior to the given time position. // autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. // For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, // even if the automation item is trimmed so that not all points are visible. // Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations. // Prior to REAPER v7.46, this function interpreted the 0x10000000 autoitem_idx flag backwards. // See GetEnvelopePointEx, SetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx. int (*REAPERAPI_FUNCNAME(GetEnvelopePointByTimeEx))(TrackEnvelope* envelope, int autoitem_idx, double time); #endif #if defined(REAPERAPI_WANT_GetEnvelopePointEx) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopePointEx // Get the attributes of an envelope point. // autoitem_idx=-1 for the underlying envelope, 0 for the first automation item on the envelope, etc. // For automation items, pass autoitem_idx|0x10000000 to base ptidx on the number of points in one full loop iteration, // even if the automation item is trimmed so that not all points are visible. // Otherwise, ptidx will be based on the number of visible points in the automation item, including all loop iterations. // When using full loop iteration automation item mode, the time returned will be the project time of the first iteration of the point, and selection state will only be set if all visible instances of the point in the automation item are selected. // See CountEnvelopePointsEx, SetEnvelopePointEx, InsertEnvelopePointEx, DeleteEnvelopePointEx. bool (*REAPERAPI_FUNCNAME(GetEnvelopePointEx))(TrackEnvelope* envelope, int autoitem_idx, int ptidx, double* timeOut, double* valueOut, int* shapeOut, double* tensionOut, bool* selectedOut); #endif #if defined(REAPERAPI_WANT_GetEnvelopeScalingMode) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopeScalingMode // Returns the envelope scaling mode: 0=no scaling, 1=fader scaling. All API functions deal with raw envelope point values, to convert raw from/to scaled values see ScaleFromEnvelopeMode, ScaleToEnvelopeMode. int (*REAPERAPI_FUNCNAME(GetEnvelopeScalingMode))(TrackEnvelope* env); #endif #if defined(REAPERAPI_WANT_GetEnvelopeStateChunk) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopeStateChunk // Gets the RPPXML state of an envelope, returns true if successful. Undo flag is a performance/caching hint. bool (*REAPERAPI_FUNCNAME(GetEnvelopeStateChunk))(TrackEnvelope* env, char* strNeedBig, int strNeedBig_sz, bool isundoOptional); #endif #if defined(REAPERAPI_WANT_GetEnvelopeUIState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetEnvelopeUIState // gets information on the UI state of an envelope: returns &1 if automation/modulation is playing back, &2 if automation is being actively written, &4 if the envelope recently had an effective automation mode change int (*REAPERAPI_FUNCNAME(GetEnvelopeUIState))(TrackEnvelope* env); #endif #if defined(REAPERAPI_WANT_GetExePath) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetExePath // returns path of REAPER.exe (not including EXE), i.e. C:\Program Files\REAPER const char* (*REAPERAPI_FUNCNAME(GetExePath))(); #endif #if defined(REAPERAPI_WANT_GetExtState) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetExtState // Get the extended state value for a specific section and key. See SetExtState, DeleteExtState, HasExtState. const char* (*REAPERAPI_FUNCNAME(GetExtState))(const char* section, const char* key); #endif #if defined(REAPERAPI_WANT_GetFocusedFX) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetFocusedFX // This function is deprecated (returns GetFocusedFX2()&3), see GetTouchedOrFocusedFX. int (*REAPERAPI_FUNCNAME(GetFocusedFX))(int* tracknumberOut, int* itemnumberOut, int* fxnumberOut); #endif #if defined(REAPERAPI_WANT_GetFocusedFX2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetFocusedFX2 // Return value has 1 set if track FX, 2 if take/item FX, 4 set if FX is no longer focused but still open. tracknumber==0 means the master track, 1 means track 1, etc. itemnumber is zero-based (or -1 if not an item). For interpretation of fxnumber, see GetLastTouchedFX. Deprecated, see GetTouchedOrFocusedFX int (*REAPERAPI_FUNCNAME(GetFocusedFX2))(int* tracknumberOut, int* itemnumberOut, int* fxnumberOut); #endif #if defined(REAPERAPI_WANT_GetFreeDiskSpaceForRecordPath) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetFreeDiskSpaceForRecordPath // returns free disk space in megabytes, pathIdx 0 for normal, 1 for alternate. int (*REAPERAPI_FUNCNAME(GetFreeDiskSpaceForRecordPath))(ReaProject* proj, int pathidx); #endif #if defined(REAPERAPI_WANT_GetFXEnvelope) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetFXEnvelope // Returns the FX parameter envelope. If the envelope does not exist and create=true, the envelope will be created. If the envelope already exists and is bypassed and create=true, then the envelope will be unbypassed. TrackEnvelope* (*REAPERAPI_FUNCNAME(GetFXEnvelope))(MediaTrack* track, int fxindex, int parameterindex, bool create); #endif #if defined(REAPERAPI_WANT_GetGlobalAutomationOverride) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetGlobalAutomationOverride // return -1=no override, 0=trim/read, 1=read, 2=touch, 3=write, 4=latch, 5=bypass int (*REAPERAPI_FUNCNAME(GetGlobalAutomationOverride))(); #endif #if defined(REAPERAPI_WANT_GetHZoomLevel) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetHZoomLevel // returns pixels/second double (*REAPERAPI_FUNCNAME(GetHZoomLevel))(); #endif #if defined(REAPERAPI_WANT_GetIconThemePointer) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetIconThemePointer // returns a named icontheme entry void* (*REAPERAPI_FUNCNAME(GetIconThemePointer))(const char* name); #endif #if defined(REAPERAPI_WANT_GetIconThemePointerForDPI) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetIconThemePointerForDPI // returns a named icontheme entry for a given DPI-scaling (256=1:1). Note: the return value should not be stored, it should be queried at each paint! Querying name=NULL returns the start of the structure void* (*REAPERAPI_FUNCNAME(GetIconThemePointerForDPI))(const char* name, int dpisc); #endif #if defined(REAPERAPI_WANT_GetIconThemeStruct) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetIconThemeStruct // returns a pointer to the icon theme (icontheme.h) and the size of that struct void* (*REAPERAPI_FUNCNAME(GetIconThemeStruct))(int* szOut); #endif #if defined(REAPERAPI_WANT_GetInputActivityLevel) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetInputActivityLevel // returns approximate input level if available, 0-511 mono inputs, |1024 for stereo pairs, 4096+devidx*32 for MIDI devices double (*REAPERAPI_FUNCNAME(GetInputActivityLevel))(int input_id); #endif #if defined(REAPERAPI_WANT_GetInputChannelName) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetInputChannelName const char* (*REAPERAPI_FUNCNAME(GetInputChannelName))(int channelIndex); #endif #if defined(REAPERAPI_WANT_GetInputOutputLatency) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetInputOutputLatency // Gets the audio device input/output latency in samples void (*REAPERAPI_FUNCNAME(GetInputOutputLatency))(int* inputlatencyOut, int* outputLatencyOut); #endif #if defined(REAPERAPI_WANT_GetItemEditingTime2) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetItemEditingTime2 // returns time of relevant edit, set which_item to the pcm_source (if applicable), flags (if specified) will be set to 1 for edge resizing, 2 for fade change, 4 for item move, 8 for item slip edit (edit cursor time or start of item) double (*REAPERAPI_FUNCNAME(GetItemEditingTime2))(PCM_source** which_itemOut, int* flagsOut); #endif #if defined(REAPERAPI_WANT_GetItemFromPoint) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetItemFromPoint // Returns the first item at the screen coordinates specified. If allow_locked is false, locked items are ignored. If takeOutOptional specified, returns the take hit. See GetThingFromPoint. MediaItem* (*REAPERAPI_FUNCNAME(GetItemFromPoint))(int screen_x, int screen_y, bool allow_locked, MediaItem_Take** takeOutOptional); #endif #if defined(REAPERAPI_WANT_GetItemProjectContext) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetItemProjectContext ReaProject* (*REAPERAPI_FUNCNAME(GetItemProjectContext))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_GetItemStateChunk) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetItemStateChunk // Gets the RPPXML state of an item, returns true if successful. Undo flag is a performance/caching hint. bool (*REAPERAPI_FUNCNAME(GetItemStateChunk))(MediaItem* item, char* strNeedBig, int strNeedBig_sz, bool isundoOptional); #endif #if defined(REAPERAPI_WANT_GetLastColorThemeFile) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetLastColorThemeFile const char* (*REAPERAPI_FUNCNAME(GetLastColorThemeFile))(); #endif #if defined(REAPERAPI_WANT_GetLastMarkerAndCurRegion) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetLastMarkerAndCurRegion // Get the last project marker before time, and/or the project region that includes time. markeridx and regionidx are returned not necessarily as the displayed marker/region index, but as the index that can be passed to EnumProjectMarkers. Either or both of markeridx and regionidx may be NULL. See EnumProjectMarkers. void (*REAPERAPI_FUNCNAME(GetLastMarkerAndCurRegion))(ReaProject* proj, double time, int* markeridxOut, int* regionidxOut); #endif #if defined(REAPERAPI_WANT_GetLastTouchedFX) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetLastTouchedFX // Returns true if the last touched FX parameter is valid, false otherwise. The low word of tracknumber is the 1-based track index -- 0 means the master track, 1 means track 1, etc. If the high word of tracknumber is nonzero, it refers to the 1-based item index (1 is the first item on the track, etc). For track FX, the low 24 bits of fxnumber refer to the FX index in the chain, and if the next 8 bits are 01, then the FX is record FX. For item FX, the low word defines the FX index in the chain, and the high word defines the take number. Deprecated, see GetTouchedOrFocusedFX. bool (*REAPERAPI_FUNCNAME(GetLastTouchedFX))(int* tracknumberOut, int* fxnumberOut, int* paramnumberOut); #endif #if defined(REAPERAPI_WANT_GetLastTouchedTrack) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetLastTouchedTrack MediaTrack* (*REAPERAPI_FUNCNAME(GetLastTouchedTrack))(); #endif #if defined(REAPERAPI_WANT_GetMainHwnd) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMainHwnd HWND (*REAPERAPI_FUNCNAME(GetMainHwnd))(); #endif #if defined(REAPERAPI_WANT_GetMasterMuteSoloFlags) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMasterMuteSoloFlags // &1=master mute, &2=master solo, &4=master mix to mono, &24 is 2 bit mask, 0: L+R, 8: L, 16: R, 24: L-R. int (*REAPERAPI_FUNCNAME(GetMasterMuteSoloFlags))(); #endif #if defined(REAPERAPI_WANT_GetMasterTrack) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMasterTrack MediaTrack* (*REAPERAPI_FUNCNAME(GetMasterTrack))(ReaProject* proj); #endif #if defined(REAPERAPI_WANT_GetMasterTrackVisibility) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMasterTrackVisibility // returns &1 if the master track is visible in the TCP, &2 if NOT visible in the mixer. See SetMasterTrackVisibility. int (*REAPERAPI_FUNCNAME(GetMasterTrackVisibility))(); #endif #if defined(REAPERAPI_WANT_GetMaxMidiInputs) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMaxMidiInputs // returns max dev for midi inputs/outputs int (*REAPERAPI_FUNCNAME(GetMaxMidiInputs))(); #endif #if defined(REAPERAPI_WANT_GetMaxMidiOutputs) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMaxMidiOutputs int (*REAPERAPI_FUNCNAME(GetMaxMidiOutputs))(); #endif #if defined(REAPERAPI_WANT_GetMediaFileMetadata) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaFileMetadata // Get text-based metadata from a media file for a given identifier. Call with identifier="" to list all identifiers contained in the file, separated by newlines. May return "[Binary data]" for metadata that REAPER doesn't handle. int (*REAPERAPI_FUNCNAME(GetMediaFileMetadata))(PCM_source* mediaSource, const char* identifier, char* bufOutNeedBig, int bufOutNeedBig_sz); #endif #if defined(REAPERAPI_WANT_GetMediaItem) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItem // get an item from a project by item count (zero-based) (proj=0 for active project) MediaItem* (*REAPERAPI_FUNCNAME(GetMediaItem))(ReaProject* proj, int itemidx); #endif #if defined(REAPERAPI_WANT_GetMediaItem_Track) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItem_Track // Get parent track of media item MediaTrack* (*REAPERAPI_FUNCNAME(GetMediaItem_Track))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_GetMediaItemInfo_Value) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemInfo_Value // Get media item numerical-value attributes. // B_MUTE : bool * : muted (item solo overrides). setting this value will clear C_MUTE_SOLO. // B_MUTE_ACTUAL : bool * : muted (ignores solo). setting this value will not affect C_MUTE_SOLO. // C_LANEPLAYS : char * : on fixed lane tracks, 0=this item lane does not play, 1=this item lane plays exclusively, 2=this item lane plays and other lanes also play, -1=this item is on a non-visible, non-playing lane on a formerly fixed-lane track (read-only) // C_MUTE_SOLO : char * : solo override (-1=soloed, 0=no override, 1=unsoloed). note that this API does not automatically unsolo other items when soloing (nor clear the unsolos when clearing the last soloed item), it must be done by the caller via action or via this API. // B_LOOPSRC : bool * : loop source // B_ALLTAKESPLAY : bool * : all takes play // B_UISEL : bool * : selected in arrange view // C_BEATATTACHMODE : char * : item timebase, -1=track or project default, 1=beats (position, length, rate), 2=beats (position only). for auto-stretch timebase: C_BEATATTACHMODE=1, C_AUTOSTRETCH=1 // C_AUTOSTRETCH: : char * : auto-stretch at project tempo changes, 1=enabled, requires C_BEATATTACHMODE=1 // C_LOCK : char * : locked, &1=locked // D_VOL : double * : item volume, 0=-inf, 0.5=-6dB, 1=+0dB, 2=+6dB, etc // D_POSITION : double * : item position in seconds // D_LENGTH : double * : item length in seconds // D_SNAPOFFSET : double * : item snap offset in seconds // D_FADEINLEN : double * : item manual fadein length in seconds // D_FADEOUTLEN : double * : item manual fadeout length in seconds // D_FADEINDIR : double * : item fadein curvature, -1..1 // D_FADEOUTDIR : double * : item fadeout curvature, -1..1 // D_FADEINLEN_AUTO : double * : item auto-fadein length in seconds, if not greater than zero, no auto-fadein // D_FADEOUTLEN_AUTO : double * : item auto-fadeout length in seconds, if not greater than zero, no auto-fadeout // C_FADEINSHAPE : int * : fadein shape, 0..6, 0=linear // C_FADEOUTSHAPE : int * : fadeout shape, 0..6, 0=linear // I_FADELPF : int * : low pass frequency fade, &1=fade-in, &2=fade-out // I_GROUPID : int * : group ID, 0=no group // I_LASTY : int * : Y-position (relative to top of track) in pixels (read-only) // I_LASTH : int * : height in pixels (read-only) // I_CUSTOMCOLOR : int * : custom color, OS dependent color|0x1000000 (i.e. ColorToNative(r,g,b)|0x1000000). If you do not |0x1000000, then it will not be used, but will store the color // I_CURTAKE : int * : active take number // IP_ITEMNUMBER : int : item number on this track (read-only, returns the item number directly) // F_FREEMODE_Y : float * : free item positioning or fixed lane Y-position. 0=top of track, 1.0=bottom of track // F_FREEMODE_H : float * : free item positioning or fixed lane height. 0.5=half the track height, 1.0=full track height // I_FIXEDLANE : int * : fixed lane of item (fine to call with setNewValue, but returned value is read-only) // B_FIXEDLANE_HIDDEN : bool * : true if displaying only one fixed lane and this item is in a different lane (read-only) // P_TRACK : MediaTrack * : (read-only) // double (*REAPERAPI_FUNCNAME(GetMediaItemInfo_Value))(MediaItem* item, const char* parmname); #endif #if defined(REAPERAPI_WANT_GetMediaItemNumTakes) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemNumTakes int (*REAPERAPI_FUNCNAME(GetMediaItemNumTakes))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_GetMediaItemTake) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTake MediaItem_Take* (*REAPERAPI_FUNCNAME(GetMediaItemTake))(MediaItem* item, int tk); #endif #if defined(REAPERAPI_WANT_GetMediaItemTake_Item) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTake_Item // Get parent item of media item take MediaItem* (*REAPERAPI_FUNCNAME(GetMediaItemTake_Item))(MediaItem_Take* take); #endif #if defined(REAPERAPI_WANT_GetMediaItemTake_Peaks) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTake_Peaks // Gets block of peak samples to buf. Note that the peak samples are interleaved, but in two or three blocks (maximums, then minimums, then extra). Return value has 20 bits of returned sample count, then 4 bits of output_mode (0xf00000), then a bit to signify whether extra_type was available (0x1000000). extra_type can be 115 ('s') for spectral information, which will return peak samples as integers with the low 15 bits frequency, next 14 bits tonality. int (*REAPERAPI_FUNCNAME(GetMediaItemTake_Peaks))(MediaItem_Take* take, double peakrate, double starttime, int numchannels, int numsamplesperchannel, int want_extra_type, double* buf); #endif #if defined(REAPERAPI_WANT_GetMediaItemTake_Source) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTake_Source // Get media source of media item take PCM_source* (*REAPERAPI_FUNCNAME(GetMediaItemTake_Source))(MediaItem_Take* take); #endif #if defined(REAPERAPI_WANT_GetMediaItemTake_Track) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTake_Track // Get parent track of media item take MediaTrack* (*REAPERAPI_FUNCNAME(GetMediaItemTake_Track))(MediaItem_Take* take); #endif #if defined(REAPERAPI_WANT_GetMediaItemTakeByGUID) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTakeByGUID MediaItem_Take* (*REAPERAPI_FUNCNAME(GetMediaItemTakeByGUID))(ReaProject* project, const GUID* guid); #endif #if defined(REAPERAPI_WANT_GetMediaItemTakeInfo_Value) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTakeInfo_Value // Get media item take numerical-value attributes. // D_STARTOFFS : double * : start offset in source media, in seconds // D_VOL : double * : take volume, 0=-inf, 0.5=-6dB, 1=+0dB, 2=+6dB, etc, negative if take polarity is flipped // D_PAN : double * : take pan, -1..1 // D_PANLAW : double * : take pan law, -1=default, 0.5=-6dB, 1.0=+0dB, etc // D_PLAYRATE : double * : take playback rate, 0.5=half speed, 1=normal, 2=double speed, etc // D_PITCH : double * : take pitch adjustment in semitones, -12=one octave down, 0=normal, +12=one octave up, etc // B_PPITCH : bool * : preserve pitch when changing playback rate // I_LASTY : int * : Y-position (relative to top of track) in pixels (read-only) // I_LASTH : int * : height in pixels (read-only) // I_CHANMODE : int * : channel mode, 0=normal, 1=reverse stereo, 2=downmix, 3=left, 4=right // I_PITCHMODE : int * : pitch shifter mode, -1=project default, otherwise high 2 bytes=shifter, low 2 bytes=parameter // I_STRETCHFLAGS : int * : stretch marker flags (&7 mask for mode override: 0=default, 1=balanced, 2/3/6=tonal, 4=transient, 5=no pre-echo) // F_STRETCHFADESIZE : float * : stretch marker fade size in seconds (0.0025 default) // I_RECPASSID : int * : record pass ID // I_TAKEFX_NCH : int * : number of internal audio channels for per-take FX to use (OK to call with setNewValue, but the returned value is read-only) // I_CUSTOMCOLOR : int * : custom color, OS dependent color|0x1000000 (i.e. ColorToNative(r,g,b)|0x1000000). If you do not |0x1000000, then it will not be used, but will store the color // IP_SPECEDIT:CNT : int : spectral edit count (read-only) // IP_SPECEDIT:DELETE:x : int : read or write this key to remove the spectral edit specified // IP_SPECEDIT:ADD : int : read or write this key to add a new spectral edit (returns index) // IP_SPECEDIT:SORT : int : read or write this key to re-sort spectral edits (be sure to do this following a position change or insert of new edit) // I_SPECEDIT:FFT_SIZE : int * : FFT size used by spectral edits for this take // D_SPECEDIT:x:POSITION : double * : position of spectral edit start (changing this requires a resort of spectral edits) // D_SPECEDIT:x:LENGTH : double * : length of spectral edit // F_SPECEDIT:x:GAIN : float * : gain of spectral edit // F_SPECEDIT:x:FADE_IN : float * : fade-in size 0..1 // F_SPECEDIT:x:FADE_OUT : float * : fade-out size 0..1 // F_SPECEDIT:x:FADE_LOW : float * : fade-lf size 0..1 // F_SPECEDIT:x:FADE_HI : float * : fade-hf size 0..1 // I_SPECEDIT:x:CHAN : int * : channel index, -1 for omni // I_SPECEDIT:x:FLAGS : int * : flags, &1=bypassed, &2=solo // F_SPECEDIT:x:GATE_THRESH : float * : gate threshold // F_SPECEDIT:x:GATE_FLOOR : float * : gate floor // F_SPECEDIT:x:COMP_THRESH : float * : comp threshold // F_SPECEDIT:x:COMP_RATIO : float * : comp ratio // B_SPECEDIT:x:SELECTED : bool * : selection state // I_SPECEDIT:x:TOPFREQ_CNT : int * : (read-only) number of top frequency-points // I_SPECEDIT:x:TOPFREQ_ADD:pos:val : int * : reading or writing will insert top frequency-point with position/value pair, returns index // I_SPECEDIT:x:TOPFREQ_DEL:y : int * : reading or writing will delete top frequency-point y. there will always be at least one point. // F_SPECEDIT:x:TOPFREQ_POS:y : float * : (read-only) get position of top frequency-point y // F_SPECEDIT:x:TOPFREQ_FREQ:y : float * : (read-only) get frequency of top frequency-point y // I_SPECEDIT:x:BOTFREQ_CNT : int * : number of bottom frequency-points // I_SPECEDIT:x:BOTFREQ_ADD:pos:val : int * : reading or writing will insert bottom frequency-point with position/value pair, returns index // I_SPECEDIT:x:BOTFREQ_DEL:y : int * : reading or writing will delete bottom frequency-point y. there will always be at least one point. // F_SPECEDIT:x:BOTFREQ_POS:y : float * : (read-only) get position of bottom frequency-point y // F_SPECEDIT:x:BOTFREQ_FREQ:y : float * : (read-only) get frequency of bottom frequency-point y // IP_TAKENUMBER : int : take number (read-only, returns the take number directly) // P_TRACK : pointer to MediaTrack (read-only) // P_ITEM : pointer to MediaItem (read-only) // P_SOURCE : PCM_source *. Note that if setting this, you should first retrieve the old source, set the new, THEN delete the old. // double (*REAPERAPI_FUNCNAME(GetMediaItemTakeInfo_Value))(MediaItem_Take* take, const char* parmname); #endif #if defined(REAPERAPI_WANT_GetMediaItemTrack) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaItemTrack MediaTrack* (*REAPERAPI_FUNCNAME(GetMediaItemTrack))(MediaItem* item); #endif #if defined(REAPERAPI_WANT_GetMediaSourceFileName) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaSourceFileName // Copies the media source filename to filenamebuf. Note that in-project MIDI media sources have no associated filename. See GetMediaSourceParent. void (*REAPERAPI_FUNCNAME(GetMediaSourceFileName))(PCM_source* source, char* filenamebufOut, int filenamebufOut_sz); #endif #if defined(REAPERAPI_WANT_GetMediaSourceLength) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaSourceLength // Returns the length of the source media. If the media source is beat-based, the length will be in quarter notes, otherwise it will be in seconds. double (*REAPERAPI_FUNCNAME(GetMediaSourceLength))(PCM_source* source, bool* lengthIsQNOut); #endif #if defined(REAPERAPI_WANT_GetMediaSourceNumChannels) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaSourceNumChannels // Returns the number of channels in the source media. int (*REAPERAPI_FUNCNAME(GetMediaSourceNumChannels))(PCM_source* source); #endif #if defined(REAPERAPI_WANT_GetMediaSourceParent) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaSourceParent // Returns the parent source, or NULL if src is the root source. This can be used to retrieve the parent properties of sections or reversed sources for example. PCM_source* (*REAPERAPI_FUNCNAME(GetMediaSourceParent))(PCM_source* src); #endif #if defined(REAPERAPI_WANT_GetMediaSourceSampleRate) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaSourceSampleRate // Returns the sample rate. MIDI source media will return zero. int (*REAPERAPI_FUNCNAME(GetMediaSourceSampleRate))(PCM_source* source); #endif #if defined(REAPERAPI_WANT_GetMediaSourceType) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaSourceType // copies the media source type ("WAV", "MIDI", etc) to typebuf void (*REAPERAPI_FUNCNAME(GetMediaSourceType))(PCM_source* source, char* typebufOut, int typebufOut_sz); #endif #if defined(REAPERAPI_WANT_GetMediaTrackInfo_Value) || !defined(REAPERAPI_MINIMAL) REAPERAPI_DEF //============================================== // GetMediaTrackInfo_Value // Get track numerical-value attributes. // B_MUTE : bool * : muted // B_PHASE : bool * : track phase inverted // B_RECMON_IN_EFFECT : bool * : record monitoring in effect (current audio-thread playback state, read-only) // IP_TRACKNUMBER : int : track number 1-based, 0=not found, -1=master track (read-only, returns the int directly) // I_SOLO : int * : soloed, 0=not soloed, 1=soloed, 2=soloed in place, 5=safe soloed, 6=safe soloed in place // B_SOLO_DEFEAT : bool * : when set, if anything else is soloed and this track is not muted, this track acts soloed // I_FXEN : int * : fx enabled, 0=bypassed, !0=fx active // I_RECARM : int * : record armed, 0=not record armed, 1=record armed // I_RECINPUT : int * : record input, <0=no input. if 4096 set, input is MIDI and low 5 bits represent channel (0=all, 1-16=only chan), next 6 bits represent physical input (63=all, 62=VKB). If 4096 is not set, low 10 bits (0..1023) are input start channel (ReaRoute/Loopback start at 512). If 2048 is set, input is multichannel input (using track channel count), or if 1024 is set, input is stereo input, otherwise input is mono. // I_RECMODE : int * : record mode, 0=input, 1=stereo out, 2=none, 3=stereo out w/latency compensation, 4=midi output, 5=mono out, 6=mono out w/ latency compensation, 7=midi overdub, 8=midi replace // I_RECMODE_FLAGS : int * : record mode flags, &3=output recording mode (0=post fader, 1=pre-fx, 2=post-fx/pre-fader) // I_RECMON : int * : record monitoring, 0=off, 1=normal, 2=not when playing (tape style) // I_RECMONITEMS : int * : monitor items while recording, 0=off, 1=on // B_AUTO_RECARM : bool * : automatically set record arm when selected (does not immediately affect recarm state, script should set directly if desired) // I_VUMODE : int * : track vu mode, &1:disabled, &30==0:stereo peaks, &30==2:multichannel peaks, &30==4:stereo RMS, &30==8:combined RMS, &30==12:LUFS-M, &30==16:LUFS-S (readout=max), &30==20:LUFS-S (readout=current), &32:LUFS calculation on channels 1+2 only // I_AUTOMODE : int * : track automation mode, 0=trim/off, 1=read, 2=touch, 3=write, 4=latch // I_NCHAN : int * : number of track channels, 2-128, even numbers only // I_SELECTED : int * : track selected, 0=unselected, 1=selected // I_WNDH : int * : current TCP height in pixels including envelopes (read-only) // I_TCPH : int * : current TCP height in pixels not including envelopes (read-only) // I_TCPY : int * : current TCP Y-position in pixels relative to top of arrange view (read-only) // I_TCPSCREENY : int * : current TCP Y-position in pixels relative to screen (read-only) // I_MCPW : int * : current MCP width in pixels (read-only) // I_MCPH : int * : current MCP height in pixels (read-only) // I_MCPX : int * : current MCP X-position in pixels relative to mixer container (read-only) // I_MCPY : int * : current MCP Y-position in pixels relative to mixer container (read-only) // I_MCPSCREENX : int * : current MCP X-position in pixels relative to screen (read-only) // I_FOLDERDEPTH : int * : folder depth change, 0=normal, 1=track is a folder parent, -1=track is the last in the innermost folder, -2=track is the last in the innermost and next-innermost folders, etc // I_FOLDERCOMPACT : int * : folder collapsed state (only valid on folders), 0=normal, 1=collapsed, 2=fully collapsed // I_MIDIHWOUT : int * : track midi hardware output index, <0=disabled, low 5 bits are which channels (0=all, 1-16), next 5 bits are output device index (0-31) // I_MIDIHWOUT_SLOT : int * : hint for slot index for MIDI HW output send, if enabled // I_MIDI_INPUT_CHANMAP : int * : -1 maps to source channel, otherwise 1-16 to map to MIDI channel // I_MIDI_CTL_CHAN : int * : -1 no link, 0-15 link to MIDI volume/pan on channel, 16 link to MIDI volume/pan on all channels // I_MIDI_TRACKSEL_FLAG : int * : MIDI editor track list options: &1=expand media items, &2=exclude from list, &4=auto-pruned // I_PERFFLAGS : int * : track performance flags, &1=no media buffering, &2=no anticipative FX // I_CUSTOMCOLOR : int * : custom color, OS dependent color|0x1000000 (i.e. ColorToNative(r,g,b)|0x1000000). If you do not |0x1000000, then it will not be used, but will store the color // I_HEIGHTOVERRIDE : int * : custom height override for TCP window, 0 for none, otherwise size in pixels // I_SPACER : int * : 1=TCP track spacer above this trackB_HEIGHTLOCK : bool * : track height lock (must set I_HEIGHTOVERRIDE before locking) // D_VOL : double * : trim volume of track, 0=-inf, 0.5=-6dB, 1=+0dB, 2=+6dB, etc // D_PAN : double * : trim pan of track, -1..1 // D_WIDTH : double * : width of track, -1..1 // D_DUALPANL : double * : dualpan position 1, -1..1, only if I_PANMODE==6 // D_DUALPANR : double * : dualpan position 2, -1..1, only if I_PANMODE==6 // I_PANMODE : int * : pan mode, 0=classic 3.x, 3=new balance, 5=stereo pan, 6=dual pan // D_PANLAW : double * : pan law of track, <0=project default, 0.5=-6dB, 0.707..=-3dB, 1=+0dB, 1.414..=-3dB with gain compensation, 2=-6dB with gain compensation, etc // I_PANLAW_FLAGS : int * : pan law flags, 0=sine taper, 1=hybrid taper with deprecated behavior when gain compensation enabled, 2=linear taper, 3=hybrid taper // P_ENV: