# Using REW to generate a FIR and use that with a convolver



## tued (Mar 5, 2008)

Hi,

I'm stuck.

As the title suggest i would like to use REW to make a few measurements of my room and make a few corrections. These corrections should then end up as a FIR that I can use with a convolver like jconvolver.
I'm pretty much stuck at the last part - getting the nice filter out of the first box (REW) and in the the second box (jconvolver).

Properly some info on this site about just that, but can't find it.

Thanks.


----------



## fusseli (May 1, 2007)

I'd assume individual REW filters are simple/easy SOS IIR filters. I don't know that it will calculate symmetric FIR filter coefficients for you...


----------



## tued (Mar 5, 2008)

Then I do not understand the feature for exporting FIR as a sound file.
Where can I find some information about the use of this feature?

NB: couldn't find anything in the sticky threads...


----------



## EarlK (Jan 1, 2010)

> REW doesn't export it's filter set as FIR filters ( * linear phase* ) , they are instead exported ( as created ) as IIR filters (  *minimum phase*  ) .

> It's very arguable that you could hear the difference between these two filter types ( since research shows the human ear is quite phase insensitive ). 

> Currently there's no ( 5 mouse-click / fully integrated / KISS ) approach to creating those EQ filters that then somehow ( auto-magically ) end up residing over in another program's convolution engine ( there is no REW guide for you to follow ) .

> If you are interested in studying how others have approached bridging these two worlds, do a forum search using "convolution" as the keyword .

:sn:


----------



## JohnM (Apr 11, 2006)

REW lets you export the impulse response of a filter set as a WAV file, which is the signal you could use in a convolution package. The response expresses the behaviour of the IIR filter set as a finite impulse response (FIR), but of course the filter characteristics remain 2nd order biquads (IIR filters). The issue is normally finding out how to get the response in a format the convolution package will accept and with the required alignment, which will vary from package to package. I haven't tried any myself, so can't offer any specific help, sorry.


----------



## AudiocRaver (Jun 6, 2012)

One more tip: once you get the impulse response file generated, if it is not in the exact format that Convolver needs, there is a free tool for converting between formats called SoX.


----------



## tued (Mar 5, 2008)

Cool. Thanks!
I hopefully get some time to play with it during the holydays.

@John: When I open the exported WAV file, it is always the same thing. One peek and nothing. Should the filters I have created not affect this output?


----------



## Barleywater (Dec 11, 2011)

To untrained eye, and without close examination, impulse response viewed in time domain indeed looks like single peak and lots of nothing. Care must be used in trimming for use with convolution engines. Low frequencies are expressed over longer time, which translates to more samples in time domain. When trimming, a boundary discontinuity is created that has broadband behavior. Smooth fade in/out is required, but this too will impact filter response. Choice and length of smoothing function becomes important.

Regards,

Andrew


----------



## fusseli (May 1, 2007)

Barleywater said:


> To untrained eye, and without close examination, impulse response viewed in time domain indeed looks like single peak and lots of nothing. Care must be used in trimming for use with convolution engines. Low frequencies are expressed over longer time, which translates to more samples in time domain. When trimming, a boundary discontinuity is created that has broadband behavior. Smooth fade in/out is required, but this too will impact filter response. Choice and length of smoothing function becomes important.
> 
> Regards,
> 
> Andrew


You've boiled down a semester or two of college signal processing classes, great explanation! :nerd: Unfortunately I have never personally used any real-time filtering program like jconvolver so I can't contribute much to the discussion here.


----------



## tued (Mar 5, 2008)

I finalen manage to her it working!

Pretty simple actually. Just export the WAV and let jconvolver handle the rest.
There's a clear difference, so now I jus need to get the measurement right


----------



## Barleywater (Dec 11, 2011)

Congratulations! The initial learning curve often feels like running into brick wall.


----------



## EarlK (Jan 1, 2010)

As Andrew stated, "Congratulations" on getting this far .

If you want to ( further ) pursue the idea of using FIR filters ( or maybe employing a mix of both IIR & FIR ) then checkout this website for a "user-friendly" version of  *DRC*  as scripted ( within Java I believe ) by Alan Jordan .

He has constructed a very powerful ( & slick ) utility for the creation of ( HTPC ) "vst-hosted" EQ filters .



:sn:


----------



## AudiocRaver (Jun 6, 2012)

FYI, there is a converted/fixed version of DRCDesigner. Explanation and link in this post.


----------



## mc_lover (Aug 25, 2012)

- I can measure FR for each speaker
- I know REW has EQ feature
- I can set auto target and then export filter.

---------------------------------
my questions are
- I use a USB dac direct to amp (Benchmark DAC)
- I use Foobar.

how to make use of export REW target file to work with Foobar.

there is a missing link. and I got no clue at all how to work with it.
thank you


----------



## AudiocRaver (Jun 6, 2012)

mc_lover said:


> - I can measure FR for each speaker
> - I know REW has EQ feature
> - I can set auto target and then export filter.
> 
> ...


In REW: file = export - filter impulse response as wav
In Foobar: install the Impulse Response Convolver component
Plug the impulse wav file into the Foobar Convolver

Hope that gets you started. If you need more detail, I can look it up later.


----------



## mc_lover (Aug 25, 2012)

Dear AudiocRaver
I appreciate your suggestion. I went straight to Foobar component and got the revolver.
but it didn't work with the latest foobar.

Can you suggest what will be my next step to try to room optimization with foobar?

- I measure left and right speaker separately already.
- EQ in foobar I believe I can auto target two channels and export it in wav(s) two files.
it's the step i am totally blinded to go on.

thank you


----------



## AudiocRaver (Jun 6, 2012)

Looks like you will need a VST wrapper for foobar, then you will load Convolver into that, then load the impulse file(s) into that.

Two VST wrappers that work with recent foobar versions (according to posts in forums) are Young's Foobar2000 Wrapper and VST 2.4 Adapter.

Also, here is a thread on getting Convolver to work with a wrapper in Foobar.


----------



## krzys (Jul 19, 2006)

This convolver works in foobar 1.1.5
Chris


----------

