Re: Multiplying LocalIn -> Dangerous?
By the way, you might be interested in this analysis that Bruno
Ruviaro did of the same sctweet - it explains a little about how the
sound is produced:
(but really, I wrote it by adding, tweaking and removing things until
it sounded good and was short enough - all this analysis makes it
sound much cleverer than it really is...)
On 16 July 2011 14:17, Benjamin Buch <benni.buch@...> wrote:
> Hi Wouter!
> Thanks for explaining, things are a lot clearer now to me!
>> Indeed, which means an increase in level of about 18 dB. Normally that will cause most signals to go out of
the -1.0 to 1.0 range. Here as well. That is no problem as long as you don't feed it directly to your outputs.
SC can handle out-of-range signals to an almost infinite range internally because it works with floating
> Good to know!
>> In the bandpass line the magic happens. The signal is filtered with a bandwidth of 0.1, basically
reducing it's level again by apx 25db (depending on the cutoff frequency and the material in the loop).
This is the reason why there is no build up in the feedback loop; the level earlier multiplied is now lowered
again, and becomes apx -7dB. Sometimes a specific frequency gets amplified and the level increases, but
because the LFNoise0 changes the bandpass frequency every ~1.33s this never happens for too long.
> I wrote another example to see the effect of BPF:
> var source, signal;
> source = Saw.ar([32,33],0.2);
> signal = LocalIn.ar(2)*3 + source;
> signal = BPF.ar(signal, 1000, 0.1);
> With a factor of 3 this works and demonstrates the effect of LocalIn/Out quite well; but with a factor of 7.5
this gets pretty loud too (very loud, so I wouldn't recommend trying).
> I guess it's like you said, it's different if you do this on a steady or a changing signal.
>> But there's more: the loud clicks you hear are caused by the sudden jumps in frequency (bandpass_freq).
These are basically a side-effect of bpf, here used in a musical way.
> I figured out the clicks with this sample code:
> Could you explain how the clicking/the bpf-side-effect works?
> I mean how comes that this only occurs with sudden big jumps?
>> These clicks can stretch way beyond the -1.0 to 1.0 range. To compensate for this Nathaniel added a
.distort to the filter. Apart from adding a nice distortion edge to the sound, this also makes sure the
signal is clipped between -1.0 and 1.0. So basically it works like a limiter too, making sure the signal
never grows out of range.
> Nice explanation of distort! I wondered what this does, because it didn't seem to make too much of a
>> The last step is the CombN which, very important, adds a 2 second delay to the sound. This makes the feeback
process evolve over time. It also has an internal feedback loop, which makes the total sound a blend
between the LocalIn/LocalOut pair and a normal feedback delay. This loop does add to the total volume
though, and results in the output signal being slightly out of range especially at the clicking moments.
So to make it really perfect we'd need to soften the output signal. Nathaneal chose not to, probably
because the hard clipping of the clicks creates a nice extra edge.
>> I hope this sheds some light on the situation.
> Absolutely did, thanks!
> sc-users mailing list
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml