Facebook Twitter Music RSS

Weeklybeats 2016 was a 52 week long music project in which artists composed and publicly released 1 song a week for the entire year. Enjoy this archive of over 3,700 music compositions by over 260 artists.
Sign up or Login to give feedback or chat up on the forums.

WeeklyBeats.com / Music / Aday's music / Super Collider Function Flip Flop Heavy Weight Sinewave Apocalypse

Super Collider Function Flip Flop Heavy Weight Sinewave Apocalypse

By Aday on June 12, 2016 9:30 am

Super Collider experiments
Sweeping sinewaves, multible shepard tones, Frequency Modulation, PinkNoise, var initRandomFreq.

CODE DUMP!!!
(
fork{
    SynthDef(\basicFM, {|out = 0, gate = 1, amp = 1, carFreq = 1000, modFreq = 100, modAmount = 2000, clipAmount = 0.1|
        var modEnv = EnvGen.ar(Env.adsr(0.5, 0.5, 0.7, 0.1, peakLevel: modAmount), gate);
        var mod = SinOsc.ar(modFreq) * modEnv;
        var car = SinOsc.ar(carFreq + mod);
        var ampEnv = EnvGen.ar(Env.adsr(0.1, 0.3, 0.7, 0.2, peakLevel: amp), gate, doneAction: 2);
        var clip = clipAmount * 500;
        Out.ar(out, (car * ampEnv * clip).clip(-0.7, 0.7) * 0.1);
    }).add;

    s.sync;

    Pbind(*[
        instrument: \basicFM,
        out: [0, 1],
        dur: Pseq([1/7, 1/3] / 1.2, inf),
        sustain: Pkey(\dur),
        amp: 1/4,
        carFreq: Pseq([1, 1, 1, 2] * 350, inf),
        modFreq: Pkey(\carFreq) * (1/8),
        modAmount: Pseq([2, 1, 0.5, 2, 1, 0.5, 2, 1, 2, 1, 0.5, 2, 1, 0.5, 2, 4] * 500, inf),
        clipAmount: Pseq([Pn(0.1, 32), Pn(1, 32)], inf)
    ]).play;
}
)



\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

play{x=0;(80..100).do{|f|f=f/2;x=SinOsc.ar(f+[0,1],x*Line.kr(1,3,240,doneAction:2))};tanh(x+Ringz.ar(Impulse.ar(0),45,0.3,3))}


\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

play{a=HPF.ar(ar(PinkNoise,5e-3),10)*Line.kr(0,1,9);ar(GVerb,({|i|ar(Ringz,a*LFNoise1.kr(0.05+0.1.rand),55*i+60,0.2)}!99).sum,70,99).tanh}



\\\\\\\\\\\\\\\\\\\\\\\\\
//inverting init sort, louder bass, final volume envelope, some little tweaks
(
{
var numVoices = 30;
var fundamentals = ({rrand(200.0, 400.0)}!numVoices).sort.reverse;
var finalPitches = (numVoices.collect({|nv| (nv/(numVoices/6)).round * 12; }) + 14.5).midicps;
var outerEnv = EnvGen.kr(Env([0, 0.1, 1], [8, 4], [2, 4]));
var ampEnvelope = EnvGen.kr(Env([0, 1, 1, 0], [3, 21, 3], [1, 0, -4]), doneAction: 2);
var snd = Mix
({|numTone|
    var initRandomFreq = fundamentals[numTone] + LFNoise2.kr(0.5, 6 * (numVoices - (numTone + 1)));
    var destinationFreq = finalPitches[numTone] + LFNoise2.kr(0.1, (numTone / 5));
    var sweepEnv =
        EnvGen.kr(
            Env([3, rrand(0.5, 0.2), 1], [rrand(6.5, 2), rrand(8.5, 9)],
                [rrand(2.0, 3.0), rrand(5.0, 1.0)]));
    var freq = ((1 - sweepEnv) * initRandomFreq) + (sweepEnv * destinationFreq);
    Pan2.ar
    (
        BLowPass.ar(Saw.ar(freq), freq * 3, 0.6),
        rrand(-3.5, 2.5),
        (1 - (1/(numTone + 2))) * 2.5
    ) / numVoices
}!numVoices);
Limiter.ar(BLowPass.ar(snd, 4000 + (outerEnv * 18000), 1.5, (4 + outerEnv) * ampEnvelope));
}.play;
)



\\\\\\\\\\\\\\



// shepard tones
// alberto de campo
(
var ampTable, freqTable, b1, b2;

ampTable = Signal.hanningWindow(1024).squared;
freqTable = Signal.newClear(1024).waveFill({ arg i; 0.5 ** i * 20000 }, 0, 10);

b1 = Buffer.loadCollection(s, freqTable);
b2 = Buffer.loadCollection(s, ampTable);

{
    var freqs, amps, phasor, ratescale, rate, phases;
    ratescale = 1024 / 44100 / 10;
    rate = 0.01;    // once per 10 sec i think
    phasor = Phasor.ar(0, rate * ratescale, 0, 1024);
    phases = (0..9) * 0.1 * 1024 + phasor;

    freqs = BufRd.ar(1, b1.bufnum, phases);
    amps = BufRd.ar(1, b2.bufnum, phases);

    Mix.ar(SinOsc.ar(freqs) * amps) * 0.3;
}.play;

)



Effectively figuring stuff out in SuperCollider ....
Sorry if your speakers strongly disagree with me this week...

Still figuring out things, for example the shepards tone is only on the left channel because I don't get how to bus yet...
Theres some clicking on one of my SinOsc's --- oops


I do like the pink-noise atmos sounds this creates, a lot..
The buffer overflow at the end is just that...

source forked from http://sccode.org/

This submission is licensed by author under CC0 Creative Commons Zero (Public Domain)

  • Play
  • Download
June 14, 2016 3:02 pm

June 15, 2016 3:57 am

This is definitely freaking me out.

June 15, 2016 4:03 am

I hung in there the whole way!  Great ending!

June 15, 2016 6:10 am
orangedrink wrote:

I hung in there the whole way!  Great ending!


haha, cheers, and lol, I Was wondering if anyone would stick round till the end smile


Ipaghost wrote:


Pretty much!! Limiter.ar(BLowPass.ar(snd, 4000 + (outerEnv * 18000), 1.5, (4 + outerEnv) * ampEnvelope)); definitely gave that away.

I stole that bit of code and tweaked it from http://www.earslap.com/article/recreating-the-thx-deep-note.html

June 15, 2016 2:29 pm

I think I must be a generally unwell person, 'cos I can listen to this for pure enjoyment.

June 15, 2016 10:13 pm
mysterioso wrote:

I think I must be a generally unwell person, 'cos I can listen to this for pure enjoyment.

hahaha, Nice, I find this piece particularly refreshing, who even needs traditional beat driven music anymore?!

June 16, 2016 3:31 pm
Ipaghost wrote:


shit you beat me to it

quite the trip too, really cool track!

June 17, 2016 10:46 pm

Gotta love some speaker rattling bone crunching noise once in awhile. I dig the effect of the infinitely descending tone at the end.

June 18, 2016 10:12 am

Exciting experiment, very nice textures!

You need to login to leave a comment.
Login Sign-up