Help on using processes & pipes.

From: Harvey J. Stein <hjstein_at_math.huji.ac.il>
Date: Sat, 3 Dec 1994 20:31:32 +0200

Does anyone have any notes written up on using processes & pipes?
After everyone pointed out to me that queuing tasks for the future can
be done using the command "after", I managed to code up a tetris game
in STk. It plays pretty well (especially if I increase the number of
cells that STk uses & force gc at opportune times).

Now, I'd like to add sound effects. Currently, I just use the !
command to cat files to /dev/audio in background. This has two
problems. One is that it hits the disk alot (for unknown reasons),
and the other is that if another sound effect comes up before the
first one is done, I get a "device busy" message. What I'd like is to
just be able to queue up sounds in the background (i.e. - without
wasting STk's time much). I suppose I could open a fifo named pipe
(called sound-queue, for example), get a cat sound-queue >/dev/audio
going in background, & when I want to output a sound, just copy the
sound file to sound-queue.

But, this is pretty kludgey, and will still tie up STk while it copies
the sound files to the sound-queue. So, is there a better way to do
this? For example, using the process routines? Anything that's
cleaner and/or ties up STk less would be appreciated. Notes on
the process routines would be appreciated too.

Thanks,

Dr. Harvey J. Stein
Berger Financial Research
hjstein_at_math.huji.ac.il
Received on Sat Dec 03 1994 - 19:33:21 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST