writing to fifo from chuck

Something I've been doing from pd: writing a line (or more) of text to a fifo and letting csound read that in as score lines. Trying the same from chuck -- I find that I can write text to a normal file. When I send the same text to a fifo, nothing happens. If I don't close the fifo chuck merely freezes; if I do close it at the end of each line, chuck continues to receive midi notes but csound doesn't get anything from the other end. Do I need to open the fifo in 'WRITE_ONLY mode"? Will try now. Other thoughts?

Basically, to use OSC protocol I end up needing a finicky listening routine
in the csound program, with all sorts of complications about starting &
stopping notes from the messages... while the -L command line option lets
me feed lines directly through the operating system into the score, with
csound handling the subsequent timing automatically. So it depends what you
mean by 'easier.'
Chuck does seems like a pretty heavy-duty program to use as a midi-timer;
last night I worked out a short python script that seems to do the job; but
chuck -- if it had the right file-handling capabilities -- is more
specifically designed for coordinating a musical process, and might work
better. I dunno.
On Wed, Sep 23, 2015 at 11:13 PM, Casper Schipper
wrote:

For csound Chuck communication, I have built a csound chugin. Perhaps you
could try this out? https://github.com/PaulBatchelor/ChuckSound
On Sep 24, 2015 05:30, "Forrest Curo"

Hi Forrest,
If you're only using one fifo and you're not using chuck's stdout for other
purposes, you can redirect it to the fifo and communicate that way, e.g.
chuck file.ck > myfifo.fifo
ChucK's diagnostics go to stderr, as does <<< >>> printing, so only stuff
you write to chout will go to the fifo.
spencer
On Thu, Sep 24, 2015 at 5:29 AM, Forrest Curo
-- Spencer Salazar Doctoral Candidate Center for Computer Research in Music and Acoustics Stanford University spencer@ccrma.stanford.edu +1 831.277.4654 https://ccrma.stanford.edu/~spencer/

"chuck file.ck > myfifo.fifo " ? Okay, I can try that when I get home; thanks! {Does this represent an awful waste of sound-processing resources? -- or a reasonable combination of csound rendering methods with chuck straightforward programming syntax?] On Thu, Sep 24, 2015 at 11:15 AM, Spencer Salazar < spencer@ccrma.stanford.edu> wrote:

Oops, that '1' at the start is nothing but a problem, because the first
score line then starts with it. [Supposed to be there in the example, but
not for my usage.]
---------
Main glitch now: Chuck starts with an error message because csound is
trying to use the audio output. Csound does play the two notes -- but only
after chuck exits. Csound has received them before this -- and sends them
to dac; but they play simultaneously later, when chuck lets go of the
audio...
What to do?
On Thu, Sep 24, 2015 at 3:40 PM, Forrest Curo

Sorry, this last was not a chuck problem
-- something to do with closing the fifo on the writing end before it can
be read.
[Using a python script to feed the lines via " > testfif " , csound -L
testfif still waits until the script exits to play -- although now the
timing between notes is preserves.]
---------------
Um, re ChuckSound -- I still need a clue re how to add a chugin... ?!
On Thu, Sep 24, 2015 at 5:39 PM, Forrest Curo

Hey Forrest,
All the make commands should be run from the top level directory.
You'll also need to need to have Csound installed, preferably compiled from
source to get the Csound API in the right places.
Email me off-list if you need more help.
-P
On Fri, Sep 25, 2015 at 9:05 AM, Forrest Curo
participants (4)
-
Casper Schipper
-
Forrest Curo
-
Paul Batchelor
-
Spencer Salazar