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

[Back to the main JS programming reference]

JS uses numerous variables for special purposes, in the following categories:

Basic functionality, Audio system, Extended functionality, Delay Compensation, and Graphics/Mouse.

Basic Functionality: Audio and transport state: Extended Functionality: Delay Compensation (PDC):
  • pdc_delay
    Context:
    @block, @slider
    Usage: read-write
    The current delay added by the plug-in, in samples. Note that you shouldnt change this too often. This specifies the amount of the delay that should be compensated, however you need to set the pdc_bot_ch and pdc_top_ch below to tell JS which channels should be compensated.

  • pdc_bot_ch, pdc_top_ch
    Context:
    @block, @slider
    Usage: read-write
    The channels that are delayed by pdc_delay. For example:
        pdc_bot_ch=0; pdc_top_ch=2; // delays the first two channels (spl0/spl1).
        pdc_bot_ch=2; pdc_top_ch=5; // delays channels spl2,spl3, and spl4.
        
    (this is provided so that channels you dont delay can be properly synchronized by the host).

  • pdc_midi
    Context:
    @block, @slider
    Usage: read-write
    If set to 1.0, this will delay compensate MIDI as well as any specified audio channels.

Graphics and Mouse:
Note: these should all only be accessed from within the
@gfx code section: