diff options
author | Phil Burk <[email protected]> | 2015-01-31 18:35:44 -0800 |
---|---|---|
committer | Phil Burk <[email protected]> | 2015-01-31 18:35:44 -0800 |
commit | d3c74876db36598813068ce0bb8ea887e41a1c71 (patch) | |
tree | 496faa82295838ccb1d68d16642bcc892ca94e4c /tests/com | |
parent | dd9e0cdf6475034f538dc5b925a1ba6f1076761e (diff) | |
parent | efc7fc30ba074c687644f2f4c66c4b1c950da9c5 (diff) |
Merge pull request #4 from philburk/noise
Added a new BrownNoise unit generator
Diffstat (limited to 'tests/com')
-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)); |