Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Doc is not self-contained #2

Closed
hordiales opened this issue Oct 16, 2018 · 0 comments
Closed

Doc is not self-contained #2

hordiales opened this issue Oct 16, 2018 · 0 comments

Comments

@hordiales
Copy link

I think would be good add to the documentation that you have to define a synths named 'kick' and 'hihat' to test it.

Propose something like (or link to a similar reference):

SynthDef("kick", {arg out = 0, amp = 0.3, sinfreq = 60, glissf = 0.9, att = 0.01, rel = 0.45, pan = 0;
var env, snd, ramp;
env = Env.perc(att, rel, amp).kr(doneAction: 2);
ramp = XLine.kr(
start: sinfreq,
end: sinfreq * glissf,
dur: rel
);
snd = SinOsc.ar(freq: ramp, mul: env);
snd = Pan2.ar(snd, pan);
Out.ar(out, snd);
}).add;

SynthDef("hihat", {arg out = 0, amp = 0.5, att = 0.01, rel = 0.2, ffreq = 6000, pan = 0;
var env, snd;
env = Env.perc(att, rel, amp).kr(doneAction: 2);
snd = WhiteNoise.ar;
snd = HPF.ar(in: snd, freq: ffreq, mul: env);
Out.ar(out, Pan2.ar(snd, pan));
}).add;

@lvm lvm closed this as completed in 4380015 Oct 16, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant