Drawing easy wave graph for wave audio file with PHP

PHP is becoming more stable languages for audio manipulation stuffs. PHP can easily convert the wave audio file to an image format by the vibration in wave audio file. In this demo PHP script opens a given sound sample file in the WAVE format and extracts the variation of the volume of the sample over time. And PHP script renders an image that represents the sound sample wave form. The input for this demo PHP script should be .wav file. The script first split the wave file into chunks and then draw function will be instantiated.

This draw function is having some features like,

  1. Channel alignment
  2. Width of the image
  3. Height of the image
  4. Background color of the image
  5. Line color
  6. Image color

 

Requirement :-  PHP, *.wav file
Demo :- http://mydons.com/viewer/php/wav/example_draw.php
Download :- Wav2ImagePHP