_core
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:
boardcore
breadboard version (see demo).
- WeAct Raspberry Pi Pico (others should work too) ($2.50)
- pcm5102 ($9)
- sdio sd card ($3.50)
zeptocore
hand-held version (see demo).
![](https://private-user-images.githubusercontent.com/6550035/296509753-05e2b34b-efbc-47d1-8ba0-605ad723f85c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDc0NTAxOTYsIm5iZiI6MTcwNzQ0OTg5NiwicGF0aCI6Ii82NTUwMDM1LzI5NjUwOTc1My0wNWUyYjM0Yi1lZmJjLTQ3ZDEtOGJhMC02MDVhZDcyM2Y4NWMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAyMDlUMDMzODE2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTAyMWU4ZTA5YTJkZWIxNDY0ZGVlNzk1YmQyNjdlNTZmYWQ2YWRmMGEwNzBiY2ZmZGY5YzVhMTZmZWFjNDM2NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ea0oaDWhgcHGoGokFngwspS4Hlh3EDU23_dNbhSNEe8)
goals
the goal of this project is to produce a device that achieves compelling music without learning, though learning is rewarded.
non-goals
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.
similar devices
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.
zeptocore spec (draft)
knobs: X, Y, Z
top buttons are A, B, C, and D.
the rest of the buttons (1-16) are just called H.
combo buttons
- H + H → JUMP: retrig depending on location
- A + H → JUMP: do fx (toggle), MASH/BASS: do jump
- A + B → JUMP mode
- A + B + B ... → set tempo via tapping
- 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 → display which sequence is selected (bright)
- C + H → select sequence (led dim or bright = used, led off or blinking = unused)
- C + H + H + H ... → chains sequences together, though the first selected must be empty
- C + B → toggle play sequence
- C + D → toggle record sequence
- C + D, C + D → erase current sequence
- D → shows current slot (blinking / bright) and slots with data (dim)
- D + H → select save slot
- D + B load from save slot
- D + C → save into save slot
combo knobs
- 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
effects
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 postamp)
- 2 -> loss (type+threshold, postamp)
- 3 -> fuzz (preamp postamp)
- 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 -> scratch (scratch speed)
- 13 -> lower (depth)
- 14 -> slower (duration, depth)
- 15 -> faster (duration, depth)
- 16 -> stop (duration)
cheat codes
- 1,2,1 -> toggle variable splice playback
- 4,5,4 -> toggle one-shot mode
- 6,7,6 -> toggle play mode
- 5, 8, 7, 6 -> toggle tempo match mode
- 9,12,10,11 -> change resampling (linear or quadratic)
- ?? -> toggle sync mode?
needs
- pitch
- gate
- all probabilities
- distortion level
- distortion wet
- saturation wet
- probability jump
- probability reverse
- probability retrig
- probability tunnel
- probability repitch
building image
windows
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:
linux
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 zeptocore
(replace 'zeptocore
' with 'ectocore
' if you are building the latter)
building upload tool
windows
First install Scoop, open PowerShell terminal and type:
> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
> Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
Then in the Powershell:
> scoop update
> scoop install go zig sox
Now you can build with:
> cd core
> $env:CGO_ENABLED=1; $env:CC="zig cc"; go build -v -x
Now the upload tool can be run by typing
./core.exe
license
- 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)