INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5 6 ... 10   Go Down

Author Topic: Native JRiver 64bit fp convolution engine for Room Correction (FIR filters)?  (Read 316714 times)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Does the plan include active speaker setup (crossovers/multiple channels outputting the same audio)??

This is already possible with the Parametric Equalizer DSP.  I use it personally to bi-amp a subwoofer.

Please start a new thread if you'd like to discuss this area more.
Logged
Matt Ashland, JRiver Media Center

fhl

  • Recent member
  • *
  • Posts: 15

+1 for native convolution! :)

Frode
Logged

hulkss

  • Galactic Citizen
  • ****
  • Posts: 446

...encorage people to play with active speakers as a future improvement- creating the most technically accurate sound system possible, and saving thousands of dollars. This would render all high end processors obsolete!

This is working great right now and can only get better.

I just pulled a very expensive pre/pro with Audyssey Pro and two DEQX processors out of my rack and replaced them all with a home built HTPC. I develop the XO and correction filters with Audiolense. Their philosophy combines loudspeaker correction, room correction, and digital XO all into a single filter for each driver. Super quick and easy to use compared to anything else.

JRiver MC does all the digital processing including the ConvolverVST plugin for the FIR filters. Then straight to my 16 channel DAC over USB. Then directly into the power amps. Digital internal volume control with JR Media Center works perfectly.

You can go nuts with multiple room measurements, target response curves, different bass management strategies, all in software.
Ready for prime time now! The final missing piece for set-up of 7.1 systems with active XO just came in build 17.0.62 of MC.

I've been waiting a long time for this solution to be available and it was lots of fun to pull it all together just as all the pieces were ready.

Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

This is working great right now and can only get better.

I just pulled a very expensive pre/pro with Audyssey Pro and two DEQX processors out of my rack and replaced them all with a home built HTPC. I develop the XO and correction filters with Audiolense. Their philosophy combines loudspeaker correction, room correction, and digital XO all into a single filter for each driver. Super quick and easy to use compared to anything else.

JRiver MC does all the digital processing including the ConvolverVST plugin for the FIR filters. Then straight to my 16 channel DAC over USB. Then directly into the power amps. Digital internal volume control with JR Media Center works perfectly.

You can go nuts with multiple room measurements, target response curves, different bass management strategies, all in software.
Ready for prime time now! The final missing piece for set-up of 7.1 systems with active XO just came in build 17.0.62 of MC.

I've been waiting a long time for this solution to be available and it was lots of fun to pull it all together just as all the pieces were ready.



...and the results? We want results!  ;D

I agree on the comment regarding going nuts with multiple measurements (which is a necessity in my room!) and target curves. But fun, even if it makes me a little tired in the morning.
Logged

TheLion

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 437

Matt,

a good set of links regarding this topic and its implementation (FFT) is to be found here: http://convolver.sourceforge.net/links.html
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

I have the internals of a native convolution engine working.

Some points of interest:
  • All processing is 64bit
  • Any number of paths, targetting any input or output channel, is supported
  • All FFT / iFFT evaluation is lazy so only run when necessary
  • Filter files can be in any format supported by Media Center (.wav, .ape, .flac, .mp3, 16bit, 32bit, etc.)
  • Partitioning is used to avoid latency (equal length partitioning for now, maybe unequal length someday)
  • Latency is handled automatically so lip-sync for video works without additional user configuration
  • Filters can be any sample rate (so one high sample rate, high precision filter can be used for all sources)
  • Handles flushing nicely so the tail of the last song isn't heard when playing a new song
  • Handles volume attenuation for clip protection automatically

.

Definitions:
I'm trying to use the same terminology as Convolver to minimize confusion.
  • Path: a single convolution effect consisting of an input channel, filter, and output channel
  • Filter: the correction / convolution used by a path, normally an impulse file


I still have to work out a user interface and reading of convolver text configuration files, so it might be a little while before we have anything to release.
Logged
Matt Ashland, JRiver Media Center

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

  • Filters can be any sample rate (so one high sample rate, high precision filter can be used for all sources)
Does this mean we would need to set all sources to resample to one rate, or that you (JRiver) can use one filter and extrapolate what should be used for other sample rates?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Does this mean we would need to set all sources to resample to one rate, or that you can use one filter and extrapolate what should be used for other sample rates?

You would take one high-quality measurement and create a single high-quality filter.  It would then be used for all sample rates.  There is no performance penalty (other than DSP startup time) and no real-time resampling of the input would be needed.

I can't understand why you would want to do this any other way.  What's the purpose of making different measurements at different / lower sample rates?  A high sample rate measurement contains all the information (and more) that a low sample rate measurement would contain.

If I'm missing some wrinkle on this, please let me know.
Logged
Matt Ashland, JRiver Media Center

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

Hello Matt,

your report looks good, better than my own experiences :-)

Anyway I like to say that a filter samplerate conversion has to be done carefully. In case of a low to high samplerate conversion: how do you handle the stop band area, especially above fs/2 of the lower samplerate? You need to remove the stopband.
In case of high to low samplerate conversion: anyway there will be the brickwall filter influence.

Typically measurements result in filters with lower samplerates. I do not know e.g. how to make a recording with 192 kHz where you get reliable information from microphone and loudspeaker regarding frequencies up to the possible 96 kHz (fs/2). Usually microphones like ECM8000 stop at 20 kHz very quickly.

Another point: IMO it is necessary to allow the partition size to be defined as a parameter. With multiple filters the CPU load can get quicky higher. So a bigger size, e.g. 8192 or 16384 can help a lot. An alternative is to analyze the capability of a CPU and to optimize the setup like fftwisdom (library FFTW) tries to do.



Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

Sample rate and frequency are two different things. A sine sweep at very high sample rates does not mean you microphone needs to record up all the way to fs/2. A 96kHz freq/impulse response measurement will be recorded only up to somewhere above 20kHz (Audiolense recording was up to ~25kHz).

One downside of making high sample rate sine sweeps is a reduced S/N ratio. If it has any practical negative consequences, I don't know.
Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

I have the internals of a native convolution engine working.

Some points of interest:
  • All processing is 64bit
  • Any number of paths, targetting any input or output channel, is supported
  • All FFT / iFFT evaluation is lazy so only run when necessary
  • Filter files can be in any format supported by Media Center (.wav, .ape, .flac, .mp3, 16bit, 32bit, etc.)
  • Partitioning is used to avoid latency (equal length partitioning for now, maybe unequal length someday)
  • Latency is handled automatically so lip-sync for video works without additional user configuration
  • Filters can be any sample rate (so one high sample rate, high precision filter can be used for all sources)
  • Handles flushing nicely so the tail of the last song isn't heard when playing a new song
  • Handles volume attenuation for clip protection automatically

.

Definitions:
I'm trying to use the same terminology as Convolver to minimize confusion.
  • Path: a single convolution effect consisting of an input channel, filter, and output channel
  • Filter: the correction / convolution used by a path, normally an impulse file


I still have to work out a user interface and reading of convolver text configuration files, so it might be a little while before we have anything to release.

This is nothing less than amazing. Less than a couple of weeks after the initial request, Matt has already dug into the matter quite deeply and have a suggested solution! Now, there may be quite some work still before there is a proven, working implementation of it, but I am impressed and utterly grateful for this.

Question regarding filter files. In Convolver, there is a number of ways you can set up your filter. My preferred way is to have one wav filter file with sequences for each channel (total of 15 channels for 7.1 audio because of XO between 7 channels to two subs), which is read an interpreted via a config file. The structure of this file is documentet at http://convolver.sourceforge.net/config.html.
Have you been thinking along the same lines, or will us old Convolver users need to restructure our filters, e.g. divided into one file pr channel? What are your thoughts on using a config file similar to Convolver?


EDIT: Nothing more than amazing replaced by "nothing less than amazing". English is not my native language....
Logged

jdubs

  • Junior Woodchuck
  • **
  • Posts: 86

I have the internals of a native convolution engine working.

Some points of interest:
  • All processing is 64bit
  • Any number of paths, targetting any input or output channel, is supported
  • All FFT / iFFT evaluation is lazy so only run when necessary
  • Filter files can be in any format supported by Media Center (.wav, .ape, .flac, .mp3, 16bit, 32bit, etc.)
  • Partitioning is used to avoid latency (equal length partitioning for now, maybe unequal length someday)
  • Latency is handled automatically so lip-sync for video works without additional user configuration
  • Filters can be any sample rate (so one high sample rate, high precision filter can be used for all sources)
  • Handles flushing nicely so the tail of the last song isn't heard when playing a new song
  • Handles volume attenuation for clip protection automatically

.

Definitions:
I'm trying to use the same terminology as Convolver to minimize confusion.
  • Path: a single convolution effect consisting of an input channel, filter, and output channel
  • Filter: the correction / convolution used by a path, normally an impulse file


I still have to work out a user interface and reading of convolver text configuration files, so it might be a little while before we have anything to release.

Matt, this is amazing and talk about fast!!  Wow.  Good stuff.

-Jim
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Question regarding filter files. In Convolver, there is a number of ways you can set up your filter. My preferred way is to have one wav filter file with sequences for each channel (total of 15 channels for 7.1 audio because of XO between 7 channels to two subs), which is read an interpreted via a config file. The structure of this file is documentet at http://convolver.sourceforge.net/config.html.
Have you been thinking along the same lines, or will us old Convolver users need to restructure our filters, e.g. divided into one file pr channel? What are your thoughts on using a config file similar to Convolver?

