Skip to content

meownoid/bender

Repository files navigation

An image-bending tool that transforms images to sound and back.

Installation

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:

_BENDER_COMPLETE=zsh_source bender > ~/.zshrc.d/bender-complete.zsh

Usage

Convert image to sound

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

Convert processed sound back to an image

bender convert image-xxxx-processed.wav

The corresponding .json file with the longest matching prefix is selected automatically.

List available algorithms and parameters

bender convert --list

Use specific algorithm and parameters

bender convert -a bmp -p sample_size 1 image.jpg

Monitor and convert matching sound files

When experimenting, it might be useful to automatically convert new sound files back to images.

bender monitor 'image-*.wav'

This command converts new sound files with the prefix image- back to images. Use quotes to prevent shell expansion of the pattern.

About

Data bending tool

Topics

Resources

License

Stars

Watchers

Forks

Languages