[flocking-users] .set() Error: Invalid type found in ugen definition

Colin Clark colin at colinclark.org
Mon Apr 7 10:21:31 EDT 2014

Hi Jef,

Sorry to hear you’ve been struggling with it. The issue is at least an easy one to fix. Unfortunately, you can’t replace a unit generator with another simply by changing its “ugen” property. You have to specify a full ugenDef object, like this:

synthMap[1].set(“note1”, {
   ugen: “flock.ugen.triOsc”,

Your project sounds insanely cool. I’d love to see a video of it in action!

Let me know if there’s anything else I can do to help with it,


> From: <jef.dijkman at gmail.com>
> Subject: .set() Error: Invalid type found in ugen definition
> Date: April 6, 2014 at 6:35:10 AM EDT
> To: "users at lists.flockingjs.org" <users at lists.flockingjs.org>
> Hello, am going round in circles and need a little bit of help with a flockingjs error message I am getting when trying to dynamically change the ugen for a synth. FireFox development mode says ‘Error: Invalid value type found in ugen definition’.
> What I am trying to do is connect a Makey Makey board to various fruits and vegetables each with a different base sound. For example banana are sinOsc, carrots are triOsc etc.
> I have an array of 6 synths (synthMap) with unique ids note0 to note5 i.e.
> synthMap[1] =flock.synth({
>         synthDef: {
>             id: 'note' + 1,
>  ugen: "flock.ugen.sinOsc",
> When I load the html page they are all set to banana mode and happily generating sinOsc.
> I then use a html select box to try to trigger a different oscillator like triOsc on the 2nd Makey Makey alligator clip and use synthMap[1].set(‘note1.ugen’,’flock.ugen.triOsc’).  This is where FireFox shows the error ‘Error: Invalid value type found in ugen definition’ (near line 10
> Anybody any idea what I am not doing correctly .
> Thanks
> Jef.

More information about the flocking mailing list