]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Still more tests
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 7 Jul 2019 19:47:20 +0000 (21:47 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 7 Jul 2019 19:47:20 +0000 (21:47 +0200)
examples/Gain.gw
examples/fullrect.gw [new file with mode: 0644]
examples/halfrect.gw [new file with mode: 0644]
examples/impulse.gw [new file with mode: 0644]
examples/step.gw [new file with mode: 0644]
examples/zerox.gw [new file with mode: 0644]

index ccb619d742a3fc676a20b9a98950e41766bbf172..7c8dcee77c01acaebaf32854cf56f06135e019de 100644 (file)
@@ -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 (file)
index 0000000..e8f6fda
--- /dev/null
@@ -0,0 +1,5 @@
+Impulse imp => FullRect fr => dac;
+samp => now;
+1 => imp.next;
+samp => now;
+<<<imp.last()>>>;
diff --git a/examples/halfrect.gw b/examples/halfrect.gw
new file mode 100644 (file)
index 0000000..138f10d
--- /dev/null
@@ -0,0 +1,5 @@
+Impulse imp => HalfRect fr => dac;
+samp => now;
+1 => imp.next;
+samp => now;
+<<<imp.last()>>>;
diff --git a/examples/impulse.gw b/examples/impulse.gw
new file mode 100644 (file)
index 0000000..6917f5c
--- /dev/null
@@ -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 (file)
index 0000000..fa1ab6b
--- /dev/null
@@ -0,0 +1,4 @@
+Step step => dac;
+.1 => step.next;
+samp => now;
+<<<step.next()>>>;
diff --git a/examples/zerox.gw b/examples/zerox.gw
new file mode 100644 (file)
index 0000000..25597fa
--- /dev/null
@@ -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;
+<<<imp.last()>>>;