News:

SMF for DIYStompboxes.com!

Main Menu

any FV-1 cabsim?

Started by potul, November 23, 2017, 10:32:47 AM

Previous topic - Next topic

gena_p1

Quote from: potul on December 18, 2017, 05:46:58 AM
Interesting.... where did you get IR files with 32768 sample rate?
just asked our sound director to make.

We did project called "CabZone" FIR cabsim based on adau1701 , so impulses were prepared and translators from wav to C were made.
And i just spent couple of hours to make wav2spin off wav2fir

Firesledge

Quote from: potul on December 18, 2017, 05:46:58 AMInteresting.... where did you get IR files with 32768 sample rate?

You can resample the IR like any other sample. Just make sure that the phase is not messed up.

Pédale Vite, multi-FX pedalboard

potul

Quote from: Firesledge on December 18, 2017, 04:16:14 PM
Quote from: potul on December 18, 2017, 05:46:58 AMInteresting.... where did you get IR files with 32768 sample rate?

You can resample the IR like any other sample. Just make sure that the phase is not messed up.

So I can use something like ffmpeg and resample it like a regular wav? I will give it a try.


Rob Strand

#23
Short FIR filters will never work very well for low frequency filters.   Very roughly it will pretty much do nothing for frequencies below 'sample frequency'/filter length.

There's a trick in DSP called polyphase filtering  (it comes under the topic of multirate filtering) it is far more efficient than using a single filter when the filter's cut-off frequency is small compared to the sample frequency.  It's all formalized and optimised in the DSP literature but unfortunately the way it is presented is hard to understand.   When you look at it you might think it is complicated and takes more processing but it doesn't, it is *far* more efficient.

The key to the idea is if want a *low-pass* filter with low frequency cut-off, say 100Hz, the required length of the filter at sample rate fs/2 is shorter than at fs.   If we keep going fs/4, fs/8   then the length of the low-pass filter gets shorter and shorter.  What we are doing here is down sampling the input signal.  In practice there's an optimum place to stop.  Anyway if you say down sample a bit to say fs/4 or fs/8  the filter is a hell of a lot shorter.    Notice also the 100Hz filter has less samples to process because its operating at a lower sample frequency.

So you down sample, then filter with a short filter at the lower sample rate. Now, the next step is to upsample again back upto sample rate fs.

When you downsample and upsample and you need anti-aliasing low-pass filters.  Sometimes you can go from fs to fs/4 directly other times you can do two steps of fs/2.   The filters need a fair amount of attenuation to prevent unwanted spectral images appearing.   However, they can be short and each step operates at a lower sample rate -> so less calculations.  You might even be able to use half-band filters which have a lot of zeros in the coefficients.

Anyway after all that you end-up with a very efficient *low pass* filter. 

To make this a high-pass filter what you do is calculate:

           High-pass filter   = 1 - Low-pass filter.

[Edit: That's the idea *but* what you really have to calculate ,

           High-pass filter   = Delayed Input - Low-pass filter.

Where the delay matches the delay of all the filters in the Low-pass chain.

You can check it by measuring the output with DC or low frequency input.
]

You would do this high-pass filtering then put it though the higher-frequency low-pass filters which operate at sample frequency fs.

That's the idea.  I don't really want to fill in all the details.  It takes too long. I don't want to write a book here.  If you understand upsampling and downsampling then you should be OK.  Watch out to get the correct scaling when upsampling. 

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

benqbasic

Quote from: gena_p1 on December 18, 2017, 08:04:20 AM
Quote from: potul on December 18, 2017, 05:46:58 AM
Interesting.... where did you get IR files with 32768 sample rate?
just asked our sound director to make.

We did project called "CabZone" FIR cabsim based on adau1701 , so impulses were prepared and translators from wav to C were made.
And i just spent couple of hours to make wav2spin off wav2fir

That is quite an achievement. I am struggling to get an IR file converted to FIR table and loaded into the adau1701.
You need quite a few taps to get the correct bass response.
Did you program a script within SigmaStudios?



gena_p1

I think, my tool might help: http://s.shift-line.com/wav2fir/

It converts mono pcm 48kHz 24bit uncompressed wav to FIR table +/-1  ,
24 bit wav to 24 lower bits of ADAU.

It has hex output is for testing purposes, bytes are LSB (intel format) , so to send it to ADAU you need to convert it to MSB format.


benqbasic

Quote from: gena_p1 on October 14, 2018, 10:43:38 AM
I think, my tool might help: http://s.shift-line.com/wav2fir/

It converts mono pcm 48kHz 24bit uncompressed wav to FIR table +/-1  ,
24 bit wav to 24 lower bits of ADAU.

It has hex output is for testing purposes, bytes are LSB (intel format) , so to send it to ADAU you need to convert it to MSB format.

Thank you, I will check this out when I get home!!!

Can the FIR table be copied directly into the FIR block within SigmaStudio?

Once I get this functioning correctly I will need to work out how to send over i2s to the ADAU.
All new too me so thanks for pointing me in the right direction.





gena_p1

Yes, you may ctrl+c, ctrl+v to sigma studio.