11 Commits

Author SHA1 Message Date
david 191c70fd18 fix: replace cyclone env~ with vanilla line~ envelope, fix stripnote outlet
Validate and Test / validate-patches (push) Failing after 12s
- env~ is a cyclone external not available on board's Pd 0.55
- Replace with line~ + *~ 0.0055 for velocity-scaled AR envelope
- Fix stripnote outlet 1 (gate trigger) connected to envelope instead of outlet 0 (pitch)
- Change dac~ to dac~ 1 for mono output matching -outchannels 1
- Envelope: attack ~50ms, release ~50ms, sustain scaled by velocity
2026-06-24 16:47:05 -07:00
david 8d3666cdaa fix: replace hsl with loadbang floats for headless Pd
Validate and Test / validate-patches (push) Failing after 13s
hsl GUI objects don't initialize in -nogui mode, causing
cutoff at 0 Hz and volume at 0 → no audio output.
Use loadbang + float for headless-safe initialization.
2026-06-24 16:24:25 -07:00
david 290862a74e feat: add skills, version pinning, CI/CD, and generated-file headers
Validate and Test / validate-patches (push) Failing after 2m7s
- Create skills: rego-pd-validator, usb-gadget-configfs, led-matrix-msgpack-rpc
- Update pd-audio-synthesis skill with Uno Q specifics
- Add Pd version check (min 0.54.0) to start-synth.sh
- Add DO NOT EDIT headers to generated pd patches
- Add Gitea Actions CI workflow for patch validation
- Add ConditionPathExists guards to legacy systemd services
- Add 'just ci' recipe for CI
2026-06-24 03:16:28 -07:00
david 163ad4145b add prometheus exporter + test suite
- prometheus-exporter.py: stdlib-only HTTP metrics on :9090/metrics
- Exposes: ALSA status, hw_ptr rate, service health, mixer controls
- MIDI counters: notes_on, notes_off, errors
- test-unit.py: 10-test suite covering full MIDI→Pd→Audio pipeline
- test-tone.pd, test-midi-log.pd: minimal debug patches
- systemd service for exporter
- install.sh/deploy updated to include exporter
2026-06-24 02:22:05 -07:00
david 3cc497f632 refactor: 3-module pd architecture + viz non-blocking fix
- midi-in.pd: netreceive -> route -> unpack -> pitch/velocity outlets
- audio-out.pd: inlet~ -> dac~ abstraction
- synth.pd: consumer patch wiring midi-in -> voice -> audio-out
- led-matrix-viz.py: router socket non-blocking, registered with poller
- pd.rego: skip outlet/abstraction false positives in validation
2026-06-24 02:08:57 -07:00
david ed8cb7ca5a working synth: two detuned oscs, env~, lop~ (no slider for now) 2026-06-24 00:45:37 -07:00
david ccc40e4314 rebuild synth.pd from working components 2026-06-23 22:17:02 -07:00
david e098f32a32 fix synth: envelope driven by velocity not pitch, louder gain 2026-06-23 21:58:10 -07:00
david a135dc4452 controller.pd: add MIDI passthrough for MPK Mini → board
Added notein→pack→noteout and ctlin→ctlout chains that forward all
incoming MIDI from the MPK Mini to the board's MIDI port. This means
physical keys/knobs now work alongside the GUI click buttons.
2026-06-23 14:44:05 -07:00
david dbd7c2cece auto-detect MIDI device, drop ALSA sequencer dependency, MPK Mini simulator
midi-bridge.py:
  - Auto-detect rawmidi device (gadget f_midi > env override > fallback)
  - Reconnect on ENODEV (device hotplug)
  - No longer needs MIDI_BRIDGE_DEV env var in common cases

start-synth.sh:
  - Remove all -alsamidi/-midiadddev flags (kernel lacks CONFIG_SND_SEQUENCER)
  - MIDI handled entirely by midi-bridge.service → UDP → netreceive
  - Host mode: same approach, no ALSA sequencer needed

mpk-mini-sim.pd:
  - New MPK Mini Mk II simulator (25 keys, 8 pads, 8 CC knobs)
  - Proper Pd #X obj format for all objects (bng, hsl, t, del, netsend, loadbang)
  - UDP output to board:8081, matching midi-bridge format

system: enable usb-gadget-audio.service at boot, load dwc3 module at boot
2026-06-22 23:10:38 -07:00
david 8cd796e3dd Initial commit: Arduino Uno Q USB Audio Synth project
- USB gadget (UAC1 + MIDI) with boot persistence
- USB host mode with auto-detection
- Pure Data synth patch with ALSA + UDP netreceive MIDI input
- MIDI rawmidi-to-UDP bridge (midi-bridge.py)
- LED matrix visualization (led-matrix-viz.py via arduino-router RPC)
- MCU sketch for LED matrix control (Arduino_RouterBridge + ArduinoGraphics)
- Conftest/OPA Rego policy validation suite for .pd files
- gen_synth_pd.py: programmatic .pd file generator
- System services: midi-bridge, led-matrix-viz, pd-synth-auto, usb-role-detect
- Justfile with deploy, enable, diagnostic recipes
- Diagnostic script (diag.sh)
2026-06-22 22:46:36 -07:00