Created
October 5, 2014 15:07
-
-
Save cheery/535c805034b2c8e78599 to your computer and use it in GitHub Desktop.
Exponential chirps
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
function dsp(t, f) { | |
var o = env(0.25, Math.PI*2*200*Math.sin(Math.PI*2*t*0.7), -5, 25, t); | |
return o*0.2; | |
} | |
function env(measure, x, y, z, t){ | |
var ts = t / 2 % measure; | |
return Math.sin(x * (Math.exp(-ts * y))) * Math.exp(-ts * z); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi !
I'm really new to dsp music.
I don't understand at all this code. From my research, an expontial chirps allow us to "slide" from a frequency to another. Am i right ? How does this one work ? What does the parameters means ?
Anyway, thank for the code !