Skip to content

Commit

Permalink
Merge pull request #232 from Ultraschall/US_Api_Doku_Reaper_6_05_update
Browse files Browse the repository at this point in the history
Us api doku reaper 6 05 update
  • Loading branch information
rstockm authored Mar 8, 2020
2 parents d1955ec + 17016dc commit 30b82c5
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 33 deletions.
33 changes: 17 additions & 16 deletions UserPlugins/ultraschall_api/DocsSourcefiles/reaper-apidocs.USDocML
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<slug>1.Introduction</slug>
<title>1 Introduction to ReaScript</title>
<description markup_type="markdown" markup_version="1.0.1" indent="default">
## ReaScript API as of Reaper 6.03
## ReaScript API as of Reaper 6.05

REAPER provides an API (advanced programming interface) for users and third parties to create extended functionality. API functions can be called from a compiled C/C++ dynamic library that is loaded by REAPER, or at run-time by user-created ReaScripts that can be written using REAPER's own editor.

Expand Down Expand Up @@ -8165,7 +8165,7 @@
<functioncall prog_lang="lua">boolean retval, string valuestrNeedBig = reaper.GetSetProjectInfo_String(ReaProject project, string desc, string valuestrNeedBig, boolean is_set)</functioncall>
<functioncall prog_lang="python">(Boolean retval, ReaProject project, String desc, String valuestrNeedBig, Boolean is_set) = RPR_GetSetProjectInfo_String(project, desc, valuestrNeedBig, is_set)</functioncall>
<requires>
Reaper=5.975
Reaper=6.05
Lua=5.3
</requires>
<description prog_lang="*" markup_type="markdown" markup_version="1.0.1" indent="default">
Expand All @@ -8176,20 +8176,21 @@
RENDER\_FILE: render directory
RENDER\_PATTERN: render file name (may contain wildcards)
RENDER\_FORMAT: base64-encoded sink configuration (see project files, etc). Callers can also pass a simple 4-byte string (non-base64-encoded), to use default settings for that sink type.
RENDER\_FORMAT2: base64-encoded secondary sink configuration. Callers can also pass a simple 4-byte string (non-base64-encoded), e.g. "evaw" or "l3pm", to use default settings for that sink type, or "" to disable secondary render.
see [render-code-documentation](render-codes-decoded-base64-strings.txt) for how the unencoded RENDER_FORMAT-string is structured.

To just use the 4-byte-string, you can use:
"evaw" for wave, "ffia" for aiff, " osi" for audio-cd, " pdd" for ddp, "calf" for flac, "l3pm" for mp3, "vggo" for ogg, "SggO" for Opus, "PMFF" for FFMpeg-video, "FVAX" for MP4Video/Audio on Mac, " FIG" for Gif, " FCL" for LCF, "kpvw" for wavepack
</description>
<retvals>
boolean retval -
string valuestrNeedBig -
boolean retval - true, value can be set/get; false, value can't be set/get
string valuestrNeedBig - the current value for this project-setting
</retvals>
<parameters>
ReaProject project -
string desc -
string valuestrNeedBig -
boolean is_set -
ReaProject project - the project, whose setting you want to get or set
string desc - the setting, that you want to get/set; refer description for available ones
string valuestrNeedBig - if is_set==true, this is the new value to set
boolean is_set - true, set a new value; false, just get the current one
</parameters>
<target_document>Reaper_Api_Documentation</target_document>
<source_document>reaper-apidocs.USDocML</source_document>
Expand Down Expand Up @@ -24339,11 +24340,15 @@
<functioncall prog_lang="python">JS_GDI_ReleaseDC(void windowHWND, void deviceHDC)</functioncall>
<requires>
Reaper=5.95
JS=0.986
JS=0.999
Lua=5.3
</requires>
<description indent="default" markup_type="markdown" markup_version="1.0.1" indent="default">
Any GDI HDC should be released immediately after drawing, and deferred scripts should get and release new DCs in each cycle.
To release a window HDC, both arguments must be supplied: the HWND as well as the HDC. To release a screen DC, only the HDC needs to be supplied.

For compatibility with previous versions, the HWND and HDC can be supplied in any order.

NOTE: Any GDI HDC should be released immediately after drawing, and deferred scripts should get and release new DCs in each cycle.
</description>
<parameters>
identifier windowHWND -
Expand Down Expand Up @@ -28018,19 +28023,15 @@
<functioncall prog_lang="python">Boolean JS_Window_IsWindow(void windowHWND)</functioncall>
<requires>
Reaper=5.965
JS=0.971
JS=0.999
Lua=5.3
</requires>
<description indent="default" markup_type="markdown" markup_version="1.0.1" indent="default">
DEPRECATED: Since REAPER v5.974, windows can be checked using the native function [ValidatePtr](#ValidatePtr)(windowHWND, "HWND").

Determines whether the specified window handle identifies an existing window.

On macOS and Linux, only windows that were created by WDL/swell will be identified (and only such windows should be acted on by scripts).

WARNING! On MacOS and Linux, REAPER WILL CRASH if the handle passed to a [JS\_Window](#JS_Window) or [JS\_WindowMessage](#JS_WindowMessage) function does not refer to an existing window.

The IsWindow function is slower on macOS and Linux. Preferably use native functions such as [MIDIEditor\_GetMode](#MIDIEditor_GetMode) to test handles.
NOTE: Since REAPER v5.974, windows can be checked using the native function ValidatePtr(windowHWND, "HWND").
</description>
<retvals>
boolean -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<slug>Introduction</slug>
<title>Introduction to Config Variables</title>
<description markup_type="markdown" markup_version="1.0.1" indent="default">
List of all Config Variables as of Reaper 6.01 and probably are missing some, but should be fairly complete anyway.
List of all Config Variables as of Reaper 6.05 and probably are missing some, but should be fairly complete anyway.
These can be used to set configuration-stuff in the preferences, the project-settings, the render-dialog, many context-menus(like MCP or transport-context-menus) and many others.
To change them, you can use the following ReaScript API-functions(requires SWS being installed):

Expand Down Expand Up @@ -6081,6 +6081,22 @@
<source_document>reaper-config_var.USDocML</source_document>
<target_document>Reaper_Config_Variables</target_document>
</US_DocBloc>

<US_DocBloc version="1.0" spok_lang="en" prog_lang="*">
<slug>midipeaks</slug>
<title>midipeaks</title>
<description markup_type="markdown" markup_version="1.0.1" indent="default">
unknown
It is an integer

Default is 0
</description>
<chapter_context>
Config Variables
</chapter_context>
<source_document>reaper-config_var.USDocML</source_document>
<target_document>Reaper_Config_Variables</target_document>
</US_DocBloc>

<US_DocBloc version="1.0" spok_lang="en" prog_lang="*">
<slug>midisendflags</slug>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h3><a id="Introduction">Introduction</a></h3>
<h3><a id="FunctionsIntro">How it works - basics</a></h3>
The Web-Interface is programmed in JavaScript. You need to include main.js first, then call wwr_start(), which tells the Reaper-Server to accept requests.<br>
You can now give Reaper requests, using commands like i.e. wwr_req(ActionCommandID) for one time requests. The ActionCommandID tells Reaper, what you want to call, i.e. the ActionCommandID 1007 starts play in Reaper.<br>
You can find a full Action Command ID-list at the page <a href="Reaper-ActionList.txt">Reaper Action-Command-IDs</a>.<p>
You can find a full Action Command ID-list in the Action-Dialog in the menu Actions -> Show Action List.<p>

Example Code that presses the Play-Button:<p>
<pre>
Expand Down Expand Up @@ -202,7 +202,7 @@ <h3><a id="FunctionsIntro">How it works - basics</a></h3>
<i style="padding-left :10%;">SCR 4 32060 RS7d3c_1ee9bb229dabffe151848d7efa3c10f748e1a1cf "Custom: lyrics.lua" Cockos/lyrics.lua</i><p>
The third entry(beginning with <i>RS7d3c_...</i>) is the Action-Command-Code. You can change it to something more "catchy" like Reascript_Lyrics_Script, so now it reads:<p>
<i style="padding-left :10%;">SCR 4 32060 Reascript_Lyrics_Script "Custom: lyrics.lua" Cockos/lyrics.lua</i><p>
Note: If you want to use your newly defined Action-Command-Code in the Web-API, you need to put a underscore at the beginning(in our example, <i>Reascript_Lyrics_Script</i> becomes <i>_Reascript_Lyrics_Script</i>)! Else, it will not work.<p>
Note: If you want to use your newly defined Action-Command-Code in the Web-API, you need to put an underscore at the beginning(in our example, <i>Reascript_Lyrics_Script</i> becomes <i>_Reascript_Lyrics_Script</i>)! Else, it will not work.<p>

Note also: If you had a shortcut associated with it, you need to change it too after changing the ActionCommandID. You can do it either in Reaper itself or you look for another existence of the old Action-Command-Code(in our example <i>RS7d3c...</i>) in the reaper-kb.ini file.<br>
You should find it among the entries, that begin with KEY and it is written with an underscore at the beginning ( <i>_RS7d3c...</i>). Replace the code with <i>_Reascript_Lyrics_Script</i> (remember, here, it must begin with an underscore!).<br>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
</div>
<div style="position:absolute; top:17%; padding-left:5%; width:90%;">
<br><br><img src="gfx/us.png"><div style="padding-left:0%;"><br>Beta 2.7 - "John Cage - 4'33" - 15th of October 2018 - Build: 43008</div><h3>The Functions Reference</h3>To add the API to your script, just add<pre><code> dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")</code></pre>as first line into your script.<br><br>For more details, read the docs in the <a href="US_Api_Introduction_and_Concepts.html">Introduction and Concepts</a>-area of this page.<br><br><table style="font-size:10pt; width:100%;" ><table style="width:100%;" border="0"><tr><td><br><strong><u>ProjectStateChunk</u></strong><br><br>
<br><br><img src="gfx/us.png"><div style="padding-left:0%;"><br>Beta 2.7 - "John Cage - 4'33" - 15th of October 2018 - Build: 43011</div><h3>The Functions Reference</h3>To add the API to your script, just add<pre><code> dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")</code></pre>as first line into your script.<br><br>For more details, read the docs in the <a href="US_Api_Introduction_and_Concepts.html">Introduction and Concepts</a>-area of this page.<br><br><table style="font-size:10pt; width:100%;" ><table style="width:100%;" border="0"><tr><td><br><strong><u>ProjectStateChunk</u></strong><br><br>
</td></tr><tr><td style="width:25%; font-size:small;"><a href="#APPLY_CFG">APPLY_CFG</a></td><td style="width:25%; font-size:small;"><a href="#AUTOXFADE">AUTOXFADE</a></td><td style="width:25%; font-size:small;"><a href="#CURSOR">CURSOR</a></td><td style="width:25%; font-size:small;"><a href="#DEFPITCHMODE">DEFPITCHMODE</a></td></tr><td style="width:25%; font-size:small;"><a href="#ENVATTACH">ENVATTACH</a></td><td style="width:25%; font-size:small;"><a href="#FEEDBACK">FEEDBACK</a></td><td style="width:25%; font-size:small;"><a href="#GLOBAL_AUTO">GLOBAL_AUTO</a></td><td style="width:25%; font-size:small;"><a href="#GRID">GRID</a></td></tr><td style="width:25%; font-size:small;"><a href="#GROUPOVERRIDE">GROUPOVERRIDE</a></td><td style="width:25%; font-size:small;"><a href="#GROUPS_DISABLED">GROUPS_DISABLED</a></td><td style="width:25%; font-size:small;"><a href="#GROUP_NAME">GROUP_NAME</a></td><td style="width:25%; font-size:small;"><a href="#INTMIXMODE">INTMIXMODE</a></td></tr><td style="width:25%; font-size:small;"><a href="#ITEMMIX">ITEMMIX</a></td><td style="width:25%; font-size:small;"><a href="#LOCK">LOCK</a></td><td style="width:25%; font-size:small;"><a href="#LOOP">LOOP</a></td><td style="width:25%; font-size:small;"><a href="#LOOPGRAN">LOOPGRAN</a></td></tr><td style="width:25%; font-size:small;"><a href="#MARKER/REGION">MARKER/REGION</a></td><td style="width:25%; font-size:small;"><a href="#MASTERAUTOMODE">MASTERAUTOMODE</a></td><td style="width:25%; font-size:small;"><a href="#MASTERHWOUT">MASTERHWOUT</a></td><td style="width:25%; font-size:small;"><a href="#MASTERHWOUT">MASTERHWOUT</a></td></tr><td style="width:25%; font-size:small;"><a href="#MASTERMUTESOLO">MASTERMUTESOLO</a></td><td style="width:25%; font-size:small;"><a href="#MASTERPEAKCOL">MASTERPEAKCOL</a></td><td style="width:25%; font-size:small;"><a href="#MASTERTRACKHEIGHT">MASTERTRACKHEIGHT</a></td><td style="width:25%; font-size:small;"><a href="#MASTERTRACKVIEW">MASTERTRACKVIEW</a></td></tr><td style="width:25%; font-size:small;"><a href="#MASTER_FX">MASTER_FX</a></td><td style="width:25%; font-size:small;"><a href="#MASTER_GROUP_FLAGS">MASTER_GROUP_FLAGS</a></td><td style="width:25%; font-size:small;"><a href="#MASTER_GROUP_FLAGS_HIGH">MASTER_GROUP_FLAGS_HIGH</a></td><td style="width:25%; font-size:small;"><a href="#MASTER_NCH">MASTER_NCH</a></td></tr><td style="width:25%; font-size:small;"><a href="#MASTER_PANMODE">MASTER_PANMODE</a></td><td style="width:25%; font-size:small;"><a href="#MASTER_SEL">MASTER_SEL</a></td><td style="width:25%; font-size:small;"><a href="#MASTER_VOLUME">MASTER_VOLUME</a></td><td style="width:25%; font-size:small;"><a href="#MASTER_WIDTH">MASTER_WIDTH</a></td></tr><td style="width:25%; font-size:small;"><a href="#MAXPROJLEN">MAXPROJLEN</a></td><td style="width:25%; font-size:small;"><a href="#MIXERUIFLAGS">MIXERUIFLAGS</a></td><td style="width:25%; font-size:small;"><a href="#PANLAW">PANLAW</a></td><td style="width:25%; font-size:small;"><a href="#PANMODE">PANMODE</a></td></tr><td style="width:25%; font-size:small;"><a href="#PEAKGAIN">PEAKGAIN</a></td><td style="width:25%; font-size:small;"><a href="#PLAYRATE">PLAYRATE</a></td><td style="width:25%; font-size:small;"><a href="#PROJOFFS">PROJOFFS</a></td><td style="width:25%; font-size:small;"><a href="#QUEUED_RENDER_ORIGINAL_FILENAME">QUEUED_RENDER_ORIGINAL_FILENAME</a></td></tr><td style="width:25%; font-size:small;"><a href="#QUEUED_RENDER_OUTFILE">QUEUED_RENDER_OUTFILE</a></td><td style="width:25%; font-size:small;"><a href="#REAPER_PROJECT">REAPER_PROJECT</a></td><td style="width:25%; font-size:small;"><a href="#RECMODE">RECMODE</a></td><td style="width:25%; font-size:small;"><a href="#RECORD_CFG">RECORD_CFG</a></td></tr><td style="width:25%; font-size:small;"><a href="#RECORD_PATH">RECORD_PATH</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_1X">RENDER_1X</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_ADDTOPROJ">RENDER_ADDTOPROJ</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_CFG">RENDER_CFG</a></td></tr><td style="width:25%; font-size:small;"><a href="#RENDER_DITHER">RENDER_DITHER</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_FILE">RENDER_FILE</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_FMT">RENDER_FMT</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_PATTERN">RENDER_PATTERN</a></td></tr><td style="width:25%; font-size:small;"><a href="#RENDER_QDELAY">RENDER_QDELAY</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_RANGE">RENDER_RANGE</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_RESAMPLE">RENDER_RESAMPLE</a></td><td style="width:25%; font-size:small;"><a href="#RENDER_STEMS">RENDER_STEMS</a></td></tr><td style="width:25%; font-size:small;"><a href="#RIPPLE">RIPPLE</a></td><td style="width:25%; font-size:small;"><a href="#SAMPLERATE">SAMPLERATE</a></td><td style="width:25%; font-size:small;"><a href="#SELECTION">SELECTION</a></td><td style="width:25%; font-size:small;"><a href="#SELECTION2">SELECTION2</a></td></tr><td style="width:25%; font-size:small;"><a href="#SMPTESYNC">SMPTESYNC</a></td><td style="width:25%; font-size:small;"><a href="#TAKELANE">TAKELANE</a></td><td style="width:25%; font-size:small;"><a href="#TEMPO">TEMPO</a></td><td style="width:25%; font-size:small;"><a href="#TEMPOENVLOCKMODE">TEMPOENVLOCKMODE</a></td></tr><td style="width:25%; font-size:small;"><a href="#TIMELOCKMODE x">TIMELOCKMODE x</a></td><td style="width:25%; font-size:small;"><a href="#TIMEMODE">TIMEMODE</a></td><td style="width:25%; font-size:small;"><a href="#USE_REC_CFG">USE_REC_CFG</a></td><td style="width:25%; font-size:small;"><a href="#VIDEO_CONFIG">VIDEO_CONFIG</a></td></tr><td style="width:25%; font-size:small;"><a href="#VZOOMEX">VZOOMEX</a></td><td style="width:25%; font-size:small;"><a href="#ZOOM">ZOOM</a></td><td style="width:25%;">&nbsp;</td><td style="width:25%;">&nbsp;</td></tr></table><table style="width:100%;" border="0"><tr><td><b style="font-size:small;"> Automation Items</b>
</td></tr><tr><td style="width:25%; font-size:small;"><a href="#POOLEDENV">POOLEDENV</a></td><td style="width:25%;">&nbsp;</td><td style="width:25%;">&nbsp;</td><td style="width:25%;">&nbsp;</td></tr></table><table style="width:100%;" border="0"><tr><td><b style="font-size:small;"> Extensions</b>
</td></tr><tr><td style="width:25%; font-size:small;"><a href="#EXTENSIONS">EXTENSIONS</a></td><td style="width:25%;">&nbsp;</td><td style="width:25%;">&nbsp;</td><td style="width:25%;">&nbsp;</td></tr></table><table style="width:100%;" border="0"><tr><td><b style="font-size:small;"> Master DualPan Envelope 2</b>
Expand Down
Binary file modified UserPlugins/ultraschall_api/Documentation/gfx/Reaper_Internals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 30b82c5

Please sign in to comment.