Created
July 11, 2014 16:22
-
-
Save carlossaraiva/afa75b99fd18fd507205 to your computer and use it in GitHub Desktop.
A simple somewhat Theremim using Beads/Processing.
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
import beads.*; | |
AudioContext ac; | |
WavePlayer wp; | |
Gain g; | |
Glide gainGlide; | |
Glide frequencyGlide; | |
void setup() | |
{ | |
size(800, 600); | |
ac = new AudioContext(); | |
gainGlide = new Glide(ac, 0.0, 50); | |
frequencyGlide = new Glide(ac, 20, 50); //20 hz | |
wp = new WavePlayer(ac, frequencyGlide, Buffer.SINE); | |
g= new Gain(ac, 1, gainGlide); | |
g.addInput(wp); | |
ac.out.addInput(g); | |
ac.start(); | |
background(0); | |
} | |
void draw() | |
{ | |
gainGlide.setValue(mouseX/ (float)width); | |
frequencyGlide.setValue(mouseY); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment