REAPERAudio Production Without Limits
About : Download : Purchase : Manual : Forum : Resources : REAPER Radio!
REAPER/JS Advanced Function Reference

[Back to the main JS programming reference]

In addition to the basic functions available, REAPER/JS also provides numerous advanced functions, organized into the following categories:

Looping, FFT/MDCT, Memory Utility, Slider, File, MIDI, and Graphics.


Accessing Samples

Looping
FFT/MDCT Functions Memory Utility Slider Functions File Functions
The following functions can be used in the
@serialize section or in other sections (for reading of files specified with file: or from an extended file slider.

In a @serialize section, they can be for read or for write, but on all others they are for reading only.

For @serialize, file_open() and file_close() should not be used, and the file handle should be 0.

These functions should NOT under any circumstances be used in the @gfx section.

MIDI Functions
The following functions can be used in @block or @sample sections to send and receive MIDI.

Note that Sysex messages are not currently supported, and that if a function receives any MIDI, JS will no longer pass through any MIDI, so if you wish to enable passthrough, you should midisend() any messages you midirecv().

Offset is offset from current block, in samples. msg1 is status byte, msg23 is second (and third if available) data bytes, second byte is low 8 bits (msg23&$xff), third byte is next 8 bits (msg23/256)&$xff.
Graphics Functions
Effects can specify a
@gfx code section, from which the effect can draw its own custom UI and/or analysis display.

These functions must only be called from the @gfx section.

There are numerous Graphics State Variables that should be used as well.

In addition to these advanced functions, there are numerous Special Variables.