Waveform icon indicating copy to clipboard operation
Waveform copied to clipboard

All high values when generating high values only?

Open websanova opened this issue 8 years ago • 0 comments

Hello,

I'm having some trouble getting correct values from the Png generator.

I extended the existing one to just print out the position values and it's showing some strange numbers. The values are all just maxed out from around 397 to 400 (400 being the height of the image).

foreach($waveform->toArray() as $position => $value) {
    echo $position . ':' . $value . '****';

    $y = round(($height - $value) / 2);
    imageline($image, $position, $y, $position, $y + $value, $color);
}

I'm just doing a simple test with a path to a .wav file directly set. I'm not sure what encoder is on my system, so not sure if this is part of the issue or something else needs to be installed?

websanova avatar Mar 20 '17 10:03 websanova