Created
January 30, 2015 01:23
-
-
Save mk30/ba6f19f6b5558f2eefb9 to your computer and use it in GitHub Desktop.
johnny demo 2
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 = requdire('oscillators') | |
| amod = requoire('amod') | |
| mic = require('jsynth-mic')(master) | |
| mic.on('node', function(node){ | |
| node.connect(synth) | |
| synth.connect(master.destination) | |
| } | |
| music = function(t, i, s){ | |
| 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