Awesome
waveform
Go package capable of generating waveform images from audio streams. MIT Licensed.
This library supports any audio streams which the azul3d/engine/audio package is able to decode. At the time of writing, this includes:
- WAV
- FLAC
An example binary called waveform
is provided which show's the library's usage.
Please see cmd/waveform/README.md
for details.
Examples
Here are several example images generated using waveform
. Enjoy!
Generate a waveform image, and scale it both vertically and horizontally.
$ cat ~/Music/02\ -\ Peace\ Of\ Mind.flac | waveform -x 5 -y 2 > ~/waveform.png
Apply a foreground and background color, to make things more interesting.
cat ~/Music/02\ -\ Peace\ Of\ Mind.flac | waveform -fg=#FF3300 -bg=#0099CC -x 5 -y 2 > ~/waveform_color.png
Apply an alternate foreground color, draw using a stripe pattern.
cat ~/Music/02\ -\ Peace\ Of\ Mind.flac | waveform -fg=#FF3300 -bg=#0099CC -alt=#FF9933 -fn stripe -x 5 -y 2 > ~/waveform_stripe.png
Apply an alternate foreground color, draw using a random fuzz pattern.
cat ~/Music/02\ -\ Peace\ Of\ Mind.flac | waveform -fg=#FF3300 -bg=#0099CC -alt=#FF9933 -fn fuzz -x 5 -y 2 > ~/waveform_fuzz.png
Apply a new set of colors, draw using a gradient pattern.
cat ~/Music/02\ -\ Peace\ Of\ Mind.flac | waveform -fg=#FF0000 -bg=#00FF00 -alt=#0000FF -fn gradient -x 5 -y 2 > ~/waveform_gradient.png
Apply a checkerboard color set, draw using a checkerboard pattern.
cat ~/Music/02\ -\ Peace\ Of\ Mind.flac | waveform -fg=#000000 -bg=#222222 -alt=#FFFFFF -fn checker -x 5 -y 2 > ~/waveform_checker.png