Skip to content

Instantly share code, notes, and snippets.

jsimon@merapi:~/build-supercollider$ sh build-supercollider.sh
Hit:1 http://gb.archive.ubuntu.com/ubuntu eoan InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu eoan-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu eoan-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu eoan-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up-to-date.
Reading package lists...
// archive of code used for disquiet junto 0368
// P is the same as Pbindef
// also needs buffer player synth \bf, and various other bits of initialisation not shown here
~dqjpath="/Users/jsimon/Dropbox/SuperCollider/disquiet junto 0368/Junto 367.aif"
~dqjbuf=Buffer.read(s, ~dqjpath)
// ~dqjbuf.play
t.tempo_(120/60)
@tedthetrumpet
tedthetrumpet / dsqj365-01.scd
Created December 29, 2018 10:28
source code for js2018 (disquiet0365)
// source code for js2018 (disquiet0365)
// https://disquiet.com/0365/
// randomly chosen five-second segments from 12 audio files, one for each month of the year
// SuperCollider 3.10.0
(
s.waitForBoot{
var path, files;
Buffer.freeAll;
jsimon@edgy:~/EspGrid/espgridd$ cd ~
jsimon@edgy:~$ ls
Desktop Music
Documents Pictures
Downloads Public
Dropbox qt-opensource-linux-x64-5.6.1.run
EspGrid sc3-plugins
examples.desktop sc_ide_conf.yaml
exchangecalendar supercollider
jsimon@edgy:~$ pwd
/home/jsimon
jsimon@edgy:~$ ls
Desktop kxstudio-repos_9.3.0~kxstudio1_all.deb sc3-plugins
Documents kxstudio-repos-gcc5_9.3.0~kxstudio1_all.deb sc_ide_conf.yaml
Downloads Music supercollider
Dropbox Pictures Templates
examples.desktop Public Videos
exchangecalendar qt-opensource-linux-x64-5.6.1.run
jsimon@edgy:~$ git clone https://github.com/d0kt0r0/EspGrid.git
(
// reset
Pdef.all.clear; Pdefn.all.clear; Ndef.all.clear; Buffer.freeAll;
// quantize changes to four beats
Pbindef.defaultQuant = 4;
Pdefn.defaultQuant = 4;
s.waitForBoot{
// set tempo to 120
TempoClock.default.tempo = 120/60;
// setup sample path

Ndef(\m).put(1, \filter -> {|x| JPverb.ar(x, t60:2, size:0.2)}).set(\wet1, 1.0) Ndef(\m).put(2, \filter -> {|x| Decimator.ar(x, rate:1700, bits:7)}).set(\wet1, 0.1) Ndef(\m).put(2, \filter -> {|x| Decimator.ar(x, rate: Ndef(\l).kr.range(250,3770), bits:5)}).set(\wet1, 0.5) Ndef(\m).put(3, \filter -> {|x| Greyhole.ar(x, delayTime:t.tempo/8, feedback:0.6, size:0.1, diff:0.01, modDepth:0)}).set(\wet1, 0.6)

Ndef(\l, {LFNoise1.kr(t.tempo/4)})

Pbindef(\b, \instrument, \bform) Pbindef(\b, \midinote, [24, 36, 48]) (a=[36!8, 34!8].flatten;

t = TempoClock(60/60)

~changesamples.("soh")

d = ~bufs[0..18] // kendhang e = ~bufs[19..32] // saron & demung f = ~bufs[33..39] // gong

Pbindef(\x, \instrument, \bf, \dur, 1/4) // keep coming up with 8 beat patterns, and repeat each one four times

~changesamples = {
|x="hitz01"|
if ( ["hitz01","soh","hamburg", "iowa"].indexOfEqual(x) != nil,
{ var path = "/Users/jsimon/Music/SuperCollider Recordings/" ++ x ++ "/";
Buffer.freeAll;
~bufs = (path ++ "*.aiff").pathMatch.collect({ |i| Buffer.read(s, i)});},
{"that's not a sample folder".error; nil})
};
~changesamples.();
@tedthetrumpet
tedthetrumpet / lcode 04 gmsnprep 10 algodub.scd
Created June 19, 2016 19:18
Livecoding experiment, sounds a bit dub.
(
Pdef.all.clear;
Ndef.all.clear;
s.waitForBoot{
// setup sample paths and \bf synth
~hitzpath="/Users/jsimon/Music/SuperCollider Recordings/hitzamples/"; // some hits
~bufs = (~hitzpath ++ "*.aiff").pathMatch.collect({ |i| Buffer.read(s, i)});
SynthDef(\bf, {|out=0 buf=0 amp=0.1 freq=261.6255653006|
var sig = PlayBuf.ar(2, buf, BufRateScale.kr(buf) * freq/60.midicps, doneAction:2);
Out.ar(out, sig * amp)