Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
fast c program to generate the waveform image of an audio file. Also available as a node.js module
C JavaScript Python
branch: master

This branch is 2 commits ahead, 23 commits behind andrewrk:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.npmignore
README
binding.gyp
index.js
main.c
package.json

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
Something went wrong with that request. Please try again.