[chuck-users] How to read large data files

Mike McGonagle mjmogo at gmail.com
Thu Jan 5 13:15:30 EST 2006

On 1/4/06, Ge Wang <gewang at cs.princeton.edu> wrote:
> Welcome Michael,

Thank you, and congratulations on ChucK. So far, this looks very
promising for some of the ideas that I would like to implement.
Basically, I tried to do this using PD, and things get a little
cumbersome (at least for me) having to deal with a "graphical"
programming language for large projects. I am definetly more of a
"text" programmer.

> > I recently found ChucK, and have started to work with it in putting
> > together some music. I am trying to use fractal data as a control for
> > various parameters. I rewrote my fractal program in ChucK, but because
> > of how the floats are of limited percision, I am getting different
> > results than the same program written in C.
> There is currently one floating point type 'float' in ChucK, which is
> actually double precision internally.

Hum... I have written these fractal algorithms in 4 different
languages (C, Java, PD, and now ChucK), and so far, the only thing
that I can gauge this with is to compare the results I got from the
book I found these algorithms in, which was written in "Pseudo-C", and
the results from each version of the program. None of the
implementation produce the same stream of data, after about 20 or so
iterations of the fractal algorithm, the numbers start to diverge from
each other. I can only attribute this to the precision of the
underlying floating point numbers.

> If I understand this correctly, the answer currently is no - each ugen
> outputs one sample value mapped to a particular chuck time.  The framework
> caches this value and will not ask a ugen to recompute until the next time
> increment.

Well, actually, what I was getting at, is each fractal that I have
implemented produces more than a single value for each iteration of
the algorithm. It would be like a Multi-channel UGen. At the same
time, these fractals would not be like other UGens in that they
wouldn't be used to generate sample data, unless it was being used for
audio. I am primarily interested in using these things to control
other parameters, somewhere below the audio rate.

> I hope this helps - please post if you have additional questions.

I will. Thanks again.


More information about the chuck-users mailing list