[chuck-users] input | chuck <read_stdin_and_do_stuff>

Andrew C. Smith andrewchristophersmith at gmail.com
Tue Jun 1 21:15:07 EDT 2010


How about having your chuck program just read from a static, public variable (maybe of an array of numbers) and then have another program (called something like addInt.ck) that appends any integer arguments to the end of the array. That way, your python script could just spork "chuck + addInt.ck 60 64 67" and a C major triad (in midi keys) would be appended to the end of your array. The code for addInt.ck would be something like

for (int i; i < argc; i++) {
MyIntArray << argv[i];
}

Would this work for your purposes? You wouldn't have to deal with any timing issues. If you wanted to deal with duration in the python script, you can just use a multidimensional array. Also, this is assuming that you have chuck in --loop mode, which, let's be honest, is the only way to chuck.

Andrew

On Jun 1, 2010, at 8:41 PM, mike clemow wrote:

> Don't forget the idea that you can create sound-emitting responders to OSC messages which can be sent from your python program.  This further renders useless the "strong timing" of chuck, in a way...  but only where control or note events are concerned.  I've had much success with this method.
> 
> mike
> 
> On Tue, Jun 1, 2010 at 6:38 PM, Joe McMahon <mcmahon at ibiblio.org> wrote:
> I can also suggest, since the original program computing the notes is
> in Python, that another approach is to have the Python program
> actually write the whole ChucK program itself, and then execute it.
> 
> If you don't have any real-time control or computing requirements this
> works perfectly.
> _______________________________________________
> chuck-users mailing list
> chuck-users at 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 at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20100601/d3bc6e59/attachment.html>


More information about the chuck-users mailing list