#!/bin/bash
JCTL=/usr/bin/jack_control
A2JMIDID=/usr/bin/a2jmidid
JLOAD=/usr/bin/jack_load
JUNLOAD=/usr/bin/jack_unload
PERIOD=${2:-128}
SLEEP=/bin/sleep
start() {
"$JCTL" ds alsa
"$JCTL" dps device hw:U192k
"$JCTL" dps rate 48000
"$JCTL" dps nperiods 2
"$JCTL" dps period "$PERIOD"
"$JCTL" start
"$SLEEP" 3
"$JLOAD" netmanager -i -c
"$SLEEP" 3
"$A2JMIDID" -e &
}
stop() {
"$JUNLOAD" netmanager
"$SLEEP" 3
killall a2jmidid
"$SLEEP" 3
"$JCTL" stop
}
status() {
"$JCTL" status
}
info() {
"$JCTL" dp
}
case "$1" in
'start') start ;;
'stop') stop ;;
'status') status ;;
'info') info ;;
esac
exit 0
#!/bin/bash
JCTL=/usr/bin/jack_control
MIP="192.168.xxx.xxx"
start() {
"$JCTL" ds net
"$JCTL" dps multicast-ip "$MIP"
"$JCTL" start
}
stop() {
"$JCTL" stop
}
status() {
"$JCTL" status
}
info() {
"$JCTL" dp
}
case "$1" in
'start') start ;;
'stop') stop ;;
'status') status ;;
'info') info ;;
esac
exit $?
The master is configured like a normal setup with the addition of starting the netmanager subsystem
The netmanager has to be started after the jack server is already running. You can enter the command 'jack_load netmanager' on the command line or automate it with qjackctl (see left).
The slave has to be started with the 'net' subsystem.
Command line
sh# jackd -R -S -s -d net -l 2 | logger -t 'jackd' &
-R : enable realtime
-S : enable sync mode
-s : enable soft mode
-l : set the network latency to 1 cycle
QjackCtl
Connecting Pulse Audio to Jack
sh$ pactl load-module module-jack-source
sh$ pactl load-module module-jack-sink
sh$ pacmd set-default-sink jack_out
Virtual Midi Controller (virmidi)
sh# modprobe snd_virmidi snd_index=0 midi_devs=4
#!/bin/bash
/usr/bin/jackd -R -S -s -d net -l 2 | /usr/bin/logger -t 'jackd' &
sleep 3
/usr/bin/a2jmidid | /usr/bin/logger -t 'a2jmidid' &
/usr/bin/pactl load-module module-jack-source
/usr/bin/pactl load-module module-jack-sink
exit 0
http://llg.cubic.org/tools/multimidicast/
sh# wget http://llg.cubic.org/tools/multimidicast/multimidicast-1.3.tar.gz
sh# apt install libasound2 libasound2-dev
sh# tar xvf multimidicast-1.3.tar.gz && cd multimidicast-1.3
sh# make
g++ -Wall -O2 -c -o multimidicast.o multimidicast.cpp
g++ -o multimidicast multimidicast.o -lasound
sh# ./multimidicast -h
multimidicast v1.3 (c) 2005..2011 by Dirk Jagdmann <doj@cubic.org>
options: -i <interface> - use specific network interface
-h - display this text
-q - quiet, don't show MIDI and network events
-b <bytes> - set MIDI buffer size, default: 250000 bytes
libasound2
libasound2-dev
$ ls /proc/asound
card0 card1 cards devices hwdep modules oss PCH pcm seq timers U192k version
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7918000 irq 32
1 [U192k ]: USB-Audio - UMC404HD 192k
BEHRINGER UMC404HD 192k at usb-0000:00:14.0-3, high speed
$ cat /proc/asound/pcm
00-00: ALC269VB Analog : ALC269VB Analog : playback 1 : capture 1
00-03: HDMI 0 : HDMI 0 : playback 1
01-00: USB Audio : USB Audio : playback 1 : capture 1
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: U192k [UMC404HD 192k], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0