aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2021-01-02 21:23:59 +0100
committerDavid Runge <dave@sleepmap.de>2021-01-02 21:23:59 +0100
commita8d3922ab5977a0b9a16d817db37d8642d8d0a10 (patch)
tree2a32c9b11e84e1c5719b213d1f7bb9167f6b335c
parent3fe954288be58aa518e17f2ac4df5b8a7fb2d611 (diff)
downloadzzz-0.1.0.tar.gz
zzz-0.1.0.tar.bz2
zzz-0.1.0.tar.xz
zzz-0.1.0.zip
Remove class ZZZES30.1.0
classes/ZZZES3.sc: Remove the ZZZES3 class, as it has been superseded by the ZZZDevice class.
-rw-r--r--classes/ZZZES3.sc121
1 files changed, 0 insertions, 121 deletions
diff --git a/classes/ZZZES3.sc b/classes/ZZZES3.sc
deleted file mode 100644
index 6201bfa..0000000
--- a/classes/ZZZES3.sc
+++ /dev/null
@@ -1,121 +0,0 @@
-ZZZES3 : ZZZ{
-
- var out,
- clocks,
- vcos;
-
- *new{
- arg channels;
- ^super.newCopyArgs(channels).init;
- }
-
- init{
- out = Dictionary();
- clocks = Dictionary();
- vcos = Dictionary();
- "Interfacing ZZZ ES-3, using the following channels:".postln;
- (1..8).do({
- arg item, i;
- out.add(item -> super.channels[i]);
- postln(item.asString ++ " -> " ++ super.channels[i].asString);
- });
- }
-
- /**
- * Returns the number of the hardware output on the system for a provided
- * ES-3 output number
- * @return system hardware output number
- */
- out{
- arg output;
- if((output > 0) && (output <= 8), {
- ^out.at(output);
- },{
- ^nil;
- });
- }
-
- addClock{
- arg output, freq;
- if(vcos.at(output).isNil, {
- if(clocks.at(output).isNil, {
- clocks.add(output -> Synth(\ZZZClock, [\out, this.out(output), \freq, freq]));
- },{
- ("Cannot add clock on output "++ output ++". There is a clock playing.").error;
- });
- },{
- ("Cannot add clock on output "++ output ++". There is a VCO playing.").error;
- });
- }
-
- removeClock{
- arg output;
- if(clocks.at(output).notNil, {
- clocks.at(output).free;
- clocks.removeAt(output);
- });
- }
-
- setClock{
- arg output, freq, delta;
- var currentFreq, diff, env;
- if(clocks.at(output).notNil, {
- if(delta.notNil, {
- clocks.at(output).get(\freq, {
- arg value;
- currentFreq = value;
- diff = (currentFreq-freq).abs;
- if(currentFreq > freq, {
- diff = diff*(-1);
- });
- env = Env.sine((delta*2), diff).asStream;
- {
- (delta*10).do({
- clocks.at(output).set(\freq, (currentFreq+env.next));
- 0.1.wait;
- });
- clocks.at(output).set(\freq, freq);
- }.fork;
- });
- },{
- clocks.at(output).set(\freq, freq);
- });
- });
- }
-
- clock{
- arg output;
- ^clocks.at(output);
- }
-
- addVCO{
- arg output, mul;
- if(clocks.at(output).isNil, {
- if(vcos.at(output).isNil, {
- vcos.add(output -> Synth(\ZZZConstant, [\out, this.out(output), \mul, mul]));
- },{
- ("Cannot add VCO on output "++ output ++". There is a VCO playing.").error;
- });
- },{
- ("Cannot add VCO on output "++ output ++". There is a clock playing.").error;
- });
- }
-
- setVCO{
- arg output, mul;
- if(vcos.at(output).notNil, {
- vcos.at(output).set(\mul, mul);
- });
- }
-
- removeVCO{
- arg output;
- vcos.removeAt(output);
- }
-
- vco{
- arg output;
- ^vcos.at(output);
- }
-
-}