GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — hdslave-Machine/AGENTS.md at main · hdslave/hdslave-Machine

Expand file tree

/

AGENTS.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
55 lines (43 loc) · 4.7 KB
/

AGENTS.md

Copy path

File metadata and controls

55 lines (43 loc) · 4.7 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Notes for coding agents

hdslave Machine is an Elektron-style multi-machine synth (FM TONE, drum machines, KIT and more) with its own painted page: a CLAP plug-in for the Akai MPC Sample. It is made to run in hdslaveOS, the hdslave fork of Kerem Kiliç's Melodee. Its CLAP id is com.hdslave.machine, and it builds to build/Machine.clap.

Read the workspace guide first

On the author's machine, this repository sits in one folder beside the other hdslave projects. That folder's ../AGENTS.md and ../Workflow/ hold the shared workflow:

  • building in the Linux VM;
  • what hdslaveOS does to plug-ins;
  • screen pages;
  • reviews;
  • publishing, the hub repository and staging for the SD card.

Read ../AGENTS.md, then ../Workflow/plugins.md and ../Workflow/host-facts.md, before you change anything. The rules below hold either way.

Build and test

  • ./build.sh builds the plug-in in a Linux arm64 container (image melodee-builder, Colima VM melodee). It runs make all test: the host tests in tests/host.cpp and the sound's fingerprint. Pass make targets to run others (./build.sh sanitize for ASan + UBSan over the host tests).
  • tools/bench.sh counts the instructions of a 128-frame block with callgrind. A block is about 4.8 M cycles on one of the MPC's Cortex-A55 cores.
  • Check the build's own exit code: ./build.sh | grep … hides a failure.

Rules

  • Fixed for saved projects. Parameter ids, preset keys and choice orders never change once released, because saved projects and presets refer to them.
    • Add new ones at the end.
    • Ranges stay as they are too: the host stores bindings normalized to the range.
  • The sound is held to the bit by tests/fingerprint.txt.
    • A refactor or speed-up must leave every hash unchanged. With -ffp-contract=fast, even reshaping a loop can change the last bit, so check after every edit.
    • Only a change meant to change the sound runs make fingerprint-update, and its commit says which hashes moved and why.
  • Real-time and determinism. The output is the same at every block size. No allocation, locks or file I/O on the audio thread.
  • Notes must survive how hdslaveOS sends them:
    • every MIDI event of a block arrives at frame 0;
    • a re-pressed key arrives as on, on, off;
    • CC 120 and 123 arrive at 0 on every channel when the host silences.
  • Commits are made as hdslave <[email protected]>, with Conventional Commits. Never push, publish or stage for the card without the owner's word.
  • Other agents' work. Others may be working here. Check git status and git worktree list, and never edit, commit or reset files you did not change.
  • Names and art. No trademarked names in the plug-in's names, presets, UI text or art. Art is original; fonts are OFL, with their licences beside them in assets/fonts/<font>/OFL.txt.
  • Read the README before you change the sound. It lists the sources, the inferred values and the deliberate deviations. Keep it current: version, costs, and "not yet run on the MPC" until it has been.

This plug-in

  • Branches. Engine work happens on branch engine, which is pushed as main. The page's art and interface code are designed on branch screen.
    • screen owns ui/, assets/ and tools/ui_*.
    • engine owns src/, tests/, the Makefile and build.sh.
    • Their contract is ui/machine_ui.h.
  • The screen glue is built in when ui/ exists. make UI_DIR=… builds against another copy.
  • Fixed positions. Machine numbers and KIT slot layouts are positional forever: append only.
    • Machine knobs are the fixed slots Data A-J, whose text changes per machine, because hosts don't re-read parameter names.
  • A machine change resets Data to that machine's defaults, through output param events.
  • The pads. src/machine.cpp embeds Melodee's drum-map JSON (padMapJson, kept by padsJson()), so hdslaveOS plays the track's pads as keys 36-51 and − / + move the bank. Every incoming key goes through playKey() in src/params.h before the engine uses it, note-offs, chokes and CC 84 included. Only KIT maps keys (slot = ((key-36) mod 16) mod 8, every bank the same hit); every other machine plays each key exactly as 0.1.7 did, because a key that already sounded must never change. Keep the map's notes at 36-51.
  • 139 parameters (35 shared + 8 KIT slots of 13) is not a multiple of three for hdslaveOS's Edit rows. Accepted as it stands: never pad the table with filler parameters to reach one; only real appended parameters may land it on a multiple.

Release packaging

Every release ZIP includes the full repository LICENSE.txt beside the third-party notices, outside signed plug-in bundles. Preserve both when packaging the plug-in for another project.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.