Skip to content

Instantly share code, notes, and snippets.

@cheery
Created October 5, 2014 15:07
Show Gist options
  • Save cheery/535c805034b2c8e78599 to your computer and use it in GitHub Desktop.
Save cheery/535c805034b2c8e78599 to your computer and use it in GitHub Desktop.
Exponential chirps
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);
}
@grifdail
Copy link

grifdail commented Nov 3, 2014

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment