• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RPi + CamillaDSP Tutorial

Dont you have off pop with the motu UL mk5? interesting. I do have, and quite loud. @levimax reported the same in the ultralite thread (see below). I thought it was normal. I do a 10 minutes hold power off sequence so that my amp goes to sleep before on purpose to avoid this. My amp is also DC coupled. Note I am referring to turning off the Motu, not the raspberry pi.

Yes I have quite a loud pop when turning off my UL MK5 but otherwise it seems to work perfectly so I just leave it on all the time. If this is not "normal" I would like to know so I could get it fixed or replaced under warranty.
 
  • Like
Reactions: MCH
Dont you have off pop with the motu UL mk5? interesting. I do have, and quite loud. @levimax reported the same in the ultralite thread (see below). I thought it was normal. I do a 10 minutes hold power off sequence so that my amp goes to sleep before on purpose to avoid this. My amp is also DC coupled.


Hmm...I don't recall any pop on my Mk5 when I restart the RPi, although I never power off the Mk5. I usually have my amps on a trigger based on the optical output, but I've also used it without the trigger and don't remember any pop.

I'm out of town this week but I'll play with it a bit next week and report back.

Michael
 
  • Like
Reactions: MCH
My UL5 always pops if turned off so I never power off UL5. I have a home-assistant docker controller power on/off of amps.

BTW, I have another stupid question… might be a bit off topic. Suppose I have a device that only does IIR EQs. I can still use CDSP’s FIR to just correct the phase(the phase distortion IIR filters introduced) right?
 
Hmm...I don't recall any pop on my Mk5 when I restart the RPi, although I never power off the Mk5. I usually have my amps on a trigger based on the optical output, but I've also used it without the trigger and don't remember any pop.

I'm out of town this week but I'll play with it a bit next week and report back.

Michael
For clarification: i refer to pop when turning off the motu, be it by pressing the button or pulling power off. I have just checked and when switching off the raspberry pi connected to the Motu but leaving the Motu on, i get no Pop at all.
 
Hi

Thanks to this guide I was already once sucessfull with a pi and a MCHstreamer.

Currently I use mainly Dante in my home cinema. So I want a Dante-CDSP System. Tomorrow I get a Marian Clara E and I have a Rockpro64 already here. The Clara E supports Alsa. Since rpi does not offer the necessary PciE slot I will go with the rockpro.
I checked a bit the tutorial and as far as I can see it should also be OK to serve as start for my project, too. Any hints for this linux-rookie in advance already? Otherwise I will just try as far as I get before asking :)
 
BTW, I have another stupid question… might be a bit off topic. Suppose I have a device that only does IIR EQs. I can still use CDSP’s FIR to just correct the phase(the phase distortion IIR filters introduced) right?

The only IIR filters that should introduce phase distortion are IIR filters to form crossovers. The crossover will create all pass behavior that can be removed (at least on-axis) via FIR filtering.

There is some discussion of various approaches to accomplish this here -> https://www.audiosciencereview.com/...-through-the-bass-roll-off.53966/post-1963794. In any case if you are attempting to linearize phase, it should be acoustic phase, not electrical phase.

Michael
 
Currently I use mainly Dante in my home cinema. So I want a Dante-CDSP System. Tomorrow I get a Marian Clara E and I have a Rockpro64 already here. The Clara E supports Alsa. Since rpi does not offer the necessary PciE slot I will go with the rockpro.
I checked a bit the tutorial and as far as I can see it should also be OK to serve as start for my project, too. Any hints for this linux-rookie in advance already? Otherwise I will just try as far as I get before asking :)
The Pi 5 has PCIe too, via a separate board. Has the Marian been tested with aarch64 or are you just hoping/assuming it'll work on something other than x86_64? A lot of the drivers haven't been tested on anything other than PC hardware, and they don't always work smoothly on ARM. https://pipci.jeffgeerling.com/ might give some idea of the proportions.
 
How much of this can be attributed to the soundcard and how much (if any) is the Raspberry Pi?
Given my experience with my Raspberry Pi 5 and CamillaDSP, my guess is that it is entirely due to the sound card.

Here is my setup:

WiiM --> miniDSP MCHStreamer Kit --> Raspberry Pi 5/CamillaDSP --> miniDSP MCHStreamer Kit --> KEF LS60

With PEQ provided by CamillaDSP on my Raspberry Pi, my KEF LS60s sound better to me, in my room and the way I have the KEFs oriented, than they do stock.
 
Thanks for the great tutorial, it looks pretty straightforward. I'm considering this setup to have access to dsp. A few things I'm wondering about, is the pi 4/5 powerful enough to also act as an HTPC at the same time as running dsp? Streaming services through a browser, DVD playback etc? I'd also want an ADC input, the hifiberry dac+adc seems ok but part of this plan is to upgrade to a 2.1 system and having separate dsp for the sub seems useful. Seems like the only option there is the dac8x, are there any ADCs to combine with that? A headphone amp would be a bonus but I can always use an apple dongle.

Thanks!
 
Hi

Yes the Marian Driver is testet on arm on a Rockpro64. Thats why I choose this.
So.... Rockpro64 or pi5 with PciE Hat? Whats more promising?
 
Hi

Yes the Marian Driver is testet on arm on a Rockpro64. Thats why I choose this.
So.... Rockpro64 or pi5 with PciE Hat? Whats more promising?
Added to https://wiki.pine64.org/wiki/ROCKPro64_Hardware_compatibility#PCIe_devices after finding Marian's driver page.
I don't have experience with either. Pine64 have an unusual business model - they make the hardware, but software is up to the community. Support in case of hardware failure is variable based on forum reports - I haven't needed to deal with their support. If you're fine with this, and know the state of software, then the ROCKPro64 seems reasonable - Marian claim it's tested after all.
Raspberry Pi tend to have decent long term support, but untested with the Marian. Beyond that it's whether they've got the capabilities you need now, or might want to use in the future.
 
I Ordered a pi5 this morning. It is a sbc I can use for others projects, too. Several pi3/4 in use over here. Testing the marian driver is quickly done and if it works all the rest with CDSP would be straight forward.
 
Last edited:
I have generated .wav files for FIR convolution filtering using REW following the tutorial to which I posted the link in post #1822, using the Harman curve. When I apply the convolution files, the speakers' frequency responses drop below the target curve between about 120 Hz and 400 Hz, and then rise above the target curve from there. The music sounds a little thin. I have re-tried and I get similar results.

View attachment 372794

Has anyone else experienced this? Perhaps I need to modify one or more of the steps discussed in the tutorial. If anyone knows the solution, your input is greatly appreciated. One option is to just add one or two biquads to refine the tuning, but I would like to nail down the process of properly generating the .wav files.

As a side note, I also have created a configuration using all biquads, though using a modified Harman curve with about 4.3 dB less bass boost. I used REW's auto-generated filters as a starting point, but still did much tuning beyond those. That sounds good. But, generating the .wav files takes much, much less time than tuning with biquads, which makes it much less time consuming to have different target curves for different recordings.
I think I have found a way to use REW to generate .wav files for convolution that track closer to my target curve than my earlier attempts.

I did the following for each channel using Trace Arithmatic:

1. Generate 1st correction trace - divide trace of measured frequency response (1/24 octave smoothed) by target curve (A/B), then compute reciprocal of that result (1/A).
2. Generate 1st predicted response - multiply trace of measured frequency response by 1st correction trace (A * B).
3. Generate 2nd correction trace - divide 1st predicted response by target curve (A/B), then compute reciprocal of that result (1/A).
4. Generate 1st convolution trace - multiply 1st correction trace by 2nd correction trace (A * B).
5. Generate 2nd predicted response - multiply trace of measured frequency response by 1st convolution trace (A * B).
6. Generate 3rd correction trace - divide 2nd predicted response by target curve (A/B), then compute reciprocal of that result (1/A).
7. Generate 2nd convolution trace - multiply 1st convolution trace by 3rd correction trace (A * B).

8. Using Measurement Actions, generate a minimum phase version of 2nd convolution trace.

9. Export the minimum phase version of 2nd convolution trace as a .wav file.

Below are the predicted frequency responses for the left and right channels using .wav files generated per above. In CamillaDSP I also added PEQs to drop the frequency response below 20 Hz - the convolution files were generating around 10 dB of gain in the subsonic frequencies, which was pushing the little woofers in my KEFs a little hard. It definitely sounds better than my earlier attempts. I am comparing the result to the configuration I generated using all PEQs, but need more time to determine whether I like one better than the other:

New Convolution.jpg
 
I got the Focusrite Scarlett 4i4 Gen3, and got it to work after some trouble. TL;DR, I'm not impressed and will be sending it back.

The device is delivered in MSD mode (mass storage device), and needs to be activated with their software. Connecting the device leads you to their website where you being greeted by a registration page. At the buttom of the page there was a shortcut to bypass and go to the software download, but I already registrered before I noticed. Personally, that triggers me, other people may feel differently.

Next their software could not find my device (that is useless in MSD mode otherwise). This seems to be a normal occurance, because it kindly lead me to a troubleshooting page, that included trying to restart a process in activity monitor (Mac). Nothing worked. The software for the Gen3 is Focusrite Control 3.18, which has been superseeded by Control2 for their Gen 4 devices. It seems like they are not maintaining their old software. Anyhow, I got it solved by using an old Mac with their 3.6 version. Now the device was atleast out of MSD mode and useable!

Unfortunately their marketing videos were misleading, and the volume control on the front only works on monitor output 1 and 2 like every other interface I've found so far, unless you step up to something with a lot more outputs. That was quite disappointing.

Getting it setup with Camilla I used the headphone output with some IEMs. The headphone output sounded bad (not that I planned using it).

Getting it connected to speakers was dissappointing too. The sound is harsh like with the cheap soundcard. It however, doesn't sound as compressed, and I don't hear noise when nothing is playing. I'm not blaming the device for this entirely. It's entirely possible it's something I mess up in the setup.

The harsh sound is like something with too high gain (I have 0 clipped samples in Camilla). So I went into alsamixer where everything was set to max. I have no idea if it's supposed to be this way, but I turned it down to 50% (green band).

I keept listning and pursuaded myself it improved the sound somewhat. But at this point I stopped trusting myself.

Anyway, even if it indeed fixed it, and it's not imagination, on a psychoaccoustic level, I will never be happy with this device and it's going back.


Edit to add:
I got it to sound decent (good actually) by keep playing with the Alsamixer, despite having no clue what I was doing (learning by doing I guess). There are a ton of mixes that I have no clue what are doing, but scrolling all the way to the end, you can choose which mixes goes to the outputs. Default was Mix A to Analog output A, etc.

While playing with it, I messed up all the mixes to the left (that are now set to off). At one point I had no sound when I had my balance slider centered. But only at full L or R. While messing with those mixes I had some nasty feedback distortion.

So in desperation I tried setting PCM directly to Analog (red circle). It worked and it seemed to improve the sound quality quite a lot. It lowered the volume substantially, so I had to turn the gain back up btw.
 

Attachments

  • Screenshot 2024-06-19 at 22.03.20.png
    Screenshot 2024-06-19 at 22.03.20.png
    570.7 KB · Views: 63
  • Screenshot 2024-06-19 at 22.02.38.jpg
    Screenshot 2024-06-19 at 22.02.38.jpg
    136.5 KB · Views: 53
Last edited:
Pi arrived and PciE Board is mounted. Later I will try to install the Marian driver. If this runs without errors: how can I check best if all is OK before doing all thr CDSP setup?
 
Pi arrived and PciE Board is mounted. Later I will try to install the Marian driver. If this runs without errors: how can I check best if all is OK before doing all thr CDSP setup?
Following Michael's tutorial should be a walk in the park, just copy and paste everything if unsure, only takes ~20min.
Just don't forget to change ccsize according to the bit depth of your source.
 
I keept listning and pursuaded myself it improved the sound somewhat. But at this point I stopped trusting myself.
Do you have a USB microphone? You might want to measure your system using REW (it is free to download and use, though they do take donations). If you do not already have a microphone, a miniDSP UMIK-1 is sufficient for running frequency response measurements. It costs around $100 if I remember correctly.
 
I think I have found a way to use REW to generate .wav files for convolution that track closer to my target curve than my earlier attempts.

I did the following for each channel using Trace Arithmatic:

1. Generate 1st correction trace - divide trace of measured frequency response (1/24 octave smoothed) by target curve (A/B), then compute reciprocal of that result (1/A).
2. Generate 1st predicted response - multiply trace of measured frequency response by 1st correction trace (A * B).
3. Generate 2nd correction trace - divide 1st predicted response by target curve (A/B), then compute reciprocal of that result (1/A).
4. Generate 1st convolution trace - multiply 1st correction trace by 2nd correction trace (A * B).
5. Generate 2nd predicted response - multiply trace of measured frequency response by 1st convolution trace (A * B).
6. Generate 3rd correction trace - divide 2nd predicted response by target curve (A/B), then compute reciprocal of that result (1/A).
7. Generate 2nd convolution trace - multiply 1st convolution trace by 3rd correction trace (A * B).

8. Using Measurement Actions, generate a minimum phase version of 2nd convolution trace.

9. Export the minimum phase version of 2nd convolution trace as a .wav file.

Below are the predicted frequency responses for the left and right channels using .wav files generated per above. In CamillaDSP I also added PEQs to drop the frequency response below 20 Hz - the convolution files were generating around 10 dB of gain in the subsonic frequencies, which was pushing the little woofers in my KEFs a little hard. It definitely sounds better than my earlier attempts. I am comparing the result to the configuration I generated using all PEQs, but need more time to determine whether I like one better than the other:

View attachment 376158
You can directly divide target curve to the speaker response and save the minimum phase version of that A/B result as .wav to use as your FIR convolution file. For ringing free clarity: divide 0-225Hz limited range and use the "min phase" version of the speaker's response in the division, not the original response. Also note that latest REW beta versions have some extra features for impulse divisions.
 
Hi

a Dante based DSP. Worked out absolutely well. Driver worked directly. Just had to figure a bit around which of the many devices (like 5 for that card) to choose. Any drawback on the plughw version of it? Getting errors for the others. If worth it could go on there maybe...
Pi5 with PciE hat now.

Guys I am just really happy about the new toy :)


1000025422.jpg
 
Thank you for the information!

You can directly divide target curve to the speaker response and save the minimum phase version of that A/B result as .wav to use as your FIR convolution file.
The tutorial video I originally followed indicated that there was an issue with FFT in REW doing it that way. But, the video is more than a year old and there have been quite a few REW updates since then, so perhaps that issue has been fixed.

For ringing free clarity: divide 0-225Hz limited range and use the "min phase" version of the speaker's response in the division
Due to my room and where the speakers are positioned, the frequency responses of the speakers at the listening position are not the same due to non-symmetrical room reflections. This adversely impacts their imaging performance. By equalizing them to the same target curve at the listening position throughout the frequency range, the imaging improved quite a bit. So, for my setup, I want room correction to extend well beyond 225 Hz. That is what I did, and it worked well for my room/speakers.
 
Back
Top Bottom