Skip to content

Instantly share code, notes, and snippets.

@unclewalter
Created March 7, 2016 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unclewalter/19800b30136ebefeac50 to your computer and use it in GitHub Desktop.
Save unclewalter/19800b30136ebefeac50 to your computer and use it in GitHub Desktop.
Weekly Beats Wk 9
s.boot;
// Defining FM Synth
SynthDef(\fmsynth, {arg freq1, freq2, freq3;
var signal, env;
signal = SinOsc.ar(freq1 * (SinOsc.ar(freq2) + SinOsc.ar(freq3)));
Out.ar(0, signal!2);
}).add;
// Instantiating synth instances
synthA = Synth(\fmsynth, \freq1, 5, \freq2, 96, \freq3, 97]);
synthB = Synth(\fmsynth, \freq1, 5, \freq2, 98, \freq3, 101]);
/*
Timbre/intensity: freq1.
Polyrhythms: beating frequencies between freq2 and freq3.
*/
synthA.set(\freq1, 5, \freq2, 96, \freq3, 97);
synthB.set(\freq1, 5, \freq2, 98, \freq3, 101);
// Stop all sound
synthA.free;
synthB.free;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment