#!/bin/bash
. $(dirname $0)/pd.defs

# PD="$GDB $PD"

SR="-r 48000"
AUDIO_JACK="-jack -inchannels 2 -outchannels 2"

# Use aconnect
MIDI="-alsamidi -mididev 1"
FONT="-font-face terminus"

# If jack is running then use it, else use alsa.
if pgrep jackd; then
    echo using JACK >&2
    exec $PD $SR $AUDIO_JACK $MIDI $FONT "$@"
else
    echo Jack not running
    exit 1
fi

