Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-07-2009
01:10 AM

989 Views

Sound amplitude

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?Link Copied

3 Replies

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-07-2009
04:39 AM

38 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 I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-08-2009
04:06 PM

38 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 I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-09-2009
02:31 AM

38 Views

Yeah, this sounds better.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.