genish.js
Version:
20 lines (14 loc) • 636 B
JavaScript
// record and use master output
h1 = history();
h1(
cycle( add( 440, mul( h1() * 100 ) ) )
)
out = gen.createCallback( h1 )
// History x1, y1; y = in1 - x1 + y1*0.9997; x1 = in1; y1 = y; out1 = y;
let x1 = history( in1 ), y1 = history();
let out = add( sub( in1, x1() ), mul( y1(), .9997) )
y1( out )
//cycle( add( 440, mul( h1() * 100 ) ) )
out = gen.createCallback( h1 )
accum = .1, .2, .3, .4, .5, .6, .7, .8, .9, .0, 0,
delta = (.1-0=.1),(.2-.1=.1),(.3-.2=.1),(.4-.3=.1),(.5-.4=.1),(.6-.5=.1),(.7-.6=.1),(.8-.7=.1),(.9-.8=.1),(.0-.9=-.1),(.0-.10=.1)