Hi there,
I’m a complete beginner, I’m following Eli Fieldsteel’s tutorials and there’s something bugging about his second example in video 3, I copied his code diligently but I don’t get the two signals alternated on L/R as it should be because of phase shift.
Whatever phase value I use for amp2 doesn’t change much. Here’s my code:
As an advise: You can take a look at Multichannel Expansion | SuperCollider 3.14.0 Help which is IMO the single best feature of SuperCollider as it allows to create multiple signals in paralell in an easy manner. E.g. your code could be rewritten via
(
SynthDef.new(\pulseTest, {|ampHz=4, fund=40, maxPartial=4, width=0.5, out=0|
var sig = Pulse.ar(
freq: LFNoise0.kr(4!2).exprange(fund, fund*maxPartial).round(fund),
);
sig = sig * LFPulse.kr(
freq: ampHz,
iphase: [0, 0.5],
width: 0.12
) * 0.75;
sig = FreeVerb.ar(
in: sig,
mix: 0.7,
room: 0.8,
damp: 0.25,
);
Out.ar(out, sig);
}).add;
)
x = Synth(\pulseTest);
x.free;
notice LFNoise0.kr(4!2) and iphase: [0, 0.5] to expand the signal at these places.
Agreed with @dscheiba that multichannel expansion makes clean work of this otherwise messy example. This code comes from tutorial 3, but multichannel expansion is covered in tutorial 5. As a learning exercise for my university courses, I will sometimes have students copy this example from T3 and express it more concisely with multichannel expansion.
Also FYI, all of the code for these tutorials is on github, which avoids the need to copy manually (often prone to human error).