CHANGSTAR: Audiophile Headphone Reviews and Early 90s Style BBS

  • December 31, 2015, 09:40:33 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4 5

Author Topic: Advanced Crossfeed DSP  (Read 8187 times)

0 Members and 1 Guest are viewing this topic.

AstralStorm

  • Speculation and Speculums
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +250/-164
  • Offline Offline
  • Posts: 559
  • Warning: causes nearby electronics to go haywire
Advanced Crossfeed DSP
« on: July 15, 2013, 06:57:12 AM »

I've decided to post a thread here in order to have your input on whether you like the home-made advanced crossfeed DSP written by yours truly.
Theme song: Project Pitchfork - Timekiller (Note: reissue is terribly compressed. :sadpanda: )


This crossfeed is special, as it is probably the only one that's linear for mono signals. (As linear as linear-phase FIR gets.)
Zero combing is possible for mono signals and it should be vastly lower for side signals as well thanks to phase linearity.

Based on an idea presented by Jan Meier in an offhand form here:
http://www.meier-audio.homepage.t-online.de/crossfeed.htm

Corda amps actually wing it, since they use passive filters and thus have phase issues, especially in mid/side splitting circuitry.
This one does not, so inverse phase signals are properly localized as well.
The defaults were tuned by ear for my head.

Currently it's available both in source code form, VST form (requires host to have its own controls, it doesn't have GUI) and Linux LV2, LADSPA; and Jack application forms, with either Qt, GTK UI or Windows UI. Yes, Jack works in Windows too. Some others are also possible on request.

The advanced crossfeed has been written in a computer language made by Julius O. Smith III (of Yamaha fame) and later enhanced by some other people. It is called Faust and compiles to various output plugins.

Source code is attached, feel free to mention any improvements you see fit. It's not recommended to patch the C++ code by hand, as it is generated from Faust.
I built it in Linux using MinGW with special options. It is a 32-bit VST dll, like most of them, and works well in Wine, e.g. George Yohng's VST bridge for Foobar2000.

Can't wait for your impressions and suggestions.
« Last Edit: July 15, 2013, 07:09:36 AM by AstralStorm »
Logged
For sale: Hifiman HE-500; Paradox; Brainwavz B2. PM me if you would like to buy them.

PelPix

  • Team Linear Magnetic
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +63/-2
  • Offline Offline
  • Posts: 176
Re: Advanced Crossfeed DSP
« Reply #1 on: July 15, 2013, 07:14:14 AM »

Looking forward to testing this!  Let's see how it stacks up to hardware crossfeed and bs2b (which cites the same link by Meier and also says it's is as close as possible to linear phase)

Edit:

I like it!  Very natural.  Settings were quick to change to my ear layout and tastes!  Overall, great plugin.  No bugs to report, either!
« Last Edit: July 15, 2013, 07:24:59 AM by PelPix »
Logged

ultrabike

  • Burritous Supremus (and Mexican Ewok)
  • Master
  • Pirate
  • *****
  • Brownie Points: +4226/-2
  • Offline Offline
  • Posts: 2384
  • I consider myself "normal"
Re: Advanced Crossfeed DSP
« Reply #2 on: July 15, 2013, 08:10:45 AM »

From quick impressions default settings seem to move sound to the front relative to what I hear without it. The controls are also responsive. Good job!



Didn't know about Faust. Looks like a cool route to make VST stuff. Code definitively looks weird.
Logged

AstralStorm

  • Speculation and Speculums
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +250/-164
  • Offline Offline
  • Posts: 559
  • Warning: causes nearby electronics to go haywire
Re: Advanced Crossfeed DSP
« Reply #3 on: July 15, 2013, 08:22:19 AM »

Looking forward to testing this!  Let's see how it stacks up to hardware crossfeed and bs2b (which cites the same link by Meier and also says it's is as close as possible to linear phase)

This is true, it's as close as possible given its design - in that it uses minimum phase first order IIR filters, that gives 60 degree phase shift at bass.
BS2b implements a Chu Moy's crossfeed - like Meier's first one published on Headroom, except with compensatory highs boost.

The first order IIR filters cause a bass boost and mild subbass distortion, as well as a relatively shallow wide dip in the knee range (depending on crossfeed frequency) in the central signal plus very minor high frequency combing.
The inverted bass cut is both due to the phase shift and requirement for more aggressive feeding due to lack of real ITD simulation - the filter delay acts as one and it's very short. BS2b doesn't specifically feed higher frequencies at all either, only the bass, but the IIR filter used has very low stopband rejection due to being first order, so a tiny amount of feeding is present.
« Last Edit: July 15, 2013, 08:42:36 AM by AstralStorm »
Logged
For sale: Hifiman HE-500; Paradox; Brainwavz B2. PM me if you would like to buy them.

AstralStorm

  • Speculation and Speculums
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +250/-164
  • Offline Offline
  • Posts: 559
  • Warning: causes nearby electronics to go haywire
Re: Advanced Crossfeed DSP
« Reply #4 on: July 15, 2013, 08:59:19 AM »

Didn't know about Faust. Looks like a cool route to make VST stuff. Code definitively looks weird.

Not just VST, it has many "architecture" files. Including a command line application.
The language isn't precisely well known due to being quite new and very domain-specific. It feels in writing like Verilog for audio - you're designing a simplified electrical circuit in textual flow form with some math sprinkled on top.
PureData (also known as Pure) is slightly more widely known - it uses graphical flow forms, but does not have as nice UI and generator capabilities or C bindings. And of older ones, Max/MSP, which is more general and includes control and visuals, is commercial thus has a higher barrier of entry.

The main issue with it is that it's almost purely functional - there are very few stateful facilities (like a mutable buffer) and this makes some things look quite awkward.
Also makes some major algorithms unavailable except by C binding, which works excellent. There's also no support for oversampling yet, but there's work being done in this regard.
Of major unavailable algorithms, resampling or FFT is not possible, neither is thus fast convolution. There's no stdio or direct file access either. For those, C has to be used.
String handling is nonexistent - only very limited numeric substitution.

UIs are relatively spartan too, no nice controls like a spectrum analyzer or oscilloscope are included, but the basic buttons, checkboxes, entry fields, sliders and knobs are there. Of display controls, VU meters and LED are available.
« Last Edit: July 15, 2013, 09:23:00 AM by AstralStorm »
Logged
For sale: Hifiman HE-500; Paradox; Brainwavz B2. PM me if you would like to buy them.

ultrabike

  • Burritous Supremus (and Mexican Ewok)
  • Master
  • Pirate
  • *****
  • Brownie Points: +4226/-2
  • Offline Offline
  • Posts: 2384
  • I consider myself "normal"
Re: Advanced Crossfeed DSP
« Reply #5 on: July 15, 2013, 10:04:29 AM »

This crossfeed is special, as it is probably the only one that's linear for mono signals. (As linear as linear-phase FIR gets.)
Zero combing is possible for mono signals and it should be vastly lower for side signals as well thanks to phase linearity.

The link looks interesting. Not sure if this is what they (CORDA guys) do, but I guess one could generate a left, center, right, or more channels from stereo, and use a different crossfeed approach for each (like almost-no or no crossfeed to the center channel).

Sorry, not sure what you mean by "...inverse phase signals are properly localized..." What inverse phase signals you mean?

This is true, it's as close as possible given its design - in that it uses minimum phase first order IIR filters, that gives 60 degree phase shift at bass.

From quick monkeying around, I think the phase shift depends on the location of the pole and the zeros. I think a lone pole at say 0.05 would give less than 3 degrees of phase shift. A lone pole closer to the unit circle, say 0.95, might result in more than 70 degrees (mostly at the stop band though). As a sanity check, a pole at 0 means no pole and therefore no phase shifts.

First order IIRs are sort of crude, but dunno if they are more than enough for crossfeed design.

The "standard crossfeed" (Meier link) seems to use a pole around 0.85 (or above) with about 60 degrees of phase shift of HF relative to LF. The "extended crossfeed" probably uses a pole around 0.5 (or maybe less) with about 30 degrees of phase shift...   

BS2b implements a Chu Moy's crossfeed - like Meier's first one published on Headroom, except with compensatory highs boost.

The first order IIR filters cause a bass boost and mild subbass distortion, as well as a relatively shallow wide dip in the knee range (depending on crossfeed frequency) in the central signal plus very minor high frequency combing.
The inverted bass cut is both due to the phase shift and requirement for more aggressive feeding due to lack of real ITD simulation - the filter delay acts as one and it's very short. BS2b doesn't specifically feed higher frequencies at all either, only the bass, but the IIR filter used has very low stopband rejection due to being first order, so a tiny amount of feeding is present.

A first order low-pass IIR should act as a clumsy bass boost deal but shouldn't cause subbass issues or combing on its own... Do you mean after left and right channel combination?

Not just VST, it has many "architecture" files. Including a command line application.
The language isn't precisely well known due to being quite new and very domain-specific. It feels in writing like Verilog for audio - you're designing a simplified electrical circuit in textual flow form with some math sprinkled on top.< br />
The main issue with it is that it's almost purely functional - there are very few stateful facilities (like a mutable buffer) and this makes some things look quite awkward.
Also makes some major algorithms unavailable except by C binding, which works excellent. There's also no support for oversampling yet, but there's work being done in this regard.
Of major unavailable algorithms, resampling or FFT is not possible, neither is thus fast convolution. There's no stdio or direct file access either. For those, C has to be used.
String handling is nonexistent - only very limited numeric substitution.

UIs are relatively spartan too, no nice controls like a spectrum analyzer or oscilloscope are included, but the basic buttons, checkboxes, entry fields, sliders and knobs are there. Of display controls, VU meters and LED are available.

 :'(
Logged

AstralStorm

  • Speculation and Speculums
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +250/-164
  • Offline Offline
  • Posts: 559
  • Warning: causes nearby electronics to go haywire
Re: Advanced Crossfeed DSP
« Reply #6 on: July 15, 2013, 10:14:24 AM »

A first order low-pass IIR should act as a clumsy bass boost deal but shouldn't cause subbass issues or combing on its own... Do you mean after left and right channel combination?

Direct form IIR faces some coefficient quantization issues at low frequencies, made worse by the division. in BS2b, this is relatively small, but can be audible if you boost the subbass some dB.
Instead, ladder form should have been used. Or if there's some saturation bits left, normalized ladder form with transformers. Alternatively, internal double precision.

The bass boost is due to the crossfeed itself and is not that large, this happens after channel combination.
Logged
For sale: Hifiman HE-500; Paradox; Brainwavz B2. PM me if you would like to buy them.

AstralStorm

  • Speculation and Speculums
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +250/-164
  • Offline Offline
  • Posts: 559
  • Warning: causes nearby electronics to go haywire
Re: Advanced Crossfeed DSP
« Reply #7 on: July 15, 2013, 07:16:09 PM »

This crossfeed is special, as it is probably the only one that's linear for mono signals. (As linear as linear-phase FIR gets.)
Zero combing is possible for mono signals and it should be vastly lower for side signals as well thanks to phase linearity.

The link looks interesting. Not sure if this is what they (CORDA guys) do, but I guess one could generate a left, center, right, or more channels from stereo, and use a different crossfeed approach for each (like almost-no or no crossfeed to the center channel).

That's because they cannot write a crossfeed that handles front correctly?  ::) Mine doesn't do anything comb-like to the centered signal, other than perhaps increasing the volume and not crossing it.

For surround sound their approach can partially work. However, it's mostly ITD difference, different feed thresholds and different HRTF - especially the latter is beyond crossfeed... It's easy enough to do front-rear, but not more than this with crossfeed approach only.

Quote (selected)
Sorry, not sure what you mean by "...inverse phase signals are properly localized..." What inverse phase signals you mean?

Where one channel and the other are playing similar signal, but inverted phase. This is typically used for a cheap "wide stereo" effect.
Logged
For sale: Hifiman HE-500; Paradox; Brainwavz B2. PM me if you would like to buy them.

happywheels

  • Powder Monkey
  • *
  • Brownie Points: +0/-0
  • Offline Offline
  • Posts: 10
Re: Advanced Crossfeed DSP
« Reply #8 on: July 17, 2013, 01:52:44 PM »

Tragic this doesn't work with yegor's wrapper
Logged

AstralStorm

  • Speculation and Speculums
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +250/-164
  • Offline Offline
  • Posts: 559
  • Warning: causes nearby electronics to go haywire
Re: Advanced Crossfeed DSP
« Reply #9 on: July 17, 2013, 01:56:37 PM »

To make it work there, I would have to implement a faust architecture file for VSTs that provides UI.
Time consuming. The VST host should supply a generated interface if none is present. Yegor's does not.
Logged
For sale: Hifiman HE-500; Paradox; Brainwavz B2. PM me if you would like to buy them.
Pages: [1] 2 3 4 5