This commit is contained in:
wirsing
2014-06-27 19:35:15 -07:00
parent 3f470bfb2b
commit 4d6e986a60
8 changed files with 9 additions and 9 deletions
@@ -32,7 +32,7 @@ public void draw() {
// rms.analyze() return a value between 0 and 1. To adjust
// the scaling and mapping of an ellipse we scale from 0 to 0.5
scale=int(map(rms.process(), 0, 0.5, 1, 350));
scale=int(map(rms.analyze(), 0, 0.5, 1, 350));
noStroke();
fill(255,0,150);
@@ -41,6 +41,6 @@ public void draw() {
{
// The result of the FFT is normalized
// draw the line for frequency band i scaling it up by 5 to get more amplitude.
line( i, height, i, height - spec[i]*height*5 );
line( i, height, i, height - spectrum[i]*height*5 );
}
}
@@ -8,8 +8,8 @@ public class Pulse implements SoundObject {
MethClaInterface m_engine;
private int[] m_nodeId = {-1,-1};
private float m_freq = 440;
private float m_width = 0.5;
private float m_amp = 0.5;
private float m_width = 0.5f;
private float m_amp = 0.5f;
private float m_add = 0;
private float m_pos = 0;
@@ -8,7 +8,7 @@ public class SawOsc implements Oscillator{
private MethClaInterface m_engine;
private int[] m_nodeId = {-1,-1};
private float m_freq = 440;
private float m_amp = 0.5;
private float m_amp = 0.5f;
private float m_add = 0;
private float m_pos = 0;
@@ -7,7 +7,7 @@ public class SinOsc implements Oscillator {
private MethClaInterface m_engine;
private int[] m_nodeId = {-1,-1};
private float m_freq = 440;
private float m_amp = 0.5;
private float m_amp = 0.5f;
private float m_add = 0;
private float m_pos = 0;
@@ -8,7 +8,7 @@ public class SqrOsc implements SoundObject {
MethClaInterface m_engine;
private int[] m_nodeId = {-1,-1};
private float m_freq = 440;
private float m_amp = 0.5;
private float m_amp = 0.5f;
private float m_add = 0;
private float m_pos = 0;
@@ -8,7 +8,7 @@ public class TriOsc implements Oscillator{
private MethClaInterface m_engine;
private int[] m_nodeId = {-1,-1};
private float m_freq = 440;
private float m_amp = 0.5;
private float m_amp = 0.5f;
private float m_add = 0;
private float m_pos = 0;
@@ -6,7 +6,7 @@ public class WhiteNoise implements SoundObject{
PApplet parent;
private MethClaInterface m_engine;
private int[] m_nodeId = {-1,-1};
private float m_amp=0.5;
private float m_amp=0.5f;
private float m_add=0;
private float m_pos=0;