Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 06-07-2018, 02:28 PM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default Reaper Internals - DevDocs & Tutorials about the secret internal life of Reaper

While learning Reaper to develop stuff for Ultraschall.fm, I started to document things for the others in our project, as well as a resource for myself.
The whole thing is far away from being a proper developer-doc, but you may or may not see use in these docs, so I uploaded them.

Some are work in progress and some are far from finished, while others are more updated versions of the docs available in Cocko's Wiki.

All these docs are creative commons cc-by-nc-sa, so feel free to use them, share them and have fun with it.

See also: Tutorials, created by the community

API-Docs:
Reaper Api Docs(improved)
This is my own version of the API-docs of Reaper, where I try to add all the information that's missing, like parameter/retval-descriptions, function-descriptions, etc.
I also added the C++-functions and I structured the index to reflect the individual use-case-areas appearing in the API.
This is work in progress, but maybe it's useful for you already.

https://forum.cockos.com/showpost.ph...2&postcount=21
I wrote a small introduction there on how to use Reaper's defer-function.
More detailinfo: https://forum.cockos.com/showpost.ph...99&postcount=7

Thoughts on require vs dofile in Lua

Tutorial for HiDPI/Retina in gfx-scripts

Web RC-Api
How to program WebRemoteControl?

Video API
a web-version of Reaper's video-processor-docs

Fileformats and Datastructures
Fileformat Descriptions
descriptions for various config-files of Reaper

LiceCap.ini-doc
Describes the config-file of Cocko's LiceCap-Screenrecording-tool.

Full Actionlist as of Reaper 5.941
The full actionlist as of Reaper 5.941. Includes Menu-only-actions as well(those aren't shown in the actionlist).


Reserved commandids for scripts
This lists all commandids, that are reserved for ReaScripts, separated into the individual sections.
Funfact: About 11997-scripts can be added to each section


Config Variables
The config-variables as used by SNM_GetIntConfigVar(), SNM_SetIntConfigVar(), SNM_GetDoubleConfigVar() and SNM_SetDoubleConfigVar(), as well as the C++-only function get_config_var().
You can set many options, checkboxes and configuration-values with them.
These are fairly complete with only a handful missing(I couldn't trigger them, maybe you can help me with them).


All Config-Variables, that are triggered by actions.
This lists all toggle-actions, who trigger config-variables.
They are documented with values in int/double/string and bitfield.
To know, how to read them, I suggest you to read the Config Variables-docs above.


Render-CFG-Codes
In Projectfiles as well as in the configfile for render-presets, the render-settings are stored using a string.
In this document, I tried to reverse-engineer and document, how these strings work, how they are built and how to make them work.
Includes all formats, except m4a, as this is Mac-only and I don't have a Mac to document them..
With this, you can build your own render-functions/scripts! I already successfully did that
See the render-codes-ini-file below, that feature all code-segments for fps and resolution of video, mp3, flac, opus and ogg.


StateChunk-docs
Envelope StateChunk
This documents envelope-statechunks quite complete. I also included docs for automation-items.
The automation-item-docs feature both, the docs about how to include one automation-item into your own envelope, as well as the automation-item themselves.
Note: the automation-items themselves are only available in RPP-projectfiles and .ReaperAutoItem-files.


MediaItem StateChunk
My attempt at documenting MediaItem-Statechunks, as the docs in Cocko's Wiki is heavily outdated.
Still work in progress, especially all the MIDI stuff is wrong/incomplete and there are entries I haven't found out yet, what they do.
In parts, it's already helpful, anyway

the state-chunk-entries of Parameter Learning/Modulation/Aliases

misc
https://github.com/Ultraschall/ultra...s-ChildIDs.txt - child-hwndids for Reaper-windows(incomplete)
the difference between dofile and require
when you want to build your own Lua-function-library

Helpful-Ini-Files
Reaper Actions as ini
An ini-file that features all actions with their description from Reaper5.941
cmdid=description



gfx.getkey()-codes
This ini-file features all codes that are returned by gfx.getkey() and their ASCII-representation.
That way, you can display, which key is typed. Good to find out easily, which gfx.getkey-code you need now in your script.


reaper-kb.ini - KEY-codes
This ini-file includes all(!) codes and their representation of all keyboard/midi-shortcuts available in Reaper.
Good for analysing, which codes are used in your kb.ini, if you want to display shortcuts in another way, rather than the actions-window-only.
See Fileformat Descriptions above for a full description of reaper-kb.ini

reaper-kb.ini - factory default KEY-codes
The reaper-kb.ini does not include shortcuts, that are factory-default-settings, only custom shortcuts. So I documented the factory-default-ones out and made a handy ini out of it.
See Fileformat Descriptions above for a full description of reaper-kb.ini and in how to work with factory-default-shortcuts


Render codes
The rendercfg-codes as an ini-file, for many formats like DDP, AIF, MP3, FLAC, Video, OPUS and OGG.
The sections are the file-formats (like [OGG] or [FLAC]).
You can find in all sections a key called Renderstring, in which the renderstring-template is stored.
All changeable parts are replaced by [FormatAlterID].
e.g. for OPUS:
Code:
Renderstring=U2dnTwAA[KBPS][MODE][Complexity]AAAA==
Replace the [KBPS] [MODE] [Complexity] with the values of the corresponding keys in the section OPUS.
e.g.:
KBPS_xxx - where xxx is the bitrate-number
MODE_xxx - where xxx is the mode
Complexity_xxx - where xxx is the complexity-number.

So a renderstring with OPUS, Mode:VBR, Bitrate: 24kbps, Complexity:5 would result in this string:
Code:
U2dnTwAAwEEABQAAAA==
MODE_VBR=A
KBPS_24=wEE
Complexity_5=BQ


The Render-codes for the Audio-CD-rendering. Works like the render-string-codes above, but is limited to AudioCD. Supports LeadInSilence up to 100 seconds.

Tools
Display altered config-variables
If you want to use config-variables but don't know, which one is behind the checkbox of your choice, use this. It will display changes to ReaConsole.
Also prepared for string-variables, which are only available in pre-releases of Reaper, yet.

Display altered configfile-entries
This displays changes in classic-ini-files, eg. reaper.ini. Every time an entry is altered, it will be displayed into the ReaConsole.
Supports only standard ini-files
[section]
key=value

For monitoring-tools of StateChunks(Project, Item, Envelope, Tracks), head over to the following post: https://forum.cockos.com/showpost.ph...0&postcount=65

A LangPack, which displays to the left of the section-location of the text.
https://raw.githubusercontent.com/Ul...ReaperLangPack

HWND-displayer - to get the position and attributes of hwnds

Maybe some of the stuff is helpful for you. If you want to motivate me to add more stuff/complete stuff, you can head over to http://ultraschall.fm/danke/, where you can donate stuff to our team

Cheers
Meo-Ada Mespotine

Last edited by Meo-Ada Mespotine; 01-04-2022 at 08:18 PM.
Meo-Ada Mespotine is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.