Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- SynthDef(\rissetTone, {|fund, period|
- // I really don't know how to use addFunc within the SynthDef. Isn't that not possible because of the environment?
- // Doesn't addFunc need to be used outside of this therefore why are we passing in "fund"?
- var oscArray, ampEnv, freqEnvGen;
- oscArray = Array.fill(10, {|i|
- SinOsc.ar(EnvGen.kr(Env.circle([~freq.at(i), (~freq.at(i))/2, ~freq.at(i)], [period, 0, 0])),
- mul: IEnvGen.kr(Env.circle(levels: [(i+1)/10, 0, 0, (i+1)/10], times: [period/2, 0], curve: 'sin'), LinLin.kr(EnvGen.kr(Env.circle([0, 1, 0], [period/2, period/2, 0], 'sin')).poll, 0, 1, ((i+1)/10) * period, ((i)/10) * period).poll));
- });
- Out.ar([0,1], oscArray); // the [0,1] routes audio to both L and R channels
- }).add;
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement