Skip to content

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 PROJECT PHOENIX SOUND SAMPLER

ESP32-S3 Polyphonic Hardware Sampler

4 Sample Slots · 12 Voices · Multisampling · Realtime Sequencer · Sample Editor · MIDI · USB · Phoenix Librarian

Version 1.0.2 FINAL

ESP32-S3 Arduino Audio Release

RealTimeAudioLab / RTAL


Phoenix is a standalone ESP32-S3 hardware sampler designed as an instrument — not just a sample player.
Record, import, sculpt, loop, map, sequence and perform samples directly on the hardware, then manage complete banks comfortably on Windows with Phoenix Librarian.


🎬 Phoenix in action


📸 Hero Image and 🎵 Hardware Demo — 120 BPM Electronic Track

Eight samples · four sequencer tracks · 12-voice engine · no DAW

Phoenix_Demo_Bank_01.mp4

Phoenix 3D printed case.


📸 Current Development Prototype

The current ESP32-S3 based hardware platform used for firmware, DSP and hardware development.


📸 Draw Waveform

WELLENBAD Show Sequencer demonstration


📸 Sample Editor

WELLENBAD Show Sequencer demonstration


What is Phoenix?

Project Phoenix is a complete sample-based musical instrument built around the ESP32-S3.

The sampler combines four directly accessible sample slots with a global 12-voice polyphonic playback engine, onboard recording, waveform editing, loop processing, multisamples, keyzones, MIDI, effects, a four-track pattern sequencer, song chaining, SD-card storage and USB mass-storage access.

Phoenix v1.0.0 FINAL is the first frozen stable release of the platform.

At a glance

Feature Phoenix v1.0.2
MCU ESP32-S3 @ 240 MHz with PSRAM
Polyphony 12 global sample voices
Audio engine 32 kHz, 128-frame blocks
Basic sample slots 4
ADC PCM1808
DAC PCM5102A
Sample import WAV → Phoenix 32 kHz mono format
Sampling Direct recording from ADC
Loop modes OFF / FORWARD / ALTERNATE
Multisampling Keygroups, velocity layers, round robin
Performance modes KEYZONE / MULTI
Sequencer 4 patterns × 4 tracks × up to 16 steps
MIDI clock Internal / External, 24 PPQN
MIDI transport FA Start / FC Stop, continuous F8 supported
Storage SD card + USB Mass Storage
PC companion Phoenix Librarian v1.0.0

Highlights

🎙 Sampling and waveform editing

Phoenix can record directly from the PCM1808 ADC and play back through a PCM5102A DAC.

Each sample can be edited directly on the hardware:

  • Sample Start
  • Loop Start
  • Loop End
  • Sample End
  • Normalize
  • DC correction
  • Root note
  • Pitch tracking
  • ADSR
  • Loop mode
  • Loop crossfade
  • Level and panorama

The four marker positions follow a clear playback model:

S.START ---- L.START ================= L.END ---- S.END
               <---- LOOP AREA ---->

FORWARD loops restart at L.START.
ALTERNATE loops run as bidirectional ping-pong loops.


🎹 12-voice polyphonic sample engine

Phoenix uses one global voice pool for all sample slots and multisample regions.

                    ┌─────────────────────┐
MIDI / Sequencer ──►│  12-Voice Allocator │
                    └─────────┬───────────┘
                              │
             ┌────────────────┼────────────────┐
             ▼                ▼                ▼
       Sample Voices      Multisamples      Keyzones
             │                │                │
             └────────────────┼────────────────┘
                              ▼
                       Filter / FX / Mix
                              │
                              ▼
                          PCM5102A

The v1.0 voice engine includes ownership protection, sustain handling, duplicate-note handling and guarded voice stealing.


🧩 Multisampling

Phoenix is not limited to four static WAV files.

The multisample system supports:

  • multiple keygroups
  • keyboard ranges
  • velocity layers
  • round robin
  • root-note mapping
  • one-shot regions
  • forward loops
  • alternate loops
  • per-region sample assignment

This makes Phoenix suitable for much more than drums: pianos, strings, pads, percussion sets, sound effects and experimental sample instruments can all be built from the same engine.


🎚 Quattro: KEYZONE and MULTI

The four primary sample slots can operate as a single performance setup.

KEYZONE

Split the keyboard into zones and assign different samples to different ranges.

C1                C3                C5                C7
│------ SLOT 1 -----│
          │------ SLOT 2 ------│
                    │------ SLOT 3 ------│
                              │------ SLOT 4 ------│

MULTI

Several slots can respond simultaneously, each with its own level, panorama, range and processing.

This allows layered instruments, stacked textures and complex live setups.


⚡ Realtime sequencer

One of the central architectural features of Phoenix v1.0.0 is the dedicated realtime sequencer path.

The final engine no longer lets display, SD-card or normal UI work determine musical timing.

CORE 0
┌────────────────────┐
│ MIDI Task      P10 │
│ F8 / FA / FC       │
└─────────┬──────────┘
          │ timestamped clock
          ▼
┌────────────────────┐
│ SeqRT Task      P8 │
│ 24 PPQN            │
│ step scheduling    │
└─────────┬──────────┘
          │ scheduled events
══════════╪════════════════════════════════════
          ▼
CORE 1
┌────────────────────┐
│ Audio Task      P24│
│ 128-frame blocks   │
│ intra-block events │
└─────────┬──────────┘
          ▼
        AUDIO

External MIDI clock is designed for systems where F8 continues permanently and transport is controlled separately by FA Start and FC Stop.

Six MIDI clock ticks correspond to one 16th-note sequencer step.

The v1.0 validation build demonstrated scheduled event placement inside the 128-frame audio block while keeping realtime audio overruns and clock/command drops at zero during the validated tests.


🥁 Pattern Sequencer

Phoenix includes a four-track hardware step sequencer:

  • 4 patterns
  • 4 tracks per pattern
  • 1–16 steps per track
  • note
  • velocity
  • gate length
  • individual track lengths
  • internal or external clock
  • pattern management
  • song chaining

A step contains:

ACTIVE | NOTE | VELOCITY | GATE

Different track lengths can be used to create polymetric patterns.


🎛 Sound processing

Phoenix v1.0 contains a lightweight realtime processing chain designed specifically for the ESP32-S3 audio budget.

Filter

Sample playback can be shaped using the onboard filter section with realtime cutoff and modulation control.

Echo

The delay engine includes smoothed parameter handling and click-reduced delay-time transitions.

Vintage Sampler

Phoenix can deliberately move away from clean modern playback through its Vintage Sampler section, including reduced-rate / reduced-resolution style processing and character parameters.


💾 Banks and SD storage

Phoenix stores instruments as banks on the SD card.

Typical structure:

/PHOENIX
│
├── CONFIG.TXT
├── WAV/
├── EXPORT/
│
└── BANKS/
    ├── BANK01/
    │   ├── BANK.CFG
    │   ├── BANK.INFO
    │   ├── SLOT1.WAV
    │   ├── SLOT2.WAV
    │   ├── SLOT3.WAV
    │   ├── SLOT4.WAV
    │   ├── MULTISAMPLE.CFG
    │   ├── PATTERNS.CFG
    │   └── SONG.CFG
    │
    ├── BANK02/
    └── ...

Current formats:

BANK_VERSION        15
MULTISAMPLE_VERSION 10

Phoenix uses transactional bank storage to reduce the risk of destroying an existing bank during a failed save operation.


🖥 Phoenix Librarian

Phoenix Librarian v1.0.0 is the Windows companion application for Project Phoenix.

It works directly with the same Phoenix bank structure used by the hardware.

Phoenix Librarian

Librarian features

  • Bank management
  • Waveform editor
  • Loop editor
  • KEYZONE / MULTI editor
  • Pattern sequencer
  • Song editor
  • Echo / FX editing
  • Bank metadata
  • MIDI monitor
  • On-screen keyboard
  • Polyphonic PC audio preview
  • Factory library
  • Search and filters
  • Backup & Restore
  • Bank validation
  • Self Test and diagnostics

Typical hardware ↔ PC workflow

PHOENIX HARDWARE
      │
      │ USB Mass Storage
      ▼
WINDOWS
      │
      ▼
PHOENIX LIBRARIAN
      │
      ├── Backup bank
      ├── Import / edit samples
      ├── Set loops
      ├── Build keyzones / multis
      ├── Edit patterns and songs
      ├── Preview audio
      └── Validate
      │
      ▼
Save to Phoenix volume
      │
      ▼
Safely eject USB volume
      │
      ▼
Reload bank on Phoenix

The Librarian can also work directly with the SD card or with a local copy of the complete Phoenix file structure.

Phoenix Librarian complements the hardware.
Phoenix plays the instrument — Librarian organizes, edits, previews and validates its data.


🔌 Hardware

Audio

ESP32-S3                    PCM1808 ADC
────────                    ───────────
GPIO0   MCLK  ─────────────► MCLK / SCKI
GPIO18  BCLK  ─────────────► BCK
GPIO16  LRCK  ─────────────► LRCK / WS
GPIO5   DIN   ◄───────────── DOUT


ESP32-S3                    PCM5102A DAC
────────                    ────────────
GPIO18  BCLK  ─────────────► BCK
GPIO16  LRCK  ─────────────► LCK / LRCK
GPIO17  DOUT  ─────────────► DIN

The PCM1808 and PCM5102A share BCLK and LRCK/WS.
The ADC master clock is supplied from GPIO0.


Complete ESP32-S3 pinout

Function GPIO
PCM1808 MCLK / SCKI 0
I2S BCLK 18
I2S LRCK / WS 16
I2S DOUT → PCM5102A 17
I2S DIN ← PCM1808 5
OLED SCK 12
OLED MOSI 11
OLED CS 10
OLED DC 6
OLED RESET 7
SD SCK 12
SD MOSI 11
SD MISO 13
SD CS 9
MIDI RX 40
MIDI TX 39
F1 21
F2 47
F3 45
F4 38
F5 4
F6 15
F7 3
F8 14
Encoder A 1
Encoder B 2
Encoder Switch 42
Native USB D− 19
Native USB D+ 20

OLED and SD share SPI SCK GPIO12 and MOSI GPIO11, while using independent chip-select signals.

All GPIO signals are 3.3 V logic.


🧠 Task architecture

Phoenix deliberately separates realtime audio from MIDI, sequencing and user-interface work.

ESP32-S3 @ 240 MHz

CORE 1
└── AudioTask      Priority 24
    ├── I2S input
    ├── voice rendering
    ├── sample-accurate scheduled events
    ├── filter / effects
    └── I2S output

CORE 0
├── MidiTask       Priority 10
├── SeqRT          Priority 8
└── ControlTask    Priority 3
    ├── UI
    ├── encoder / buttons
    ├── SD / bank management
    └── system control

Audio block:

Sample rate : 32,000 Hz
Block size  : 128 frames
Deadline    : 4.0 ms
Voices      : 12

🎹 MIDI

Phoenix supports standard DIN MIDI through the ESP32-S3 hardware serial interface.

MIDI IN  → GPIO40
MIDI OUT → GPIO39
Baud     → 31250

The MIDI system supports, among other functions:

  • Note On / Note Off
  • Velocity
  • Sustain pedal
  • Pitch Bend
  • Control Change
  • MIDI Learn
  • external MIDI clock
  • Start / Stop transport

For external-clock operation:

F8 = MIDI CLOCK (24 PPQN)
FA = START
FC = STOP

Continuous F8 while stopped is explicitly supported.


🕹 Controls

Phoenix uses eight front-panel buttons and one rotary encoder with push switch.

F1  GPIO21
F2  GPIO47
F3  GPIO45
F4  GPIO38
F5  GPIO4
F6  GPIO15
F7  GPIO3
F8  GPIO14

Encoder A   GPIO1
Encoder B   GPIO2
Encoder SW  GPIO42

The switches are active-low and are normally wired from GPIO to GND using the ESP32-S3 internal pull-ups.


🧰 Development environment

The v1.0 FINAL firmware was developed for:

Arduino IDE          1.8.19
Arduino-ESP32 Core   2.0.16
MCU                  ESP32-S3
CPU                  240 MHz
PSRAM                8 MB
Flash                16 MB
Audio                32 kHz / 128 frames

The realtime audio translation unit uses targeted optimization while avoiding global fast-math behavior.


🚀 Quick start

  1. Build the Phoenix hardware according to the pinout above.
  2. Install the required Arduino libraries.
  3. Open the Phoenix v1.0.0 FINAL sketch in Arduino IDE 1.8.19.
  4. Select the correct ESP32-S3 board configuration.
  5. Compile and upload.
  6. Insert a prepared Phoenix SD card.
  7. Connect audio input/output.
  8. Connect MIDI.
  9. Power up Phoenix.
  10. Load a bank and play.

For detailed operation, see the Phoenix v1.0.0 Bedienungshandbuch in the repository documentation.


🧪 Service mode & diagnostics

Hold the encoder switch while powering on Phoenix to enter the service/self-test area.

Available tests include:

  • Audio Output Test
  • Audio Input Test
  • Button Test
  • System Diagnostics
  • Start Sampler

Runtime diagnostics expose audio, MIDI, sequencer and storage health counters, making realtime problems measurable instead of relying only on subjective testing.


✅ Release status

Phoenix v1.0.2 FINAL

The first stable Phoenix release was frozen after the v0.9.0 RC1 regression and endurance phase.

The validated release architecture includes:

  • 12-voice realtime sample engine
  • guarded MIDI / voice ownership
  • transactional bank storage
  • sample and loop boundary hardening
  • robust MIDI Start / Stop handling
  • continuous external F8 clock support
  • dedicated realtime sequencer task
  • intra-block event scheduling
  • cooperative SD / bank I/O
  • multisample validation
  • stabilized delay-time changes
  • USB Mass Storage workflow
  • Phoenix Librarian integration

The v1.0 release is intended to remain frozen. Future development should branch from this release rather than modify the archived FINAL source.


📖 Documentation

docs/ ├── Phoenix_v1_0_0_Handbuch_DE.pdf


🔥 Why Phoenix?

Phoenix started as a sampler experiment and grew into a complete embedded musical instrument.

The project explores how far an ESP32-S3 can be pushed when audio processing, MIDI, sequencing, storage and UI are treated as one coherent realtime system.

It is built around a simple idea:

Samples should not just be played back. They should become instruments.


PROJECT PHOENIX

Sample · Sculpt · Map · Sequence · Perform

ESP32-S3 Hardware Sampler
Phoenix v1.0.2 FINAL

RealTimeAudioLab / RTAL


About

Project Phoenix is a 12-voice ESP32-S3 hardware sampler with multisampling, keyzones, filters, vintage sample processing, echo, MIDI, a real-time 4-track step sequencer and the Phoenix Librarian desktop editor.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages