diff options
author | Phil Burk <[email protected]> | 2015-01-31 18:32:50 -0800 |
---|---|---|
committer | Phil Burk <[email protected]> | 2015-01-31 18:32:50 -0800 |
commit | efc7fc30ba074c687644f2f4c66c4b1c950da9c5 (patch) | |
tree | 496faa82295838ccb1d68d16642bcc892ca94e4c /tests | |
parent | dd9e0cdf6475034f538dc5b925a1ba6f1076761e (diff) |
Added a new BrownNoise unit generator that generate
noise based on Brownian motion.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/com/jsyn/examples/CircuitTester.java | 11 | ||||
-rw-r--r-- | tests/com/jsyn/util/TestPseudoRandom.java | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/com/jsyn/examples/CircuitTester.java b/tests/com/jsyn/examples/CircuitTester.java index 22db760..1a307f2 100644 --- a/tests/com/jsyn/examples/CircuitTester.java +++ b/tests/com/jsyn/examples/CircuitTester.java @@ -22,6 +22,7 @@ import javax.swing.JApplet; import com.jsyn.JSyn; import com.jsyn.Synthesizer; +import com.jsyn.instruments.SubtractiveSynthVoice; import com.jsyn.scope.AudioScope; import com.jsyn.swing.JAppletFrame; import com.jsyn.swing.SoundTweaker; @@ -75,10 +76,12 @@ public class CircuitTester extends JApplet { * @return */ public UnitSource createUnitSource() { - // return new SampleHoldNoteBlaster(); - // return new com.syntona.exported.FMVoice(); - // return new SubtractiveSynthVoice(); - return new WindCircuit(); + //return new SampleHoldNoteBlaster(); + //return new com.syntona.exported.FMVoice(); + return new SubtractiveSynthVoice(); + //return new WindCircuit(); + //return new WhiteNoise(); + //return new BrownNoise(); } @Override diff --git a/tests/com/jsyn/util/TestPseudoRandom.java b/tests/com/jsyn/util/TestPseudoRandom.java index 0ef2fa3..20df465 100644 --- a/tests/com/jsyn/util/TestPseudoRandom.java +++ b/tests/com/jsyn/util/TestPseudoRandom.java @@ -47,7 +47,7 @@ public class TestPseudoRandom extends TestCase { } public void testIntegerDistribution() { - int scaler = 10; + int scaler = 100; for (int i = 0; i < (bins.length * scaler); i++) { int rand = pseudoRandom.nextRandomInteger(); int positiveInt = rand & 0x7FFFFFFF; @@ -59,7 +59,7 @@ public class TestPseudoRandom extends TestCase { } public void test01Distribution() { - int scaler = 10; + int scaler = 100; for (int i = 0; i < (bins.length * scaler); i++) { double rand = pseudoRandom.random(); assertTrue("not too low, #" + i + " = " + rand, (rand >= 0.0)); |