参考 freq()

freq()

Set frequency of an oscillator to a value. Or, pass in an object such as an oscillator to modulate the frequency with an audio signal.

示例

语法

freq(Frequency, [rampTime], [timeFromNow])

参数

Frequency
Number|Object:

Frequency in Hz or modulating signal/oscillator

rampTime
Number:

Ramp time (in seconds)

timeFromNow
Number:

Schedule this event to happen at x seconds from now

返回值

AudioParam: Frequency If no value is provided, returns the Web Audio API AudioParam that controls this oscillator's frequency
Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

相关参考