[PD] Few steps further on analog synth emulation on RPi

Miller Puckette msp at ucsd.edu
Tue Sep 18 19:08:47 CEST 2012


The only "recent" (1/2 year old I think) change that affects the Pi
is that Pd no longer checks setuid before attempting to promote its
priority to "realtime" so that you no longer have to make it setuid
to get that to work.

I've also begun a round of tweaking audio and MIDI drivers (which seem
constantly to need tinkering with).  Only difference this might make on the
Pi is that you can now try to open audio in on a USB device and use HDMI
or analog audio out (it never worked before to straddle 2 ALSA devices like
that and arguably it still doesn't work properly :)

Miller

On Tue, Sep 18, 2012 at 10:22:18AM +0200, Pierre Massat wrote:
> Has he started tweaking Pd yet?? I thought he was only working on the
> firmware (or something) of the Pi to improve audio output.
> 
> 2012/9/18 Antoine Villeret <antoine.villeret at gmail.com>
> 
> > to take benefits of all the recents changes miller made to tweak pd for RPi
> > i don't know another way to do that
> > but any suggestion would be appreciated...
> >
> > --
> > do it yourself
> > http://antoine.villeret.free.fr
> > http://drii.ensad.fr
> > --
> > Google lit ce mail...
> > si vous refusez cela, utilisez l'adresse antoine.villeret [at] free.frpour me contacter
> >
> >
> >
> >
> > 2012/9/18 Pierre Massat <pimassat at gmail.com>
> >
> >> Why do you need to compile it?..
> >>
> >>
> >>
> >> 2012/9/17 Cyrille Henry <ch at chnry.net>
> >>
> >>> hello,
> >>> yes, you are right, there is a typo.
> >>> it's
> >>> git clone git://pure-data.git.**sourceforge.net/gitroot/pure-**
> >>> data/pure-data<http://pure-data.git.sourceforge.net/gitroot/pure-data/pure-data>
> >>> (or git clone git://pure-data.git.**sourceforge.net/gitroot/pure-**
> >>> data/pure-data<http://pure-data.git.sourceforge.net/gitroot/pure-data/pure-data>pure-data)
> >>>
> >>>
> >>> try
> >>> sudo apt-get install autoconf
> >>>
> >>> thanks for the feedback, we will correct the documentation.
> >>>
> >>> cheers
> >>> c
> >>>
> >>>
> >>>
> >>> Le 17/09/2012 20:44, m.e.grimm a écrit :
> >>>
> >>>  hey,
> >>>>
> >>>> so you know
> >>>>
> >>>> with this i get:
> >>>>
> >>>> pi at raspberrypi ~/Desktop/pure-data/src $ git clone
> >>>> git://pure-data.git.**sourceforge.net/gitroot/pure-**data/<http://pure-data.git.sourceforge.net/gitroot/pure-data/>pure-data
> >>>> Cloning into 'pure-data'...
> >>>> fatal: The remote end hung up unexpectedly
> >>>>
> >>>> so i have to do:
> >>>>
> >>>> git clone git://pure-data.git.**sourceforge.net/gitroot/pure-**
> >>>> data/pure-data<http://pure-data.git.sourceforge.net/gitroot/pure-data/pure-data>
> >>>> (no space)
> >>>>
> >>>> but then i get:
> >>>>
> >>>> pi at raspberrypi ~/Desktop/pure-data/src $ autoconf-bash: autoconf:
> >>>> command not found
> >>>>
> >>>> where is autoconf?
> >>>>
> >>>> m
> >>>>
> >>>> On Sun, Sep 16, 2012 at 6:38 PM, Antoine Villeret
> >>>> <antoine.villeret at gmail.com> wrote:
> >>>>
> >>>>> 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 :
> >>>>> http://www.raspbian.org/
> >>>>> http://elinux.org/RPi_Easy_SD_**Card_Setup<http://elinux.org/RPi_Easy_SD_Card_Setup>
> >>>>>
> >>>>> 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
> >>>>> - update
> >>>>>
> >>>>> sudo apt-get update / upgrade
> >>>>> sudo reboot
> >>>>> log in and start graphical interface :
> >>>>> startx
> >>>>>
> >>>>> 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/<http://pure-data.git.sourceforge.net/gitroot/pure-data/>pure-data
> >>>>> cd pure-data/src
> >>>>> autoconf
> >>>>> ./configure CFLAGS="-mfpu=vfp -mfloat-abi=hard"
> >>>>> make
> >>>>> 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
> >>>>> add
> >>>>> * - 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.
> >>>>>
> >>>>> 4. test
> >>>>>
> >>>>> download analog synth emulation patch by Cyrille Henry here :
> >>>>> svn checkout
> >>>>> https://pure-data.svn.**sourceforge.net/svnroot/pure-**
> >>>>> data/trunk/externals/nusmuk/**nusmuk-audio/<https://pure-data.svn.sourceforge.net/svnroot/pure-data/trunk/externals/nusmuk/nusmuk-audio/>
> >>>>> ~/nusmuk-audio
> >>>>> cd ~/nusmuk-audio
> >>>>> make
> >>>>> cd examples
> >>>>> pd analog_synth_emulation.pd
> >>>>>
> >>>>> 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.
> >>>>> svn checkout
> >>>>> https://pure-data.svn.**sourceforge.net/svnroot/pure-**
> >>>>> data/trunk/externals/hid/<https://pure-data.svn.sourceforge.net/svnroot/pure-data/trunk/externals/hid/>
> >>>>> ~/hid
> >>>>> cd hid/
> >>>>> make
> >>>>> pd hid-help.pd
> >>>>>
> >>>>> The Byron interface (http://www.1010.co.uk/org/**byron.html<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.
> >>>>>
> >>>>> 7. Autologin
> >>>>>
> >>>>> To enable auto login, we follow this :
> >>>>> http://elinux.org/RPi_Debian_**Auto_Login<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
> >>>>> ~/nusmuk-audio/examples/**analog_synth_emulation.pd
> >>>>>
> >>>>> ______________________________**_________________
> >>>>> Pd-list at iem.at mailing list
> >>>>> UNSUBSCRIBE and account-management ->
> >>>>> http://lists.puredata.info/**listinfo/pd-list<http://lists.puredata.info/listinfo/pd-list>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>> ______________________________**_________________
> >>> Pd-list at iem.at mailing list
> >>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/**
> >>> listinfo/pd-list <http://lists.puredata.info/listinfo/pd-list>
> >>>
> >>
> >>
> >> _______________________________________________
> >> Pd-list at iem.at mailing list
> >> UNSUBSCRIBE and account-management ->
> >> http://lists.puredata.info/listinfo/pd-list
> >>
> >>
> >

> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list




More information about the Pd-list mailing list