boyhagemann / Waveform

A php package that can generate waveforms based on a WAV file
40 stars 8 forks source link

added an svg generator #4

Closed moussaclarke closed 8 years ago

moussaclarke commented 8 years ago

I've added a quick and dirty svg generator. It makes a polygon from the waveform data.

The generate method returns the svg variable rather than saving it or outputting it, as I think that's best handled externally (in fact I would suggest changing the other generators to have the same behaviour)

boyhagemann commented 8 years ago

Thanks moussaclarke

moussaclarke commented 8 years ago

Cool, I'll maybe tidy it up a bit and submit another pull request. I can also add an example to the readme. If you want I could amend the other generators to return var rather than output/save as suggested above? That would be a breaking change so you may prefer not to, but I think it would make sense - e.g. if you're making a Laravel app and you want to use the Storage facade.