[chuck-users] system calls

Graham Percival gpermus at gmail.com
Thu Oct 6 22:34:00 EDT 2005


Thanks, it was even easier than I thought.  In case anybody is 
searching for
this in the mailist archives, here's the solution:

-----
// lilypond preamble
std.system("echo { > foo.ly");

// actual music
//std.system("echo c'4 d' e' fis'8 e' >> foo.ly");
std.system("echo c\'4 d\' e\' fis\'8 e\' >> foo.ly");

// lilypond postamble
std.system("echo } >> foo.ly");

std.system("lilypond foo.ly");
std.system("open foo.pdf");
----

I'm going to wait until chuck has better string handling before
doing more -- I'd really like to have string appending, for example.

"echo " + notes + " >> foo.ly" => message;
std.system(message);

But I know that this is on the feature list.  :)

Cheers,
- Graham



More information about the chuck-users mailing list