Skip to content

Instantly share code, notes, and snippets.

@rtsho
rtsho / AmbientExperiment2
Last active April 7, 2016 01:31
My 1st sonic pi experiment
#sonic pi
#a piece inspired from Ambien Experiment code by Darin Wilson
#a is the array, i is the previous index. returns a new index in a, in probability close to i.
#The distance is abs(i - j)
#never mind...it just help me remember what the function does
def perlin(a, i)
#create array with probabilities as a function of distance
#the indexes of this new array represent distances from i
a2 = Array.new(a.length){|index| Math.exp(a.length - index)}
@rtsho
rtsho / valley_of_the_unfinished
Created April 11, 2016 05:44
unfinished piece...#sonicpi
use_random_seed(1)
t = 0
m = 0
# t goes from 0 to 9, which is 3 measures
live_loop :main do
cue :_whatnow_ if t.modulo(3)==0 && m<6
cue :_boom_ if t==0 && m>=1
cue :_wizz_ if t==0 && m>=2 && m<6