Created
September 10, 2014 19:59
-
-
Save shashi/dbc4a44ede975ac7d8e5 to your computer and use it in GitHub Desktop.
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
using AudioIO | |
macro time_call(ex) | |
println(ex) | |
var = gensym() | |
ex = Expr(:(=), var, ex) | |
quote | |
$ex; | |
AudioIO.pull($var, 44100, 0, 44100); | |
@time AudioIO.pull($var, 44100, 0, 44100); | |
end | |
end | |
println("rendering 1s of samples at 44100Hz") | |
@time_call NullNode() | |
@time_call WhiteNoise() | |
@time_call LinRamp(0, 1, 0.75) | |
@time_call SinOsc(220) | |
@time_call SinOsc(220) * .5 | |
@time_call SinOsc(220) + .5 | |
@time_call SinOsc(220) * 5 + .5 | |
@time_call AudioMixer(SinOsc(220), LinRamp(0, 1, 0.75)) | |
@time_call AudioMixer(SinOsc(220), SinOsc(343)) | |
@time_call AudioMixer(SinOsc(220), SinOsc(343), SinOsc(434)) | |
@time_call AudioMixer(SquareOsc(220), SinOsc(343), SinOsc(434)) | |
@time_call AudioMixer(SquareOsc(220), TriangleOsc(343, pi/2), SinOsc(434)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment