Play a pitched instrument
Goal: A pitched kit on the SD card, so one recorded sample plays as sixteen notes across the pads.
You need: Start here done, an SD card in the board, one or more 16-bit PCM WAV recordings (mono or stereo, up to 24), and the crosspad-hil venv from 1. Set up the toolchain active (step 1 uses it; one-line installer: crosspad-hil already works).
Run every command from the project root (~/CrossPad, Windows C:\CrossPad\firmware). The commands talk to the board over USB, like the first flash: if the board asks USB serial mode?, press Allow.
-
Try the test kit first
This writes a two-zone sine test kit to the SD card over USB, which proves the card, the transfer and the pitched engine before you add your own recordings. Restart the board afterwards, so the check can find the kit.
Terminal window python3 tools/make_pitched_kit.py --zones 2Terminal window python tools\make_pitched_kit.py --zones 2You should see: one
Push: …and oneStored as …line per file, then:pushed /sdcard/crosspad/kits/HIL_PITCHED; reboot the board so the kit scan picks it upIf not: OTA flash cannot find the board (the same USB search). If it says
Device error: FS_ERR mkdir_…(any number but 17), the board cannot write to the SD card: file transfer says FS_ERR mkdir or FS_ERR open. -
Write your kit.json
Set
"engine": "pitched"and list up to 24 zones, each a WAV file and its root note (a MIDI number, or"auto"to let the board detect it). Name each file bare; the board looks besidekit.jsonand inSAMPLES/.{"name": "Piano","engine": "pitched","instrument": {"zones": [{ "sample": "a3.wav", "root": "auto" },{ "sample": "a4.wav", "root": 69 }]}}Check that the file is valid JSON before you copy it:
Terminal window python3 -m json.tool kit.jsonTerminal window python -m json.tool kit.jsonYou should see: your kit printed back.
If not: an error such as
Expecting ',' delimiter: line …points at the typo; fix it and run the check again. See also pitched kit is missing from the kit list. -
Copy the kit to the SD card
Give the kit its own folder in
/sdcard/crosspad/kits(on a blank card, first create/sdcard/crosspadand then/sdcard/crosspad/kitswith the samemkdircommand). A remote path ending in/keeps the local file name.Terminal window python3 tools/fs_transfer.py mkdir /sdcard/crosspad/kits/PIANOpython3 tools/fs_transfer.py mkdir /sdcard/crosspad/kits/PIANO/SAMPLESpython3 tools/fs_transfer.py push kit.json /sdcard/crosspad/kits/PIANO/kit.jsonpython3 tools/fs_transfer.py push a3.wav /sdcard/crosspad/kits/PIANO/SAMPLES/python3 tools/fs_transfer.py push a4.wav /sdcard/crosspad/kits/PIANO/SAMPLES/Terminal window python tools\fs_transfer.py mkdir /sdcard/crosspad/kits/PIANOpython tools\fs_transfer.py mkdir /sdcard/crosspad/kits/PIANO/SAMPLESpython tools\fs_transfer.py push kit.json /sdcard/crosspad/kits/PIANO/kit.jsonpython tools\fs_transfer.py push a3.wav /sdcard/crosspad/kits/PIANO/SAMPLES/python tools\fs_transfer.py push a4.wav /sdcard/crosspad/kits/PIANO/SAMPLES/You should see:
Createdand the folder name from eachmkdir, and for eachpushlines such as:Push: kit.json -> /sdcard/crosspad/kits/PIANO/kit.json (… bytes, crc …)…Stored as /sdcard/crosspad/kits/PIANO/kit.json (FS_OK …)If not:
Device error: FS_ERR mkdir_17only means the folder already exists; go on with the next command. Any otherFS_ERR mkdir_…, orFS_ERR open_…, means the board cannot write to the SD card: file transfer says FS_ERR mkdir or FS_ERR open. If the board is not found: OTA flash cannot find the board. -
Restart the board and pick the kit
The board reads the kit list once at boot, so restart it, then choose the kit in the Sampler’s kit browser. Tune zones, root, loop and envelope with Edit → Save.
You should see: your kit’s
name(“Piano”) in the kit browser. After you load it, each pad plays its own note.
Check it worked
Section titled “Check it worked”List the kit’s folder on the card:
python3 tools/fs_transfer.py ls /sdcard/crosspad/kits/PIANOYou should see: a - line for kit.json and a d line for SAMPLES. Then, by ear: after you load the kit, each pad plays a different note, and the Sampler’s oscilloscope draws a different, steady wave per pad.