Skip to content

Instantly share code, notes, and snippets.

@colinbdclark
Created May 11, 2016 22:02
Show Gist options
  • Save colinbdclark/e1f762b93096f7b2ca6b1ab462699fef to your computer and use it in GitHub Desktop.
Save colinbdclark/e1f762b93096f7b2ca6b1ab462699fef to your computer and use it in GitHub Desktop.
New MIDI controller binding specification, harmonized with the wiring specification format.
fluid.defaults("my.midiController", {
gradeNames: "flock.midi.controller",
components: {
// All "target" declarations are relative to this component.
synthContext: "${myComposition}.band"
},
inputMap: {
noteOn: [
{
target: "leadSynth",
input: "carrier.freq",
transform: {
ugen: "flock.ugen.midiFreq",
note: "${note}"
},
// Expanded by the framework from ${} expressions.
// wires: {
// "note": "note"
// }
},
{
target: "leadSynth",
input: "envelope.gate",
wires: {
"value": "velocity"
},
// Value transforms are implied, and added by the framework if omitted.
// transform: {
// ugen: "flock.ugen.value"
// }
}
],
noteOff: {
target: "leadSynth",
input: "envelope.gate",
transform: {
ugen: "flock.ugen.value"
value: 0
}
},
control: {
32: [
target: "leadSynth",
input: "filter.q",
transform: {
ugen: "flock.ugen.math",
source: "${value}",
div: 127
},
// Again, expanded from the above by the framework if omitted.
// wires: {
// "source": "value"
// },
]
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment