An opinionated multitrack phrase/loop sampler, written in Rust, with live performance in mind.
This is a mostly failed experimental project aiming to create a (time-synced) multitrack loop player/mangler.
The basic idea is you can load folders of audio loop files and use it as a kind of Live for the poor that can run on your Raspberry PI, Mac OSX, Linux + everything it can compile for.
Layout, goals:
- Tracks are linked to folders containing samples (one Track / one Folder).
- Each Track have a dedicated and configurable Sampler Engine (SampleGen).
- A SampleGen is basically a way to play a loop in sync with a clock according to a method.
- think Timestretch / Beat Slicer / Re-Pitch ... or any other way to sync a bunch of samples with a tick.
- Each SampleGen implements its own way to mangle samples for fun (beat repeats, freeze, pitch shifts ...).
- Each Track can have a chain of FXs on top ( Filters / Delays / Reverbs ...).
- All this machinery is configurable with just a TOML file.
- All Tracks are synced to a MIDI Clock, Internal Clock, Ableton Link or even CV Clock ...
UI should be a separate project.
The sampler will run somewhere on the network and can be controlled by the UI via OSC API.
- Onset / BPM analysis
- Slicer sample player
- Phase Vocoder sample player (basic timestretch, dirty)
- RePitch sample player (simple linear interpolation)
- MIDI Controls (CC)
- MIDI Clock (Virtual Midi Device)
- OSC API (wip)
- Config (see src/config/default.toml)
Each sample/loop present in the folders is loaded in memory then analysed for BPM detection / Beat detection / Onsets detection.
You can ease the work by setting directly the bpm in the file name, as in amen_break_180bpm.wav.
For this purpose, the aubio library is used in a rust wrapper around the C API.
Rust is a very promising language for realtime audio because it provides:
- high level of abstraction, embrace software complexity with elegance and modernity.
- memory safety,
- speed, in C ballpark, + auto-vectorization, SIMD ...
- fantastic tooling, that you will absolutely love.
- bounded execution times, no nondeterministic garbage collector latency.
- compiler, rustc is a real pair programmer.
- community, just as brillant as helpful.
- Sane (no clicks / pops), synchronized audio engine for all SampleGen.
- Variations / Region detection in loaded audio samples bars.
- Implement FXs.
- Implement a proper Timestretch SampleGen.
- Get rid of C dependencies.
- Test on more platforms.
- Live preformance tests.