Skip to content

mrcheng/Daisy

Repository files navigation

Daisy Drums

Small drum synth experiments for the Electro-Smith Daisy Seed.

Test In Browser

Kicki Danielsson is a sine-based bassdrum. The firmware uses libDaisy and DaisySP to make a simple kick drum with a sine oscillator, pitch drop, ADSR amplitude shaping, lowpass filtering, resonance, and Daisy-safe distortion options.

Repository Layout

.
|-- src/kicki.cpp            # Kicki Danielsson firmware
|-- preview/kicki/index.html # Browser bassdrum preview
|-- Makefile          # Build/flash entry point
|-- libDaisy          # Electro-Smith library submodule
|-- DaisySP           # Electro-Smith DSP library submodule
|-- .vscode           # VS Code tasks and C++ IntelliSense setup

libDaisy and DaisySP are git submodules. They are not copied into this repo, so clone with submodules.

Requirements

Use Windows with Git Bash, VS Code, and the official Daisy Windows toolchain.

Install:

  • Git for Windows
  • Daisy Windows Toolchain Installer
  • VS Code
  • Python from python.org, not Microsoft Store
  • VS Code extensions:
    • C/C++
    • Cortex-Debug
    • Makefile Tools

Official setup docs:

Clone

git clone --recurse-submodules https://github.com/mrcheng/Daisy.git
cd Daisy

If you already cloned without submodules:

git submodule update --init --recursive

Verify Toolchain

Open Git Bash and run:

git --version
make --version
arm-none-eabi-gcc --version
dfu-util --version
python --version
code --version

If any command is not found, fix PATH, then close and reopen Git Bash and VS Code.

Typical Windows PATH entries include:

C:\Program Files\Git\cmd
C:\Program Files\DaisyToolchain\bin
C:\Users\<you>\AppData\Local\Programs\Python\Python313\
C:\Users\<you>\AppData\Local\Programs\Python\Python313\Scripts\
C:\Users\<you>\AppData\Local\Programs\Microsoft VS Code\bin

Python must resolve to the python.org install, not the Microsoft Store alias.

Build

From Git Bash:

make

This builds libDaisy, DaisySP, and then the firmware.

Build outputs are written to build/:

build/KickiDanielsson.elf
build/KickiDanielsson.hex
build/KickiDanielsson.bin

To clean only the firmware build:

make clean

To clean firmware and libraries:

make clean-all

To rebuild firmware and refresh the browser memory report:

python tools/update_memory_report.py

Flash With USB DFU

Connect the Daisy Seed over USB.

Put the Daisy Seed into bootloader mode:

  1. Hold BOOT.
  2. Press and release RESET.
  3. Release BOOT.

Then run:

make program-dfu

Normal edit/build/flash loop:

make
make program-dfu

VS Code

Open the repo folder:

code .

This repo includes VS Code tasks:

  • build
  • clean
  • clean-all
  • program-dfu
  • build_and_program_dfu

Use Terminal > Run Build Task... or press Ctrl+Shift+B to run the default build task.

The workspace is configured to use Git Bash as the default integrated terminal on Windows.

Browser Preview

The Daisy firmware cannot run directly on the PC. For quick sound-design work before flashing, this repo includes a browser preview that renders the kick sample-by-sample in JavaScript using the same parameter names, envelope math, signal order, and basic distortion formulas as the firmware.

Open:

preview/kicki/index.html

Or from the repo root on Windows:

start preview/kicki/index.html

The preview lets you:

  • Trigger the bassdrum.
  • Repeat the bassdrum in the browser for auditioning.
  • Set browser preview BPM manually.
  • Tap a browser preview tempo.
  • Change base pitch.
  • Change pitch drop and pitch decay.
  • Shape the amp envelope with the ADSR graph.
  • Change lowpass cutoff and resonance.
  • Enable simple clipping, DaisySP Overdrive, wavefolder, and saturation.
  • Change output gain.
  • Watch the real browser output VU meter.
  • Watch the latest Daisy Seed memory usage from preview/kicki/memory-report.js.
  • Print the current settings as C++ firmware constants.
  • Inspect the interactive breadboard/build overview for Daisy Seed wiring.

Use this for fast listening and parameter experiments. When a sound is worth keeping, copy the matching values into src/kicki.cpp, build with make, and flash with make program-dfu.

The preview is close enough for design work, but the Daisy Seed hardware is still the final sound reference. DaisySP Overdrive, Wavefolder, and Svf are approximated in JavaScript.

The preview remembers your current settings in the browser. Click Print Firmware Values to generate the constexpr lines that should replace the matching constants near the top of src/kicki.cpp. Browser BPM/repeat is only for auditioning and is not burned into the Daisy firmware.

The preview also includes a Build Overview section with a sitewide Daisy Seed and breadboard wiring chart. Click a component or wire in the diagram to see what it connects to and whether that part is already supported in firmware or still needs firmware work. The current planned module wiring is:

  • A0 / D15: Masterdist potentiometer.
  • A1 / D16: Sloppy/Twisted Master Kicki-Twister potentiometer.
  • D2-D7: Six preset buttons.
  • D8: Trigger input jack.
  • D11: OLED I2C SCL.
  • D12: OLED I2C SDA.
  • D13: Activity LED through a resistor.
  • OUT1: Main mono audio output jack.

For the fastest path:

  1. Click Copy Values in the browser.
  2. Run:
python tools/apply_firmware_values.py
  1. Build, refresh memory, and flash:
python tools/update_memory_report.py
make program-dfu

After firmware changes, refresh the memory report with:

python tools/update_memory_report.py

Editing The Synth

The firmware is in src/kicki.cpp.

Change the final body pitch here:

constexpr float kBaseFreqHz = 48.0f;

Change the pitch drop here:

constexpr float kPitchAmountHz = 112.0f;

Change the pitch decay and body decay here:

constexpr float kPitchDecaySec = 0.055f;
constexpr float kAmpDecaySec   = 0.36f;

Change the lowpass filter here:

constexpr float kLowpassCutoffHz = 760.0f;
constexpr float kResonance       = 0.62f;

Change the output volume here:

constexpr float kOutputGain = 0.7f;

Keep volume conservative when using headphones or speakers.

Setup Prompt For A Friend

If someone wants an AI assistant to set up their Windows machine for this repo, they can paste this:

You are setting up my Windows computer for C++ synth/audio programming on the Electro-Smith Daisy Seed using VS Code.

Use the official Electro-Smith Daisy Windows toolchain workflow. Use Git Bash as the terminal. Target board is Daisy Seed.

Install and verify:
- Git for Windows and Git Bash
- Daisy Windows Toolchain Installer
- VS Code
- Python from python.org, not Microsoft Store
- VS Code extensions: C/C++, Cortex-Debug, Makefile Tools

After installing, open Git Bash and verify:
git --version
make --version
arm-none-eabi-gcc --version
dfu-util --version
python --version
code --version

If any command is not found, fix PATH, then reopen Git Bash and VS Code and explain exactly what changed.

Clone and build this repo:
git clone --recurse-submodules https://github.com/mrcheng/Daisy.git
cd Daisy
make

Configure VS Code:
- Make Git Bash the default integrated terminal.
- Confirm VS Code can run the build task.

To flash the Daisy Seed, put it into DFU bootloader mode and run:
make program-dfu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors