-
Notifications
You must be signed in to change notification settings - Fork 29
software, pd
- on the pd end of things, we just need to put together the elements from before, and make things start up on start-up. in terms of i/o we need either [netreceive] and [route] or [terminal_tedium_adc] for the ADC, [tedium_input] for the gates and switches; and [tedium_output] and [dac~] for the outputs. a (the most) basic patch (in this case using the adc external rather than [netreceive]) would look like so -- not really doing anything much at all:
- the [loadbang] object on the top left puts out a bang when the patch is loaded and turns on the dsp. a little delay is required, thus [delay 300]. it also turns on the [metro object] for the ADC; you have to call it with sudo because of the GPIO/SPI access:
sudo puredata -nogui -noadc x.pd
or, in case you're using pd-extended,
sudo pd-extended -nogui -noadc x.pd
-
the
-nogui
and-noadc
flags do what they say: we need no graphical user interface and have no audio input. -
finally, we need some kind of start-up script(s), in which we launch pd, adc2FUDI and which takes care of a few other things as well. an example can be found here: https://github.com/mxmxmx/terminal_tedium/blob/master/software/pdpd . it simply calls a patch called pv.pd located in the folder /home/pi/PD/ . adjust the name of the patch to whatever you're using, and/or if using pd-extended. more complex things (like changing patches) is possible of course, but requires some more complex little programs running in the background.
-
put that script in a folder of your choice, say 'PD' (that what the example is using: /home/pi/PD/). make it executable -
sudo chmod 755
. entering/home/pi/PD/pdpd
in the terminal should launch pd. next, we need to edit rc.local so that the script will run automatically at start-up. you can do so withsudo nano /etc/rc.local
. simply add the line/home/pi/PD/pdpd
. reboot. your terminal tedium should be booting up now with both pd/your patch and the ADC running. -
last. optimisations etc. there's lots of room for improvement/experimentation. you might consider using a different distribution, there's realtime kernels or using jack* (not ALSA). you're on your own here though. some simple/basics things can be found in this script: https://github.com/mxmxmx/terminal_tedium/blob/master/software/rt_start (in particular, note the line
echo -n performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
). you can simply add it to rc.local, too, before the pd script (and after chmod 755-ing it). ie:
sudo /home/pi/PD/rt_start
/home/pi/PD/pdpd
- in terms of latency, the best results i got is with something like:
sudo puredata -noadc -nogui -rt -r 44100 -audiobuf 5 [yourpatch].pd
- *: note that jackd won't work with the DAC, as the driver lacks mmap support. it's possible though with some trickery: see here https://github.com/constantin3000/PiCollider