You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
707 B
Plaintext
34 lines
707 B
Plaintext
(
|
|
SynthDef(\lead, {
|
|
arg freq = 440, gate = 1, modAmount = 5.0, modOffset = -0.91;
|
|
var sig, env, mod;
|
|
|
|
// envelope
|
|
env = EnvGen.kr(Env.adsr(0.056, 0.14, 0.584, 0.396), gate, doneAction: 2);
|
|
|
|
// nested modulation
|
|
mod = SinOsc.ar(freq + modOffset, mul: modAmount); // inner modulator
|
|
sig = SinOsc.ar(freq, phase: mod).dup; // main oscillator
|
|
|
|
// apply envelope
|
|
sig = sig * env;
|
|
|
|
// output
|
|
Out.ar(0, sig);
|
|
}).add;
|
|
)
|
|
|
|
x = Synth(\lead, [\freq, 440]);
|
|
x.set(\gate, 0);
|
|
|
|
|
|
/*
|
|
Next Steps:
|
|
|
|
- [ ] MIDI microtuning helper
|
|
- [ ] Test Param-GUI workflow
|
|
- [ ] Test Ardour MIDI workflow
|
|
- [ ] Test visual sound design workflow by connecting SC to xjadeo or similar
|
|
- [ ] Connect Tidal with OSC
|
|
|
|
*/ |