Feature #1316

Option to silence warnings

Added by Justin Salamon over 7 years ago. Updated about 7 years ago.

Status:NewStart date:2015-06-30
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


Currently there is no way (that I could find) to silence plugin warnings. For instance, this happens when processing audio sampled at 48kHz with the qm onset detector:

WARNING: PluginInputDomainAdapter::initialise: non-power-of-two
blocksize 1114 not supported, using blocksize 1024 instead
WARNING: OnsetDetector::initialise: Possibly sub-optimal block size for this sample rate: 1024 (wanted 1114)

When processing large amounts of files it would be very helpful to be able to silence such warnings, as they render any other terminal output useless (e.g. printing out a message when a certain condition is detected).



#1 Updated by Chris Cannam over 7 years ago

Currently no, and I'm not sure how you would achieve that -- the second of those messages at least comes from the plugin itself, not the host module.

(These presumably go to stderr at least, while normal output would generally go to stdout?)

The ideal solution in this particular case would be to get the right blocksize and avoid having the warning at all...

#2 Updated by Justin Salamon over 7 years ago

How does one specify the blocksize and stepsize to be used? Couldn't find it in the docs... thanks!

#3 Updated by Chris Cannam about 7 years ago

You can only do this by using the low-level API (PyPluginObject) directly I'm afraid.

I'll add a separate feature request. I have another related thing I'd like to add as well.

#4 Updated by Chris Cannam about 7 years ago

OK, the code in the repo now has block_size and step_size options for the collect and process functions. See their docs for details. I haven't yet got this update packaged into pypi but I'll push it there soon.

#5 Updated by Justin Salamon about 7 years ago


Also available in: Atom PDF