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

I was tempted to say "no, not possible atm due to a limitation in pulseaudio"...

But then, a few minutes ago under the shower it dawned on me that it would be quite easy to achieve what you want by adding a feature to swap left/rigth channels on outputs...

Please see attached screenshot and .paxor file for a prototype of this concept.

It uses one output which is downmixed to mono, should be clear. Then it uses two outputs that output to the same channels on the soundcard. One of them has an inverter in front of it and has the channels swapped. This way by adjusting the gain parameter of the inverter you should be able to adjust the "spacing" effect...

I have not tested it in real life, please report back :D


Accordingly, here is the changelog of 1.28:
Code:
pulseaudio-crossover-rack (1.28) stable; urgency=low
* features:
  - allow swapping of left/right channels on outputs
-- Jürgen Herrmann <t-5@t-5.eu> 2019-03-27
 

Attachments

  • Bildschirmfoto zu 2019-03-27 13-32-33.png
    Bildschirmfoto zu 2019-03-27 13-32-33.png
    86.1 KB · Views: 282
  • single_speaker_stereo.paxor.zip
    56.2 KB · Views: 43
Member
Joined 2008
Paid Member
So it kind of works, but I am not sure if the signal routing is correct with my soundcard. I need to test again more tomorrow. It seems like signals are mixing where they should not.

When I insert the filters while playing sound, is it normal to get delayed signal in one pair of the speakers? When I stop and play again, it is normal.

Also, can you edit the output down right? I could not. I deleted it, created a new one and could not edit it, too.
 
There was a bug, sorry for the little testing before releasing it. Fixed.

Regarding the delay issues - does your soundcard work without delays when using no filter? I use ASUS Xonar U7/U5 and they both don't work correctly unless i disable tsched on the default.pa... (change the line containing "load-module module-udev-detect" to "load-module module-udev-detect tsched=0" in /etc/pulse/default.pa) - this is just a guess though.
 
TI use ASUS Xonar U7/U5 and they both don't work correctly unless i disable tsched on the default.pa...

Did you consider filing a bug with PA? The timer-based scheduling feature of PA has been developed for many years, usually resulting in fixes of the underlying alsa drivers. I would assume it should work correctly for USB audio now.

The principle is described in the PA initial motivation What's Cooking in PulseAudio's glitch-free Branch and makes sense. It requires reliable co-operation by the alsa driver to work correctly.
 
Member
Joined 2008
Paid Member
No need to be sorry, I cannot complain even little bit!
The soundcard starts working normally when I stop and start the playback. It looks like the pairs are getting out of sync while inserting the project - so the front pair is slightly ahead of the rear pair output. And it does it kind of randomly - sometimes yes, sometimes no. It is a cheap USB soundcard I use for testing, I will get a proper 8ch soundcard from M-Audio or some other when I finalize the setup.

The funny thing is, it almost sounded like the band screwed up:)

I hope to do some more tests tonight - and in another room. This one is missing the sidewalls that are required for the SSS.
 
Did you consider filing a bug with PA? The timer-based scheduling feature of PA has been developed for many years, usually resulting in fixes of the underlying alsa drivers. I would assume it should work correctly for USB audio now.

The principle is described in the PA initial motivation What's Cooking in PulseAudio's glitch-free Branch and makes sense. It requires reliable co-operation by the alsa driver to work correctly.

OK, just did that.
 
Member
Joined 2008
Paid Member
I installed PAXOR on a RPi running the latest Ubuntu Server. So far so good. I am doing everything from the terminal running on my laptop. Now the hard part for Linux noobs - how do I run the PAXOR graphical interface on the RPi from my laptop? Can the RPi somehow use the X server on my computer? Or should I install some graphical environment and use e.g. VNC?

By the way, I have it set up to use ecasound and Mopidy with Spotify extension (yet need to connect to PA and get premium account on Spotify). The final goal is to have a device, which will accept SPDIF, analog in and Spotify stream from the network, process it and send the signal to a 6ch amplifier for powering a 3-way stereo setup. Either with a USB soundcard or via HDMI to a 5.1 or 7.1 receiver.
 
The final goal is to have a device, which will accept SPDIF, ... and send the signal to a 6ch amplifier for powering a 3-way stereo setup.

SPDIF stream carries its own clock, why the output soundcard will have another clock. Two clock domains in one stream do not work reliably without some form of adaptive resampling.

PA can do adaptive resampling at the output Modules but that module requires configuring.
 
In that case this is relatively easy, just use X forwarding via ssh:

Code:
ssh <remote-hostname> -l <remote-username> -X /usr/bin/pulseaudio-crossover-rack

...and the program will run on the remote machine and the GUI will appear on the local machine. You can skip the "-l <remote-username>" part if the local username and the remote username are identical.

Of course another option would be to start x11vnc on the remote machine and vnc into it with any vnc viewer. I use mate as desktop environment and have a startup job after the login of the user start a small bash script with the following contents:

Code:
#!/bin/bash
while true; do
    x11vnc -rfbport 5900 -rfbauth /home/t-5/.x11vnc.pwd -forever
    sleep 1
done

To adapt this to your needs please read X11vnc - ArchWiki
 
This is amazing work! I just installed this on a Raspberry Pi 3 with Raspbian. The install process was painless. So far, running through VNC, using the GUI works, but this rpi is not connected to a soundsystem or soundcard. I'll set the sd card up to use it on my other rpi with Hifiberry and try this out as soon as possible.

Thanks!
 
This is amazing work! I just installed this on a Raspberry Pi 3 with Raspbian. The install process was painless. So far, running through VNC, using the GUI works, but this rpi is not connected to a soundsystem or soundcard. I'll set the sd card up to use it on my other rpi with Hifiberry and try this out as soon as possible.

Thanks!

You're welcome :)

Question: Isn't the HifiBerry s Stereo DAC? Do you plan to use it for EQ only?

So far I haven't really received a usage report from a RPi user... So a usage report with complexity of your filters and cpu usage etc. would be highly appreciated!
 
Haha, yes I have a Hifiberry Amp2, which is a stereo amplifier. But I have also done the kernel-hack for 8-channel output over HDMI a few times. Very interesting with multichannel crossover options to feed into a surround receiver. I just thought I'd install the full crossover thing and set it up as just stereo EQ for Hifiberry, so I could enjoy the crossover stuff for HDMI as well at some point.
 
Oops, error loading EQ module. Quite possibly related to using Raspbian with Pulseaudio 10? Although I also changed the config.txt for Hifiberry and then back to standard setup. May have made errors there. If I can't sort that out, I'll look into Ubuntu server.

Bear in mind, I can manage apt-get install, but code and command line is basically above my head. :)
 
To be honest I have next to zero experience with raspbian. I use a QEMU image with rapsbian to compile the ladspa-plugins for arm architectures but the desktop is so unbearably slow that i never tested the GUI in the emulator. Obviously having real hardware here for development would probably be better but atm I have no use for a rapberry here so I did not buy one :D

In your case I would switch to ubuntu server and see if it works with a newer PA version, that's probably the quickest fix for the situation. Obviously somebody did get it to work with pa 10 because he complained when I raised the dependencies to pulseaudio>=11.0 but I don't know what exactly in pulseaudio prevents loading the ladspa filters. The error messages in the pa logs are not very helpful and since there never was a problem with pa 11 and up i did not invest the time to debug this.
 
i did not invest the time to debug this.

Understood. Can't support everything. PA in Raspbian will undoubtedly catch up to 11 at some point.

I am thinking towards some linux with the right PA, your software, and then Kodi on top. See how that works out. I find Kodi uses the rpi hardware exceptionally well. Outputting Kodi over HDMI to my AVreceiver alone was worth the price of one rpi to me, would be fantastic to have EQ and even crossover control over sound.