This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
// generate uniformly distributed random number in [0, 1] | |
float rand_float() { | |
return (float)rand() / RAND_MAX; | |
} | |
const int NORM_APPROX_STAGES = 12; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- bouncy | |
-- tiny demo of ASL's dyn, generating a stream of bass notes from crow | |
-- little sequins of frequencies | |
PIT = sequins{ 110 | |
, 110*1.5 | |
, 110*1.25 | |
, 110*1.666 | |
, 110*1.333 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////// 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); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Install utils for cpu freq | |
sudo apt-get install cpufrequtils | |
sudo cpufreq-set -r -g performance | |
sudo echo "ENABLE="true" | |
GOVERNOR="performance" | |
MAX_SPEED="0" | |
MIN_SPEED="0" " | sudo tee -a /etc/default/cpufrequtils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- pattern_time study | |
pattern_time = require 'pattern_time' -- use the pattern_time lib in this script | |
function init() | |
grid_pattern = pattern_time.new() -- establish a pattern recorder | |
grid_pattern.process = grid_pattern_execute -- assign the function to be executed when the pattern plays back | |
grid_redraw() | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////////////////////////////////////////////////////////////////////// | |
************************************** 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// via https://web.archive.org/web/20191104212834/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)) - |
NewerOlder