[chuck-users] writing to fifo from chuck

Forrest Curo treegestalt at gmail.com
Thu Sep 24 18:40:09 EDT 2015


Okay, so inside 'file.ck'
a line like:

chout <= 1 <= bar <= "i3 0 0.5 60 5 5 \ni3 1 0.5 60 5 7 \n" ;

sends two notes through the fifo.
Okay, I'm not entirely sure about usage for 'chout' -- but it works!

On Thu, Sep 24, 2015 at 12:25 PM, Forrest Curo <treegestalt at gmail.com>
wrote:

> "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 at ccrma.stanford.edu> wrote:
>
>> 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 <treegestalt at gmail.com>
>> wrote:
>>
>>> 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 <
>>> casper.schipper at gmail.com> wrote:
>>>
>>>> Hi Forrest,
>>>>
>>>> Maybe a naive question: but is there any reason you don’t want to use
>>>> OSC protocol for communicating between ChucK and CSound ? I think that’s
>>>> the easier route.
>>>>
>>>> Best,
>>>> Casper
>>>>
>>>>
>>>>
>>>> > On Sep 24, 2015, at 02:25, Forrest Curo <treegestalt at gmail.com>
>>>> wrote:
>>>> >
>>>> > 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?
>>>> > _______________________________________________
>>>> > chuck-users mailing list
>>>> > chuck-users at lists.cs.princeton.edu
>>>> > https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>>>
>>>> _______________________________________________
>>>> chuck-users mailing list
>>>> chuck-users at lists.cs.princeton.edu
>>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> chuck-users mailing list
>>> chuck-users at lists.cs.princeton.edu
>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>>
>>>
>>
>>
>> --
>> Spencer Salazar
>> Doctoral Candidate
>> Center for Computer Research in Music and Acoustics
>> Stanford University
>>
>> spencer at ccrma.stanford.edu
>> +1 831.277.4654
>> https://ccrma.stanford.edu/~spencer/
>>
>>
>> _______________________________________________
>> 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/20150924/a1305b5c/attachment.html>


More information about the chuck-users mailing list