Debian Codegraph @

examples/analysis/concat.ck

raw
1 // name: concat.ck
2 // desc: FeatureCollector is really meant to be used for recording data for machine
3 // learning analysis (see https://chuck.cs.princeton.edu/doc/language/uana.html),
4 // but this example shows bare-bones usage of the UAana for something silly.
5 //
6 // author: Curtis Ullerich
7
8 FeatureCollector fc =^ UnFlip unflip => dac;
9 SinOsc one => Flip f1 =^ fc;
10 TriOsc two => Flip f2 =^ fc;
11 .5 => one.gain => two.gain;
12
13 300 => int freq;
14 freq => one.freq;
15 2*freq => two.freq;
16 second/freq => dur period;
17 (period/samp)$int => int size; // number of samples in a period
18 size => f1.size => f2.size;
19
20 while(true)
21 {
22 period => now;
23 unflip.upchuck();
24 }