Closed bhaskargr closed 7 years ago
The way it currently works is that the image height covers the full range of the audio signal so, as you've found, a low amplitude input will produce a small waveform.
I'll consider adding a new command-line option to allow the scaling to be adjusted, either automatically to fit the available height, or by a user-specified amount. Something like:
--amplitude-scale=1.5
: Scale waveform height by a specified amount (default: 1, which preserves the current behaviour)--amplitude-scale=auto
: Scale waveform image to fit available height This option would only be used when rendering waveform images, and not when creating .dat or .json waveform files.
Thanks for the suggestion!
This will be awesome, keep me posted.
Sent from Mailbird [http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm_campaign=sent-from-mailbird] On 10/17/2016 3:02:37 AM, Chris Needham notifications@github.com wrote: The way it currently works is that the image height covers the full range of the audio signal so, as you've found, a low amplitude input will produce a small waveform. I'll consider adding a new command-line option to allow the scaling to be adjusted, either automatically to fit the available height, or by a user-specified amount. Something like:
This option would only be used when rendering waveform images, and not when creating .dat or .json waveform files. Thanks for the suggestion! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [https://github.com/bbc/audiowaveform/issues/45#issuecomment-254127993], or mute the thread [https://github.com/notifications/unsubscribe-auth/ACW5P_29EmS9t0X6S_evbINidj-DRGeyks5q0x2MgaJpZM4KYJ7t].
Chris, did you get a chance to implement this?
Yes, it's on this branch. Let me know if it does what you need, or if you find any problems.
Hey, I checked out the amplitude-scale branch wanting to test this new option but I cannot seem to get it to work. I'm definitely on the right branch with the updated code, but when I try to run a command with the option, I still get: Error: unrecognised option '--amplitude-scale=auto'
I don't think you're running the updated code. If you enter audiowaveform --help
you should see this line in the output:
--amplitude-scale arg (=1.0) amplitude scale
I was waiting for @bhaskargr to verify the feature before merging into master
and publishing a new release.
Yeah, I don't see that option in the output for --help. I just cloned a fresh repo and checked out the branch: amplitude-scale.
Would it matter if I built from source?
Hello, I am trying to generate an image with 600 (width) and 325 (height), but sometimes if the audio file is very flat (say someone speaking), my output waveform height is too small within my entire image height, I was hoping that the waveform scale is determined automatically, but for some reason, it's not working in these cases... any suggestion would help