Skip to content

Doc is not self-contained #2

@hordiales

Description

@hordiales

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions