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
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TUI step sequencer / drum machine / synth in Rust. All DSP from scratch.
```bash
cargo build # dev build
cargo build --release
cargo test # 23 tests, runs in <1s
cargo test # 55 tests, runs in <1s
cargo run # launch TUI
```

Expand Down Expand Up @@ -46,7 +46,7 @@ Two-thread model: UI thread (ratatui + crossterm) and audio thread (cpal/CoreAud
- `drum_voice.rs` — per-track DSP (kick, snare, hats, etc.), params: tune/sweep/color/snap/filter/drive/decay/volume
- `synth_voice.rs` — polyphonic synth DSP, 2 oscillators, 2 envelopes, filter with own ADSR
- `mixer.rs` — channel mixing, send effects
- `effects.rs` — reverb, delay, compressor, saturator
- `effects.rs` — FDN reverb, delay, compressor, saturator, lookahead limiter, sidechain envelope, oversampler
- `display_buffer.rs` — lock-free audio→UI buffer for waveform display
- `fft.rs` — FFT for spectrum analyzer

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "textstep"
version = "1.3.0"
version = "1.4.0"
edition = "2024"

[dependencies]
Expand Down
73 changes: 38 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<div align="center">

# T E X T S T E P
# 🎛️ T E X T S T E P 🎹

**A terminal-based step sequencer, drum machine, and synthesizer built entirely in Rust.**

All DSP from scratch — no samples, no external audio libraries. Just your terminal and your speakers.
All DSP from scratch — no samples, no external audio libraries. Just your terminal and your speakers.

[![Rust](https://img.shields.io/badge/Rust-1.70%2B-orange?logo=rust&logoColor=white)](https://www.rust-lang.org/)
[![License: GPL v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![Platform: macOS](https://img.shields.io/badge/Platform-macOS-lightgrey?logo=apple&logoColor=white)](https://www.apple.com/macos/)
[![Platform: Linux](https://img.shields.io/badge/Platform-Linux-lightgrey?logo=linux&logoColor=white)](https://www.kernel.org/)
[![Audio: CoreAudio / ALSA](https://img.shields.io/badge/Audio-CoreAudio_|_ALSA-green)](https://developer.apple.com/documentation/coreaudio)
[![TUI: ratatui](https://img.shields.io/badge/TUI-ratatui-purple)](https://ratatui.rs/)
[![Lines of Code](https://img.shields.io/badge/Lines_of_Code-20k-informational)]()
[![Tests](https://img.shields.io/badge/Tests-48_passing-brightgreen)]()
[![Lines of Code](https://img.shields.io/badge/Lines_of_Code-17k-informational)]()
[![Tests](https://img.shields.io/badge/Tests-55_passing-brightgreen)]()

![TextStep Demo](assets/demo.gif)

</div>

---

## Features
## Features

- **8 Drum Tracks** — Kick, Snare, Closed HiHat, Open HiHat, Ride, Clap, Cowbell, Tom — each fully synthesized with 8 tweakable sound parameters
- **Dual Polyphonic Synths** — Synth A + Synth B with DJ-style crossfader, each with 2 oscillators + sub, 2 ADSR envelopes, resonant filter, dual LFOs with 6 waveforms, independent patterns and kits
- **32-Step Sequencer** — 10 patterns and 8 kit slots with per-pattern BPM and swing
- **16 Scene Slots** — snapshot and recall full instrument states (all patterns, kits, BPM, swing) with queued or immediate switching
- **Send Effects Chain** — Schroeder reverb, tempo-synced filtered delay, tube saturator, SSL-style glue compressor
- **Live Performance** — drum pads, real-time recording, pattern queuing, scene-based arrangement
- **Mouse Support** — click the grid, drag parameters Ableton-style, audition sounds from the activity bar
- **Project System** — save/load `.tsp` files, standalone kit export, preset browser
- **Collapsible Panels** — minimize/expand synth, drum knobs, and waveform sections; auto-adapts to small terminals
- **Spectrum Analyzer** — real-time FFT spectrum display and VU meter with 90s Hi-Fi LED aesthetic
- 🥁 **8 Drum Tracks** — Kick, Snare, Closed HiHat, Open HiHat, Ride, Clap, Cowbell, Tom — each fully synthesized with 8 tweakable sound parameters
- 🎹 **Dual Polyphonic Synths** — Synth A + Synth B with DJ-style crossfader, each with 2 oscillators + sub, 2 ADSR envelopes, resonant filter, dual LFOs with 6 waveforms, independent patterns and kits
- 🔲 **32-Step Sequencer** — 10 patterns and 8 kit slots with per-pattern BPM and swing
- 🎬 **16 Scene Slots** — snapshot and recall full instrument states (all patterns, kits, BPM, swing) with queued or immediate switching
- 🔊 **Pro Audio Engine** — FDN reverb (8-line stereo), tempo-synced delay, 2×-oversampled tube saturator, SSL-style glue compressor, lookahead limiter, sidechain compression (kick ducks synths)
- 🎤 **Live Performance** — drum pads, real-time recording, pattern queuing, scene-based arrangement
- 🖱️ **Mouse Support** — click the grid, drag parameters Ableton-style, audition sounds from the activity bar
- 💾 **Project System** — save/load `.tsp` files, standalone kit export, preset browser
- 📐 **Collapsible Panels** — minimize/expand synth, drum knobs, and waveform sections; auto-adapts to small terminals
- 📊 **Spectrum Analyzer** — real-time FFT spectrum display and VU meter with 90s Hi-Fi LED aesthetic

Ships with **10 demo scenes** ready to play: Acid Techno, Classic House, Deep House, Driving Techno, Lo-Fi Hip Hop, Trance, Drum & Bass, Electro Funk, Dub Techno, and Ambient — each with matched drum patterns, synth patterns, and kits.
Ships with **10 demo scenes** ready to play: 🎵 Acid Techno, Classic House, Deep House, Driving Techno, Lo-Fi Hip Hop, Trance, Drum & Bass, Electro Funk, Dub Techno, and Ambient — each with matched drum patterns, synth patterns, and kits.

## Getting Started
## 🚀 Getting Started

### Prerequisites

Expand Down Expand Up @@ -66,7 +66,7 @@ sudo apt-get install libasound2-dev # Debian/Ubuntu
Run the tests:

```bash
cargo test # 48 tests, runs in <1s
cargo test # 55 tests, runs in <1s
```

### Pre-built Binaries
Expand All @@ -79,9 +79,9 @@ Pre-built binaries for macOS (ARM, x86_64, universal) and Linux (x86_64) are ava
xattr -d com.apple.quarantine ./textstep
```

## Quick Manual
## 🎚️ Quick Manual

### Transport
### ▶️ Transport

| Key | Action |
|-----|--------|
Expand All @@ -94,13 +94,14 @@ xattr -d com.apple.quarantine ./textstep
| `L` | Cycle loop length: 8 / 16 / 24 / 32 |
| `Shift+C` | Cycle compressor: Off / Light / Medium / Heavy / Max |
| `Shift+T` | Cycle tube saturator: Off / Light / Medium / Heavy / Max |
| `Shift+D` | Cycle sidechain duck: Off / Light / Medium / Heavy / Max |
| `Shift+V` | Adjust master volume |
| `<` / `>` | Swing ±5% |
| `(` / `)` | Crossfader toward A / B |
| Click `A` / `B` | Mute/unmute Synth A / B |
| Click `C` | Reset crossfader to center |

### Navigation
### 🧭 Navigation

| Key | Action |
|-----|--------|
Expand All @@ -112,7 +113,7 @@ xattr -d com.apple.quarantine ./textstep
| `~` | Toggle spectrum analyzer / VU meter |
| `?` | Help overlay |

### Sound Design
### 🎛️ Sound Design

Each drum track has 8 parameters across three pages:

Expand All @@ -126,7 +127,7 @@ Tweak with `Shift+Up/Down` (adjust value) or `Alt+Up/Down` (adjust and audition

Mute (`Shift+M`) and Solo (`Shift+S`) are always accessible on any page.

### Drum Pads
### 🥁 Drum Pads

The bottom keyboard row triggers sounds live:

Expand All @@ -136,7 +137,7 @@ The bottom keyboard row triggers sounds live:

With record enabled and playback running, pad hits write steps at the playhead.

### Patterns & Kits
### 🔀 Patterns & Kits

**Patterns** — 10 slots per section (Synth A, Synth B, Drums), each with its own step data:

Expand All @@ -153,13 +154,13 @@ With record enabled and playback running, pad hits write steps at the playhead.
|-----|--------|
| `1` through `8` | Switch to kit slot |

### Dual Synths
### 🎹 Dual Synths

TextStep features two independent polyphonic synthesizers (**Synth A** and **Synth B**), each with its own patterns, kits, 2 oscillators + sub, noise, 2 ADSR envelopes, 24dB resonant filter, and LFO with 6 waveforms. Toggle all synth panels with `F2`. Each synth has its own pattern/kit selectors shown in the transport bar.

Synth notes are triggered with `z` `x` `c` `v` when a synth grid is focused, with `Up/Down` for pitch and `(` `)` for octave shifts.

### Scenes
### 🎬 Scenes

Scenes are snapshots of the full instrument state: which pattern and kit is selected for drums, Synth A, and Synth B, plus BPM and swing. Use them to arrange your track.

Expand All @@ -173,7 +174,7 @@ Scenes are snapshots of the full instrument state: which pattern and kit is sele
| `D` | Delete scene |
| `Esc` | Close browser |

### File Operations
### 💾 File Operations

| Key | Action |
|-----|--------|
Expand All @@ -189,7 +190,7 @@ Scenes are snapshots of the full instrument state: which pattern and kit is sele

Projects are stored as JSON in `~/Library/Application Support/textstep/projects/`.

## Architecture
## 🏗️ Architecture

```
┌──────────────────────────────────────────────────┐
Expand Down Expand Up @@ -219,14 +220,14 @@ Projects are stored as JSON in `~/Library/Application Support/textstep/projects/

Communication is lock-free via bounded crossbeam channels. The audio thread never blocks.

### DSP — All From Scratch
### 🔧 DSP — All From Scratch

Every sound is synthesized in real-time with no external DSP dependencies:

- **Drum voices** — TR-808/909-inspired kicks (sine + pitch envelope + resonant impulse), noise-blended snares, 6-oscillator metallic banks for hats and rides (Mutable Instruments Plaits-style inharmonic ratios), ring-modulated open hats, bandpass claps, detuned pulse cowbells, FM toms
- **Synth voice** — dual oscillators, sub, noise, two ADSR envelopes, resonant SVF filter, 6-waveform LFO
- **Effects** — Schroeder/Freeverb reverb (4 comb + 2 allpass), tempo-synced filtered delay, asymmetric tube saturator, feedforward RMS glue compressor with soft knee
- **Primitives** — 1-pole HP/LP filters, state-variable filter, xorshift32 noise, tanh waveshaping
- **Synth voice** — dual PolyBLEP anti-aliased oscillators, sub, noise, two ADSR envelopes, resonant SVF filter, 6-waveform LFO
- **Effects** — 8-line FDN reverb with Householder feedback matrix (native stereo), tempo-synced filtered delay, 2×-oversampled asymmetric tube saturator, feedforward RMS glue compressor with soft knee, true-peak lookahead limiter, sidechain envelope follower
- **Primitives** — 1-pole HP/LP filters, state-variable filter, xorshift32 noise, stereo decorrelation

### Source Map

Expand All @@ -238,7 +239,7 @@ Every sound is synthesized in real-time with no external DSP dependencies:
| `src/sequencer/` | Data: patterns, transport, project serialization |
| `src/presets/` | Preset browser: drum/synth sounds and patterns by genre |

### Color Palette
### 🎨 Color Palette

Hardware/synthwave aesthetic — all rendered with UTF-8 block characters on a dark background.

Expand Down Expand Up @@ -311,7 +312,7 @@ textStep/
└── LICENSE # GPL v2
```

## Contributing
## 🤝 Contributing

Contributions are welcome! Please ensure:

Expand All @@ -329,6 +330,8 @@ This project is licensed under the [GNU General Public License v2.0](LICENSE).

<div align="center">

**Built with Rust** · **All DSP from scratch** · **Zero audio dependencies**
🦀 **Built with Rust** · 🔊 **All DSP from scratch** · 🎵 **Zero audio dependencies**

*"Any sufficiently advanced terminal is indistinguishable from a drum machine."*

</div>
Loading
Loading