Announcement

Collapse
No announcement yet.

Digital Room Correction and Bass Artefacts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ctrlbreak
    replied
    Originally posted by ralphy View Post
    Yes there is a pcp-sox.tcz extension for picoreplayer. It's used for the streamer and is available to install separately from the extensions section in the webgui main tab.
    Has anyone managed to get this set up to use SOX to EQ on the player side?

    My setup is a bunch of (hidden) RPis just running Squeezelite, connected to ceiling speakers, controlled remotely by jogglers mounted on my walls in various rooms (running jivelite) and LMS running as a docker on my Unraid server. So having the RPis manage the EQ on the player side is much preferred.

    I've installed the sox plugin but can't figure out how to configure the EQ routing. If I can get working might look to build a squeezlight UI plugin for a graphic EQ/balance control...

    Leave a comment:


  • cliveb
    replied
    Originally posted by JanVana View Post
    Hello Clive,

    I have a Raspberry 4, Amp100 and a DSP module running. I have the same issue with low frequency rumble on some Hifiberry DSP Profiles. I asked hifiberry for support, but unfortunately they can't help me. Have you found a solution.

    Thanks for your help. Regards.
    Jan
    Jan, I saw your post on the HiFiBerry forum and responded there.
    But to summarise: ditch the DSP card and just use SOX to apply the filters you need.

    I strongly suspect that the algorithms used in the DSP card are flawed.

    Leave a comment:


  • JanVana
    replied
    Originally posted by cliveb View Post
    But once I started listening in earnest, noticed some curious low frequency artefacts during quiet moments, a kind of grumbling that varies in amplitude. The closest analogy I can give is that it sounds a bit like turntable rumble.
    Hello Clive,

    I have a Raspberry 4, Amp100 and a DSP module running. I have the same issue with low frequency rumble on some Hifiberry DSP Profiles. I asked hifiberry for support, but unfortunately they can't help me. Have you found a solution.

    Thanks for your help. Regards.
    Jan

    Leave a comment:


  • cliveb
    replied
    Originally posted by ralphy View Post
    Yes there is a pcp-sox.tcz extension for picoreplayer. It's used for the streamer and is available to install separately from the extensions section in the webgui main tab.
    This is interesting. I am currently running SOX filters in LMS, using a MAC address to target the specific player.
    It's working fine, but running the filters on the player itself seems like a more elegant solution that I'd like to try.
    I wasn't aware it was possible until I saw your post.
    Is there any documentation about how to configure the pcp-sox extension once it's loaded?

    Leave a comment:


  • ralphy
    replied
    Originally posted by SeanMiddleton View Post
    I came to this thread via a discussion on another website. That discussion was related to how to use HiFiBerry DAC+ DSP under PiCore; specifically how to install the dsptoolkit onto PiCore (I'm still working on that !). However, it seems to me that the SOX approach is a much better approach than the DAC+ DSP, its certainly cheaper and would appear to have more filters capability (DAC+ DSP max is 16).

    My question is this - can SOX be installed onto PiCore without the need to install LMS ? In my case my LMS resides on my NAS and I just use PiCore only as my player. I want to be able to have my PiCore player apply the SOX filters to whatever track is being streamed from my NAS LMS.
    Cheers
    Sean
    Yes there is a pcp-sox.tcz extension for picoreplayer. It's used for the streamer and is available to install separately from the extensions section in the webgui main tab.

    Leave a comment:


  • BoxOfCables
    replied
    Originally posted by SeanMiddleton View Post
    My question is this - can SOX be installed onto PiCore without the need to install LMS ? In my case my LMS resides on my NAS and I just use PiCore only as my player. I want to be able to have my PiCore player apply the SOX filters to whatever track is being streamed from my NAS LMS.
    Cheers
    Sean
    SoX is used by squeezelite, which is the player used by piCore so it will already be installed even when piCore is set up without LMS. I would imagine there is a way to pipe the audio stream through SoX with your custom commands for the eq, however I don't know how. I'd say you would need to look into the workings of squeezelite.

    Leave a comment:


  • SeanMiddleton
    replied
    running SOX on PiCore

    I came to this thread via a discussion on another website. That discussion was related to how to use HiFiBerry DAC+ DSP under PiCore; specifically how to install the dsptoolkit onto PiCore (I'm still working on that !). However, it seems to me that the SOX approach is a much better approach than the DAC+ DSP, its certainly cheaper and would appear to have more filters capability (DAC+ DSP max is 16).

    My question is this - can SOX be installed onto PiCore without the need to install LMS ? In my case my LMS resides on my NAS and I just use PiCore only as my player. I want to be able to have my PiCore player apply the SOX filters to whatever track is being streamed from my NAS LMS.
    Cheers
    Sean

    Leave a comment:


  • BoxOfCables
    replied
    Originally posted by cliveb View Post
    Anyway, all is now well without the DSP card installed and I'm a happy bunny.
    Awesome Glad it all worked for you. I wish I had known about SoX before I wasted £70 and who knows how many hours on that HiFiBerry DSP! On the plus side though it did introduce me to REW which makes a nice improvement to the sound.

    Originally posted by cliveb View Post
    The peak CPU usage on the RPi3 I've seen is about 25%
    Same as I've seen, that's actually 100% load on a single core. The multi-threading on SoX doesn't seem to work on the Pi, I had expected to see it jump to 50% use, using one core per audio channel. Still, it's not a noticeable delay with that lowest compression.

    Happy listening!

    Leave a comment:


  • cliveb
    replied
    OK, latest news on this.

    I set up the appropriate equalizer settings in custom-convert.conf and am happy to report that:

    1. They work - the bass response is smoothed out as required. Not quite perfect yet, but I can try a bit of fine tuning.

    2. Re-encoding to FLAC works just fine. The peak CPU usage on the RPi3 I've seen is about 25%, and that is only during the initial phase when playback is starting up. Once it's going, CPU usage typically sits around the 3% - 5% mark. With re-encode compression level set to 0, there is no significant latency. So I probably won't bother messing about trying to stream PCM.

    3. Most importantly of all: there are no audible bass artefacts. Hooray!
    It would seem that the filtering code used by the HiFiBerry DSP card must have some kind of flaw which is responsible.
    I did wonder if perhaps the card itself had a hardware fault, but when the card is installed and all filters disabled, the bass artefacts disappear.
    So it has to be something to do with the filter processing.

    Anyway, all is now well without the DSP card installed and I'm a happy bunny.

    Leave a comment:


  • cliveb
    replied
    Originally posted by BoxOfCables View Post
    You could try directly uploading it, rather than updating pCP as a first course of action. Name the file "custom-convert.conf" and put it in "/usr/local/slimserver" (it doesn't need any special permissions). Then restart LMS and see.
    OK, I gave that a go and it worked.
    So now I'll try applying the filters to see what happens, and if that works will experiment with not bothering to re-encode to FLAC and just stream PCM.

    Many thanks for your help.

    Leave a comment:


  • BoxOfCables
    replied
    Originally posted by cliveb View Post
    got this error message when attempting to upload it:
    Sorry I don't know why that would be - I've tested here (using Notepad) and I can upload a "something.txt" or "something.conf" file and it works fine, even with [CR][LF] line endings. I even tried a few odd tabs / whitespaces and it accepted it. I am on the latest pCP though. The file contents as you posted here are fine, there isn't anything that would need changing or adding.

    You could try directly uploading it, rather than updating pCP as a first course of action. Name the file "custom-convert.conf" and put it in "/usr/local/slimserver" (it doesn't need any special permissions). Then restart LMS and see.

    Originally posted by cliveb View Post
    Would it reduce any delay even further by not re-encoding to FLAC, and just stream the output as PCM?
    From what I understand, it has to output flac to match the rule (the second entry in the first line is the output format requested by the player). If your players are configured to request PCM then you can alter the SoX command to change it to output PCM, and also change the matching for the rule from "flac flac" to "flac pcm". I've not read the SoX documentation for PCM, a breif look shows a few more options than flac so you'd need to pick your way through that.

    Leave a comment:


  • cliveb
    replied
    OK, have hit a problem.

    I created a simple custom convert file using Notepad just to test that it works, but got this error message when attempting to upload it:
    Code:
    [ERROR] Invalid file format, must be a text file"
    Thinking perhaps it might be due to Windows using CR/LF for newline, I removed the CR characters using a hex editor and tried again, but with the same result.

    Any ideas?

    Here is the full content of the file I was trying to upload:
    Code:
    flc flc * *
    	[sox] -q --multi-threaded --no-clobber -t flac $FILE$ -t flac - remix 1 0
    Are there any header lines I need to include? (The "invalid file format" messsage would seem to suggest it's nothing to do with the content, but a more fundamental issue).

    I'm using an old pCP (v4.1.0), if that's relevant. Was hoping not to have to upgrade, but will if it's required.

    Leave a comment:


  • cliveb
    replied
    Originally posted by BoxOfCables View Post
    I've also done some more tweaking and found limiting the flac compression level to zero helps a lot with the initial delay, it's now pretty much imperceptable.
    Thanks again.

    Would it reduce any delay even further by not re-encoding to FLAC, and just stream the output as PCM? My understanding is that FLAC decodes really easily but uses quite a lot of CPU to encode. Not bothering to re-encode might also reduce the load on the RPi3. All my players are connected via gigabit wired ethernet, so I don't need to worry about network bandwidth.

    Leave a comment:


  • BoxOfCables
    replied
    In case anyone was trying the above, I've now edited it as the command for turning off one channel was wrong.

    I've also done some more tweaking and found limiting the flac compression level to zero helps a lot with the initial delay, it's now pretty much imperceptable. Here's the conf:

    Code:
    flc flc * *
    	[sox] -q --multi-threaded --no-clobber -t flac $FILE$ -C 0 -t flac - equalizer 99.6 2.70q +3.6 equalizer 283 1.00q -2.9 equalizer 2293 1.00q +1.4
    If you need to alter the balance L/R but don't have such a control on the amplifier, that can be done too (using the remix command):

    Code:
    flc flc * *
    	[sox] -q --multi-threaded --no-clobber -t flac $FILE$ -C 0 -t flac - equalizer 99.6 2.70q +3.6 equalizer 283 1.00q -2.9 equalizer 2293 1.00q +1.4 remix -m 1p-3 2p0
    The value after the "p" is the db by which to alter that channel. I believe it's best to reduce than increase as there's no chance of clipping then. The example above reduces the left channel by 3db.

    Leave a comment:


  • BoxOfCables
    replied
    Originally posted by cliveb View Post
    Excellent - many thanks. That all looks very straighforward, and I already have the REW filter settings.

    It will interesting to see if the filters used by SOX produce bass artefacts like those on the HiFiBerry DSP card.
    If they don't, the DSP card will be going on eBay!

    EDIT: Given that I want to target the specific piCorePlayer in my living room, I presume I need to set up custom-convert like so:
    Code:
    flc flc * PLAYER-ID
    	[sox] ...
    where PLAYER-ID is the MAC address or IP address of the target piCorePlayer?
    Yes, it should just be the MAC address.

    If you want an easy way to see if it's working, use the following which will turn off the right channel [EDIT - the remix command was wrong, removed the "-m" from it]:

    Code:
    flc flc * *
    	[sox] -q --no-clobber -t flac $FILE$ -t flac - remix 1 0
    It does add to the load on the Pi, but it's not much (about 6% cpu load running, 26% starting the track) - the initial start time to play a track is a little longer (still under 2 seconds from my testing with about 5 filters and a remix to alter the balance).
    Last edited by BoxOfCables; 2021-09-15, 13:27.

    Leave a comment:

Working...
X