Moode Forum
Crossfeed implemented using CamillaDSP - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9)
+--- Thread: Crossfeed implemented using CamillaDSP (/showthread.php?tid=3796)



Crossfeed implemented using CamillaDSP - the_bertrum - 05-10-2021

Hello Folks,

TL;DR - I don't know what I'm doing, but I've tried to make a crossfeed using CamillaDSP.  Feel free to use, improve, and tell me where I've gone wrong.

First a few caveats:
  1. I had never heard of crossfeeds until last year when I first installed moOde.
  2. Until about 6 months ago, I thought messing with the sound that the recording engineer created and the hi-fi engineer made audible was supremely arrogant (how could lowly me improve it).
  3. I've never done a blind test to prove it, but I can't tell the difference between 320 MP3 and hi-res FLAC.
Notwithstanding all that, based on the conversation in this thread, I decided to try to build a crossfeed using the excellent CamillaDSP within moOde.  My research lead me to believe that crossfeeds take the lower frequencies from one channel, make them quieter, delay them a little than mix them back into the other channel.  I could not find any recipes that break down these parameters and so I took the crossfeeds that are already present in moOde as a starting point and made some assumptions.  For example the 700Hz 3dB crossfeed I took to mean frequencies below 700Hz are attenuated by 3dB and fed to the opposite channel, I guessed there would be a little delay added too.  With these assumptions in place, I made a mixer that took each channel and split it into two channels on the left and two on the right. I made a lowpass filter at 700Hz, then a gain of -3dB and finally a delay of 5ms.  I applied these filters sequentially to one of the left channels and one of the right channels.  Finally I made another mixer that took unaltered left and mixed into one channel with the filtered right and vice versa.

The results work in that I can certainly hear the effect, and that some of the width of the soundstage on my headphones is reduced, any hard panned sounds are brought back a little.  I suspect it is a little heavy handed, probably way too much delay for one.  I think however that the framework is fine, probably just the filters need tweaking to suit taste.  The .yml file for the 700Hz 3dB crossfeed looks like this:

Code:
---
devices:
 adjust_period: 10
 capture:
   type: File
   channels: 2
   filename: /dev/stdin
   format: S32LE
 capture_samplerate: 0
 chunksize: 1024
 enable_rate_adjust: false
 enable_resampling: false
 playback:
   type: Alsa
   channels: 2
   device: hw:0,0
   format: S32LE
 queuelimit: 1
 resampler_type: BalancedAsync
 samplerate: 44100
 silence_threshold: 0
 silence_timeout: 0
 target_level: 0
filters:
 -3:
   parameters:
     gain: -3
     inverted: false
     mute: false
   type: Gain
 700lp:
   parameters:
     freq: 700
     q: 0.500000
     type: Lowpass
   type: Biquad
 Delay:
   parameters:
     delay: 5
     unit: ms
   type: Delay
mixers:
 2to4:
   channels:
     in: 2
     out: 4
   mapping:
   - dest: 0
     mute: false
     sources:
     - channel: 0
       gain: -3
       inverted: false
       mute: false
   - dest: 1
     mute: false
     sources:
     - channel: 0
       gain: -3
       inverted: false
       mute: false
   - dest: 2
     mute: false
     sources:
     - channel: 1
       gain: -3
       inverted: false
       mute: false
   - dest: 3
     mute: false
     sources:
     - channel: 1
       gain: -3
       inverted: false
       mute: false
 4to2:
   channels:
     in: 4
     out: 2
   mapping:
   - dest: 0
     mute: false
     sources:
     - channel: 1
       gain: 0
       inverted: false
       mute: false
     - channel: 3
       gain: 0
       inverted: false
       mute: false
   - dest: 1
     mute: false
     sources:
     - channel: 2
       gain: 0
       inverted: false
       mute: false
     - channel: 0
       gain: 0
       inverted: false
       mute: false
pipeline:
- name: 2to4
 type: Mixer
- channel: 0
 names:
 - 700lp
 - "-3"
 - Delay
 type: Filter
- channel: 3
 names:
 - 700lp
 - "-3"
 - Delay
 type: Filter
- name: 4to2
 type: Mixer
...
I've also attached a zip with the same assumptions applied to all four of the crossfeeds in moOde for folks to examine, use, modify, discard, ridicule, ignore, or do what ever else they fancy with.  I think the device section will need checking for correctness on other systems.
I'm posting this in the hope that it may be of use, but also in the hope that any errors or misunderstandings I have might be explored by those with better understanding than mine and I can learn a bit more in the process.

Cheers folks,
Robert


RE: Crossfeed implemented using CamillaDSP - bitlab - 05-10-2021

@the_bertrum I see that you are doing well ! :-)

If you like to also have an example of a Linkwitz crossfeed implementation, I have an example ready for you at https://www.bitlab.nl/page_id=665.

Concerning the delay; the difference in distance between the left ear vs right is about +/-6 cm in sonic path which is roughly ~0.2mS. So 5mS is indeed little bit heavy ;-)


RE: Crossfeed implemented using CamillaDSP - the_bertrum - 05-10-2021

(05-10-2021, 04:50 PM)bitlab Wrote: @the_bertrum I see that you are doing well ! :-)

If you like to also have an example of a Linkwitz crossfeed implementation, I have an example ready for you at https://www.bitlab.nl/page_id=665.

Concerning the delay; the difference in distance between the left ear vs right is about +/-6 cm in sonic path which is roughly ~0.2mS. So 5mS is indeed little bit heavy ;-)

Thanks @bitlab , praise from the master Smile

I'm glad to see that I've got the basic format right.  I've adjusted the delay down a lot and it does already feel much more natural.  Interesting to see that your example Linkwitz has a highpass on the direct path which isn't something that was apparent to me in the reading I did, I'm going to run some comparisons to see what I prefer.  I notice also that you adjust the gain in the mixers rather than having a separate filter, is there a reason for this, or just how you like to do it?

It could get very addictive this fiddling with DSP.


RE: Crossfeed implemented using CamillaDSP - bitlab - 05-11-2021

Actually a highshelf filter is used. In combination with the gain it reduces the part below < 700Hz, so when it is mixed with the <700Hz part of the other channel the lower isn't to much lifted.
And the phase response of the lp filter also will introduce a delay on the mixed part.
I guess using the mixer or filters for the gain is indeed just personal style. I the end I tune the pipe line gains to match other configs, just to minize the level differences between switch from one config to an other.


RE: Crossfeed implemented using CamillaDSP - the_bertrum - 05-12-2021

(05-11-2021, 07:28 PM)bitlab Wrote: Actually a highshelf filter is used. In combination with the gain it reduces the part below < 700Hz, so when it is mixed with the <700Hz part of the other channel the lower isn't to much lifted.
And the phase response of the lp filter also will introduce a delay on the mixed part.
I guess using the mixer or filters for the gain is indeed just personal style. I the end I tune the pipe line gains to match other configs, just to minize the level differences between switch from one config to an other.

I think I understand that.  The filters I built will end up accentuating the bass frequencies because I'm adding some from the other channel and a highshelf on the treble frequencies boosts those a bit to compensate.