Created
January 30, 2015 01:23
-
-
Save mk30/565c76be98c7f3953ea5 to your computer and use it in GitHub Desktop.
johnny demo 1
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
| 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