waveform-autowidth
v0.0.1
Published
fast waveform generation
Downloads
2
Readme
Command Line Usage:
waveform [options] audiofile pngfile
Available options with their defaults:
--width 256 width of the image
--height 64 height of the image
--color-bg 00000000 bg color, rrggbbaa
--color-center 000000ff gradient center color, rrggbbaa
--color-outer 000000ff gradient outer color, rrggbbaa
Substitute '-' for a filename to use stdio.
Node.js Usage:
var generateWaveform = require('waveform');
generateWaveform(audiofile, pngfile, {
width: 256, // width of the image
height: 64, // height of the image
'color-bg': '00000000', // bg color, rrggbbaa
'color-center': '000000ff',// gradient center color, rrggbbaa
'color-outer': '000000ff', // gradient outer color, rrggbbaa
}, function(err) {
// done generating waveform
});
PHP Usage: https://github.com/polem/WaveformGenerator
Dependencies:
libsox
libpng
zlib
Compile:
gcc -o waveform main.c -O3 -lsox -lz -lpng
Compile on osx using macport:
install depedencies:
sudo port install sox
sudo port install libpng
sudo port install zlib
run compiler:
gcc -o waveform main.c -O3 -lsox -lz -lpng -I/opt/local/include -L/opt/local/lib