You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bend is a small command-line application for 'bending' data into audio. It used to be written in Nim and can be found here, though the Rust version here supercedes the old Nim one.
This project stems from my own use of SoX to bend raw data into audio with the command:
I wanted to write a small application that could implement this functionality but without the overhead of having to install SoX, a tool suited to performing a number of other DSP tasks that I didn't need. This was also a fun project to learn more about the structure of WAVE audio as well as experimenting with the Rust language.
Francesco Cameli is a significant contributor, particularly in optimising the code to be fast (from 100ms to less than 5ms!). I'd like to also thank him for his patience and guidance on all things Nim and Rust
Build The Tool Yourself
To build bend yourself you need a valid rust toolchain greater than version 1.75.0. A good way to install the rust compiler is by using rustup, which can be found at the rustup website.
Once you have rustc installed (the rust compiler), you can cd to this repository and cast the following spell:
cargo install --path .
You now have the bend binary in your path which can be invoked. See the Usage section.
Usage
bend can process individual files, or process directories of files.
Examples
Convert a single file
bend ~/posts.json ~/audio_output.wav
Convert a whole directory up to 100MB (default)
bend ~/Documents ~/batch_output
Convert a whole directory up to 1GB
bend ~/Documents ~/batch_output -l 1000
Convert a whole directory up to 2GB with a bit depth of 16 at 16000Hz
bend ~/Documents ~/batch_output -l 2000 -s 16000
Help and issues
If you have any issues or questions please raise one on the github!