dB and semitone conversion

One of the first pieces of code I implement in any audio coding project are the conversion of dB (Decibel) to amplitude factor, semitones to playback rate and vice versa. In game audio we often increase the amount of variation by not just picking random sound assets, but also randomizing playback-volume and pitch of sound effects. I sometimes see people implementing these as amplitude factor (for volume) and playback rate (for pitch) but there are a few reasons we would want to do that in dB / semitones.

Continue reading “dB and semitone conversion”