summaryrefslogtreecommitdiff
path: root/start_chuck
blob: 649fc9d5098907736c86b335b4f9a43a4f2dbc9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

set -e

colorize()
{
	while read line; do
		echo -e "\e[01;31m$line\e[0m"
	done
}

test -n "$CHUCK" || CHUCK=chuck

# kill possibly running stuff
pkill alsa_in || true
pkill alsa_out || true
pkill jack.scope || true

# USB sound card JACK ports
alsa_in -d hw:default -c 1 -q 1 -p 2048 >/dev/null &
alsa_out -d hw:default -c 2 -q 1 -p 2048 >/dev/null &

# Jack Oscilloscope (Bus.oscope[] in ChucK)
# NOTE: frame size given here limits the frame size that can be set later on
# currently the MIDI slider can set from 512 to (512::samp + 2::second)/samp
jack.scope -n 3 -w 512 -b 96512 >/dev/null &

# ChucK server
# NOTE: Last three output ports are for jack.scope
$CHUCK $* \
      --srate:44100 --in:3 --out:7 \
      --chugin-path:chugins \
      --loop lib.ck \
      2> >(colorize)