UNPKG

p5.gibber.js

Version:

Music and audio programming for p5.js

56 lines (37 loc) 1.13 kB
function setup() { createCanvas( windowWidth, windowHeight ) synth = Synth('bleep') synth2 = Synth('bleep', {maxVoices:4}) // score.next() score = Score([ 0, synth.note.score( 'c4', 1/4 ), measures(1), synth.note.score( ['c4','c5'], 1/8 ), measures(1), synth.note.score( ['c2','c3','c4','c5'], 1/16 ), measures(1), function() { kick = Kick().note.seq( 55,1/4 ) }, Score.wait, null, 0, synth2.note.score('bb4',1/4 ), measures(1), synth2.chord.score( [['bb4','g4']], 1/4 ), measures(2), synth2.chord.score( [['c5','f4']], 1/4 ), measures(2), function() { synth2.chord.seq( [['eb4','bb4','d5']], 1/6 ) synth2.note.seq.stop() synth2.fx.add( Delay(1/9,.35) ) synth2.fadeOut(32) }, measures(4), function() { ks = Pluck() .note.seq( Rndi(100,600), 1/16 ) .blend.seq( Rndf() ) .fx.add( Schizo('paranoid') ) Clock.rate = Line( 1, 1.1, 8 ) }, measures(8), function() { Master.fadeOut( 8 ) }, measures(8), Gibber.clear ]).start() } function draw() { }