Skip to content

Instantly share code, notes, and snippets.

@reprimande
reprimande / c.sh
Last active March 6, 2019 07:36
nomikai
#!/bin/sh
while :;do screencapture -x -t psd t.psd; tail -c 1000000 t.psd | head -c 230000 >> a.psd; sleep 0.2; done
(
s.options.device = "SuperCollider";
s.options.sampleRate = 44100;
s.options.numBuffers = 32;
s.options.hardwareBufferSize = 16;
s.options.numOutputBusChannels = 16;
s.options.numInputBusChannels = 0;
s.waitForBoot{
SuperDirt.start;
@reprimande
reprimande / 20230916_synthdef.scd
Last active September 17, 2023 12:00
SynthDef 20230916
SynthDef(\saw1, {
var snd, freq, ratio, spread, spreadTo, num, freqs, amps, detune, attack, decay, modSpread, modrate, modamount;
freq = \freq.kr(440);
attack = \attack.kr(0.0001);
decay = \decay.kr(1);
spread = \spread.kr(0.1);
spreadTo = \spreadTo.kr(0.003);
modrate = \modrate.kr(0.4);
modamount = \modamount.kr(0);
modSpread = Line.kr(1, spreadTo, decay) + (LFNoise2.kr(modrate).linlin(-1.0, 1.0, 0.0, 1.0) * modamount);
(
SynthDef(\fm1, {
var snd, freq;
freq = \freq.kr(440);
snd = PMOsc.ar(freq, freq * \ratio.kr(5.0), \index.kr(10.0) * Env.perc(0.001, \decay.kr(0.5)).ar(Done.none, \gate.kr(1)));
snd = snd * Env.asr(\attack.kr(0.1), 1.0, \release.kr(0.5)).ar(Done.freeSelf, \gate.kr(1));
Out.ar(\out.kr(0), Pan2.ar(snd, \pan.kr(0)) * \amp.kr(1));
}).add;
Pdef(\happybirthday, {