Convert12TET_F16
Converts a pitch bend value in semitones and cents into an f16 bend value.
Synopsis
Err Convert12TET_F16( int32 Semitones, int32 Cents,frac16 *FractionPtr )
Description
This function, whose name reads (convert 12-tone equal-tempered to f16,) converts a pitch bend value expressed in semitones and cents to an f16 bend value. The bend value is used with BendInstrumentPitch()
to bend the instrument's pitch up or down: The value multiplies the frequency of the instrument's output to create a resultant pitch bent up or down by the specified amount.
Note that the semitones and cents values need not both be positive or both be negative. One value can be positive while the other value is negative. For example, -5 semitones and +30 cents bends pitch down by 4 semitones and 70 cents.
Convert12TET_F16()
stores the resultant bend value in FractionPtr.
Arguments
- Semitones
- The integer number of semitones to bend up or down (can be negative or positive).
- Cents
- The integer number of cents (from -100 to +100) to bend up or down.
- FractionPtr
- Pointer to a frac16 variable where the bend value will be stored.
Return Value
The function returns 0 if successful or an error code (a negative value) if an error occurs.
Implementation
Folio call implemented in Audio folio V20.
Associated Files
audio.h
See Also
BendInstrumentPitch
()