Skip to content

Instantly share code, notes, and snippets.

View schollz's full-sized avatar
🎺

Zack schollz

🎺
View GitHub Profile
//////// sunset 2020
(Ndef(\reverb, {|wet=0.85, dry=0.15, size=10|
var input = \in.ar([0, 0]);
var primes = (2..13).nthPrime;
var reverb = Mix.ar(primes.collect({|i|
var delay = SinOsc.ar(0.02.rrand(0.1), 0, 0.02.rand, i/100);
AllpassL.ar(input, 1/2, delay, size, 1/primes.size)
}));
(wet*(reverb + input)) + (dry*input);
});
Routine {
s = Server.default;
s.waitForBoot;
// max buffer duration
~dur = 8.0;
// 4-channel buffer: pitch, clar, amp, flatness
~buf = Buffer.alloc(s, s.sampleRate * ~dur, 4);
@schollz
schollz / generative-patch.scd
Created February 8, 2022 16:40 — forked from nhthn/generative-patch.scd
Generative SuperCollider patch
(
SynthDef(\kick, {
var snd;
snd = SinOsc.ar(50 * (1 + (8 * Env.perc(0.001, 0.05).ar) + (2 * Env.perc(0.001, 0.3).ar)));
snd = snd + (SinOsc.ar(200 * (1 + (3 * Env.perc(0.001, 0.05).ar))) * Env.perc(0.001, 0.05).ar);
snd = snd + (Hasher.ar(Sweep.ar) * Env.perc(0.001, 0.01).ar);
snd = snd.tanh;
snd = snd * Env.perc(0.001, 1.0).ar(Done.freeSelf);
snd = snd ! 2;
snd = snd * \amp.kr(1);
@schollz
schollz / againagain.scd
Created May 24, 2022 12:36 — forked from karnpapon/againagain.scd
Cadson Demak - again_again(TBC-interpretation)
/////////////////////////////////////////////////////////////////////////////////////////
************************************** INITIALIZE ***************************************
/////////////////////////////////////////////////////////////////////////////////////////
Server.default.options.outDevice = "Built-in Output";
s.options.numBuffers = 2048 * 16;
s.options.memSize = 8192 * 16;
s.options.maxNodes = 1024 * 32;
// s.options.numOutputBusChannels = 12;
s.options.numInputBusChannels = 0;
@schollz
schollz / raspi_sc_install.sh
Created July 15, 2022 17:43 — forked from madskjeldgaard/raspi_sc_install.sh
Raspberry pi 3 SuperCollider installation and setup script
#!/bin/bash
#
# Steps to install and set up a headless raspberry pi (3) for SuperCollider use
# This is primarily copied from https://supercollider.github.io/development/building-raspberrypi
#
#
# Get updated
sudo apt-get update
@schollz
schollz / perlin.lua
Created October 25, 2022 22:10 — forked from kymckay/perlin.lua
Perlin Noise in Lua
--[[
Implemented as described here:
http://flafla2.github.io/2014/08/09/perlinnoise.html
]]--
perlin = {}
perlin.p = {}
-- Hash lookup table as defined by Ken Perlin
-- This is a randomly arranged array of all numbers from 0-255 inclusive
@schollz
schollz / supersaw-shooter.scd
Created November 2, 2022 22:10 — forked from audionerd/supersaw-shooter.scd
SuperSaw (Roland JP-8000 and JP-8080) in SuperCollider
// via https://www.nada.kth.se/utbildning/grukth/exjobb/rapportlistor/2010/rapporter10/szabo_adam_10131.pdf
(
{ | freq = 523.3572, mix=0.75, detune = 0.75 |
var detuneCurve = { |x|
(10028.7312891634*x.pow(11)) -
(50818.8652045924*x.pow(10)) +
(111363.4808729368*x.pow(9)) -
(138150.6761080548*x.pow(8)) +
(106649.6679158292*x.pow(7)) -
@schollz
schollz / audioSynths.scd
Created November 3, 2022 16:49 — forked from furenku/audioSynths.scd
INSTRUMENT SynthDefs
SynthDef(\audioBus, {|inBus=99,outBus=99,amp=1,pan=0|
var sig = In.ar(inBus);
Out.ar(outBus, Pan2.ar(sig * amp,pan))
}).store;
SynthDef(\audioInput, {| inBus=0, out = 0, gate=1,amp=1|