[flocking-users] Fwd: using flocking
colin at colinclark.org
Thu Jan 23 12:36:51 EST 2014
Wow, this is cool! The sound of network latency.
On Jan 23, 2014, at 12:29 PM, Laurens van der Wee <l.vanderwee at gmail.com> wrote:
> repeating ajax call with timer determining pitch of sine wave.
> is this the way to do it? -> schedule a change 'now', or is there also a way to do something like: synth.freq = newfreq ?
It’s probably simpler and more efficient not to use the scheduler if you are just making changes to a synth immediately. Instead, you can call .set() on the synth. Here’s a version of your code, updated to this:
Synth.set() will take either a single key/value pair as two arguments like this:
Or an object containing multiple key/value pairs, like this:
I hope this helps,
More information about the flocking