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
MIDI Reception and Intervention | |
• MIDI Input Handling: | |
• Mozaic triggers the @OnMidiInput event when any MIDI data is received. | |
• Note: Incoming MIDI is not automatically forwarded to the output—you must explicitly forward it using commands like SendMIDIThru or SendMIDIThruOnCh <channel>. | |
• Forwarding MIDI Data: | |
• Use SendMIDIThru to pass all incoming MIDI data unchanged. | |
• Use SendMIDIThruOnCh <channel> to reassign all incoming MIDI to a specific channel (e.g., SendMIDIThruOnCh 9 routes everything to channel 9). | |
• Filtering MIDI Events: | |
• The variable MIDICommand holds the last received MIDI command (e.g., Note On 0x90, Note Off 0x80, CC 0xB0). | |
• Mozaic supports both hexadecimal (e.g., 0xB0) and decimal (e.g., 176) notation. |
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
@OnLoad | |
ShowLayout 0 | |
// Set the default label for knob 0 when the script loads. | |
LabelKnob 0, {Knob1} | |
@End | |
@OnKnobChange | |
// Only process changes for knob 0. | |
if LastKnob = 0 | |
// Continue processing knob 0 changes. |
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>] |
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
@OnLoad | |
ShowLayout 0 | |
Call @ResetKnobLabels | |
// Set default LFO values | |
lfoDest = 0 // Default: Volume | |
lfoSpeed = 6 // Default: Quarter Note | |
lfoCurve = 0 // Default: Sine | |
lfoAmount = 127 // Default: Full Range | |
midiCC = 7 // Default CC: Volume |
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
@OnLoad | |
ShowLayout 0 | |
gActiveChannel = 1 | |
// Set initial knob and pad labels | |
Call @UpdateKnobLabels | |
Call @UpdatePadLabels | |
@End | |
@UpdateKnobLabels |
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>] |
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
Below is a cheat sheet highlighting Mozaic’s key differences, limitations, and “gotchas” relative to typical coding or scripting languages. If you’re guiding other LLMs (or developers) who want to generate code for Mozaic, these are some of the most important points to emphasize. | |
1. Limited String Handling | |
No string variables: Mozaic doesn’t allow you to store strings in variables. | |
Cannot do string interpolation: You must log strings as constants in braces (e.g., Log {Hello}), or log numeric variables separately (e.g., Log var). | |
No concatenation: There is no built-in method to build dynamic strings. | |
Gotcha: This means you can’t do myString = "Hello " + name or myString = {"Hello "}{name} in Mozaic. You also cannot store a string from user input in a variable. | |
2. Unique Event Model with Labelled Blocks |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>OP-XY MIDI Control</title> | |
</head> | |
<body> | |
<div id="status"></div> | |
<button onclick="opxy.start()">Start</button> | |
<button onclick="opxy.stop()">Stop</button> |
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
@Description | |
Melodic Generator v2.0 | |
Uses four knobs to control melodic generation: | |
- Melodic Contour: Smooth ↔ Angular intervals | |
- Rhythm: Steady ↔ Syncopated patterns | |
- Register: Narrow ↔ Wide pitch range | |
- Harmony: Sparse ↔ Rich note choices | |
Adjust any knob to generate a new melody. | |
@End |
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
@Description | |
OP-XY Drum Pattern Generator v2.0 | |
A dynamic drum pattern generator for OP-XY creating musical 4-bar patterns. | |
Controls: | |
- Density: Overall number of hits (sparse to busy) | |
- Variation: Pattern unpredictability and dynamics | |
- Balance: Emphasis between core drums vs percussion | |
- Repetition: Pattern evolution over time |
NewerOlder