Last active
February 2, 2025 16:32
-
-
Save kmorrill/b9144ffa1d6726461419de811623a3e1 to your computer and use it in GitHub Desktop.
Mozaic script syntax sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOZAIC SCRIPT SYNTAX SHEET | |
Download the full programming manual on ruismaker.com | |
MIDI functions: | |
SendMIDIOut <byte1>, <byte2>, <byte3> [,<delay_in_milliseconds>] | |
SendMIDINoteOn <chan>, <note>, <velocity> [,<delay_in_milliseconds>] | |
SendMIDINoteOff <chan>, <note>, <velocity> [,<delay_in_milliseconds>] | |
SendMIDICC <chan>, <controller>, <value> [,<delay_in_milliseconds>] | |
SendMIDIPitchbend <chan>, <value> [,<delay_in_milliseconds>] | |
SendMIDIProgramChange <chan>, <value> [,<delay_in_milliseconds>] | |
SendMIDIBankSelect <chan>, <MSB>, <LSB> [,<delay_in_milliseconds>] | |
SendMIDIThru [<delay_in_milliseconds>] | |
SendMIDIThruOnCh <chan> [,<delay_in_milliseconds>] | |
ConfigureMPE <lowerzone>, <upperzone> | |
<var> = MIDIChannel | |
<var> = MIDICommand | |
<var> = MIDINote | |
<var> = MIDIVelocity | |
<var> = MIDIByte1 | |
<var> = MIDIByte2 | |
<var> = MIDIByte3 | |
<bool> = MIDISustainPedalDown | |
Sysex functions: | |
ReceiveSysex <array> | |
SendSysex <array>, <length> [,<checksum>, <checksum start index>] | |
SendSysexThru | |
<var> = SysexSize | |
AUv3 and Host functions: | |
SetShortName {name} | |
SetMetroPPQN <ppqn> | |
SetMetroSwing <swing%> | |
SetAUParameter <parameter>, <value> | |
<var> = HostTempo | |
<var> = HostBar | |
<var> = HostBeat | |
<var> = HostBeatsPerMeasure | |
<bool> = HostRunning | |
<var> = CurrentMetroPulse | |
<var> = GetAUParameter <parameter> | |
<var> = LastAUParameter | |
<ms> = QuarterNote | |
<ms> = SystemTime | |
Timer and LFO functions: | |
StartTimer | |
StopTimer | |
ResetTimer | |
SetTimerInterval <milliseconds> | |
SetupLFO <lfo>, <minimum>, <maximum>, <sync>, <frequency> | |
SetLFOType <lfo>, {type} | |
ResetLFO <lfo> [,<phase>] | |
<var> = GetLFOValue <lfo> | |
Available LFO types: Sine, Cosine, Square, Triangle, RampUp, RampDown, SH | |
Musical Scale functions: | |
CustomScale c, c# d, d#, e, f, f#, g, g#, a, a#, b | |
PresetScale {scale} | |
PresetScale <scalenum> | |
SetRootNote <rootnote> | |
<bool> = InScale <note> | |
<var> = ScaleQuantize <note> | |
Available preset scales: Chromatic (0), Major (1), Minor (2), MinorMelodic (3), MinorHarmonic (4), MajorPentatonic (5), MinorPentatonic (6), Aeolian (7), Dorian (8), Lydian (9), Mixolydian (10), Phrygian (11), Blues (12), WholeTone (13), Diminished (14), Bhairavi (15), Gypsy (16), Klezmer (17), Octave (18), Andean (19), Iwato (20), InSen (21), HiraJoshi (22), Pelog (23), Yo (24) | |
GUI and Interaction functions: | |
ShowLayout <layout> | |
LabelPad {label} | |
LabelPads {title} | |
LabelKnobs {title} | |
LabelXY {title} | |
LabelKnob <knob>, {label} | |
SetKnobValue <knob>, <value> | |
LatchPad <pad>, <state> | |
ColorPad <pad>, <color> | |
FlashPad <pad> | |
FlashUserLed | |
SetXYValues <x>, <y> | |
Log <var>, {text}, ... | |
LogTime | |
<bool> = PadState <pad> | |
<var> = GetXValue | |
<var> = GetYValue | |
<var> = GetXYMorphValue <topleft>, <topright>, <bottomleft>, <bottomright> | |
<var> = LastKnob | |
<var> = GetKnobValue <knob> | |
<var> = LastPad | |
<var> = LastPadVelocity | |
<var> = MotionPitch | |
<var> = MotionRoll | |
<var> = MotionYaw | |
<bool> = ShiftPressed | |
{notename} = NoteName <note> [, <showoctave>] | |
{notename} = RootNoteName | |
{scale} = ScaleName [<scalenum>] | |
Variables and Math functions: | |
FillArray <var>, <value> [, <numcells>] | |
CopyArray <sourcevar>, <destvar> [, <numcells>] | |
Inc <var> [,<max>] | |
Dec <var> [,<min>] | |
<bool> = Unassigned <var> | |
<var> = Round <value> | |
<var> = RoundUp <value> | |
<var> = RoundDown <value> | |
<var> = Random [<min>, <max>] | |
<var> = Clip <var>, <min>, <max> | |
<var> = TranslateCurve <value>, <curve> [,<min>, <max>] | |
<var> = TranslateScale <value>, <inputmin>, <inputmax>, <outputmin>, <outputmax> | |
<var> = Sin <value> | |
<var> = Cos <value> | |
<var> = Tan <value> | |
<var> = Tanh <value> | |
<var> = Exp <value> | |
<var> = Sqrt <value> | |
<var> = Abs <value> | |
<var> = Logn <value> | |
<var> = Log10 <value> | |
<var> = Pow <base>, <exponent> | |
<int> = Div <int>, <int> | |
Storing note states: | |
ResetNoteStates <initvalue> | |
SetNoteState <channel>, <note>, <var> | |
<var> = GetNoteState <channel>, <note> | |
Events: | |
@OnMidiInput | |
@OnMidiNote | |
@OnMidiNoteOn | |
@OnMidiNoteOff | |
@OnMidiCC | |
@OnAUParameter | |
@OnNewBar | |
@OnNewBeat | |
@OnMetroPulse | |
@OnTimer | |
@OnHostStart | |
@OnHostStop | |
@OnLoad | |
@OnPadDown | |
@OnPadUp | |
@OnKnobChange | |
@OnXYChange | |
@OnPedalDown | |
@OnPedalUp | |
@OnShiftDown | |
@OnShiftUp | |
@OnSysex | |
@Description | |
Script flow: | |
if (condition) | |
... | |
elseif (condition) | |
... | |
else | |
... | |
endif | |
for [var] = [initialvalue] to [endvalue] | |
... | |
endfor | |
repeat | |
... | |
until (condition) | |
while (condition) | |
... | |
endwhile | |
Call @EventName | |
Exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment