参考 freq()

freq()

Adjusts the frequency of the oscillator. Frequency is measured int Hertz (Hz) and determines the amount of cycles a waveform (square, sawtooth, etc...) will repeat in a second. The amount of repetitions results in a change of perceived 'pitch.' You can lookup corresponding frequency values for 'notes' if you would like to play a scale. For example, 'middle C' on the keyboard has a frequency of 261.63 Hz. You can also use note names such as C4, D4, C#4 (for octaves in range of -4 to 11).

示例

语法

freq(frequency, [rampTime])

参数

frequency
Number: frequency of the oscillator in Hz (cycles per second). used to change 'pitch' or 'notes.'
rampTime
Number: the time in seconds it takes to ramp to a new frequency value (defaults to 0).

相关参考