Michael, thanks for your answer.
Do you still live in Brooklyn? Maybe we can get together for a coffee...
I like 3 blocks away from the Prospect Park station (Q, B, S trains)
i'll definitely check the code you send me.
looking forward
2010/10/25 mike clemow
Hi Wolfgang,
I really like your instrument! I had to change a few things to get it running: the file name strings ended in ".ch" rather than ".ck", which threw me for a minute. Also, there are obviously somethings that are un-implemented (e.g. reverb in Global, etc.) But I really like the use of the interface to spawn grain-producing shreds. It gives you some ad hoc control over the grain cloud.
One bit of feedback I will give you is that the most inefficient part of your granular implementation is the sample-level intervention in the Grain class. The way you're doing it at each sample, the chuck language has to do a bunch of math to calculate the gain for the next sample in order to do your enveloping. This does work, however, there are UGens that will do this much more efficiently (as they are written in C). One of them is Envelope, another is ADSR. These will work more efficiently, however, they have drawbacks. Namely, the amount of work you have to do to use these UGens doesn't really yield (no pun intended) much more flexibility in particle design. Envelope style makes a huge difference in the spectral characteristics of individual grains.
There is one UGen, however, which I have found to be extremely flexible, efficient, and generally under-used: CurveTable. Attached is a the basis (and some simple tests) for a granular synthesis implementation using CurveTable as an envelope. I find this to be quite elegant and useful. You may too.
CurveTable allows you to specify a curve using coefficients to build segments of the curve and fills a buffer with those curve segments. The segments are specified by three coefficients each, [ time, amplitude, curvature ] and you can have as many segments as you want: [ time, amplitude, curvature, time, amplitude, curvature, time, amplitude, curvature, time, amplitude, curvature... ]
some documentation:
http://chuck.cs.princeton.edu/doc/examples/special/GenX-CurveTable-test.ck
http://www.music.columbia.edu/cmc/Rtcmix/docs/scorefile/maketable.html#curve
Anyway, take a look at the attached code and run it / play with it a little bit. I find this to be a much more efficient and flexible way to envelope grains in Chuck. I find that I can get a lot more bang for my buck performance-wise. In this implementation, Chuck only intervenes once per grain (to initiate it). We get to take advantage of a variable control rate implementation that the Chuck system affords us and we also get to lean on the UGens for the heavy lifting.
That said, I really like the direction you're taking this instrument. Keep it up!
Mike
2010/10/23 Wolfgang Gil
Hello,
I'm working on a granular synthesizer using the language of Chuck (using miniAudicle). I would like to share the code with the desire to receive feedback from you.
Please take a look at it if you like and feel free to modify it, use it, etc. .. I am also looking for an open-source pulse synthesizer and other microsound-based instruments.
Thanks, open to collaborate.
-- Wolfgang Gil http://www.wolfganggil.com
-- Wolfgang Gil http://www.wolfganggil.com
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- http://michaelclemow.com http://semiotech.org
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Wolfgang Gil http://www.wolfganggil.com