this is the source code for _core music devices that utilize the rp2040. devices may differ, but the basic specification is as follows:
- mono or stereo playback of 16-bit (internal 32-bit) audio files @ 44.1 kHz sampling rate
- sd-card storage for audio + data
- recall up to 256 audio files (16 banks of 16 tracks)
- digital low-pass and high-pass filter
- basic single-cycle wavetable synthesizer
- realtime sequencer with optional quantization
- low-latency (<10 ms)
there are a few versions of the "_core" devices that utilize this firmware:
breadboard version (see demo).
- WeAct Raspberry Pi Pico (others should work too) ($2.50)
- pcm5102 ($9)
- sdio sd card ($3.50)
hand-held version (see demo).
the goal of this project is to produce a device that achieves compelling music without learning, though learning is rewarded.
a non-goal for this project is to be emulate a specific musical device.
a non-goal for this project is audio synthesis. though I may change my mind about this.
if you like this device, you might also like:
- joydrums, as if a beat pad and a loop pedal had a baby.
- bitty, an Arduino-compatible device that makes making music fun.
- hss2020, a trimmed down version of the hard soft synth that fits in the hands.
- phantasmal force, a micro midi controller.
knobs: X, Y, Z
top buttons are A, B, C, and D.
the rest of the buttons (1-16) are just called H.
x = finished
o = partially finished
- none → n/a
- [o] H → (JUMP): do jump, (MASH): toggle fx, (BASS): play bass
- H + H → JUMP: retrig depending on location
- A → n/a
- A + H → JUMP: do fx (toggle), MASH/BASS: do jump
- A + B → JUMP mode
- A + C → MASH mode
- A + D → BASS mode
- B → show bank (blinking) + sample (bright)
- B + H + H → select bank (1st) + sample (2nd)
- B + C → start/stop
- B + D → mute
- C → show which sequence is selected (bright)
- C + H + H... → merge sequences into next available slot
- C + B → toggle play sequence
- C + D → toggle record sequence
- C + D, C + D → erase current sequence
- C + H → select sequence
- D → show which save slot is selected (bright)
- D + H → select save slot
- D + B load from save slot
- D + C → save into save slot
- ?? copy sequences?
- X → n/a
- Y → n/a
- Z → n/a
- A + X → tempo
- A + Y →
- A + Z → volume
- B + X →
- B + Y → filter fc (lowpass/highpass?)
- B + Z →
- C + X → pitch
- C + Y →
- C + Z → quantize
- D + X →
- D + Y →
- D + Z →
- [o] H + X/Y/Z -> in MASH mode this edits the parameters of the effect
there are 16 effects in four categories - "shape", "time", "space", and "pitch". holding an effect and using a knob will change its parameters.
- 1 -> warm (preamp multiplier)
- 2 -> loss (preamp multiplier, threshold)
- 3 -> fuzz (preamp multliplier)
- 4 -> crush (frequency, bitdepth)
- 5 -> reverse
- 6 -> stretch
- 7 -> delay (delay feedback, delay length)
- 8 -> repeat (repeat length)
- 9 -> tighten (gate amount)
- 10 -> heighten (tremelo speed, depth)
- 11 -> circulate (pan speed, depth)
- 12 -> phasor/flanger
- 13 -> lower (depth)
- [o] 14 -> slower (duration, depth)
- [o] 15 -> faster (duration, depth)
- [o] 16 -> stop (duration)
- 4,5,4 -> toggle one-shot mode
- 7,8,7 -> toggle play mode
- 5, 8, 7, 6 -> toggle tempo match mode
- 9,12,10,11 -> change resampling (linear or quadratic)
- ?? -> toggle sync mode?
- pitch
- gate
- all probabilities
- distortion level
- distortion wet
- saturation wet
- probability jump
- probability reverse
- probability retrig
- probability tunnel
- probability repitch
Install WSL 2
$ wsl --set-default-version 2
$ wsl --install Ubuntu
Then restart computer and run
$ wsl --install
That should start your system. Then you can follow the Linux directions:
Install the pre-requisites:
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib git python3 g++
sudo -H python3 -m pip install numpy matplotlib tqdm icecream librosa click
Clone this repo and install the Pico SDK:
git clone https://github.com/schollz/_core
cd _core
git clone https://github.com/raspberrypi/pico-sdk
cd pico-sdk && git submodule update --init
Do a build:
make clean && PICO_SDK_PATH=../pico-sdk make zeptocore
(replace 'zeptocore
' with 'ectocore
' if you are building the latter)
- Apache License 2.0 for no-OS-FatFS (Copyright 2021 Carl John Kugler III)
- MIT license for the SdFat library (Copyright (c) 2011-2022 Bill Greiman)