#!/bin/sh

BACKPIPE=backpipe

INFLOW=inflow
OUTFLOW=outflow

PDDSP_PORT=5500
PDGUI_PORT=5600

if [ -e ${BACKPIPE} ]; then :; else
 mknop ${BACKPIPE} p
fi


rm -f ${INFLOW} ${OUTFLOW}

netcat -l -p ${PDDSP_PORT} 0<${BACKPIPE} | tee -a ${INFLOW} | netcat -l -p ${PDGUI_PORT} | tee -a ${OUTFLOW} 1>${BACKPIPE}

#/usr/local/lib/pd/bin/pd-gui 5600
#pd -guiport 5500 

rm -f ${BACKPIPE}
