Pulseaudio Crossover Rack - multi-way crossover design & implementation with linux

Check out the new Raspberry Pi:

Buy a Raspberry Pi 4 Model B – Raspberry Pi

Faster quad-core CPU, 1GB, 2GB or 4GB ram, USB3, more power over USB-C instead of microUSB, true Gbit ethernet separate from USB, and fully/backwards compatible with the Hifiberry HATs. Seems decent. Various people comment it's comparable to low spec current PCs. We will have to see, I have one on order (4Gb of course). It's sold out at my vendor, will be a few weeks before I have it.

The Raspbian OS is also updated to the upcoming version of Debian, Buster. As far as I can tell from googling, this includes pulseaudio 12. I have downloaded it, will try it out with my RPI 3. Pi-life is easier with Raspbian instead of Ubuntu, so if it does have PA12 I will be leaving Ubuntu server with Lubuntu desktop again.
 
The new Raspbian based on Debian Buster does indeed have Pulseaudio 12. Pip seems broken though. I found and installed Zodb, but am having trouble finding a workaround for pulsectl right now.

Edit: I installed the T5 Pulseaudio Parametric Equalizer. Starting that, pip showed up and offered to install pulsectl. It did and then PA Parametric EQ started up. After closing that, I tried starting up Pulseaudio Crossover Rack, but it won't start. Yet. I noticed in the taskmanager that the equalizer starts python3, but this doesn't happen when I try to start up paxoverrack. Do I have a python issue?
 
Last edited:
Hang on, python3 does briefly show up, but disappears again.

Edit: I completely removed paxover and reinstalled, but no difference. I tried installing the dependencies, they were all already there. Some files could be removed, which I did, but it made no diference.
 
Last edited:
Of course I am a GUI kinda guy and just staring at a clean desktop helps little. Here is the response after starting in terminal window:

Code:
pi@raspberrypi:~ $ pulseaudio-crossover-rack
Traceback (most recent call last):
  File "/usr/lib/pulseaudio-crossover-rack/pulseaudio-crossover-rack.py", line 16, in <module>
    from WindowClasses.MainWindow import MainWindow
  File "/usr/lib/pulseaudio-crossover-rack/WindowClasses/MainWindow.py", line 18, in <module>
    from DataClasses.XoverFile import XoverFile
  File "/usr/lib/pulseaudio-crossover-rack/DataClasses/XoverFile.py", line 7, in <module>
    from DataClasses.XoverFilterLink import XoverFilterLink
  File "/usr/lib/pulseaudio-crossover-rack/DataClasses/XoverFilterLink.py", line 1, in <module>
    from persistent.list import PersistentList
ModuleNotFoundError: No module named 'persistent'
 
Basing a distro on the testing branch of debian has gone south once before, just look at the story of LMDE (linux mint debian edition)... So i might be considered quite a brave attempt, since it might be broken any time (missing packages, wrong dependencies etc.)

But let's see what's wrong in this case :D Please post the output of "pip3 install ZODB" in a terminal window...
 
Basing a distro on the testing branch of debian has gone south once before, just look at the story of LMDE (linux mint debian edition)... So i might be considered quite a brave attempt, since it might be broken any time (missing packages, wrong dependencies etc.)

I agree, I was surprised. The raspberry pi people were always clear that they would hang on to anything old that was still functioning, because new stuff needs debugging and communicating to users. An inefficient use of resources. So I have no idea who changed direction completely and went with testing branch. But I am impressed, sort of. :D

But let's see what's wrong in this case :D Please post the output of "pip3 install ZODB" in a terminal window...

Will do when I get off work and have some time.
 
Well... Looks like ZODB didn't install at all I guess.

Code:
pi@raspberrypi:~ $ pip3 install ZODB
Looking in indexes: [url=https://pypi.org/simple]Simple index[/url], [url=https://www.piwheels.org/simple]piwheels - Simple index[/url]
Collecting ZODB
  Downloading [url]https://files.pythonhosted.org/packages/78/27/346776a8c1d9bcdfa1559688ae8461ccb2e5e876f275732d71aaf8529c9b/ZODB-5.5.1-py2.py3-none-any.whl[/url] (412kB)
    100% |████████████████████████████████| 419kB 583kB/s 
Collecting persistent>=4.4.0 (from ZODB)
  Downloading [url]https://files.pythonhosted.org/packages/15/30/cd03f249bf63dbed76f34822f7acb0b5c4a58cb776ce3818184a825695cc/persistent-4.5.0.tar.gz[/url] (106kB)
    100% |████████████████████████████████| 112kB 1.7MB/s 
Collecting zope.interface (from ZODB)
  Downloading [url]https://files.pythonhosted.org/packages/4e/d0/c9d16bd5b38de44a20c6dc5d5ed80a49626fafcb3db9f9efdc2a19026db6/zope.interface-4.6.0.tar.gz[/url] (150kB)
    100% |████████████████████████████████| 153kB 1.3MB/s 
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from ZODB) (1.12.0)
Collecting transaction>=2.4 (from ZODB)
  Downloading [url]https://files.pythonhosted.org/packages/21/38/499bcc737411b00ea969fdc82e1ff56925a0ea634fe03173e18fbdd59015/transaction-2.4.0-py2.py3-none-any.whl[/url] (48kB)
    100% |████████████████████████████████| 51kB 1.4MB/s 
Collecting zc.lockfile (from ZODB)
  Downloading [url]https://www.piwheels.org/simple/zc-lockfile/zc.lockfile-1.4-py3-none-any.whl[/url]
Collecting zodbpickle>=1.0.1 (from ZODB)
  Downloading [url]https://files.pythonhosted.org/packages/cb/b3/008b9db7838580c8ccbf2b3992ec964e962991f881bac5e9e440d3567fd0/zodbpickle-1.0.4.tar.gz[/url] (183kB)
    100% |████████████████████████████████| 184kB 1.1MB/s 
Collecting BTrees>=4.2.0 (from ZODB)
  Downloading [url]https://files.pythonhosted.org/packages/e9/b4/4c6209fbcc8d278a1a13e7284bbea14ffb15d83c6ab3eae24c66108d239c/BTrees-4.5.1.tar.gz[/url] (164kB)
    100% |████████████████████████████████| 174kB 889kB/s 
  Installing build dependencies ... done
Collecting ZConfig (from ZODB)
  Downloading [url]https://files.pythonhosted.org/packages/d2/33/533ba4b7e39e8fc16dbdf796a84c57b27956a72103ce4bfe2dd354f9fd2a/ZConfig-3.5.0-py2.py3-none-any.whl[/url] (134kB)
    100% |████████████████████████████████| 143kB 776kB/s 
Collecting cffi (from persistent>=4.4.0->ZODB)
  Using cached [url]https://www.piwheels.org/simple/cffi/cffi-1.12.3-cp37-cp37m-linux_armv7l.whl[/url]
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from zope.interface->ZODB) (40.8.0)
Collecting pycparser (from cffi->persistent>=4.4.0->ZODB)
  Using cached [url]https://www.piwheels.org/simple/pycparser/pycparser-2.19-py2.py3-none-any.whl[/url]
Building wheels for collected packages: persistent, zope.interface, zodbpickle, BTrees
  Running setup.py bdist_wheel for persistent ... done
  Stored in directory: /home/pi/.cache/pip/wheels/41/7f/eb/5fd14567fabda3a0fa73cb3310478bfd673e034442f28d8f48
  Running setup.py bdist_wheel for zope.interface ... done
  Stored in directory: /home/pi/.cache/pip/wheels/96/f8/f9/c13f32def2f05795c6c12cb5e670c111ec089210cb418ac82e
  Running setup.py bdist_wheel for zodbpickle ... done
  Stored in directory: /home/pi/.cache/pip/wheels/da/23/f0/19e7d61112c9c4a0a9c8812fc05d1f258a572b152fedcd6c44
  Running setup.py bdist_wheel for BTrees ... done
  Stored in directory: /home/pi/.cache/pip/wheels/b8/09/db/a7e4a1e8428ec9a425cac6c002683a1341154e5bb03d855dbb
Successfully built persistent zope.interface zodbpickle BTrees
Installing collected packages: zope.interface, pycparser, cffi, persistent, transaction, zc.lockfile, zodbpickle, BTrees, ZConfig, ZODB
  The scripts zconfig and zconfig_schema2html are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  The scripts fsdump, fsoids, fsrefs, fstail and repozo are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed BTrees-4.5.1 ZConfig-3.5.0 ZODB-5.5.1 cffi-1.12.3 persistent-4.5.0 pycparser-2.19 transaction-2.4.0 zc.lockfile-1.4 zodbpickle-1.0.4 zope.interface-4.6.0
pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $

Now pulse audio crossover rack starts! I made a new file with input, single parametric eq and output, saved it and inserted the filter modules. Output of the console:

Code:
REMOVING PAXOVERRACK MODULES...
[23:55:01.836868] No modules found for unloading.

REMOVING OLD PAXOVERRACK CONFIG...
[23:55:01.858768] wrote backup of ~/.config/pulse/default.pa
[23:55:01.864538] wrote ~/.config/pulse/default.pa

INSERTING NEW PAXOVERRACK MODULES...
[23:55:02.090204] inserted module for 'Output'
[23:55:02.201356] inserted module for 'ParametricEQ'
[23:55:02.293931] inserted module for 'Input'
[23:55:02.353611] set default_sink to PaXoverRack.Input
[23:55:02.435690] wrote backup of ~/.config/pulse/default.pa
[23:55:02.438753] wrote ~/.config/pulse/default.pa

No loudspeakers connected at the moment to try it out, but it looks like it works.

Kodi is apparently a standard debian version in the new raspbian, so not tuned to RPI hardware. It's not very usable at the moment. It's expected this will be fixed, but no set time for it as yet. Time to look into a different mediaplayer, perhaps a DLNA solution if that works nicely with pulseaudio.
 
actually then, i don't know what was the problem in the first place. if it installs correctly, why didn't it on the first attempt?

Maybe at least now you will learn to love the console more :)

Silly me, should have looked at the traceback more closely. Ivo, you revealed a bug that was introduced with the data model change for filter linking in 1.37. A import regarding PersistentList (part of ZODB/persistent) was not properly guarded. Users who had ZODB already installed were not hit by this bug. The fix was simple and I released a new version just moments ago.
 
Any plans for FIR filters plugin?

There are plans but no estimate yet. Given the fact that all the basic filters for building analog-like crossovers are provided as of now my priority for FIR filters is low. At some point I will give this a shot though as I want to use non causal filters to introduce inverse bandpass filters to compensate for the phase shift introduced by crossover filters (i.e. 360° phase shift for a LR4 filter).

The problem at the moment is that there is no readymade FIR filter LADSPA plugin I can use as it will have to be able to load coefficients from disk. So I will have to write up my own and at the moment I do neither have the time to do that nor do I have the knowledge. I thought about using pipe communications to brutefir but after some research and thinking i ditched the idea because then the brutefir processes would have to be spawned by PaXoverRack (by the GUI). That would destroy the ability to have to whole filter chain setup just by the default.pa configuration file which means that filters are always started when pulseaudio starts. This feature i deem to be quite important for ease of use, just configure the filter chain once and have it running seamlessly in the background regardless if the system is restartet and whatnot.

So here's my shoutout to developers and people having deeper knowledge of FIR filters: Do you happen to know a fast and efficient FIR filter library in C/C++/Rust that I can use for a LADSPA plugin?
 
Now pulse audio crossover rack starts! I made a new file with input, single parametric eq and output, saved it and inserted the filter modules. Output of the console:
....

No loudspeakers connected at the moment to try it out, but it looks like it works.

Kodi is apparently a standard debian version in the new raspbian, so not tuned to RPI hardware. It's not very usable at the moment. It's expected this will be fixed, but no set time for it as yet. Time to look into a different mediaplayer, perhaps a DLNA solution if that works nicely with pulseaudio.
I was wondering, you're just using HDMI as multichannel out or something?

How does that work? You can just simple split all channel in ALSA or is there something else to set up?
 
I was wondering, you're just using HDMI as multichannel out or something?

How does that work? You can just simple split all channel in ALSA or is there something else to set up?

No, right now I use a Hifiberry Amp2 on top of the rpi 3. I did a short test two (?) days ago with Ciare CH250 10" fullrange drivers, sitting on the desk.

It ss an amazing little combination. Fairly efficient drivers, decent amount of power, no humm or hiss, flexible "lego-style" DSP on the rpi, music streaming.

I did use HDMI with a different filter application earlier, which allowed me to connect to individual channels of the HDMI output. I would make sure to send tweeter L/R to front, woofer L/R to rear etc. I have not (yet) tried out multichannel HDMI with paxoverrack.
 
Yes, the rpi driver says two channels instead of 8. The fix is changing the 2 to 8 and recompile. Not user friendly. The RPIFoundation doesn't care about multichannel audio I guess. Although I could select the Hifiberry as a soundcard in a drop-down menu in the latest raspbian. Maybe multichannel hdmi output is also available by default now.
 
As far as I can see this relies on multichannel audio output via HDMI. If you get this working reliably you should be golden. If so, this looks like a really promising board for a no-frills multichannel audio output solution for the RPi. But: No one has reported yet that multichannel audio output via HDMI actually works on the RPi or how to get it working, there have only been some rumors that this doesn't work out of the box. Maybe the new RPi 4 will work better in this regard? I for myself can't tell as I don't use an RPi, at least not for audio/video.