Huron & SNAP Documentation
Huron & SNAP Documentation
Huron & SNAP Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Parameter Description<br />
OTHER SIMULATION TOOLS<br />
<strong>SNAP</strong>WP2LoadWave<br />
Loads a wave file into the WavePlayer-2 and assigns it an ID.<br />
Standard .wav file formats are supported including mono and<br />
multi-channel. At least one voice must be bound to the wave<br />
before playback can occur. For optimum performance, it is<br />
recommended that wave files be selected that are at the same<br />
sample rate as the <strong>Huron</strong>.<br />
FALSE is returned if the load fails and the reason for failure is<br />
displayed in the WavePlayer-2 window.<br />
in long lWaveID A wave ID<br />
in const char* szPath Full path to the wave file<br />
<strong>SNAP</strong>WP2BindVoice<br />
Binds a voice to a wave ID. A voice is an instance of a loaded<br />
wave file for playback, allowing polyphony without having to<br />
load the same wave file multiple times. When a voice is bound<br />
it is stopped, unpaused, not looped and has a gain of 1 and a<br />
pitchbend factor of 1.<br />
in long lWaveID A wave ID<br />
in long lVoiceID A voice ID<br />
in long lNumChans The number of channels to be bound to this voice. This must<br />
be less than or equal to the number of channels in the wave<br />
file.<br />
in long* plChans An array of length lNumChans containing 1-based output<br />
channel numbers mapping each wave file channel to an output<br />
channel on the sound card. Multiple voices can mix into the<br />
same output channel.<br />
<strong>SNAP</strong>WP2UpdateVoice<br />
Updates a voice’s level and pitch. This can be done either<br />
before or during playback.<br />
In long lVoiceID A voice ID<br />
in float fSPL Gain of this sound<br />
in float fPBend Pitchbend factor for this sound. 0.5 is half pitch, 1.0 is normal<br />
pitch and 2.0 is double pitch<br />
<strong>SNAP</strong>WP2PlayVoice<br />
Starts a voice playing from the beginning of the wave file. If it<br />
is already playing, restarts it from the beginning.<br />
in long lVoiceID A voice ID<br />
<strong>SNAP</strong>WP2LoopVoice<br />
Sets a voice’s loop state.<br />
in long lVoiceID A voice ID<br />
in long lStartSamp The sample number at which the looped section begins<br />
in long lEndSamp The sample number up to which the section is looped. If<br />
lEndSamp is set to 0, the wave file is looped to the end.<br />
HURON TECHNICAL MANUAL PAGE 172