A signal processing framework for making music with Rust.
This is a personal project of mine, with two goals: 1. To learn Rust. 2. To work on design and implementation of real time audio systems.
I am still fleshing out the core libraries, so interfaces are still unstable.
The following example will play back your computer's microphone input to the speakers, with an echo effect:
```rust use oxcable::delay::Delay; use oxcable::chain::{DeviceChain, Tick}; use oxcable::io::audio::AudioEngine;
let engine = AudioEngine::withbuffersize(256).unwrap(); let mut chain = DeviceChain::from( engine.defaultinput(1).unwrap() ).into( Delay::new(1.0, 0.5, 0.5, 1) ).into( engine.defaultoutput(1).unwrap() ); chain.tick_forever(); ```
For more simple examples, the src/bin
directory contains many
sample test scripts.
For an example of a project leveraging the tools this framework contains, see my sample subtractive synthesizer.
Currently, oxcable requires PortAudio and PortMIDI be installed on your machine.
On Mac, these are available on Homebrew. To install, run:
brew install portaudio
brew install portmidi
The scripts directory contains assorted scripts used both to experiment with new
features, and to test the output of Rust library code. These scripts are written
in Python, and leverage the numpy
, scipy
and matplotlib
libraries for
rapid prototyping purposes.
This project is a successor to another project of mine ClickTrack. ClickTrack is an audio framework written in C++. Much of this project is a port of work originally done in ClickTrack. To see more, visit my ClickTrack repository.