Skip to content

Commit451/codec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compose-vst

A VST3/CLAP audio plugin with a Rust backend (nih-plug) and a Compose Multiplatform desktop UI.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     TCP/JSON      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  DAW (host)      β”‚    localhost:9847  β”‚  Compose Desktop UI  β”‚
β”‚                  │◄─────────────────►│                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚                   β”‚  - Cutoff slider     β”‚
β”‚  β”‚ Rust Plugin  β”‚β”‚   state updates   β”‚  - Resonance slider  β”‚
β”‚  β”‚ (nih-plug)   β”‚β”‚ ────────────────► β”‚  - Freq response plotβ”‚
β”‚  β”‚              β”‚β”‚   param changes   β”‚                      β”‚
β”‚  β”‚ Biquad LPF   β”‚β”‚ ◄──────────────── β”‚  Material 3 dark UI  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚                   β”‚                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Plugin (Rust) β€” loaded by the DAW as a native .vst3 shared library. Handles real-time audio processing with zero GC pauses.

UI (Compose Desktop) β€” separate JVM process. Communicates with the plugin over TCP with newline-delimited JSON.

Building

Prerequisites

  • Rust (stable) β€” curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • JDK 21+ β€” for Compose Desktop
  • Gradle wrapper is included in ui/

Rust Plugin

cd plugin
cargo build --release

The compiled .vst3 bundle will be in target/release/. Copy it to your DAW's VST3 folder.

Compose Desktop UI

cd ui
./gradlew run          # Run directly
./gradlew packageDeb   # Package as .deb

IPC Protocol

Newline-delimited JSON over TCP on localhost:9847.

Plugin β†’ UI (state updates, ~30Hz):

{"type":"state","cutoff":1000.0,"resonance":0.5}

UI β†’ Plugin (parameter changes):

{"type":"set_param","name":"cutoff","value":2000.0}
{"type":"set_param","name":"resonance","value":0.7}

Project Structure

compose-vst/
β”œβ”€β”€ plugin/                    # Rust VST3/CLAP plugin
β”‚   β”œβ”€β”€ Cargo.toml
β”‚   └── src/
β”‚       β”œβ”€β”€ lib.rs             # Plugin entry + DSP loop
β”‚       β”œβ”€β”€ filter.rs          # Biquad low-pass filter
β”‚       └── ipc.rs             # TCP server for UI communication
└── ui/                        # Compose Desktop app
    β”œβ”€β”€ build.gradle.kts
    β”œβ”€β”€ settings.gradle.kts
    └── src/main/kotlin/com/composevst/
        β”œβ”€β”€ Main.kt            # App entry + main Compose UI
        β”œβ”€β”€ IpcClient.kt       # TCP client with auto-reconnect
        └── components/
            β”œβ”€β”€ ParamSlider.kt         # Logarithmic/linear slider
            └── FrequencyResponse.kt   # Biquad magnitude response plot

License

MIT

About

Compose desktop + Rust audio VST

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors