Skip to content

Instantly share code, notes, and snippets.

@colinbdclark
Created July 5, 2013 16:27
Show Gist options
  • Save colinbdclark/5935676 to your computer and use it in GitHub Desktop.
Save colinbdclark/5935676 to your computer and use it in GitHub Desktop.
Creating Flocking synths in the Infusion IoC style
fluid.defaults("colin.sinSynth", {
gradeNames: ["flock.synth", "autoInit"],
synthDef: {
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: 0.25
}
});
fluid.defaults("colin.orchestra", {
gradeNames: ["fluid.littleComponent", "autoInit"],
components: {
synth1: {
type: "colin.sinSynth"
},
synth2: {
type: "colin.sinSynth",
options: {
synthDef: {
freq: 640
}
}
}
}
});
var orc = colin.orchestra();
@GitXome
Copy link

GitXome commented Apr 7, 2023

hmmm, I'm too new to flockingjs to know the solution.

Error: Assertion failure - check console for more details: The grade hierarchy of component with type colin.orchestra is incomplete - it inherits from the following grade(s): fluid.littleComponent, autoInit for which the grade definitions are corrupt or missing. Please check the files which might include these grades and ensure they are readable and have been loaded by this instance of Infusion

@colinbdclark
Copy link
Author

hmmm, I'm too new to flockingjs to know the solution.

Error: Assertion failure - check console for more details: The grade hierarchy of component with type colin.orchestra is incomplete - it inherits from the following grade(s): fluid.littleComponent, autoInit for which the grade definitions are corrupt or missing. Please check the files which might include these grades and ensure they are readable and have been loaded by this instance of Infusion

Hi @GitXome This is a decade-old Gist, using an API that hasn't been supported for a very long time. Out of curiosity, is there a reason why you're interested in it, and how did you come across it? The Flocking Playground has examples that are more current, in case it is helpful.

If you really wanted to make this work, you could change lines 2 and 12 to:

gradeNames: "fluid.component"

@GitXome
Copy link

GitXome commented Apr 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment