This file contains 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
//CELL TYPES | |
final int EMPTY = 0; | |
final int LEADING = 1; | |
final int TRAILING = 2; | |
final int LINGER = 10; | |
final int REFLECTED = 3; | |
final int REFLECT_FADE = 4; | |
final int REFLECT_STOP = 5; | |
final int REFLECTOR = 6; | |
final int SOURCE = 7; |
This file contains 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
use_bpm 90 | |
prog = (ring | |
(chord :c3, :m11), | |
(chord :f3, :M7), | |
(chord :d3, :m6), | |
(chord :eb3, :M)) | |
live_loop :bline do | |
use_synth :mod_sine | |
use_synth_defaults attack: 0.24, amp: 0.2, mod_wave: 2, mod_phase: 1, mod_range: 5 |
This file contains 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
float normGauss() { | |
return norm(randomGaussian(), -1, 1.); | |
} | |
class Particle { | |
PVector position; | |
PVector velocity; | |
Particle() { | |
position = new PVector(normGauss(), normGauss(), normGauss()); | |
velocity = PVector.random2D(); | |
} |
This file contains 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
.unselected, .output_stderr { | |
display: none !important; | |
} | |
* { | |
font-size: large !important; | |
} |
This file contains 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
/** | |
A markov-chain based glyph generator. Given sequences of points as a corpus, this will create a markov chain based on those points. | |
Then, by sampling the chain, we can generate entirely new glyphs that weren't in our original dataset. | |
Press "r" to generate a new frame. Press "s" to save the frame to a file (with a random UUID as its name). | |
Requires the PostFx library: https://github.com/cansik/processing-postfx/ | |
*/ | |
import java.util.*; |
This file contains 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
class Foo(object): | |
def __init__(self): | |
self.value = 5 | |
def wrap(param): | |
def _wrap(clss): | |
class _Wrap(clss): | |
def __init__(self): | |
super(_Wrap, self).__init__() | |
self.other_value = param |
This file contains 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
import time | |
import spatial as sp | |
import sounddevice as sd | |
def play(sound, sample_rate=sp.SAMPLE_RATE): | |
"""Helper to play serially""" | |
sd.play(sound) | |
time.sleep(len(sound) / sample_rate) | |
space = sp.space(3) |
This file contains 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
use_synth :dpulse | |
use_synth_defaults pulse_width: 0.0001, pulse_width_slide: 0.25, detune_slide: 0.25 | |
use_bpm 20 | |
uncomment do | |
live_loop :crankcase do | |
sync :burp | |
with_fx :gverb, room: 10 do | |
#g = play (scale :G0, :blues_minor).shuffle.tick, attack: 0.7, sustain: 0.75, release: 0.4, amp: 0.25 | |
4.times do |
This file contains 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
s0 = (scale :C, :chromatic, num_octaves: 3).shuffle | |
s1 = s0.rotate(2) | |
s2 = s1.rotate(3) | |
amps = (line 0, 1, steps: 64) | |
use_synth :piano | |
use_synth_defaults stereo_width: 0.2 | |
with_fx :bpf, centre: :C+6, res: 0.5 do | |
with_fx :bitcrusher, bits: 16, sample_rate: 5000 do |
This file contains 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
PVector center; | |
float ratio = 1.0; | |
float baseRotate = -0.0001; | |
void setup() { | |
fullScreen(P3D); | |
frameRate(60); | |
center = new PVector(width/2, height/2); | |
ellipseMode(CENTER); | |
noFill(); |