I think we'll try to just support Convolver configuration files to start with.

We might end up with our own format (or package of everything in a single ZIP package) later.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Anyway I like to say that a filter samplerate conversion has to be done carefully. In case of a low to high samplerate conversion: how do you handle the stop band area, especially above fs/2 of the lower samplerate? You need to remove the stopband.
In case of high to low samplerate conversion: anyway there will be the brickwall filter influence.

It uses our existing audio resampler, which has quite a good reputation, for the filter files.


Quote
Another point: IMO it is necessary to allow the partition size to be defined as a parameter. With multiple filters the CPU load can get quicky higher. So a bigger size, e.g. 8192 or 16384 can help a lot. An alternative is to analyze the capability of a CPU and to optimize the setup like fftwisdom (library FFTW) tries to do.

The partition size will automatically adjust with the sample rate to target an acceptable level of latency (say 50ms or 100ms).

I've also been playing with using 4 (or more) threads at a time.  It's a little tricky because partitions are such little bits of work that the overhead from starting and stopping the threads offsets the gains.  I think I'll have to let the worker threads sit idle between iterations so there's no create / destroy overhead.
Logged
Matt Ashland, JRiver Media Center

lbstyling

  • Recent member
  • *
  • Posts: 43

Matt, this is amazing and talk about fast!!  Wow.  Good stuff.

-Jim

+1 awsome!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

One thing that would help me with this is if someone could send me a few simple impulse response / filter files.  All I have for testing now are echo examples like "concert hall" that aren't too impressive.

I'd like one that is just an equalization with no timing / phasing effects.  For example, a frequency correction filter for a speaker or headphone.

I'd also like one that makes no changes to make sure I have all the phasing correct.  Maybe this is just silence, but I'm not sure.

I'm matt at jriver dot com.

Thanks.
Logged
Matt Ashland, JRiver Media Center

hulkss

  • Galactic Citizen
  • ****
  • Posts: 446

One thing that would help me with this is if someone could send me a few simple impulse response / filter files.  All I have for testing now are echo examples like "concert hall" that aren't too impressive. I'd like one that is just an equalization with no timing / phasing effects.  For example, a frequency correction filter for a speaker or headphone.

I can send you the config and wave filter files for my set-up with frequency correction only and with time and frequency domain correction. This is a somewhat "big" system with 37 filter paths in the config file. Crossover filters are included as well.

I'm setting up now with 48 kHz filters so no resampling with dvd or Blu-ray optical disk audio playback. Music will up-sample from 44.1 kHz. I can do higher frequency if you want to check processor load and latency.
The wave files might be large so I can send a link to my drop box. I'll be working on filters this weekend.

I would really like to see this work seamlessly with Audiolense.

PS. I highly recommend reading Mitch's blog linked a couple posts earlier.

Brad

Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

I think we'll try to just support Convolver configuration files to start with.

We might end up with our own format (or package of everything in a single ZIP package) later.

Sounds great, thanks!
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1258

This sounds very interesting, continue the good work!
Logged

TheLion

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 437

I have the internals of a native convolution engine working.

Some points of interest:
  • All processing is 64bit
  • Any number of paths, targetting any input or output channel, is supported
  • All FFT / iFFT evaluation is lazy so only run when necessary
  • Filter files can be in any format supported by Media Center (.wav, .ape, .flac, .mp3, 16bit, 32bit, etc.)
  • Partitioning is used to avoid latency (equal length partitioning for now, maybe unequal length someday)
  • Latency is handled automatically so lip-sync for video works without additional user configuration
  • Filters can be any sample rate (so one high sample rate, high precision filter can be used for all sources)
  • Handles flushing nicely so the tail of the last song isn't heard when playing a new song
  • Handles volume attenuation for clip protection automatically

.

Definitions:
I'm trying to use the same terminology as Convolver to minimize confusion.
  • Path: a single convolution effect consisting of an input channel, filter, and output channel
  • Filter: the correction / convolution used by a path, normally an impulse file


I still have to work out a user interface and reading of convolver text configuration files, so it might be a little while before we have anything to release.

WOW.

I am utterly grateful for your efforts! Count me in as lifetime JRiver supporter  ;)

The list of features is great and well thought out. Features like auto volume attenuation, auto delay for lip sync, being inline with JRiver channel mapping and flushing between songs/skips are great benefits compared to ConvolverVST and really show the potential of a tightly integrated convolution. When I first started this thread I wasn't as forward thinking as you show it here - KUDOS! Amazing work!

The main attraction for me (a lover of big numbers ;-) is the full 64bit double precision processing. So this means we finally have a full 64bit audio path where it counts the most - with complex digital filtering. So if you allow 64bit WAV files (mono per channel + multichannel) as filter we can have:

