[chuck-users] "playing" chuck
Drew Jaworski
studio271 at gmail.com
Wed May 30 13:09:06 EDT 2007
Josh Lawrence wrote:
> On 5/30/07, Stephen Sinclair <radarsat1 at gmail.com> wrote:
>
>> i'm personally more into beat-oriented electronic music, so i imagine
>> perhaps having a bank of samples at my disposal for messing with might
>> be helpful.
>>
>
> glad you brought that up - I was going to scour the manual for this,
> but since you mentioned it...does chuck have any sort of mechanism for
> dealing with .wav files? specifically, playing samples? just point
> me in the right direction...
>
>
Definitely check out the examples/hanoi++.ck example. It really helped
me figure out how to deal with .wav files in the ChucK manner. My
complaint is that it took a while to figure out what exactly was going
on, since it isn't straightforward like "load a file, tell it to play";
it's "load a stream, constantly play samples until the stream ends, and
set the position to 0 to restart it".
Basically, my tactic when using a bank of samples is to now load them,
set them all to the end of the files (so they don't play immediately
upon loading), and when I want them to play, I just set the position to
0. I guess it does offer more flexibility in certain circumstances, but
why isn't there (or /is/ there?) a more straightforward way to play a
.wav file like a simple sampler (load, play)?
Sorry for the jumbled thoughts, but I just woke up. :D
-Drew
More information about the chuck-users
mailing list