You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file leveler.py sometimes has run into a ZeroDivisionError, printing out the line "Got ZeroDivisionError with high sample path"... But I don't know what this means exactly, so here are a couple of questions:
How does the leveler work?
Why is there a division by zero issue?
Is there any way we could recover from that error automatically?
If not, can we at least let the user know how to work around the error?
The text was updated successfully, but these errors were encountered:
That error message is certainly confusing! That could be made simpler.
The leveler works according to this algorithm. Because SampleScanner doesn't normalize its output, the leveler performs the following algorithm:
Determine the layer RMS volumes in decibels.
For each layer below the loudest, determine the difference in decibels -- ddd.
Calculate the equivalent velocity: sqrt( 127^2 / arclog( ddd / 20 ) ) and call this vvv.
Tag each layer with lovel=xxx, hivel=vvv and amp_velcurve_vvv=1, where xxx is one more than the lower layer's hivel, as usual.
The ZeroDivisionError comes about if the peak_rms of the higher sample is 0, which basically means it's silent. This can happen in exceptional conditions, and SampleScanner doesn't have any logic to catch and ignore empty samples at the moment.
We can recover from that error automatically by changing that code path to produce different operators when one or more of the samples is blank, or more completely, by changing the code path so we exclude empty samples anyways.
The file
leveler.py
sometimes has run into a ZeroDivisionError, printing out the line "Got ZeroDivisionError with high sample path"... But I don't know what this means exactly, so here are a couple of questions:The text was updated successfully, but these errors were encountered: