Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Sound amplitude

Altera_Forum
Honored Contributor II
1,026 Views

Hi, 

I'm trying to write noise gate in vhdl. I use DE2 board and I wonder how can I compare sound amplitude and threshold in noise gate. How can I check sound amplitude value?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
75 Views

In order to estimate the sound amplitude, you can use a modified moving average filter like this: 

 

 

y[n]=1/N*sum(k=0,k=N-1,|x[n-k]|) 

 

 

This resembles a full wave rectifier. 

 

if N=2^m you don't need any multiplier. So, you need N registers, N-1 sub/add circuits ("sub" if x[n-k]<0 and "add" if x[n-k]>=0) and a hardwired arithmetic shifter.
Altera_Forum
Honored Contributor II
75 Views

i would drop the scale factor and build this particular filter with a CIC-like structure. the actual filter becomes 2 adders (well 1 add 1 subtract). 

 

input => absolute value => CIC
Altera_Forum
Honored Contributor II
75 Views

Yeah, this sounds better.

Reply