[chuck-users] Matrix of Impulse Generators

Perry R Cook prc at CS.Princeton.EDU
Wed Feb 5 13:43:40 EST 2014

Yep, having that resource allocation and connection
to the dac inside your infinite loop is the culprit.
In fact, almost everything in that function is static
initialization, so chould be moved outside the while(1)
context.  This fixes it for real:

fun void iGen(int i1, int j1) {
    Euclid(i1,j1,a1,b1) + Euclid(i1,j1,a2,b2) => float dist;
    <<< dist >>>;
    SinOsc s => ADSR e => dac;
    e.set(35::ms, 8::ms, .1, 200::ms);
    Math.pow(0.65,(dist)) => s.gain;
    i1*x + j1*y => s.freq;
    while(true) {
        (440)::ms => now;
        (440*Math.pow(1.2,dist))::ms => now;

----- Original Message -----
Send chuck-users mailing list submissions to
	chuck-users at lists.cs.princeton.edu

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
	chuck-users-request at lists.cs.princeton.edu

You can reach the person managing the list at
	chuck-users-owner at 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. Matrix of Impulse Generators (Philipp Blume)
   2. Re: Matrix of Impulse Generators (Stefan Blixt)

More information about the chuck-users mailing list