[chuck-users] include/import (am noob)

Robert Poor rdpoor at gmail.com
Mon Mar 5 17:58:21 EST 2012


George:

I love github as a shared repository of code.  To answer your first
questions -- if you have the stomach -- look in:

  https://github.com/rdpoor/chuck_performance_setup

The _loadup.ck file loads all the requisite files in the proper order,
and finally calls:

  Machine.add(HOME + "_main.ck");

which has the main performance loop.  _main's last line is:

   1::week => now;

so the main shred runs for a week -- the PatchManager (q.v.) sporks
and kills patch-specific shreds as required.

As for gaussian random numbers, look up

   http://en.wikipedia.org/wiki/Box-Muller_transform

... any random number generator plus a couple of trig calls does the trick.

- Rob


2012/3/5 George Locke <george.locke.maxmsp at gmail.com>:
> Hi,
>
> I want to make a library of functions that I can call from any chuck script.
>  If I put those functions in one file, how do I access them from another?
>  It would be great if I could make them into a new namespace, akin to Std.X
> or Math.X (I am using miniAudicle 0.2.0, not command line.)
>
> (I checked the language specification for the words "include" and "import"
> and found nothing relevant.)
>
> Thanks,
> George
>
> (I am new to chuck, but not to computer programming, nor computer audio.)
>
> PS is there a popular/built-in solution for making exponentially
> distributed, normally distributed, etc random variables?
>
> PPS If not, I'd be happy to share my work - is there a common way for people
> to share code like this?
>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>


More information about the chuck-users mailing list