I come up with a troubling problem these days.
I work with somd Sound Designers. They make some game sample datas to use for me.
Unfortunately, the unit is always so different.
eg: in fmod, for each sound use volume from 0.0~1.0; freq maybe 16000hz for a channel.
but the sample date Designer offer me is like this: vol in DB unit from -96db ~ 0db, freq use "pitch" from -3.0 ~ 3.0.
what’s worse, the relation between the 2 ways is not "linearity".
then how can I calculate the correct value of the sample datas to use?
Thank you very much for help.
- mecgouki asked 9 years ago
If you are just getting data from them outside of fmod, just use db to linear conversion formula
Ie linear = 10^(db/10)
Pitch could be converted as
float val = basefrequency_of_sound * (2 ^ pitch);
basefrequency_of_sound would be the recorded rate of the sound ie 44khz.
That’s the formula for signal power, but I’ve always seen linear volumes expressed as voltage in code (+6 dB is about x2 multiplier):
linear = 10^(db/20)
The frequency formula you gave works when "pitch 1.0" means one octave. If they’re using semitones, and "pitch 12.0" means one octave, the formula becomes:
float val = basefrequency_of_sound * (2 ^ pitch/12);
- sgugler answered 9 years ago
Please login first to submit.