Skip to content

Commit

Permalink
hacks: mccormick algorave-mastering example
Browse files Browse the repository at this point in the history
  • Loading branch information
telephon committed Mar 1, 2016
1 parent 7047938 commit 4dc66c7
Showing 1 changed file with 49 additions and 1 deletion.
50 changes: 49 additions & 1 deletion hacks/filtering-dirt-output.scd
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,57 @@ Ndef(\x, {
// ... and so on.




/*
cleaning up when you're done:
*/

~d1.outBus = 0;
~bus.free;
~bus.free;




// algorave mastering, roughly according to
// https://mccormick.cx/news/entries/heuristic-for-algorave-mastering
(
~busses = ~dirt.orbits.collect { |each|
var bus = Bus.audio(~dirt.server, ~dirt.numChannels);
each.outBus = bus;
bus
}
);

(
Ndef(\x, {
var level = 2;
var distortion = 10;
var reverbFeedback = 0.1;
var all = ~busses.collect { |each| InBus.ar(each, each.numChannels) };
var mix = all.sum { |x|
var d = { 0.01.rand } ! x.size;
DelayN.ar(x, d, d)
};
var loop = LocalIn.ar(~dirt.numChannels);
5.do { loop = AllpassL.ar(loop, 0.15, { ExpRand(0.03, 0.15) } ! 2, 3) };
mix = loop * reverbFeedback + mix;
mix = LeakDC.ar(mix);
LocalOut.ar(mix);
mix = Compander.ar(mix, mix, 0.3, slopeBelow:1, slopeAbove:0.5, clampTime:0.01, relaxTime:0.01);
mix = (mix * distortion).tanh * (level / distortion.max(1));
mix
}).play;
);



/*
cleaning up when you're done:
*/
(
Ndef(\x).clear;
~busses.do { |x| x.free };
~dirt.orbits.do { |x| x.outBus = 0 };
);

0 comments on commit 4dc66c7

Please sign in to comment.