-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_pd_usb.sh
22 lines (20 loc) · 1 KB
/
start_pd_usb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# starts Pd synthesis process using the USB-MIDI interface.
#pd -nogui -alsamidi -audiooutdev 1 -midiindev 20 -midioutdev 20 -noadc -open synth/lever_synthesis_midi.pd &
# Driver: sudo modprobe snd_seq_midi
# view midi devices: aseqdump -l
# view connections: aconnect -l
# https://github.com/arduino-libraries/MIDIUSB
# https://github.com/BlokasLabs/USBMIDI
# https://llllllll.co/t/raspberry-pi-3-optimization-for-audio-pure-data/11222
# pkill -u pi pd
pd -nogui -alsamidi -audiooutdev 1 -audiobuf 50 -mididev 128 -noadc -nrt -verbose -open synth/lever_synthesis_midi.pd &
sleep 4
aconnect SparkFun\ Pro\ Micro:0:1 Pure\ Data:0
aconnect Pure\ Data:1 SparkFun\ Pro\ Micro:0:0
# https://alsa.opensrc.org/AlsaMidiOverview
# python3 predictive_music_model.py -d=2 --modelfile="models/musicMDRNN-dim2-layers2-units32-mixtures5-scale10-human.h5" --modelsize xs --call --log --verbose
# restart alsa output
# alsa xrun recovery apparently failed
# pd: pcm.c:1168: snd_pcm_prepare: Assertion `pcm' failed.
# Pd: signal 6