Skip to content

Instantly share code, notes, and snippets.

@tildebyte
tildebyte / config.json
Last active September 13, 2021 01:22
codemirror code colors
{"description":"codemirror code colors","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data2.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12},"util.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":true,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/s64apah.png"}
@tildebyte
tildebyte / pyo.sublime-completions
Last active December 31, 2015 21:09
First cut at Sublime Text completions for pyo.
{
"scope": "source.python",
"completions":
[
{ "trigger": "Abs", "contents": "Abs(input, mul=1, add=0)" },
{ "trigger": "Adsr", "contents": "Adsr(attack=0.01, decay=0.05, sustain=0.71, release=0.10, dur=0, mul=1, add=0)" },
{ "trigger": "Allpass", "contents": "Allpass(input, delay=0.01, feedback=0, maxdelay=1, mul=1, add=0)" },
{ "trigger": "Allpass2", "contents": "Allpass2(input, freq=1000, bw=100, mul=1, add=0)" },
{ "trigger": "AllpassWG", "contents": "AllpassWG(input, freq=100, feed=0.95, detune=0.50, minfreq=20, mul=1, add=0)" },
@tildebyte
tildebyte / Solarized_dark
Created December 19, 2013 20:27
Solarized Dark style for E-Pyo editor.
style = {'background': {'colour': u'#002B36'},
'bracebad': {'colour': u'#681311'},
'bracelight': {'colour': u'#586E75'},
'caret': {'colour': u'#FDF6E3'},
'class': {'bold': 1, 'colour': u'#D33682', 'italic': 0, 'underline': 0},
'comment': {'bold': 0, 'colour': u'#2AA198', 'italic': 1, 'underline': 0},
'commentblock': {'bold': 0, 'colour': u'#268BD2', 'italic': 1, 'underline': 0},
'default': {'bold': 0, 'colour': u'#839496', 'italic': 0, 'underline': 0},
'face': u'PT Mono',
'foldmarginback': {'colour': u'#073642'},
<<< "Assignment 7 - whales" >>>;
// Coursera: Introduction to Programming for Musicians and Digital Artists
// 2013-12-5
// Sound settings are: 16bit@44100Hz
// whale.ck
// This could easily be (and was) a single file - no class, no function.
// For purposes of demonstrating "spork" in the Score file, it's here as a
// class with one method.
// Expanding it into a real class is an interesting idea, though...
/***********************************************************************
MSAFluidDemo.pde
Demo of the MSAFluid library (www.memo.tv/msafluid_for_processing)
Move mouse to add dye and forces to the fluid.
Click mouse to turn off fluid rendering seeing only particles and their paths.
Demonstrates feeding input into the fluid and reading data back (to update the particles).
Also demonstrates using Vertex Arrays for particle rendering.
/***********************************************************************
@tildebyte
tildebyte / ex00_methodChaining.pyde
Created June 23, 2014 16:09
Conversion of first HYPE example to Processing's Python mode.
add_library('hype')
def setup():
size(640, 640)
H.init(this).background(36)
smooth()
rect1 = HRect(100)
rect1.rounding(10) # set corner rounding
rect1.fill(255, 102, 0) # set fill color
@tildebyte
tildebyte / example_001.pyde
Created June 23, 2014 20:17
HMagneticField example converted to Processing's Python mode.
add_library('HYPE')
field = None
def setup():
size(640, 640)
H.init(this).background(0xFF202020)
smooth()
colors = HColorPool([0xFFFFFFFF, 0xFFF7F7F7,
soBase = (HOscillator().
speed(1).
range(-5, 5).
freq(4).
property(H.ROTATION))
rects = [HRect(rectDiameter)
.fill(141, 73, 63, choice([64, 196]))
.noStroke()
.loc(x, y)
.anchorAt(H.CENTER)
@tildebyte
tildebyte / circle.py
Created June 29, 2014 21:32
Creative Coding, Week 3 example 2
class Circle(object):
HalfWidth = 0
def __init__(self, x, y, speed=random(10), phase=random(TAU)):
self.x = x
self.y = y
self.speed = speed
self.phase = phase
self.holdX = self.x
@tildebyte
tildebyte / constrain.pde
Last active August 29, 2015 14:03
Processing `constrain()` tests.
float x = 0;
float y = 0;
float speed = 0.9;
void setup(){
}
void draw(){