
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
|
 |
n_alSynSetPitch
Syntax
#include <n_libaudio.h>
void n_alSynSetPitch(N_ALVoice *voice, f32 pitch);
Arguments
- voice is the pointer to a voice structure
- pitch is the new pitch value
Explanation This function is available in the n_audio library.
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 the osAiSetFrequency function, 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 (n_alSynSetPitch) from within a voice handler only.
See Also
n_alSynSetVol
n_alSynSetPan
n_alSynSetFXMix
n_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
|
|