Csound Csound-dev Csound-tekno Search About

Re: how to pipe -L events in linux/unix

Date1998-06-16 04:58
FromToby
SubjectRe: how to pipe -L events in linux/unix
I have only read about this sort of thing, but I have
an idea that I think would be PAINLESS!!

Use the unix command 'mkfifo' to establish the pipe first
in the file system.  Then you can 'fopen()' the pipe from C,
and cause Csound to read from the pipe in the 'system() command'.

Sure, it's not pretty, but if all you want is for the thing to
work, then this may be your answer.

Cleaner would be 'popen()' with a fork(), or better yet shmget().
Tougher though.

Toby

	-There otta be a law-

> I know there's a way to do this, and I think it has to do with mkfifo or
> popen or something, but my limited C/unix knowledge is hampering me and
> I can't seem to figure it out from my big fat C book ("A Book on C" by
> Kelley & Pohl).

Date1998-06-16 14:06
Fromjpff@maths.bath.ac.uk
SubjectRe: how to pipe -L events in linux/unix
If you are using a recent version of Csound then you can use -L and a
filename starting with a | to start a process which delivers events.
I realise that is backward to what you asked for, but it might involve
less hassle and latency.

Altrenatively fire up the sub-process for Csound and attach stdin of
the subprocess to some pipe (if you cannot use dup2, socket etc then
look at popen) and you are off.

==John
  Unless I have failed to understand -- not unusual