An experimental audio graph player written in Rust that can either be used as a library or controlled via JSON-RPC.
By using a graph as the central structure data structure, Bassbox can serve as a flexible backend for many audio-related applications, including:
- Audio players
- Mixers/DJing software
- Remote speakers
- DAWs
Build and run the application using cargo run -- -e speaker
and play a song by entering:
{"jsonrpc":"2.0","id":0,"method":"audioGraph.addNode","params":[{"type":"File","filePath":"path/to/song.mp3"}]}
{"jsonrpc":"2.0","id":0,"method":"audioGraph.addEdge","params":[{"src":1,"dest":0}]}
You can fetch the audio graph using
{"jsonrpc":"2.0","id":0,"method":"audioGraph.get"}
On a high level, the application launches an engine
on a background thread and starts RPC services
, which control what the engine plays by mutating an audio graph.