Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: build firmware

on:
push:
pull_request:
workflow_dispatch:
workflow_call:
inputs:
release_tag:
description: "If set, upload the built .uf2 files to this release tag"
type: string
required: false
default: ""

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kit:
- { name: trippy, flag: "" }
- { name: 80s, flag: "-DCHAMBORD_KIT_80S" }
- { name: angularj, flag: "-DCHAMBORD_KIT_ANGULARJ" }
- { name: mix, flag: "-DCHAMBORD_KIT_MIX" }
- { name: tekke, flag: "-DCHAMBORD_KIT_TEKKE" }
- { name: acoustic3, flag: "-DCHAMBORD_KIT_ACOUSTIC3" }
enc:
- { dir: "1", suffix: "" } # normal encoder
- { dir: "-1", suffix: ".encoder_reversed" } # reversed encoder

steps:
- uses: actions/checkout@v4

- name: Install arduino-cli
uses: arduino/setup-arduino-cli@v2

- name: Install RP2350 core and libraries
run: |
arduino-cli config init --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
arduino-cli core update-index
arduino-cli core install rp2040:rp2040@5.6.1
arduino-cli lib install \
RotaryEncoder@1.5.3 \
Bounce2@2.71.0 \
RPi_Pico_TimerInterrupt@1.3.1

- name: Build ${{ matrix.kit.name }}${{ matrix.enc.suffix }}
run: |
arduino-cli compile \
-b rp2040:rp2040:rpipico2:freq=276,opt=Optimize3 \
--build-property "compiler.cpp.extra_flags=-DCHAMBORD_ENC_DIR=${{ matrix.enc.dir }} ${{ matrix.kit.flag }}" \
--output-dir out \
firmware/Pikobeats
mv out/Pikobeats.ino.uf2 "Pikobeats.${{ matrix.kit.name }}${{ matrix.enc.suffix }}.rp2350.uf2"

# Downloadable from the Actions run for every commit
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: Pikobeats.${{ matrix.kit.name }}${{ matrix.enc.suffix }}.rp2350
path: Pikobeats.${{ matrix.kit.name }}${{ matrix.enc.suffix }}.rp2350.uf2

# When called from the release workflow, attach the binaries to the release
- name: Upload to release
if: ${{ inputs.release_tag != '' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${{ inputs.release_tag }}" \
"Pikobeats.${{ matrix.kit.name }}${{ matrix.enc.suffix }}.rp2350.uf2" --clobber
29 changes: 29 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release-please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.rp.outputs.release_created }}
tag_name: ${{ steps.rp.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: rp

# On a new release, build every kit (normal + reversed encoder) and attach
# the .uf2 files to the release.
firmware:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
uses: ./.github/workflows/build.yml
with:
release_tag: ${{ needs.release-please.outputs.tag_name }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
71 changes: 63 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,69 @@
# Chambord

Chambord is a eurorack module, using the RP2040 or 2350 to implement a sampler.
Chambord is a eurorack module, using the RP2040 or 2350 to implement an
8-channel trigger-in drum sampler.

# UI
The 8 channels are laid out **top to bottom = channel 1 to 8**. Each channel
has a trigger input jack and a bicolor (red/green) LED. There is one encoder
(turn + press) and one CV input.

The ui is controlled via the encoder and encoder button. The feedback is the color of the current selected track or track 7.
# How to use it

1. In the default mode (0) turning the encoder selects the current track to work on. It will blink orange from default green.
2. Press the encoder button (short press) once, enter mode 1 to change the pitch of the current track.
3. Press the encoder again (short press) to enter mode 2, to change the sample. Each track has 4 samples associated with it.
5. Hold the ecoder buton for 1/2 a second (say 'one') and you assign the CV input to modulate the volume of the current track.
There are only two controls: **turn** the encoder and **press** the encoder.

That's about it.
## Turning the encoder

What turning does depends on the current "page". You step through the pages by
**short-pressing** the encoder:

```
press press press press
SELECT --> SAMPLE --> VOLUME --> PITCH --> (back to SELECT)
```

- **SELECT** (start here): turn to choose the channel you want to work on.
- **SAMPLE**: turn to change the sample on the selected channel. Each channel
has 4 samples (banks A–D); turning steps between them.
- **VOLUME**: turn to change the volume of the selected channel.
- **PITCH**: turn to change the pitch of the selected channel.

A short press always advances to the next page and wraps back to SELECT.

## Reading the LEDs

While you're editing, only the **selected channel's** LED lights, colour-coded
by page (green = choosing a thing, amber = setting an amount):

| LED | Page |
|------------------|---------------------------------------|
| green steady | SELECT (turn to pick the channel) |
| green blinking | SAMPLE (turn to change the sample) |
| amber steady | VOLUME (turn to change the volume) |
| amber blinking | PITCH (turn to change the pitch) |

You'll also hear sample/volume/pitch changes as you turn.

## Screensaver / trigger activity

When you haven't touched the encoder for about **10 seconds**, the row switches
to a trigger-activity display: every channel flashes **green** when it gets a
trigger. Touch the encoder and it goes back to showing what you're editing.
(This keeps trigger flashes from distracting you while you work.)

## CV input

**Long-press** the encoder (hold ~3/4 second) to assign the CV input to the
**volume** of the currently selected channel. Long-press again on the same
channel to turn CV off.

## Settings are saved

Your per-channel sample and pitch choices (and the CV assignment) are saved
automatically to flash a moment after you stop adjusting, and restored on the
next power-up. Saving only happens while nothing is sounding, so it never
interrupts playback.

## If the encoder turns the wrong way

Open `firmware/Pikobeats/Pikobeats.ino` and change `ENCODER_DIR` from `1` to
`-1` (near the top), then rebuild.
Loading
Loading