Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

Input sound and determine the amplitude/volume

Altera_Forum
Honored Contributor II
913 Views

Okay, so I'm using the DE2 board and I want to be able to do 2 things. 

1)to either input music from a file or the input jack (blue input jack) 

2)and then process it so I can determine the magnitude of the music 

 

Basically what I want is to flash an LED when the amplitude of the music is greater than x. 

So basically I can then make one of those sound bars or volume bars where more LEDs light up when the sound is loud, but only a few when the sound is soft. 

 

I'm a beginner at this stuff and only know like basic coding statements, and making simple code like counters, adders, and simple state machines so the more detailed you can be the better. 

 

I tried looking at some of the DE2 demos and looking online, but I couldn't figure out how to do the sound input or finding it's amplitude. 

 

Thanks.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
209 Views

source -> analog amp -> line in of DE2 , formerly calibrated to 0dBfs 

line in -> audio codec -> codec interface core (operncores) -> obtain input 

data input -> true RMS- meassuring -> sampler -> hold circuit - > monitoring 

 

so you will have to implement a codec interface, the RMS-circiut, the sampler (most probably a FIR type with 10ms) and the hold circiut for monitoring for eye observation, last but not least monitoring can be done with a VGA core instead of LED bars. 

 

my 1920x1024 screen at the bottom of the page: 

http://www.96khz.org/htm/cyclone3platform.htm 

It can do both volume monitoring of the master, the group channels and
0 Kudos
Reply