Try to move/delete the file /var/lib/dpkg/info/fake-hwclock.listJulianBrooks wrote:Hi AutoStatic,
This and the linuxaudio pages are super-useful, many thanks.
When I run this (after adding the repository)
sudo apt-get --no-install-recommends install jackd2$ sudo apt-get --no-install-recommends install jackd2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libjack-jackd2-0 libjack-jackd2-dev python-dbus python-dbus-dev
Suggested packages:
jack-tools meterbridge python-dbus-doc python-dbus-dbg
Recommended packages:
qjackctl python-gi python-gobject-2 python-qt4-dbus
The following NEW packages will be installed:
jackd2 python-dbus python-dbus-dev
The following packages will be upgraded:
libjack-jackd2-0 libjack-jackd2-dev
2 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,242 kB of archives.
After this operation, 2,655 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
files list file for package `fake-hwclock' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)
Stuck now:( Any ideas?
Cheers,
Julian
I get:
Re: RPi and real-time, low-latency audio
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Hi azeam,
Worked a treat.
Many thanks,
Julian
Worked a treat.
Many thanks,
Julian
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Whoo - Pd & jack2 on the Pi.
Fantastic!!
Fantastic!!
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
Have fun!JulianBrooks wrote:Whoo - Pd & jack2 on the Pi.
Fantastic!!
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Hi again,
Can I ask a possibly dumb question please:
"Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi"
Does this apply when using ssh and vnc?
Cheers,
Julian
Can I ask a possibly dumb question please:
"Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi"
Does this apply when using ssh and vnc?
Cheers,
Julian
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
SSH: no
VNC: yes because you're remotely viewing a running graphical session. And that session most probably uses D-Bus, gvfsd etc. so shutting those down can cause weird issues in the remote graphical session.
VNC: yes because you're remotely viewing a running graphical session. And that session most probably uses D-Bus, gvfsd etc. so shutting those down can cause weird issues in the remote graphical session.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Good to know.
Many thanks,
Julian
Many thanks,
Julian
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
Re: RPi and real-time, low-latency audio
Good stuff! Eight milliseconds isn't too shabby at all and the spring reverb in particular caught my ear.AutoStatic wrote:Using a Raspberry Pi as a virtual guitar amplifier: MIDI and effects
Is the audio interface handling the MIDI in?
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
Hi gritz, no the MIDI is handled by a MIDI-USB cable. The audio interface does have MIDI in and out but I can't use them as I have to switch the interface to a mode where those are disabled in order to make the interface work well with the RPi.gritz wrote:Good stuff! Eight milliseconds isn't too shabby at all and the spring reverb in particular caught my ear.
Is the audio interface handling the MIDI in?
The spring reverb is a simple effect based on Freeverb, so nothing really fancy. guitarix also comes with a stereo reverb effect based on zita-rev1 and that's a different beast, I've used that one in the other video I've posted. When using the stereo reverb I have to raise the number of frames/period though so system latency is higher in that case.
It is also possible to use convolution with IR files which means you could basically emulate any reverb you'd like.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
Re: RPi and real-time, low-latency audio
Thanks for the reply AutoStatic - I really should give guitarix a try, but I'm currently weaning myself back on to pedals and the whole analogue thing! Hmmm, convolution... now where's that "acoustic guitar body" response I have somewhere...
Hats off to you sir, you've been something of a pioneer with getting low latency fx processing squeezed into the Pi. I can imagine that a lot of people will be trying this out.

Hats off to you sir, you've been something of a pioneer with getting low latency fx processing squeezed into the Pi. I can imagine that a lot of people will be trying this out.
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
That's what I prefer too, for me nothing beats a tube amp with some good stompboxesgritz wrote:Thanks for the reply AutoStatic - I really should give guitarix a try, but I'm currently weaning myself back on to pedals and the whole analogue thing!
Never thought of that actually. If it's in a format guitarix can load then it will probably work fine.gritz wrote:Hmmm, convolution... now where's that "acoustic guitar body" response I have somewhere...
Thanks! So far the response has been quite minimal though.gritz wrote:Hats off to you sir, you've been something of a pioneer with getting low latency fx processing squeezed into the Pi. I can imagine that a lot of people will be trying this out.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Hi again,
Another question...
My rpi has only 256mg of ram
"## Remount /dev/shm to prevent memory allocation errors
sudo mount -o remount,size=128M /dev/shm
I don't have that much to spare, can I set it lower somehow/where? Like would jack be happy with only 64M set here?
Cheers,
Julian
Another question...
My rpi has only 256mg of ram
"## Remount /dev/shm to prevent memory allocation errors
sudo mount -o remount,size=128M /dev/shm
I don't have that much to spare, can I set it lower somehow/where? Like would jack be happy with only 64M set here?
Cheers,
Julian
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
You could try without remounting /dev/shm. I've just tested this and JACK (Jack1 to be exact) seems to work just fine. So I'm wondering if this step is mandatory at all.JulianBrooks wrote:Hi again,
Another question...
My rpi has only 256mg of ram
"## Remount /dev/shm to prevent memory allocation errors
sudo mount -o remount,size=128M /dev/shm
I don't have that much to spare, can I set it lower somehow/where? Like would jack be happy with only 64M set here?
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Cool, good to know.
Many thanks.
I've ended up building a no gui install based on the hexxeh image
http://www.raspbian.org/HexxehImages
and tweaks mainly from here
http://blog.extremeshok.com/archives/1081
adding alsa base & utils then jack2 (might remove and add 1 instead) and the systems way happier.
Not added overclocking yet as it felt unstable and mashed a couple of sd cards along the way.
The whole overclocking thing seems to be both a dark art and very subjective (another topic though:).
Cheers,
Julian
Many thanks.
I've ended up building a no gui install based on the hexxeh image
http://www.raspbian.org/HexxehImages
and tweaks mainly from here
http://blog.extremeshok.com/archives/1081
adding alsa base & utils then jack2 (might remove and add 1 instead) and the systems way happier.
Not added overclocking yet as it felt unstable and mashed a couple of sd cards along the way.
The whole overclocking thing seems to be both a dark art and very subjective (another topic though:).
Cheers,
Julian
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
I reckon, that blog mentions quite some things I hadn't thought about, like replacing open-ssh with dropbear. Thanks for posting it! I wouldn't raise the swappines though, especially when doing audio.JulianBrooks wrote:and tweaks mainly from here
http://blog.extremeshok.com/archives/1081
adding alsa base & utils then jack2 (might remove and add 1 instead) and the systems way happier.
True. If you really don't want too run the risk of corrupting SD cards then you shouldn't use it. But we're hackers who want to get the most out of their RPi rightJulianBrooks wrote:The whole overclocking thing seems to be both a dark art and very subjective (another topic though:).

Edit: using dropbear is not an option as the Raspbian package of dropbear does not support PAM.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Thanks for the swappiness hint (great word swappiness:).
So are we saying that swap and audio is a no-no?
Also I've got dropbear on my minimal image and all seems ok (famous last words).
I've done a quick search of PAM but am not really sure what itdoes and why it makes dropbear a no-go?
The minimal image was put together for a particular audio installation. All the tips and tweaks meant that my patch now runs as-is, whereas before it wouldn't run without some overclocking, which is why I've left it out so far.
Cheers for all the top tips so far,
Julian
So are we saying that swap and audio is a no-no?
Also I've got dropbear on my minimal image and all seems ok (famous last words).
I've done a quick search of PAM but am not really sure what itdoes and why it makes dropbear a no-go?
The minimal image was put together for a particular audio installation. All the tips and tweaks meant that my patch now runs as-is, whereas before it wouldn't run without some overclocking, which is why I've left it out so far.
Cheers for all the top tips so far,
Julian
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
It's not a no-no but best is to keep it as low as possible because you want your system to only swap when it's absolutely necessary as swap is almost always slower than RAM. Also, the default for Raspbian is 1, I'd just keep it that way.JulianBrooks wrote:Thanks for the swappiness hint (great word swappiness:).
So are we saying that swap and audio is a no-no?
PAM=Pluggable Authentication Modules, bit hard to give a short description. In the case of JACK, by default JACK uses realtime priorities and a normal user can't set realtime prios. With the help of PAM this becomes possible. When using Dropbear you can't set realtime prios so JACK won't run in realtime mode. Which is imo a must on the RPi.JulianBrooks wrote:Also I've got dropbear on my minimal image and all seems ok (famous last words).
I've done a quick search of PAM but am not really sure what itdoes and why it makes dropbear a no-go?
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Aaah - yes gotcha.
That's why I couldn't RT!!
Nice one,
Julian
That's why I couldn't RT!!
Nice one,
Julian
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Been pondering the RT/dropbear/available RAM thing for a few days and I hope you don't mind me asking another question:
As this particular RPi is for an installation that isn't accessible via internet, has no other usage and I'm the only user - can I still get RT if I'm root? Yes I know it's very frowned upon etc etc but I'm a big boy and can take responsibility for mashing my system if needed (plus of course I'm backed-up to the hilt).
Cheers,
Julian
As this particular RPi is for an installation that isn't accessible via internet, has no other usage and I'm the only user - can I still get RT if I'm root? Yes I know it's very frowned upon etc etc but I'm a big boy and can take responsibility for mashing my system if needed (plus of course I'm backed-up to the hilt).
Cheers,
Julian
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
Yes you can.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
http://martinezjavier.wordpress.com/201 ... sa-driver/
Patch has been merged in the RPi kernel sources. This means JACK should now also work directly with the onboard audio as the ALSA driver now has MMAP support.
Patch has been merged in the RPi kernel sources. This means JACK should now also work directly with the onboard audio as the ALSA driver now has MMAP support.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6335
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: RPi and real-time, low-latency audio
The current /etc/asound.conf (which enabled mmap emulation) is no longer required, and may cause problems.AutoStatic wrote:Patch has been merged in the RPi kernel sources. This means JACK should now also work directly with the onboard audio as the ALSA driver now has MMAP support.
So, if you have rpi-updated, and have audio problems then:
Code: Select all
sudo rm /etc/asound.conf
- AutoStatic
- Posts: 326
- Joined: Tue Jan 01, 2013 10:27 pm
Re: RPi and real-time, low-latency audio
Thanks for the heads up dom!
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/
-
- Posts: 35
- Joined: Wed Mar 20, 2013 1:08 pm
Re: RPi and real-time, low-latency audio
Hey all,
So ...
Overclocking.
There is way too much conflicting info out and about regarding this and certainly nothing I've come across specific to audio (apart from here and the linuxaudio page).
My feeling is that there's a massive difference between people who are occasionally scaling upwards into overclocking and RPi's setup for audio usage where we want to be running flat-out all the time.
Would anyone care to share their overclocking settings for experimentation (obviously at the users own risk)? Perhaps the whole config.txt would be super-helpful, certainly for me as the minimal image I've built my RPi on has nothing at all in that file atm.
Cheers,
Julian
P.S. - I'll be backing up before I start.
P.P.S. - Thanks for the alsa tip.
So ...
Overclocking.
There is way too much conflicting info out and about regarding this and certainly nothing I've come across specific to audio (apart from here and the linuxaudio page).
My feeling is that there's a massive difference between people who are occasionally scaling upwards into overclocking and RPi's setup for audio usage where we want to be running flat-out all the time.
Would anyone care to share their overclocking settings for experimentation (obviously at the users own risk)? Perhaps the whole config.txt would be super-helpful, certainly for me as the minimal image I've built my RPi on has nothing at all in that file atm.
Cheers,
Julian
P.S. - I'll be backing up before I start.
P.P.S. - Thanks for the alsa tip.