Hello SC community,
I’m studying the “kitchen studies” from the miSCellaneous lib (Thanks to Daniel Mayer).
in the “preparations” part a function is defined like this:
// this Function determines enveloping convention:
// absEnv = 1 (true): attack and release times in milliseconds are taken anyway,
// 'overlap' is possibly overriden.
// absEnv = 0 (false): attack and release times in milliseconds are taken only if
// their sum is smaller than grain duration (derived from 'overlap' and 'trigRate'),
// otherwise they are shrunk and their relation is kept.
d = ();
d.attRel = { |dict, granDur, att, rel, absEnv = 1|
// times in secs
var sum;
att = att * 0.001;
rel = rel * 0.001;
sum = att + rel;
(sum <= granDur).if {
[att, rel]
}{
(absEnv == 1).if {
[att, rel]
}{
[granDur * att, granDur * rel] / sum
}
}
};
as you can see d.attRel has 5 arguments, the first one is dict.
This argument: “dict” is never use inside the function definition.
In the next parts (1 to 6) this function is called like this (inside a PbindFx Pattern):
// determining concrete envelope times (see Function attRel above)
[\att, \rel], Pfunc { |ev| d.attRel(ev[\granDur], ~att, ~rel, ~absEnv) }
the function d.attRel is called with four arguments what happens to the first argument “dict” ?
Can someone explain me this ?
Sorry if I miss something obvious.
Thanks a lot for your patience.
Have a good week-end
Fabien