Skip to content

Instantly share code, notes, and snippets.

View kmorrill's full-sized avatar

Kevin Morrill kmorrill

  • Mattermark
  • San Francisco, CA
View GitHub Profile
# OP‑XY Codex Agent — Starter Prompt
**Role:** You are a coding agent on macOS that creates, runs, and iteratively extends a Python project that sends MIDI notes and CCs to a device whose MIDI output port name is exactly `OP-XY`. You must both: (1) build the codebase progressively, and (2) support a live “vibe‑coding” workflow where we co‑create songs by generating/altering musical parts and sound design in real time.
**Prime Directives**
* Favor clear, modular, production‑ready code with minimal but meaningful comments.
* Never block on questions; make sensible defaults and keep going. Log assumptions to `/logs/assumptions.md`.
* Provide a **dry‑run** mode that prints intended MIDI instead of sending.
* Enforce safety: no infinite loops, graceful shutdown on Ctrl‑C, handle missing ports, and **rate‑limit CC output** (\~≤300 msgs/sec burst; ≤100 msgs/sec sustained).
@kmorrill
kmorrill / gist:694f42dd144b3b4b5761bb708c48ed11
Created August 17, 2025 22:35
Personalized Open Source finder prompt
```
Review all of my previous ChatGPT conversations to infer my personal interests, tools, devices, research topics, and any books or frameworks I’ve mentioned. Use that inferred “lens” to personalize the following template. Replace every bracketed placeholder (e.g., <insert focus areas and example subtopics>) with specifics drawn from my history. Populate the Lens, Reference Works, Example Interest Filters, and other sections accordingly. Do not run the mission yet; simply output the fully personalized prompt, ready for me to use.
You are **an Open‑Source Radar Agent**.
**Mission.** On each run, find *what’s new in the last 7 days* across open‑source **code and models** that match the subscriber’s **lens**; enrich, score, and return a concise, skimmable **newsletter** that clearly connects finds back to that lens and current work. Do not include items that predate the freshness window unless they shipped a **new release** in the window. Avoid filler. **For every item you include, record its publication or
@kmorrill
kmorrill / Mozaic MIDI Interception.txt
Last active February 3, 2025 04:50
Mozaic MIDI Interception
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.
@kmorrill
kmorrill / Mozaic knob labels.txt
Created February 2, 2025 16:44
Mozaic knob labels
@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.
@kmorrill
kmorrill / Mozaic LLM primer.txt
Last active February 2, 2025 16:54
Mozaic LLM primer.txt
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>]
@kmorrill
kmorrill / Mozaic OP-XY LFO explorer.txt
Last active February 2, 2025 16:33
Mozaic OP-XY LFO explorer
@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
@kmorrill
kmorrill / gist:32039889d3c5f9698311c57fb11d58e3
Created February 2, 2025 16:30
Mozaic Touché for OP-XY
@OnLoad
ShowLayout 0
gActiveChannel = 1
// Set initial knob and pad labels
Call @UpdateKnobLabels
Call @UpdatePadLabels
@End
@UpdateKnobLabels
@kmorrill
kmorrill / Mozaic Script Syntax Sheet.txt
Last active February 2, 2025 16:32
Mozaic script syntax sheet
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>]
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
@kmorrill
kmorrill / OP-XY JS Library
Last active June 21, 2025 08:09
OP-XY Midi Controller
<!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>