You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This demo passes an oscillator as the param to osc.amp, the idea being it acts as a low-frequency oscillator to modulate amplitude. It works correctly.
Passing the LFO to osc.freq instead (osc.freq(lfo) in the setup method) - which the documentation says is possible, Or, pass in an object such as an oscillator to modulate the frequency with an audio signal. - leads to this error:
RangeError: Value must be within [0, 3.4028234663852886e+38], got: NaN
which is related to rampTo.
Of course, that's possibly trying to set an osccilator to a range between 1 and -1 - fairly standard - so I thought I'd use Oscillator.add and...
osc.add is not a function. Neither is getFreq, for that matter. I'm lost; I have p5 2.0.1, sound 0.2.0, and the listed examples work correctly... but it's unclear at the minute if the error is in code, documentation, or both.
The text was updated successfully, but these errors were encountered:
there is currently no osc.add function or getFreq in the new library, the documentation you are referring to is probably for the previous p5.sound.js library, and it seems that both of the libraries (new and old) documentation are shuffled together and that this is something that is being worked on.
i can imagine something like osc.add coming back - and maybe not getFreq but maybe so!
This demo passes an oscillator as the param to
osc.amp
, the idea being it acts as a low-frequency oscillator to modulate amplitude. It works correctly.Passing the LFO to
osc.freq
instead (osc.freq(lfo)
in the setup method) - which the documentation says is possible, Or, pass in an object such as an oscillator to modulate the frequency with an audio signal. - leads to this error:which is related to
rampTo
.Of course, that's possibly trying to set an osccilator to a range between 1 and -1 - fairly standard - so I thought I'd use
Oscillator.add
and...osc.add is not a function
. Neither isgetFreq
, for that matter. I'm lost; I have p5 2.0.1, sound 0.2.0, and the listed examples work correctly... but it's unclear at the minute if the error is in code, documentation, or both.The text was updated successfully, but these errors were encountered: