Globals

Scripts have no imports. These names are available everywhere:

GlobalWhat it is
openDAWThe Api, entry point of every script
sampleRateSample rate of the studio in Hz
baseFrequencyTuning reference of the studio in Hz
PPQNBar, Quarter, SemiQuaver, fromSignature(), secondsToPulses(), pulsesToSeconds(), toString()
AudioDataAudioData.create(sampleRate, numberOfFrames, numberOfChannels) for {@link Api
WavFileWavFile.encodeFloats(audioData) for {@link Api
midiToHzmidiToHz(note, baseFrequency?)
dbToGain, gainToDbDecibel conversions
FFTFast Fourier transform helper
ChordChord and interval helper
InterpolationInterpolation.None, Interpolation.Linear, Interpolation.Curve(slope) for automation and tempo points
ClassicWaveformOscillator waveforms of Vaporisateur
VoicingModeMonophonic, Polyphonic
MixingPanning laws for StereoTool
TransientPlayModeOnce, Repeat, Pingpong for time-stretched audio regions
AudioSendRoutingPre, Post

All interface names of the reference are available as types for annotations, e.g. const effects: ReadonlyArray<AnyAudioEffect> = unit.audioEffects.

The standard library is a subset: Array, Map, Set, Math, JSON, Promise, typed arrays, setTimeout. There is no DOM and no fetch.