Re: [chuck-users] curious about chuck
Oscillators of type (XXXOsc) do accept direct input from other UGs for Phase or Frequency. You just have to set the .op mode for those. In general, UGs don't accept sample-rate ChucK connection for arbitrary parameters, as very often one doesn't really want or need those to run at the sample rate. Control rate is arbitrary in ChucK, so to update the .freq of something non-Osc type, you would make a shred that does it at your sub-sample rate. You could even do it at the sample rate, of course. Here's an example: Flute f => dac; 880.0 => float freq => f.freq; spork ~myMod(); 1 => f.noteOn; 1*second => now; 660.0 => freq => f.freq; 1*second => now; 440.0 => freq => f.freq; 1*second => now; fun void myMod() { SinOsc s => blackhole; 6.0 => s.freq; while (true) { freq * (1.0 + 0.05*s.last()) => f.freq; 10 :: ms => now; // whatever rate you like here } } // Cheers!!! PRC ----- Original Message ----- Send chuck-users mailing list submissions to chuck-users@lists.cs.princeton.edu To subscribe or unsubscribe via the World Wide Web, visit https://lists.cs.princeton.edu/mailman/listinfo/chuck-users or, via email, send a message with subject or body 'help' to chuck-users-request@lists.cs.princeton.edu You can reach the person managing the list at chuck-users-owner@lists.cs.princeton.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of chuck-users digest..." Today's Topics: 1. Re: curious about chuck -- very basic question (Aaron Bohannon)
participants (1)
-
Perry R Cook