mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Removed Sound class, added Engine + Audio Device. No need to start a stream anymore.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user