content -> audio decoder (16bit/24bit/32bit for lossy formats) -> JRiver audio engine (64bit) -> JRiver Convolution (64bit) -> Output (dithering to 16bit/24bit/32bit depending on audio interface)
FIR filter generating (eg. Acourate in 64bit) ->  export of filter impuls files (eg. 64bit WAV) -> ^ 


About different sampling rates: I understand that you are not resampling the content stream but the filter -> eg. 48khz content as input, loaded is a 96khz filter, you "resample" the filter file to 48khz before doing the convolution, right? Well, this is certainly a method to make it very easy for the user.
I used to do it the other way round - use a 96khz filter and resample any content to that sampling rate with JRiver. Your way certainly is much more elegant - not messing with the original stream.

Still I remain cautious. With Uli's Acourate I do one measurement (eg. in 48khz) and as final step of the process Acourate has the option to build filters at any given sampling rate - so basically Acourate is also resampling the filter before saving it. I am not sure if Acourate isn't doing a "better" job because it is "aware" of all the parameter involved (like Uli said, eg. brick wall filter influence - the problem is how to you deal with the band >20khz when you are up-/downsampling filters and how does this influence the filter (eg. introduce ringing)).

All DRC applications have the option to output filter at any given sampling rate. I would much prefer it (for the sake of piece of mind) that your Convolver allows automatic filter selection (like defining a workspace directory where the filter is loaded depending on the input stream sampling rate). Your idea idea about using one filter and resample it is certainly welcome and should also be an option.

While you are at it ;-) - A huge feature would be the option to define eg. 3 filter sets with on the fly switching between them. Successful DRC is an iterative try and error process - you build filter, you hear it with a variety of content and you compare it to filter with different parameter (like different target curves). Support for that process would be a huge benefit! This feature could also be used to assign different filter sets to different content. Like one with flat target curve for Stereo music content, and one with more bass emphasize for multichannel (movie) content.

I sent you test impulse filter by email.

THANK YOU VERY MUCH! 



Logged

markus_kr

  • Recent member
  • *
  • Posts: 20

+1 for native convolution!
(Easy switching between filters while hearing would be great.)

You guys are doing a great job

markus
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

You can get an early look at the native convolution system using this build:
http://files.jriver.com/mediacenter/channels/v17/latest/MediaCenter170064.exe

This build and the new convolution system have not been tested extensively, so please be forgiving of any issues.

Both impulse response audio files and convolver configuration files are supported.

The user interface is basic.  The goal is first to get a solid engine running.  Then we'll focus on user interface and convenience issues.

There are a few features of convolver configuration files like line delays and mapping a path to multiple outputs that are not supported.  We'll add these based on demand.  I haven't seen these features used in any of the samples I have received from users.

Thanks to everyone for their help.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

I got this from jdubs in email.  I'll reply here because it might help others as well:
Quote
Matt, first THANK YOU very much for developing this!  Its huge for audiophiles
everywhere.
 
Second, I can't get my Audiolense convolution file to work - at least the Status
indicates "Not Valid" after selected the WAV file via the Browse function.  I tried
ticking the Convolution DSP on and off via the left-hand menu.  I've attached it for
you to look at.  Its for a 6 channel active system (2, 3-way speakers).  Convolver
seems to work fine with it.
 
Thanks again,
jdubs

Thanks for the kinds words.

I'm able to load and use your WAV file.  It looks like it's splitting frequencies for tri-amping nicely.  Of course, it sounds terrible on my 2 and 8 channel test setups where I'm not tri-amping!

Make sure you're actually playing audio when you turn it on and off.  Try starting and stopping playback if it's not engaging.

There's some little bug with getting it to engage on a fresh install.  I saw the same thing.  We'll get it fixed next build.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Let me describe how volume is handled.

The system is designed so that the output RMS level of pink noise, rolled off after 22 kHz so inaudible frequencies don't distort the results, will match the input level. 

In other words, turning convolution on or off should result in the same apparent volume.

This volume is a constant, fixed adjustment applied to all channels.  This means you will have consistent output levels between plays, sources, sample rates, etc.

This approach is especially useful for A/B testing.

It may turn out that this is a bit too aggressive for some filters and Clip Protection will engage due to overflows.  In these cases, an option like "-6 dB to prevent clipping" would be useful.
Logged
Matt Ashland, JRiver Media Center

hulkss

  • Galactic Citizen
  • ****
  • Posts: 446

Matt,

What sample rate do you recommend I use for the filters with your convolver?

Keep in mind: Comments from Rane professional audio about digital filtering of audio: ".....if you compare a typical 16-bit/96 kHz system against a 24-bit/48 kHz, you will pick the 24-bit system every time. If you have a choice, always choose more bits, over a higher sampling rate.......high resolution is key, and this requires more than 24-bit fixed-point or 32-bit floating-point."

You have provided a real improvement with 64 bit floating point processing. I believe 48 kHz should be fine. I understand that this is the sampling frequency of most all dvd and Blu-ray audio.
Logged

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

I have carried out some tests with the convolution engine. Therefore I have created a 24/96 wav with a logsweep signal, starting from 10 Hz to 48 kHz.
The frequency response of the logsweep (calculated from the 24 bit sweep) is



Then I have generated a highpass filter 250 Hz, Neville-Thiele, pretty steep, 96 kHz samplerate, 65536 taps, see



The sweep result convolved with the filter is shown in the next picture. It is just given as a reference. So the output signal of MC should ideally look like this.



The reality looks different. I have played the sweep by MC using the 96 kHz filter and the SPDIF ASIO output of my RME Fireface. The signal has been looped back by the soundcard function and directly recorded by Audition. This is the result:



Already during the recording the unusual low frequency content in the stopband area was detectable.

Ok, then I have tested a crossover filter with the same specs but 44.1 kHz samplerate. Just to see the behaviour above 22050 Hz. The resulting frequency response is



We can clearly see that now all frequencies above 22 kHz are suppressed. This means that a 96 kHz recording will be cut above 22 kHz. Interestingly the low frequency disturbances are lower compared to the 96 kHz filter.
IMO in case of a HD playback it would be better to use also a filter of the same samplerate.

I hope my test will help to understand the inherent traps of simple samplerate conversions. I  do not understand the reason for the low frequency behaviour, this may need further investigations.

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Uli, thanks for the tests.

It seems to point to there being something not quite right in the convolution math.  I would hold judgement on the sample rate handling until we get it sorted.

I'm not clear how you're measuring the output.  Since convolution has a delay before it starts working when starting, could this explain your low frequency anomalies?

I tested by playing pink noise real-time, apply filters (like the ones you emailed me), and watch the results in 'Analyzer' in DSP Studio.  For example, here's how the low pass filter you mailed me looks:



It looks pretty good to me.  And it looks about the same at 44.1 and 96, which indicates filter resampling is working well.

One thing I'm not clear about when doing frequency convolution is the number of FFT output elements to convolute.  When you do FFT on say 1024 PCM samples, you get half as many frequency elements.  So when you convolute in the frequency domain, do you convolute (1024/2), (1024/2)+1, or 1024 elements?
Logged
Matt Ashland, JRiver Media Center

jdubs

  • Junior Woodchuck
  • **
  • Posts: 86

I got this from jdubs in email.  I'll reply here because it might help others as well:
Thanks for the kinds words.

I'm able to load and use your WAV file.  It looks like it's splitting frequencies for tri-amping nicely.  Of course, it sounds terrible on my 2 and 8 channel test setups where I'm not tri-amping!

Make sure you're actually playing audio when you turn it on and off.  Try starting and stopping playback if it's not engaging.

There's some little bug with getting it to engage on a fresh install.  I saw the same thing.  We'll get it fixed next build.

To follow-up, its working and sounds terrific!!  Thanks Matt!!   ;D

Jim
Logged

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

Matt,

IMO something is wrong. The lowpass I have sent you looks exactly like this:



It looks much different compared to your picture. The yellow curve also shows some dips like the pictures I've posted before.
The comparison of the 44.1 and the 96 kHz filter with the lowpass does not give information about the behaviour at high frequencies. Because the lowpass suprresses the high frequency information by its own purpose. Whereas in my example the 44.1 kHz filter suppresses the high frequency information of a 96 kHz music track.

Convolution:
assume a convolution of 1024 samples with 1024 taps. The result has 2048-1 = 2047 samples. It must have as told by maths.
With FFT convolution you have 513 bins for the kernel and for the music package. If you simply multiply and transform back you get 1024 samples result and this is wrong.
So you need to apply zero tagging. Enlarge the kernel and the music package each to 2048 samples, apply zero padding, apply FFT. This give 1025 bin. Do the multiplication and the IFFT and you get a 2048 samples convolution result. resize to 2047 samples to be exact.
If you run a streamed convolution then you have to send 1024 samples to the output and save the following 1023 samples. With the next input package you repeat the process but add the saved samples to the 1024 samples prep'd for the next output.
You can read much better about how to do this at the free book at www.dspguide.com (IMO an excellent book about DSP, one of the best, easy to read, easy to follow and even with very good program examples).
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75


I'm not clear how you're measuring the output.  Since convolution has a delay before it starts working when starting, could this explain your low frequency anomalies?


Matt,

just can play pink noise with the output set to disk writer, then you can display the FFT with an external SW.

I have found similar results as Audiovero at low frequency with an high-pass filter: only 40dB attenuation in the stopband.
Also, there is the same cutoff at 22.05kHz with pink noise sampled at 96kHz.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

The yellow curve also shows some dips like the pictures I've posted before.

Real-time analysis of noise bounces around a little, so you sort of need to watch it.  Are you saying the fall-off doesn't look steep enough?


Quote
assume a convolution of 1024 samples with 1024 taps. The result has 2048-1 = 2047 samples. It must have as told by maths.
With FFT convolution you have 513 bins for the kernel and for the music package. If you simply multiply and transform back you get 1024 samples result and this is wrong.
So you need to apply zero tagging. Enlarge the kernel and the music package each to 2048 samples, apply zero padding, apply FFT. This give 1025 bin. Do the multiplication and the IFFT and you get a 2048 samples convolution result. resize to 2047 samples to be exact.
If you run a streamed convolution then you have to send 1024 samples to the output and save the following 1023 samples. With the next input package you repeat the process but add the saved samples to the 1024 samples prep'd for the next output.
You can read much better about how to do this at the free book at www.dspguide.com (IMO an excellent book about DSP, one of the best, easy to read, easy to follow and even with very good program examples).

I think I've got the zero-packing and buffer rolling correct.

What I think you're saying is that you should convolute ([FFT Size] / 2) + 1 elements.  In other words, this is the number of meaningful elements that come out of an FFT.


Quote
resize to 2047 samples to be exact.

Could you explain that?  I may have an off-by-one issue.

I do this:
FFTSize=1024
Input buffer like: [512 last input][512 current input]
FFT all 1024
Convolute (I think you're saying do 513 elements)
iFFT, use last 512 as output
Roll right side of input buffer to left side and add next 512 elements to right side
Logged
Matt Ashland, JRiver Media Center

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

I'm not clear how you're measuring the output.  Since convolution has a delay before it starts working when starting, could this explain your low frequency anomalies?
Matt,
I start the recording already before playback. And I stop if after the playback has finished. Therefore I also use some start stop markers (Dirac pulses) in the playback file. So I can also follow up the running recording.
As already said I use a loopback function of my RME soundcard. So the output signal is directly led to an input (internally) where I record the signal. As the signal does not leave the digital domain, there is no AD/DA-conversion in between and the full precision is reserved.
Logged

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

Matt,

the n x m convolution results in a length of n+m-1
So you have to ensure the same result length also by FFT convolution.
IMO the best way is to define some test signals and to check your program for the known result.
So the convolution of two signals with samples 1 0 0 1 will give the result 1 0 0 2 0 0 1. You can expand it to 1 (1022*0) 1 and you will get 1 (1022*0) 1 (1022*0) 1
Your FFT convolution must behave the same.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

IMO the best way is to define some test signals and to check your program for the known result.
So the convolution of two signals with samples 1 0 0 1 will give the result 1 0 0 2 0 0 1. You can expand it to 1 (1022*0) 1 and you will get 1 (1022*0) 1 (1022*0) 1
Your FFT convolution must behave the same.

Good idea.  I'll do this next week.
Logged
Matt Ashland, JRiver Media Center

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

Sample rate and frequency are two different things. A sine sweep at very high sample rates does not mean you microphone needs to record up all the way to fs/2. A 96kHz freq/impulse response measurement will be recorded only up to somewhere above 20kHz (Audiolense recording was up to ~25kHz).

One downside of making high sample rate sine sweeps is a reduced S/N ratio. If it has any practical negative consequences, I don't know.

Since my previous post has been totally ignored, and since there obviously are several members here with much deeper understanding than me (not too difficult), would anyone be willing to take the time to explain where I have misunderstood?  Thanks a lot :)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41862
  • Shoes gone again!

Since my previous post has been totally ignored, and since there obviously are several members here with much deeper understanding than me (not too difficult), would anyone be willing to take the time to explain where I have misunderstood?  Thanks a lot :)

There's just a lot happening in this thread.  I think what you said makes sense.

Even if your microphone doesn't work past 20 kHz, I would think you could still make measurements and correction files at a high sample rate like 192 kHz.
Logged
Matt Ashland, JRiver Media Center

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

There's just a lot happening in this thread.  I think what you said makes sense.

Even if your microphone doesn't work past 20 kHz, I would think you could still make measurements and correction files at a high sample rate like 192 kHz.

Thanks, Matt :-)

Regarding use of different channel configs - today I have separate filter files for these types of sources:

7.1 24bit/48kHz for movies (use JRSS to mix up everything to 7.1), XO for all speakers to two subs
2.0 16/44.1 for all ordinary music files, no XO, no subs
2.1 16/44.1 if I for some reason want to use XO and extra sub boost
7.1 24/96 for a few multichannel hirez music releases
2.0 24/96 for hirez music releases

There are two main reasons why I have all these configs 1) separate filters have up to now been required for different sample rates, and 2) I use different target curves for music and movies (something very similar to the B&K target curve for music and much more bass boost in movies...)

Reason 1) seems to be void with the native convolver, assuming all technical issues (if there actually are any) become verified as solved.

Reason 2) will still be needed it seems, as long as the ConvolverCST config file structure is used as input. I don't see any other way to switch between different target curve filters and between full range mains and XO setups. I can probably use the same filter for 2.0/16/44.1 and 2.0/24/96. But separate filters will still be needed for 2.1/16/44.1, 7.1/24/48 movie and 7.1/24/96 music.

I am not saying this should be changed, it works. But if there are better and fully automated ways to link source and filter, it would be great. Any good suggestions, anyone?



Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

Some points of interest:
  • Latency is handled automatically so lip-sync for video works without additional user configuration
I cannot get sync right. I use a 8ch input, to 15 paths and 8ch output, 132k taps. With ConvolverVST, the audio had to be delayed 1570ms as a fixed value. According to your statement above, Matt, I first set Audio delay to 0ms (Tools-Video-Advanced-A/V sync value). That did not work. I finally ended up delaying the video 1510ms, which worked for a brief period in one movie. After some time, it seems the delay changes. In another movie, the delay was close to, but no exactly 1510ms even from start.

What part am I missing here?

I can send the filter file and config file if that is of any help.
Logged

Mitchco

  • MC Beta Team
  • World Citizen
  • *****
  • Posts: 173

You can get an early look at the native convolution system using this build:
http://files.jriver.com/mediacenter/channels/v17/latest/MediaCenter170064.exe

Fantastic!! - thanks so much Matt!

I downloaded and tried it out with a few listening tests, more detail later, but it certainly works.

However, for some tracks, I notice distortion on either very quiet classical tracks or on very "hot" mastered tracks.  Some occur on 44.1KHz samples and the classical was at 176.8KHz sample rates.



When I switch back to the old ConvolverVST, the distortion goes away.

Maybe I am doing it wrong?

Again, this is so awesome, I can't thank you enough!

Cheers, Mitch

)p(

  • Citizen of the Universe
  • *****
  • Posts: 579

Fantastic!! - thanks so much Matt!

I downloaded and tried it out with a few listening tests, more detail later, but it certainly works.

However, for some tracks, I notice distortion on either very quiet classical tracks or on very "hot" mastered tracks.  Some occur on 44.1KHz samples and the classical w

There is now way yet to set a fixed lower level to avoid clipping I think. Do you have all your audio files analyzed by jriver. If so then enable volume leveling and clip protection in jrmc's dsp that should do away with most and maybe all of the clipping.
Logged

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

Since my previous post has been totally ignored, and since there obviously are several members here with much deeper understanding than me (not too difficult), would anyone be willing to take the time to explain where I have misunderstood?  Thanks a lot :)
I have not answered directly (despite I have caused the question) because the thread topic is a bit different.

But anyway:
Assume that you run a recording with 96 kHz and you use a logsweep 10 Hz to 236 Hz (arbitrary number). Of course you can do this. Can you use the result for a correction? Yes, you can do. But how do you correct frequencies above 236 Hz? You do not have any information. Just to suppress all higher frequencies is not correct for sure. In best case you can design a filter where all high frequencies pass 1:1. This means no correction at all above 236 Hz.
So what is the "logical" difference of 236 Hz compared to 20 kHz? IMO there is no one. You will find many discussions in the web about the importance of frequencies higher than 25 kHz. I have run a test with some people by applying a brickwall filter to a HD track. The people claimed a better sound without the brickwall filter. Now running a sweep just up to 20 kHz is like a brickwall filter.

The actual FIR filter samplerate conversion of MC shows also such a stopband behaviour. So clearly music information is taken away.

Of course with a good mic (my Earthworks M50 microphone is capable to record up to 50 kHz) you will get more information about the reality. The reality will typically show a tweeter with a falling frequency response at least above 30 kHz. But there is more information and the filter quality can be improved. Finally a good filter, IMHO, will correct up to a meaningful frequency range and then pass the music stream 1:1. If 236 Hz is meaningful then you can stop the logsweep here and design an according filter. Or 20 kHz. Whatever you like.  :)

In some way it is amusing to see audiophiles hunting for recordings up to 384 kHz samplerate but not knowing how the playback system behaves above 20 kHz. Does it make sense?
Logged

SamuelMaki

  • World Citizen
  • ***
  • Posts: 115

+∞ for native convolution  :)

For those using (or thinking of using) JRiver and Audiolense, I wrote a series of blogs posts, including setup, configuration, and measurements.

Hope you don't mind a few links...

http://www.computeraudiophile.com/blogs/Hear-music-way-it-was-intended-be-reproduced-part-1

http://www.computeraudiophile.com/blogs/Hear-music-way-it-was-intended-be-reproduced-part-2

http://www.computeraudiophile.com/blogs/Hear-music-way-it-was-intended-be-reproduced-part-3

http://www.computeraudiophile.com/blogs/Hear-music-way-it-was-intended-be-reproduced-part-4

http://www.computeraudiophile.com/blogs/Hear-music-way-it-was-intended-be-reproduced-part-5

http://www.computeraudiophile.com/blogs/Hear-music-way-it-was-intended-be-reproduced-conclusion

Cheers, Mitch

Impressing results, you got my attention:) However, audiolense is really expensive (for me...), so can someone suggest cheaper or free solution? Or can I use the free trial, do the measurings and build the correction filter, and save it and use it even when the trial has expired? Or must I buy the full version to be able to do all the tricks you mentioned on your tutorial?
Logged
AMD Phemon II N930 Quad 2.0ghz, AMD Radeon HD 5650, 4GB RAM, Windows 8 RP x64

)p(

  • Citizen of the Universe
  • *****
  • Posts: 579

can someone suggest cheaper or free solution?

I use the open source
http://drc-fir.sourceforge.net/
Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974

I use the open source
http://drc-fir.sourceforge.net/

Just be aware that different DRC solutions may (or rather will) give different results. This is not because one is objectively more correct than the other, but the developers seem to have different philosophies on what is the correct way.

BTW, Audiolense can be downloaded and tested, and you will get a fully functional filter, but the filter will be attenuated 10dB (or was it 20dB?). I am not sure if you get a trial on the XO version. But at least the 2.0 version is available.

BTW 2: Note that even if you use open source software, you will need to have a sufficiently good low latency sine sweep generator/recording solution. And a calibrated mic and mic preamp (note that many mic preamps use tubes to get that colorful voice recording, not exactly frequency linear, are they...?). This means you will need to spend a few bucks on gear anyway.
Logged

AudioVero

  • Junior Woodchuck
  • **
  • Posts: 52

A free logsweep recorder is www.acourate.com/AcourateLSR2Setup.exe
Logged

Mbare

  • Recent member
  • *
  • Posts: 17
  • One (proud) audiophile checking in.

Reading this thread has been a pure pleasure. I just got myself an HTPC for Christmas and I'm running into a lot of the issues that Matt is currently working on fixing (I have standard 2-channel hi-fi and I run Audiolense). Big thumps up for fixing this and looking forward to trying it.  :)
Logged
Room-correction saved my hi-fi. HTPC, Audiolense and JRiver Media Center, RAKK-DAC, Heretical buffer, Hegel poweramp and Magnepan loudspeakers.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71211
  • where the buffalo roam


BTW 2: Note that even if you use open source software, you will need to have a sufficiently good low latency sine sweep generator/recording solution. And a calibrated mic and mic preamp (note that many mic preamps use tubes to get that colorful voice recording, not exactly frequency linear, are they...?). This means you will need to spend a few bucks on gear anyway.
We might buy a set or two and rent them for a week at a time.  Can you recommend good equipment?
Logged

)p(

  • Citizen of the Universe
  • *****
  • Posts: 579

Just be aware that different DRC solutions may (or rather will) give different results. This is not because one is objectively more correct than the other, but the developers seem to have different philosophies on what is the correct way.

BTW, Audiolense can be downloaded and tested, and you will get a fully functional filter, but the filter will be attenuated 10dB (or was it 20dB?). I am not sure if you get a trial on the XO version. But at least the 2.0 version is available.

BTW 2: Note that even if you use open source software, you will need to have a sufficiently good low latency sine sweep generator/recording solution. And a calibrated mic and mic preamp (note that many mic preamps use tubes to get that colorful voice recording, not exactly frequency linear, are they...?). This means you will need to spend a few bucks on gear anyway.

I know and I think the choice of a proper target curve can be pretty subjective. I settled with drc on a flat one in combination with its psychoacoustic target computation described here:
http://drc-fir.sourceforge.net/doc/drc.html#htoc31

I agree on the mic-amp combo. I bought them calibrated together.

I have not tried the commercial ones...maybe someday. I am already very happy with the sound as it is :)
Logged

Sandy B Ridge

  • Citizen of the Universe
  • *****
  • Posts: 885

We might buy a set or two and rent them for a week at a time.  Can you recommend good equipment?
That's a really good idea.

Just thinking about it - a combined mic/amp/adc set would need to be calibrated wouldn't it? Since the adc can also presumably have it's own non-linearity. Does anyone do a USB fully calibrated mic/amp/adc for example? Or are adc's usually not much of a problem?

Renting out spectrometers for screen calibration at the same time would be good too!

SBR

PS: I guess shipping them to Europe wouldn't be very cost-effective!
Logged
Pages: 1 [2] 3 4 5 6 ... 10   Go Up