[chuck-users] ADSR modulation question
Adam Tindale
adamtindale at hotmail.com
Thu Jun 29 14:02:34 EDT 2006
Remember that when you spork a shred that operation returns a Shred
and you can get the int of that with Shred.id(). You can store that
int in an intermediate variable that you can access with a name. You
can't access that name directly from the command line but you could
store those names in an object and have a little script that you can
launch that polls your objects (public ones that can be seen outside
of the scope of their shred) and prints out the shred ids you are
looking for. Not totally elegant but effective.
For your other problem with modularity of code I solve that with the
object structure. You can make a synth public object and then load it
into a running VM. Then you can load separate score files that have
your synth object in there. I regularly do things like this:
%>chuck mysynth.ck score1.ck
%> score2.ck (where score 2 also uses the mysynth object in mysynth.ck)
Also, with ADSR can you poll its output? I thought that would have to
do something like this:
step s => ADSR env => blackhole;
1. => s.value;
Doesn't ADSR multiply its input with its current value?
Best of luck. Thanks for the multitude of questions.
--art
On 29-Jun-06, at 10:07 AM, Atte André Jensen wrote:
> Ge Wang wrote:
>
>> So far it's possible with the class system, but parts are
>> cumbersome (lack of #include or auto-class discovery, classpath,
>> namespaces). But we are working on it - it's essential to provide a
>> flexible framework to built abstractions and libraries for reuse.
>
> That's good to know!
>
> What do you think of my suggestion about reuing shred-ids and/or
> reshufling id's OTF? I mean, if I spork a shred on every note I quite
> fast end up with id's in the 1000 or even 10000 range, which are
> harder
> to replace/stop OTF. I would imagine it's non-trivial to implement,
> though...
>
> If we could kill or replace shreds by name it would be possible to
> live
> with huge shred ids, and I believe this is also on the TODO...
>
> --
> peace, love & harmony
> Atte
>
> http://www.atte.dk | quartet: http://www.anagrammer.dk
> http://www.atte.dk/gps | compositions: http://www.atte.dk/
> compositions
> _______________________________________________
> 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