Data bending tool. Transforms images to sound and back.
Ensure you have uv installed.
git clone https://github.com/meownoid/bender.git
cd bender
uv tool install --reinstall .
(Optional) Enable autocompletion by generating a completion script and sourcing it in your shell configuration. For bash, replace zsh
with bash
:
_BENDER_COMPLETE=zsh_source bender > ~/.zshrc.d/bender-complete.zsh
bender convert image.jpg
This creates image-xxxx.wav
and image-xxxx.json
files using the default algorithm. The .json
file contains metadata for reverse conversion.
Specify the output file name:
bender convert image.jpg -o image.wav
bender convert image-xxxx-processed.wav
The corresponding .json
file with the longest matching prefix is selected automatically.
bender convert --list
bender convert -a bmp -p sample_size 1 image.jpg
bender monitor 'image1-*.wav'
Automatically converts new sound files with the prefix image1-
or image2-
back to images. Use quotes to prevent shell expansion of the pattern.
bender monitor -o '*.wav'
bender edit -a split_channels image.jpg
This creates three output images, one per channel. Different algorithms may produce varying numbers of inputs and outputs.
bender edit --list
bender edit -a split_channels -p mode CMYK -q 90 image.jpg
If the algorithm requires one input image, it can process multiple images independently:
bender edit -a split_channels image1.jpg image2.jpg
bender process -a distortion sound.wav
Different algorithms may produce varying numbers of inputs and outputs.
bender process --list
bender process -a distortion -p gain 2.5 -b 24 sound.wav
Most algorithms can process multiple sound files at once:
bender process -a distortion sound1.wav sound2.wav