Created
June 28, 2012 20:39
-
-
Save amonks/3013792 to your computer and use it in GitHub Desktop.
iphone alert sounds
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
fun void stairs(int inA, int inB, float step){ | |
SinOsc a => dac; | |
inA => a.freq; | |
.1 => a.gain; | |
SinOsc b => dac; | |
inB => b.freq; | |
.1 => b.gain; | |
while(b.freq() < 500){ | |
step::second => now; | |
a.freq() * 1.2 => a.freq; | |
b.freq() + 20 => b.freq; | |
} | |
} | |
fun void alarm(){ | |
spork ~ stairs(100, 200, .05); | |
spork ~ stairs(50, 200, .03); | |
spork ~ stairs(100, 200, .01); | |
2::second => now; | |
} | |
fun void ring(){ | |
spork ~ stairs(100,200,.2); | |
1::second => now; | |
spork ~ stairs(200,200,.05); | |
1::second => now; | |
spork ~ stairs(100,200,.1); | |
.5::second => now; | |
spork ~ stairs(200,200,.05); | |
2::second => now; | |
} | |
spork ~ alarm(); | |
3::second => now; | |
spork ~ ring(); | |
10::second => now; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment