Removed Sound class, added Engine + Audio Device. No need to start a stream anymore.

This commit is contained in:
wirsing
2014-07-01 18:47:40 -07:00
parent 795caeaf82
commit f4b2b36e0d
35 changed files with 307 additions and 154 deletions
@@ -7,15 +7,13 @@ If you want to set all of them at the same time use
import processing.sound.*;
Sound stream;
Pulse pulse;
void setup() {
size(640,360);
background(255);
// Create and start the sound renderer and the pulse wave oscillator
stream = new Sound(this);
// Create and start the pulse wave oscillator
pulse = new Pulse(this);
pulse.play();
}
@@ -6,17 +6,13 @@ the same time use .set(float freq, float amp, float add, float pan)
import processing.sound.*;
Sound stream;
SawOsc saw;
void setup() {
size(640, 360);
background(255);
// Create and start the sound renderer and the sine oscillator.
// Second and Third arguments are optional, default is 44100 / 512
// for Sample Rate and Buffer Size
stream = new Sound(this, 44100, 256);
// Create the sine oscillator.
saw = new SawOsc(this);
//Start the Sine Oscillator. There will be no sound in the beginning
@@ -6,7 +6,6 @@ the same time use .set(float freq, float amp, float add, float pan)
import processing.sound.*;
Sound stream;
SinOsc sine;
float freq=400;
@@ -17,10 +16,8 @@ void setup() {
size(640, 360);
background(255);
// Create and start the sound renderer and the sine oscillator.
// Second and Third arguments are optional, default is 44100 / 512
// for Sample Rate and Buffer Size
stream = new Sound(this, 44100, 256);
// Create and start the sine oscillator.
sine = new SinOsc(this);
//Start the Sine Oscillator.
@@ -6,17 +6,14 @@ the same time use .set(float freq, float amp, float add, float pan)
import processing.sound.*;
Sound stream;
SqrOsc sqr;
void setup() {
size(640,360);
background(255);
// Create and start the sound renderer and the sine oscillator.
// Second and Third arguments are optional, default is 44100 / 512
// for Sample Rate and Buffer Size
stream = new Sound(this, 44100, 256);
// Create and start the sine oscillator.
sqr = new SqrOsc(this);
//Start the Sine Oscillator. There will be no sound in the beginning
@@ -6,17 +6,14 @@ the same time use .set(float freq, float amp, float add, float pan)
import processing.sound.*;
Sound stream;
TriOsc tri;
void setup() {
size(640,360);
background(255);
// Create and start the sound renderer and the sine oscillator.
// Second and Third arguments are optional, default is 44100 / 512
// for Sample Rate and Buffer Size
stream = new Sound(this, 44100, 256);
// Create and start the triangle wave oscillator.
tri = new TriOsc(this);
//Start the Sine Oscillator. There will be no sound in the beginning