--> ap/xxxxx

* __

OS nature. (2007.04.30:1)

from workshop 28th April 2PM. ap/UNIX process: dd, cat, FIFO, pipes for PD, jekyll, i_am, leaks with ap/xxxxx::

Transparency of process. coding at the commandline

0) pure:dyne (customised to include data radio, osctrans/dump and devdisplay)

see: https://devel.goto10.org/puredyne

and for our own module/iso: http://1010.co.uk/tech_notes2.html#4

Basic use (nesting?) and testing. Hardware recognition

Opening the terminal (xterm):

The classic: cat /dev/hda1 > /dev/dsp

and cat /dev/dsp

and use of devdisplay.

cat whatever | devdisplay

1) UNIX and commandline use - using the terminal - finding one's way around:

the shell: BASH, zsh - terminal/shell/commandline - history, completion, Ctrl-C

kernel and user-space (OS and hardware)

files and processes - exposure

documentation: man, --usage

filesystem (ls, ls -R, cd)

init and processes - ps, pstree, proc filesystem, file handlers, top, kill, killall, PIDs

devices as files - read and write (ls -laR /dev) eg. /dev/dsp /dev/urandom



2) Pipes and redirection. devices. /dev/dsp. /dev/urandom - piping to and from


> |

cat /dev/dsp > recorder

cat recorder > /dev/dsp

more advanced:

tee:  cat /dev/dsp | tee /dev/dsp > /dev/tty
listenpipe: http://www.vanheusden.com/listenpipe/

3) basic commands - tac:

tac - concatenate and print files in reverse

dd - dd if=source of=dest

at - echo "mail -s 'go directly to jail' m@1010.com < /dev/null" | at 15:25 (not in pure:dyne mail/at)

yes - rhythmic

split and csplit




3.5) ap0202 and pipes

cells --usage

cell -m10000 -f / -o /dev/dsp -c piper

(also how to use to output to terminal:

cells -m1000 -i /dev/urandom -o /dev/tty


xterm -e sh -c "/usr/bin/cells -m 10000 -f -o /dev/tty -s > /dev/null" )

4) xxxxx commandline tools: jekyll, i_am, devdisplay, osctrans, oscdump

jekyll: cat whatever | jekyll step samplesize > /dev/dsp

i_am: cat whatever | i_am no_of_neurons inputs outputs > /dev/dsp

OSC, osctrans and oscdump: the entry into networking

osctrans: pipe to OSC (hardwired to /test namespace):: example usage

cat whatever | osctrans 9999 (addr, port) and will send piped data as 8 bit values.

oscdump: pipes from OSC (no namespace):: example usage

oscdump 5252 > ~/pdfifo

5) promiscuOS introduction: a leaking OS

6) networking - (wireless - iwconfig, ifconfig, ports, UDP/TCP, netcat (nc) examples:


chat (TCP):

nc -l -p 3333

nc 3333

pipe over network:

nc -l -p 3333 > /dev/dsp

cat /dev/dsp > nc 3333

or - for remote execution:

nc -l -p 3333 | zsh

7) interface to PD - piperead~/write externals. netcat, OSC

mkfifo first


open /blah/blah <1< and <0< for start and stop

piperead~ num_of channels

see documentation patch: pipeio~.pd (though currently crashed pure:dyne pd)

Netsend and netreceive objects (pdsend executable also):

<netreceive port UDP/TCP (1 or 0)<

This input can be any stream of Pd messages separated by semicolons.

use:  nc 9999

OSC examples: 

<dumpOSC port<

<OSCroute /test<

and partner sendOSC with connect IP PORT and send messages - see plenum examples

8) networked play

Further possibilities: shell scripting, Chicken Scheme, C code - forking and ptrace, GNU Emacs, sox

pipes and pipes... (2007.01.22:2 pipes#1 research#3 workshop_notes#1)

For UNIX pipes and processes workshop tbc. - see also unix

1] Listenpipe: http://www.vanheusden.com/listenpipe/ - lp01

2] Pd. piperead~ and pipewrite~ externals and our sample patches for plenum

3] pipes in ap0202 software

4] pipes in our own commandline software: OSC, neuronal, devdisplay, jekyll software

5] pipes in promiscuOS: promiscuOS_notes#7 (pipe.c in the kernel)

6] pluggability: plugging

7] pipes and process: OS -

pipes p.776+ (Understanding Linux Kernel) also the pipe code we found: lp-01 which copies file descriptors (pipe is only accessible to parent process). FIFO allows for arbitrary piping and is associated with a kernel buffer.

8] proposed leaking pipes and pools


lsof | grep FIFO

10] (netcat) and for workshop:

1) basic understanding GNU/Linux and networking:

d) cat, dd and ls

i) what are pipes and how they work

j) what is a FIFO and how we can use named pipes

3) audio on Linux

a) what is a device?

b) what is /dev/dsp and how we can input and output on the command line

c) how we can use stuff like cat with /dev/dsp

d) what is sample rate. 8 bit/16 bit audio

3) netcat and pd

a) is basically networked cat but need to understand ports

b) maybe also pd in relation to netcat and pipes

c) how we can interface ap to pd

see also unix