7 Feb 2011 23:31
Resampling Output Levels
Hello. I am using libsamplerate to both do resampling and pitch scaling, and it really sounds great. Of course, as it says in the FAQ, the output is higher than the input in many cases. From my testing, if I drop the output from libsamplerate by -2.0db my final output doesn't seem to clip. So this is probably somewhat of a n00bie question, but just point me to the right reading materials and I will educate myself :p Is it possible to predict what the highest possible samples will be given an input and output rate? Or is it possible to predict an average higher output level, beyond which only a few samples would clip and you could just brickwall them? (that sounds a bit sloppy) Basically what I am trying to do with music in real time is to a) resample if needed b) pitch scale if desired (In the sense of just resampling and playing back at the original sample rate for the same effect as pitch on a vinyl record player) And I'm doing this in real time as opposed to generating a file, so normalization wont' work, but I'd rather not use a limiter in this particular signal path if possible. (or if it is on the path, it is very rarely hit) .. So if I am pushing through music that is not being resampled or pitch scaled, then its verbatim output, but if it is resampled or pitch scaled then I am dropping -2.0 db... thats probably not good, I could have it drop -2.0 db all of the time, but that seems like a mistake too as the stream I am generating would be a bit quieter than everything else.(Continue reading)
RSS Feed