PitchedPopGenerator¶
Overview¶
sound generator that produces a popping sound with controllable pitch
@author John Blanco (PhET Interactive Simulations) @author Michael Kauzmann (PhET Interactive Simulations)
Class PitchedPopGenerator¶
Constructor¶
new PitchedPopGenerator( providedOptions? : PitchedPopGeneratorOptions )¶
Instance Methods¶
playPop( relativePitch : number, duration )¶
Play the pop sound. relativePitch - a value from 0 to 1 indicating the proportionate frequency to play within the pitch range [duration] - the duration of the pop sound to be played, in seconds
Type PitchedPopGeneratorOptions¶
- pitchRange?: Range
the range of pitches that will be produced, in Hz - numPopGenerators?: number
the number of pop generators to create and pool, use more if generating lots of pops close together, less if not - & SoundGeneratorOptions
Source Code¶
See the source for PitchedPopGenerator.ts in the tambo repository.