Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.46 KB

File metadata and controls

40 lines (28 loc) · 1.46 KB
sidebar_position
5

import { Optional } from '@site/src/components/Badges';

PeriodicWave

The PeriodicWave interface defines a periodic waveform that can be used to shape the output of an OscillatorNode.

Constructor

constructor(context: BaseAudioContext, options: PeriodicWaveOptions)

PeriodicWaveOptions

Parameter Type Default Description
real Float32Array - Cosine terms
imag Float32Array - Sine terms
disableNormalization boolean false Whether the periodic wave is normalized or not.

Or by using BaseAudioContext factory method: BaseAudioContext.createPeriodicWave(real, imag, constraints?: PeriodicWaveConstraints)

Properties

None. PeriodicWave has no own or inherited properties.

Methods

None. PeriodicWave has no own or inherited methods.

Remarks

real and imag

  • if only one is specified, the other one is treated as array of 0s of the same length
  • if neither is given values are equivalent to the sine wave
  • if both given, they have to have the same length
  • to see how values corresponds to the output wave see for more information