rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool

The FFT work with a 32 bits float precision internally, and the final FIR depends on the output format chosen. Floating point formats work much better there, as can be seen on the result curve "noise" floor.

Hi Thomas, how are you?
I apologize in advance for my possibly stupid question, but may I take an HolmImpulse measurement of the driver at, for instance 44,1 kHz and then save the corresponding FIR filter at an higher rate, i.e. 88 or 96 kHz? Is this incorrect?
Thank you

GiAnt
 
Hi Antonello! :)
You can import a freq/magnitude/phase curve measured with any sampling rate and generate a correction FIR with any other sampling rate without problem.
The imported curve is just a visual assistance, nothing more, and it is not at all taken into account when generating the FIR.
With a curve created from a 44.1kHz measurement you will of course only have data up to 22kHz, so you will not see what happens above that unless you bypass it.
 
Last edited:
JRiver should do fine with the 32 bit float. I normally do the impulses in 24 bit signed, and that works just fine. My output is 24 bit at the source sample rate. Are you up-sampling everything to 192K?

Pano, i am a couple of weeks away from experimenting and trying to bring these together. So no concrete plan yet, any advice is appreciated :)

The thought is indeed to up sample all source to a fixed frequency and feed it to the DSP.

Joji
 
Administrator
Joined 2004
Paid Member
I can see advantages and disadvantages to that. Certainly the high pass crossovers might be a bit better at the higher sample rates. POS can comment with much more knowledge on that.
Another advantage is a single impulse file at whatever rate you up-sample to. No need to have 44.1, 48, 96, etc version impulse files.
The disadvantages might be in the re-sampling itself and also in the need to move and decode a signal as high as 192K, instead of letting the DAC chip do it.. The debate on that could be endless.
 
Hi Antonello! :)
You can import a freq/magnitude/phase curve measured with any sampling rate and generate a correction FIR with any other sampling rate without problem.
The imported curve is just a visual assistance, nothing more, and it is not at all taken into account when generating the FIR.
With a curve created from a 44.1kHz measurement you will of course only have data up to 22kHz, so you will not see what happens above that unless you bypass it.

Great Thomas!:)
 
I can see advantages and disadvantages to that. Certainly the high pass crossovers might be a bit better at the higher sample rates. POS can comment with much more knowledge on that.
Another advantage is a single impulse file at whatever rate you up-sample to. No need to have 44.1, 48, 96, etc version impulse files.
The disadvantages might be in the re-sampling itself and also in the need to move and decode a signal as high as 192K, instead of letting the DAC chip do it.. The debate on that could be endless.
Ditto what Pano said.
In the end any difference is probably not audible.
During adjustments it is probably simpler to have a single FIR file to generate.
Then when the system is stable it might be a good idea to generate a FIR for each sampling rate to simplify and clean the processing chain, and save some CPU power...
 
If we're going to indulge let's be a little more specific. Changing sampling rates introduces the response of the antialiasing filter used as error. Numerous results (including my own ABX testing) indicate this error causes subjective degradation and mastering engineers often exploit special cases to shift some error out of band to optimize mix quality. However, despite people banging on about this for some decades now, the limits of audibility for resampling error aren't well known. The best compact introduction to the design tradeoffs I'm aware of is Wolfson's paper on DAC filter design, though the underlying math is identical for ADCs and (A)SRCs.

Analog realized a couple decades ago is ASRC and DAC antialiasing filters can be combined for reduced resampling error, the result being the sample and hold block in the AD1955. The ASRC in ESS DACs is a small refinement of this (refer to Robert Adams of Analog's writings on sigma delta DACs and the "Operation of the S/PDIF Receiver and Asynchronous Sample Rate Converter (ASRC) in the ESS Sabre DAC" whitepaper if interested).

Nearly all DACs operate at 8x Fs by upsampling 4x, applying an anti-aliasing filter, upsampling 2x, and applying a second anti-aliasing filter. An increasing number of DACs offer a selection of anti-aliasing filters with different error tradeoffs. As I noted not quite three years ago in this thread higher end ESS parts take this a step farther by offering user programmable anti-aliasing filters. (pos added rePhase support for synthesizing these many versions ago.) Additionally, some DACs---including ESS parts---offer a bypass mode where data is presented directly at 8x Fs.

Minimum resampling error with an ES9018 like Jojip's therefore occurs in two cases. Either the DAC performs upsampling as normal, perhaps with adjusted filters, or upsampling is performed externally and the DAC operated in bypass. Presenting all data to the DAC at 196 is, mathematically, not optimal. However, it's often presumed by those unfamiliar with this fairly obscure bit of DSP considrations more upsampling is better. So, psychoacoustically, there's a counteracting placebo effect which may result in perceived improvement. If this happens to work for you, well, carry on then. ;)
 
Hello Thomas,

starting rePhase on a new laptop is quite capricious (W7 sp2):p

i do not remenber the DOS command to obtain the path of the temp directory
(wich contain rePhase setting).
i hope deleting the temp folder solve the trouble.(Ccleaner is not useful)

EDIT
it's ok now,just execute rePhase from DOS prompt.
now,it starts correctly every time from W7...



498073Sanstitre.png
 
Last edited:
If we're going to indulge let's be a little more specific. Changing sampling rates introduces the response of the antialiasing filter used as error. Numerous results (including my own ABX testing) indicate this error causes subjective degradation and mastering engineers often exploit special cases to shift some error out of band to optimize mix quality. However, despite people banging on about this for some decades now, the limits of audibility for resampling error aren't well known. The best compact introduction to the design tradeoffs I'm aware of is Wolfson's paper on DAC filter design, though the underlying math is identical for ADCs and (A)SRCs.

Analog realized a couple decades ago is ASRC and DAC antialiasing filters can be combined for reduced resampling error, the result being the sample and hold block in the AD1955. The ASRC in ESS DACs is a small refinement of this (refer to Robert Adams of Analog's writings on sigma delta DACs and the "Operation of the S/PDIF Receiver and Asynchronous Sample Rate Converter (ASRC) in the ESS Sabre DAC" whitepaper if interested).

Nearly all DACs operate at 8x Fs by upsampling 4x, applying an anti-aliasing filter, upsampling 2x, and applying a second anti-aliasing filter. An increasing number of DACs offer a selection of anti-aliasing filters with different error tradeoffs. As I noted not quite three years ago in this thread higher end ESS parts take this a step farther by offering user programmable anti-aliasing filters. (pos added rePhase support for synthesizing these many versions ago.) Additionally, some DACs---including ESS parts---offer a bypass mode where data is presented directly at 8x Fs.

Minimum resampling error with an ES9018 like Jojip's therefore occurs in two cases. Either the DAC performs upsampling as normal, perhaps with adjusted filters, or upsampling is performed externally and the DAC operated in bypass. Presenting all data to the DAC at 196 is, mathematically, not optimal. However, it's often presumed by those unfamiliar with this fairly obscure bit of DSP considrations more upsampling is better. So, psychoacoustically, there's a counteracting placebo effect which may result in perceived improvement. If this happens to work for you, well, carry on then. ;)

Twest,

Lots of useful information here. Thanks.

I wont understand all the details without more time invested on reading and thinking. But i did know that upsampling will have its neg effects on the fidelity. As Pos and Pano mentioned, this is more for a simpler setup to get going with.
But the directions you pointed to help understand the next level of tweaks.

Unfortunately the DAC designer hasnt opened the DAC firmware. So tweaking the DAC register settings is not an option available immediately. I will try to get access to the device programming documentation and existing firmware.

So i think the goal i will set is to eventually create filter setup for each source sampling frequency, leaving the DAC to do the 8x upsampling and AA filtering.
I assume such filter configurations are automatically picked up by Jriver based on the source's detected sample rate?
For starters I will develop one filter setup.

Will invest time and also continue to prod for more comments and advice. As always, i'm thankful to the experts taking time to help and train others.
 
Hello Thomas,

starting rePhase on a new laptop is quite capricious (W7 sp2):p

i do not remenber the DOS command to obtain the path of the temp directory
(wich contain rePhase setting).
i hope deleting the temp folder solve the trouble.(Ccleaner is not useful)

EDIT
it's ok now,just execute rePhase from DOS prompt.
now,it starts correctly every time from W7...



An externally hosted image should be here but it was not working when we last tested it.
Hi Thierry,

This problem only occurs because you did not let it run and install fully during the first (long) run! :smash: ;)
rePhase should normally be able to take care of the partial installation (hence your screen shot), but it looks like it does not, for some strange reason.

Removing the corresponding temp files is easy: execute "cmd", then remove %temp%/par-XXX/, XXX being your user name
 
By the way, do some of you encounter problems in rephase when using directory names with accents, or even when having a user name with accents?

I thought that I had that issue fixed in a previous version, but I recently realized it was still there.
It is now fixed in the development version, but I don't know if I will have to use special tricks for Japanese, Korean and Chinese encodings...
So if a Japanese, Korean and Chinese user could shim in, or possibly accept to try a few tests versions, that would be great :D
 
Last edited:
I assume such filter configurations are automatically picked up by Jriver based on the source's detected sample rate?
Jriver's docs are pretty good; often a quick search can resolve such questions.

It is now fixed in the development version, but I don't know if I will have to use special tricks for Japanese, Korean and Chinese encodings...
If you're using wide strings internally there shouldn't be need for special handling. Usually I include a few such Far East localization cases in the relevant data driven unit tests and have actually never hit a functional bug---usually problems are more with UI developed in Anglo-European locales not leaving enough space for wider characters in other languages, though since rePhase mainly works with numbers it has some immunity to this.
 
If you're using wide strings internally there shouldn't be need for special handling. Usually I include a few such Far East localization cases in the relevant data driven unit tests and have actually never hit a functional bug---usually problems are more with UI developed in Anglo-European locales not leaving enough space for wider characters in other languages, though since rePhase mainly works with numbers it has some immunity to this.
The problem is with directory and file names with windows...
 
twest820,

I ended upsample all 44,1/88,2 to 176,4 and 48/96 to 192 at most upstream container inside JRiver DSP.

This is for two reasons, first is to get able to correct IRR EQ in tweeter region 20k-40kHz area and second reason is very bad pre/post ringing for many sound card devices when they set to lower sample rates. These very bad pre/post ringing scheme for many sound card devices is revealed in a simple loopback test at all the various sample rates, but they perform a really nice clean impulse response when they explicit feed a 176,4 or 192kHz.

Hope not these setting scheme is terrible wrong because it actual measures much better and sounds pretty good.
 
Hello,

you can not avoid pre/post ringing because of the nature of the lowpass filter whithout the complementary components.(Gibbs phenomenom)

whatever the sampling frequency,linear or minimum phase AA filter.

the way of some DAC is to "push" the pre-ringing beyond the t=0 (apodizing)
with some minimum phase AA filter in the frequency about 35-40KHz.(need to to do it with the oversampled signal).

some designer are mixing linear and min. phase AA filter.
it's possible to do it with rePhase,phase EQ and min.phase lowpass.

basic brickwall AA fiilter (sinc function) provide pre/post ringing,it appears at 22 or 24 KHz,beyond the threshold audibility.

a quick check of AA filter of ESS 9023.
(a square wave at 1KHz (Fs=96KHz --->SPDIF input) and a scope.

as we can see,the ESS 9023 is pushing the preringing after t=0.
(group delay in the high band (20-25KHz) is higher than the audio band.

ringing is always at 24KHz

An externally hosted image should be here but it was not working when we last tested it.



An externally hosted image should be here but it was not working when we last tested it.


ringing (post) occurs at 24KHz ,even with 96KHz signal with ESS 9023



An externally hosted image should be here but it was not working when we last tested it.


with a sinc function as AA filter,we can play with rePhase.
phase EQ and lowpass filter (min. or lin. phase).
there is a lot of possible combination ...

here's an example with rePhase on sinc function AA filter DAC.

An externally hosted image should be here but it was not working when we last tested it.
 
Last edited:
thierry38,

Thanks pointing out nice info will take a closer look later.
Have a old AP192 and its ringing scheme for me looks like is by the book at all sample rates 44,1/88,2/96/176,4/192kHz, then have two relative modern USB devices and except for 176,4/192kHz they awful, can't remember if i saved their measurements else i can do some new and show the mess.
 
Hope not these setting scheme is terrible wrong because it actually measures much better
I think you've answered your question. :p To be clear, the minimum resampling error case is not necessarily the minimum error case. Be a bit cautious with loopback tests, though, as they lack ability to discriminate between DAC and ADC responses. Taking a look with an oscilloscope is helpful there. It's been my experience with the small number of implementations I've had available to measure that ADC response tends to contribute more ringing than the DAC.

One option for mitigating the time smearing of linear phase brickwalls is to present upsampled information to the DAC without applying an anti-aliasing filter. This creates a full set of images which are attenuated to whatever extent the DAC's higher sample rate filters offer, which can work out OK if the analog portions of the signal chain can accommodate the ultrasonic content without generating significant downmod components or encountering slew rate limitations. As you've touched on, design has a tendency to stop at 20kHz, however.

you can not avoid pre/post ringing because of the nature of the lowpass filter
What you've got there is a fine study of minimum phase response on the 9023's output. However, the ringing remaining at 24kHz regardless of sample rate indicates it's not due to the DAC's FIR anti-aliasing filter. Barring errors in the datasheet's description of the filter response, anyways, but my initial guess would be you're measuring excess inductance or perhaps dubious phase margin elsewhere.

The Gibbs phenomenon is an artifact of the Fourier transform, which is not a causal thing as the transform indiscriminately maps all time considered into the frequency domain. The ringing you're measuring is causal, so it isn't Gibbs. Gibbs can manifest to varying extent in intermediate and linear phase filter responses if sufficient delay over a minimum phase response is added, serving as a measure of how well the filter approximates the acausal brick <-> sinc time <-> frequency exchange of the Fourier maths.
 
The Gibbs phenomenon is an artifact of the Fourier transform, which is not a causal thing as the transform indiscriminately maps all time considered into the frequency domain. The ringing you're measuring is causal, so it isn't Gibbs. Gibbs can manifest to varying extent in intermediate and linear phase filter responses if sufficient delay over a minimum phase response is added, serving as a measure of how well the filter approximates the acausal brick <-> sinc time <-> frequency exchange of the Fourier maths.
You would say Fourier series.(no FFT is concerned in this case).

I never said my measure (causal) is linked to Gibbs phenom.:)
just to pointed out what is the behaviour of brickwall filter in time domain.

the ringing is always 24KHz in this case ,i think this is the DSP.
this is a measure with a FIR filter (3000 taps high pass 130Hz/96dB lin.phase).

the impulse high pass (48Khz) is convoluted with the signal in a ADAU1452 ("stacked" on a ADAU1701).called DSPiy
the limitation of bandwidth comes from here.
(this is a direct convolution engine,fixed point,no FFT/IFFT).

the chain:
SPDIF (96K)----->ASRC+ADAU1701 (96K)---->ADAU1452 (48K)------>ESS 9023.
for FIR crossover app.

There is another chain possible,with ADAU1452 in front of the ADAU1701.(for IIR crossover app)
SPDIF (96K)----->ASRC+ADAU1452 (48K)--------->ADAU1701 (96K)----->ESS 9023
 
Last edited: