[flocking-users] infusionic way to attribute.set() of a synthdef triggered by a click of a gif

Colin Clark colin at colinclark.org
Thu Jan 30 18:22:15 EST 2014


Thanks for posting to the list.

On Jan 30, 2014, at 12:09 AM, '2+ <electriclightheads at gmail.com> wrote:

> will try this solution later but it seems to me that it is saying that
> even though Flocking is using Infusion
> we can still directly access to flock.functions()
> from external.js

Yes, I’ve tried to ensure that Flocking is properly layered so that you can use it in the familiar imperative way (by calling functions), but you can adopt the declarative features of Infusion if desired.

> my current project is based on CoffeeCollider and in my .html i have:
> <img id="cartloon" onClick="one_thang()" src="https://somewhere/picture.gif" />
> and in js:
> cc.send("message", {a1:sa, a2:ri, a3:ga, a4:ma, a5:pa, a6:da, a7:ni});

Yes, this CoffeeCollider message is very similar to Flocking’s Synth.set() method. You can pass it either a single key value pair or an object containing many. I don’t yet have documentation about Synth's API, but there are lots of examples in the README and the Playground of how to use it. I also described how Synth.set() works in this recent post to the list:


I’ll definitely write a tutorial on how to use Synths soon.

> so .. what's the cleanest way in Infusion
> to send messages to a synth triggered by a mouseclick on a gif?
> is there an alternative?
> and BTW can someone give me a pointer to the doc relataed to these newbie kind of things? ;)
> greedy me also want to keep my keyboard hot
> is it already built in Infusion? or maybe in Flocking?

This is a good question, and there are several ways to handle this. I wrote a tutorial about it:


and also wrote some reference documentation about the Mouse unit generators:


Does this answer your question? Keep ‘em coming—this is good motivation for me to write more documentation!

Looking forward to seeing what you end up making with Flocking,


More information about the flocking mailing list