N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

## alSynSetPitch

Sytnax

    #include <libaudio.h>
    void alSynSetPitch(ALSynth *drvr, ALVoice *voice, float pitch);

Arguments

- drvr is the pointer to the synthesizer driver
- voice is the pointer to a voice
- pitch is the pitch value

Explanation
It sets the rate at which a wavetable will be rendered by the synthesizer. The pitch can range from between 0 and 2.0 (but not 0). If the sample rate of the wavetable is the same as the output rate set by osAiSetFrequency, then:

- A value of 1.0 will play the sound with no pitch change.
- A value of 0.5 will play the sound pitch shifted down an octave.
- A value of 2.0 will play the pitch shifted up one octave.
- Values greater than 2.0 will become 2.0.
- Negative pitch values are undefined.

Warning
Make sure a pitch value of zero is never used. Using it will cause a divide by zero.
Call this function (alSynSetPitch) from within an ALVoiceHandler only.

See Also
alSynSetVol
alSynSetPan
alSynSetFXMix
alSynStartVoiceParams
osAiSetFrequency

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999