From 7a6183d45af99bcaa70870ab144328ccd1fef1a1 Mon Sep 17 00:00:00 2001 From: chris chafe Date: Mon, 2 Oct 2023 12:07:14 -0700 Subject: [PATCH] rm data-sonification/spork* --- webchuck/data-sonification/spork.html | 257 ----------------- webchuck/data-sonification/sporkTwice.html | 270 ------------------ .../helloCCRMA-helloWebchuck/imitateMe.html | 6 +- 3 files changed, 3 insertions(+), 530 deletions(-) delete mode 100644 webchuck/data-sonification/spork.html delete mode 100644 webchuck/data-sonification/sporkTwice.html diff --git a/webchuck/data-sonification/spork.html b/webchuck/data-sonification/spork.html deleted file mode 100644 index ee29f9f..0000000 --- a/webchuck/data-sonification/spork.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -

HW1 - spork it!

-
-

The suggestion below shows how to spork the same process. Go ahead and copy / replace that into the live code.

- - -////////////////////////////////////////////////////
-suggestion, create a chuck function and spork it -- spawns an independent shred
-
- fun void go() - { - SinOsc osc => dac; // play the data with a sine wave - for (0 => int i; i < nVals; i++) { - osc.freq(vals[i]*1000+200); // data values in range 0 - 1 - 100::ms => now; - } - } - spork ~ go(); - while (true) 1::ms => now; // keep the main shred alive so we don't quit -
-live code -
50::ms => now; // start after 50ms - SinOsc osc => dac; // play the data with a sine wave - for (0 => int i; i < nVals; i++) { - osc.freq(vals[i]*1000+200); // data values in range 0 - 1 - 100::ms => now; - }
-

What about sporking it more than once? Try a first spork, add some time (say 1 second) and spork again before the infinite loop.

- - -

- -

-

- - - - diff --git a/webchuck/data-sonification/sporkTwice.html b/webchuck/data-sonification/sporkTwice.html deleted file mode 100644 index 0087a8b..0000000 --- a/webchuck/data-sonification/sporkTwice.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -

HW1 - spork it! TWICE!!

-
-

...with some different suggested parameterizations.

- - -////////////////////////////////////////////////////
-suggestions
-
- fun void go(int updateRate, float freqOffset, int chan) - { - SinOsc osc => dac.chan(chan); // play the data with a sine wave - for (0 => int i; i < nVals; i++) { - osc.gain (0.15); // reduce gain because we'll be layering more generators - osc.freq(vals[i]*1000+freqOffset); // data values in range 0 - 1 - updateRate::ms => now; - } - } - spork ~ go(100, 200, 0); // left side - 1500::ms => now; - spork ~ go(150, 300, 1); // slower, higher, right side -
-////////////////////////////////////////////////////
-live code -
50::ms => now; // start after 50ms - fun void go() - { - SinOsc osc => dac; // play the data with a sine wave - osc.gain (0.25); // reduce gain because we'll be layering more generators - for (0 => int i; i < nVals; i++) { - osc.freq(vals[i]*1000+200); // data values in range 0 - 1 - 100::ms => now; - } - } - spork ~ go(); - 1500::ms => now; - spork ~ go(); - - // always keep this main shred alive (like with this infinite loop) - while (true) 1::ms => now; // keep the main shred alive so we don't quit -
- - -

- -

-

- - - - diff --git a/webchuck/helloCCRMA-helloWebchuck/imitateMe.html b/webchuck/helloCCRMA-helloWebchuck/imitateMe.html index 6adb75c..5560080 100644 --- a/webchuck/helloCCRMA-helloWebchuck/imitateMe.html +++ b/webchuck/helloCCRMA-helloWebchuck/imitateMe.html @@ -22,12 +22,12 @@

Imitate Me

Hit "start" to play the target and adjust the live code on - this page + this page to match.

-

(hint #1) Different oscillator / UGens are listed +

(hint #1) Different types of oscillators and UGens are listed here.

////////////////////////////////////////////////////
-(hint #2) use these to set the tones and timing
+(hint #2) Modify these to create the tones and alter timings
osc.freq( put_a_frequency_here ); // in hertz osc.gain( put_an_amplitude_here ); // between 0.0 and 1.0