Last active
July 8, 2022 16:19
-
-
Save nnirror/4ba566f67add63055c45646d3dbb4e16 to your computer and use it in GitHub Desktop.
facet example commads
This file contains hidden or 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
// slice a file into n slices, and save each slice in a new flder | |
new $('a').sample('input_file.wav') | |
.slices(16,1,()=>{ | |
_.from(this.data) | |
.saveAs('file_slices/'+i) | |
}); | |
// exquisite corpse samples: concatenated slices of other samples | |
new $('a').iter(16,1,()=>{ | |
this.append( | |
_.randsamp() | |
.range((i/15),((i+1)/15)) | |
) | |
}); | |
// single-sample reverb | |
new $('a') | |
.noise(1) | |
.append(_.from(0).dup(88200)) | |
.mix(0.1,()=>{ | |
this.iter(20,1,()=>{ | |
this.allpass() | |
.delay(random(1,80000,1)) | |
.lpf(20000-(i*1000)) | |
.scale(-1,1) | |
}) | |
}) | |
.times( | |
_.ramp(0,1,40000) | |
.palindrome() | |
.log(random(1,100)) | |
) | |
.play() | |
.on(); | |
excellent pong drone | |
_.sine(random(30,200,1),1000).scale(-0.6,0.6).audio().play(_.noise(4)).pong(random()).on(); | |
moorer reverb design, based on: https://christianfloisand.wordpress.com/2012/10/18/algorithmic-reverbs-the-moorer-design/ | |
_.randsamp() | |
.scale(-1,1) | |
.mix(0.5,()=>{ | |
this.delay(random(189,3514)) | |
.add(this.delay(random(189,3514),1)) | |
.add(this.delay(random(189,3514),1)) | |
.add(this.delay(random(189,3514),1)) | |
.add(this.delay(random(189,3514),1)) | |
.add(this.delay(random(189,3514),1)) | |
.audio() | |
.scale(-1,1) | |
.iter(2,()=>{ | |
this | |
.add(this.delay(random(2000,8000),1).lpf(random(900,6000))) | |
.add(this.delay(random(4000,8000),1).lpf(random(900,6000))) | |
.add(this.delay(random(6000,20000),1).lpf(random(900,6000))) | |
.add(this.delay(random(7000,20000),1).lpf(random(900,6000))) | |
.add(this.delay(random(1000,2000),1).lpf(random(900,6000))) | |
.add(this.delay(random(3000,9000),1).lpf(random(900,6000))) | |
.allpass().allpass().allpass() | |
.audio() | |
.scale(-1,1) | |
}) | |
}) | |
.audio() | |
.play(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment