[PD] Few steps further on analog synth emulation on RPi
antoine.villeret at gmail.com
Mon Sep 17 00:38:01 CEST 2012
hi all, here is an up-to-date tutorial to make an analog synth with a
Raspberry Pi and pd :
1. installing raspbian on a SD card
see instruction :
connect a keyboard, a mouse, an HDMI screen and an ethernet cable with DHCP
(to get internet access) and boot on the SD card to configure the OS :
- expand root
- change keyboard
- change password
- change local (fr utf8)
- change memory split : minimum allocated to video
- enable ssh
- boot : no desktop
sudo apt-get update / upgrade
log in and start graphical interface :
2. installing puredata
sudo apt-get install git tk8.5-dev libasound2-dev subversion
downloading latest pd :
git clone git://pure-data.git.sourceforge.net/gitroot/pure-data/ pure-data
./configure CFLAGS="-mfpu=vfp -mfloat-abi=hard"
sudo make install
It takes around 20min to build, be patient.
you can start pd using the « pd » command
3. optimising the system for pd :
sudo leafpad /etc/security/limits.conf
or try nano if you don’t start an X server
* - rtprio 99
* - memlock 1000000000
start pd and go to media > preference > startup
add the following flag in the startup flag field :
-rt -alsa -noadc -audiobuf 25
then apply and restart pd.
download analog synth emulation patch by Cyrille Henry here :
5. Performance :
The analog output is very poor now. Some (like Miller) are working on
improving it (thanks for their work). The signal to noise ratio is low and
there is also some quantization distorsion.
On the other hand, one can output some audio through HDMI. We use an HDMI
display to convert audio and to send it to good quality loudspeaker. We
later tried a USB soundcard (Edirol UA-1A) which works out-of-the-box.
We tried to reduce latency without hearing click with the Cyrille’s patch,
here are the results :
10 ms latency with USB soundcard
20 ms latency with integrated HDMI audio
We also tried to input audio with USB soundcard but audio is crackly as
soon as input is enable (with output too).
6. Getting data from real world
Most of MIDI-USB interface should work out-of-the-box.
With Edirol UM-1EX we get a MIDI loopback between 30 and 35ms.
HID works great.
The Byron interface (http://www.1010.co.uk/org/byron.html) is one of the
cheapest way to make a CV-to-computer interface.
A TCP loop on a local computer takes less than 1.5 ms.
To enable auto login, we follow this :
http://elinux.org/RPi_Debian_Auto_Login. And to start pd at startup, we
follow the steps on the same page but replace startx by ~/autostart.sh wich
is a script like this :
pd -nogui -audiodev 3 -open
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list