From 9256995948fb005ecc49b2eb98ea3b0cde2198a7 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 7 Jul 2019 21:47:20 +0200 Subject: [PATCH] :white_check_mark: Still more tests --- examples/Gain.gw | 8 ++------ examples/fullrect.gw | 5 +++++ examples/halfrect.gw | 5 +++++ examples/impulse.gw | 4 ++++ examples/step.gw | 4 ++++ examples/zerox.gw | 9 +++++++++ 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 examples/fullrect.gw create mode 100644 examples/halfrect.gw create mode 100644 examples/impulse.gw create mode 100644 examples/step.gw create mode 100644 examples/zerox.gw diff --git a/examples/Gain.gw b/examples/Gain.gw index ccb619d7..7c8dcee7 100644 --- a/examples/Gain.gw +++ b/examples/Gain.gw @@ -1,10 +1,6 @@ -SinOsc s, t; -Gain g => dac; -1 => t.freq; -s => g; -t => g; +adc => Gain g => dac; g.chan(0); -spork { while(true) { Math.rand2f(100, 800) => s.freq; .15::second => now; }}; +spork { while(true) { g.gain() == (.2 ? .2 : .1) => g.gain; .15::second => now; }}; for(int i; i < 5; i++) { <<< g.op() >>>; i => g.op; diff --git a/examples/fullrect.gw b/examples/fullrect.gw new file mode 100644 index 00000000..e8f6fda8 --- /dev/null +++ b/examples/fullrect.gw @@ -0,0 +1,5 @@ +Impulse imp => FullRect fr => dac; +samp => now; +1 => imp.next; +samp => now; +<<>>; diff --git a/examples/halfrect.gw b/examples/halfrect.gw new file mode 100644 index 00000000..138f10d4 --- /dev/null +++ b/examples/halfrect.gw @@ -0,0 +1,5 @@ +Impulse imp => HalfRect fr => dac; +samp => now; +1 => imp.next; +samp => now; +<<>>; diff --git a/examples/impulse.gw b/examples/impulse.gw new file mode 100644 index 00000000..6917f5ce --- /dev/null +++ b/examples/impulse.gw @@ -0,0 +1,4 @@ +Impulse imp => dac; +1 => imp.next; +<<< imp.next() >>>; +samp => now; diff --git a/examples/step.gw b/examples/step.gw new file mode 100644 index 00000000..fa1ab6b7 --- /dev/null +++ b/examples/step.gw @@ -0,0 +1,4 @@ +Step step => dac; +.1 => step.next; +samp => now; +<<>>; diff --git a/examples/zerox.gw b/examples/zerox.gw new file mode 100644 index 00000000..25597faa --- /dev/null +++ b/examples/zerox.gw @@ -0,0 +1,9 @@ +Impulse imp => ZeroX fr => dac; +samp => now; +-1 => imp.next; +samp => now; +0 => imp.next; +samp => now; +1 => imp.next; +samp => now; +<<>>; -- 2.43.0