I am trying to create a harpsichord synth in which the strings for each note would be hit at small onset different times (50-90ms) also with a small detuning between each string freq * {rrand(1-percentDetune, 1+percentDetune)}.dup(4) .
I manage to have a global detune for each harpsichord key as well as a global difference in the attack onset. How would it be possible to have a unique detuning for each harpsichord key (freq) as well as unique onset difference for each key?
Any other considerations about how to improve the synthesis model of a harpsichord?
Hi John,
you can do everything you have described directly inside a pattern!
(
s.waitForBoot {
SynthDef(\harpsi, {
var env = Env.perc(\atk.kr(0.01), \rel.kr(1.0)) .ar(2, \gate.kr(1));
var sig = Pulse.ar(\freq.kr(220));
var out = sig * env * \amp.kr(0.2);
OffsetOut.ar(\out.kr(0), out!2)
}).add;
s.sync;
Pbind(
\instrument, \harpsi,
\amp, 0.25,
\degree, Pn(Pseries(0, 1, 8), inf),
\dur, 1,
\mtranspose, [0, 0.013, -0.011, 0.023, -0.032], // detune in cents
\strum, 0.005 // time between each detuned freq - make it big to see the effect
).play;
}
)
If you want to change the \mtranspose or \strum for each note, you could use a Pfunc or Pwhite, like this:
This, isn’t a ‘a global detune for each harpsichord key’, but a global detune for all harpsichords as the randomness is only evaluated when the synthdef is defined.
From my little knowledge on patterns, I think that you can’t pass an array for the key \strum because it won’t multichannel expand, right? Or is there another built-in key to treat onsets like initial phase and not as a global different time between strummed notes?
Regarding the Hasher, is it possible to multichannel expand twice? For instance, here are four different detuned versions of a Pulse.