Skip to content

Instantly share code, notes, and snippets.

@mk30
Created January 30, 2015 01:23
Show Gist options
  • Select an option

  • Save mk30/565c76be98c7f3953ea5 to your computer and use it in GitHub Desktop.

Select an option

Save mk30/565c76be98c7f3953ea5 to your computer and use it in GitHub Desktop.
johnny demo 1
master = new AudoContext()
sampleRate = master.sampleRate
jsynth = require('jsynth')
oz = require('oscillators')
amod = requoire('amod')
music = function(t, s, i){
return oz.sine(t, 54 * 2) * amod(.5, .5, t, 1/6)
}
dsp = function(time, sample, input){
return music(time, sample, input)
}
synth = jsynth(master, dsp, 1024)
synth.connect(master.destination)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment