Closed joshdickson closed 7 years ago
Many thanks for the nice feedback :-) audiowaveform does not attempt to centre the waveform, so I suspect that your original audio file has a DC offset. How does it look in Audacity?
Huh, you are right... there is in fact a DC offset and I am not sure why. Apologies, obviously this is not an issue with audiowaveform!
I guess we could consider adding a new command line option, If centering would be a useful feature in general.
Well for me the fact that there is a DC offset is the issue... there should not be on my files. I'd say the even more helpful addition would be to just say 'draw the whole file as a PNG with x and y height' so the user doesn't need to first figure out the file's length. Just a thought.
@joshdickson40 I agree on the idea of being able to say 'draw the whole file as a PNG with x and y height', but it may be important to note that that type of addition still would have left the big gap at the top for the DC offset.
Right, I actually think this is fine to just say 'if you don't want it drawn with the DC offset, get rid of the offset', which is what I'm in the process of doing now. I don't think this project needs to account for fixing that - I thought I was running into a different error. Re: the 'automated drawing', it may even be helpful to not supply a height and have one supplied that would correctly zoom the entire waveform? Or you can supply one and it will be zoomed accordingly? Not sure, but either of these would be a welcome addition to my use case.
Hello!
First of all, this is a great project and I was very happy to find it. Thanks for setting it up well for new users.
I'm using this to generate images for a library of audio files, and occasionally I see an output that does not seem correctly positioned in the PNG that's messing up some formatting elsewhere in my project. For example, I am working with the .dat file below which I generated with the
-z 256 -b 8
flags as suggested.Two different installations on different computers/OSs (Mac & Ubuntu 16.04) then produce the following image when I run:
audiowaveform -i combined.dat -o combined.png -s 0 -e 3368 -w 1400 -h 200 --border-color 00000000 --background-color eeeeee --no-axis-labels --compression 5 --waveform-color 527abd
I am expecting the waveform to be centered vertically. It usually is, but in 3-5% of cases it's drawn too low, as is shown here. 3368 is the native end of the file - I've also tried drawing less and move to see if that has an effect and it did not.
Is there something I am doing wrong here, or should the expected output have the result centered?
Thanks a lot and again, great project :)
Josh
.dat file (provided as .zip, as Github does not allow the .dat) combined.dat.zip