alCents2Ratio alCents2Ratio (function)

Converts an s32 cents value to an f32 ratio


#include <libaudio.h>     /* libaudio.h */
f32 alCents2Ratio(s32 cents);


Value measured in cents (a cent is 100th of a whole step)


alCents2Ratio is a utility routine for converting a detune value (measured in cents) into a ratio to be multiplied against the base pitch. Negative values lower the pitch, and positive values raise the pitch.


A value of 1200 cents will produce a ratio value of 2, which when multiplied times the base pitch, will produce a pitch one octave higher. A value of -1200 will produce a ratio value of 0.5, which when multiplied against the base pitch will produce a pitch of one octave lower.

Revision History

1999/04/30 Changed Format