Hi everybody ,im new with chuck ive downloaded chuck and i was playing with it. I was wondering is it possible to run a command directly in the shell instead of saving the code in a .ck file and execute it ? are there any tutorial or examples of chuck for live coding out there? thanks R.
Yes,
see here:
http://wiki.cs.princeton.edu/index.php/ChucK/Dev/Shell
Mac and Linux try:
%> chuck --shell
in a terminal.
No completion or history though so get ready to type.
Hope that helps.
Later,
Kurt
On Tue, Jan 4, 2011 at 3:57 AM, ronni montoya
Hi everybody ,im new with chuck ive downloaded chuck and i was playing with it. I was wondering is it possible to run a command directly in the shell instead of saving the code in a .ck file and execute it ?
are there any tutorial or examples of chuck for live coding out there?
thanks
R. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- -------------------------------------------------- www.kurtkotheimer.com --------------------------------------------------
On Tue, Jan 4, 2011 at 9:34 AM, kurt
Yes,
see here: http://wiki.cs.princeton.edu/index.php/ChucK/Dev/Shell
Mac and Linux try: %> chuck --shell in a terminal.
No completion or history though so get ready to type.
rlwrap -r chuck --shell Much better. A proper completion file for rlwrap would probably help though. Steve
I think what Ronni meant was that he's looking for a ChucK
read-eval-print-loop, like python, irb, or even "php -a" (and of course the
Lisp REPL). That way you could do something like start out by creating a
UGen and issue a command to alter its properties at the command line.
Forgive me if I'm mistaken, but I think the ChucK compilation cycle prevents
such a thing from existing on a language level, and the lack of an eval
statement would make it impossible to allow you to execute arbitrary
statements within a running shred.
Can a ChucK script be written to take command-line arguments or read/write
text to a file? You could potentially write ChucK scripts to take
command-line arguments that modify static data that is being read from in a
running shred.
On Tue, Jan 4, 2011 at 1:08 PM, Stephen Sinclair
On Tue, Jan 4, 2011 at 9:34 AM, kurt
wrote: Yes,
see here: http://wiki.cs.princeton.edu/index.php/ChucK/Dev/Shell
Mac and Linux try: %> chuck --shell in a terminal.
No completion or history though so get ready to type.
rlwrap -r chuck --shell
Much better. A proper completion file for rlwrap would probably help though.
Steve _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
2011/1/4 Jordan Orelli
I think what Ronni meant was that he's looking for a ChucK read-eval-print-loop, like python, irb, or even "php -a" (and of course the Lisp REPL). That way you could do something like start out by creating a UGen and issue a command to alter its properties at the command line. Forgive me if I'm mistaken, but I think the ChucK compilation cycle prevents such a thing from existing on a language level, and the lack of an eval statement would make it impossible to allow you to execute arbitrary statements within a running shred.
The closest you get from the shell is that you can put arbitrary ChucK code between {} brackets and it will spork it. That's not bad, but I know what you mean, it's not exactly the same as a REPL.
Can a ChucK script be written to take command-line arguments or read/write text to a file? You could potentially write ChucK scripts to take command-line arguments that modify static data that is being read from in a running shred.
I believe this is possible, but haven't used it that way myself. maybe Kassen knows better how to do it. Steve
Big thanks to Steve! Fans of ChucK --shell check out rlwrap.
try:
rlwrap -r -f complete.txt chuck --shell
with this sample completion file:
Gain Noise Impulse Step Phasor SinOsc PulseOsc TriOsc SqrOsc SawOsc
Halfrec Fullrect ZeroX Delayp SndBuf Pan2 GenX LiSa WarpTable
CurveTable Gen5 Gen7 Gen9 Gen10 Gen17
BandedWG Blowbotl BlowHole Bowed Brass Clarinet Flute Mandolin
ModalBar Moog Saxofony Shakers Sitar StifKarp VoicForm FM BeeThree
FMVoices HevyMetl PercFlut Rhodey TubeBell Wurley Delay DelayA DelayL
Echo Envelope ADSR BiQuad Filter FilterBasic OnePole TwoPole OneZero
TwoZero PoleZero LPF HPF BPF BRF Dyno JCRev NRev PRCRev ResonZ Chorus
Modulate PitShift SubNoise WvIn WvOut WaveLoop Blit BlitSaw BlitSquare
UAna UAnaBlob Windowing FFT IFFT DCT IDCT Centroid Flux RMS RollOff
true false
me machine
extends
dac adc blackhole
NetIn NetOut
MidiIn MidiOut MidiMsg OSC_Recv OSC_Addr OSC_Send
Later.
On Tue, Jan 4, 2011 at 1:08 PM, Stephen Sinclair
On Tue, Jan 4, 2011 at 9:34 AM, kurt
wrote: Yes,
see here: http://wiki.cs.princeton.edu/index.php/ChucK/Dev/Shell
Mac and Linux try: %> chuck --shell in a terminal.
No completion or history though so get ready to type.
rlwrap -r chuck --shell
Much better. A proper completion file for rlwrap would probably help though.
Steve _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- -------------------------------------------------- www.kurtkotheimer.com --------------------------------------------------
participants (4)
-
Jordan Orelli
-
kurt
-
ronni montoya
-
Stephen Sinclair