Last active
May 28, 2018 14:18
-
-
Save hidinginabunker/d723999c06a97a24789b2078f07003fb to your computer and use it in GitHub Desktop.
Playing around with generating some descending harmonic series from a base tone in super collider: https://soundcloud.com/hidinginabunker/harmonic-series-1
This file contains 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
// initialize some wiggle room to add some stank | |
var wiggle = [0.0, 0.2, 0.3, 0.4, 0.5].choose; | |
// select some base tone and add some wiggle room so we get some more interesting pure tones | |
var baseTone = [ | |
440*2+wiggle, | |
440*3+wiggle, | |
440*4+wiggle | |
].choose; | |
// create some harmonic series from the base tone | |
var tones = List[ | |
baseTone, | |
baseTone/2, | |
baseTone/3, | |
baseTone/4, | |
baseTone/5, | |
].reverse; // ascending is nicer | |
{ | |
// play each tone in the series after waiting a randomly selected time | |
tones.do({ | |
arg tone; | |
tone.postln; | |
{SinOsc.ar(tone, [0,1] , 0.05)}.play; | |
[0.5, 0.7, 1.0].choose.wait; | |
}) | |
}.fork; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment