bitsec01/waveform

Waveform generator for php 7.0

Installs: 905

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 4

pkg:composer/bitsec01/waveform

dev-master 2025-04-13 10:50 UTC

This package is not auto-updated.

Last update: 2025-12-31 14:15:42 UTC


README

Just a simple wrapper for "waveform" c script written by "Andrew Kelley"

This FORK updates the version to be compatible with PHP 7.0 and it fixes a --png argument issue that the original "polem/waveform" had.

Installation

Using Composer

{
    "require" : {
        "bitsec01/waveform" : "*"
    }
}
php composer.phar install

Running tests

TODO

Usage

<?php

include __DIR__ . '/vendor/autoload.php';

use Waveform\WaveformGenerator;

// instanciation with the waveform binary path
$waveformGenerator = new WaveformGenerator(__DIR__ . '/bin/waveform');

// configuration
$waveformGenerator
    ->setWidth(720)
    ->setHeight(120)                                                                                              
    ->setColorBg('FFFFFF', 1)
    ->setColorCenter('FFCC00', 1)
    ->setColorOuter('FFCC00', 1)
    ;   

// generation
$waveformGenerator->run('medias/audiofile.mp3', 'waveform.png');