Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: Diverting Low Level Audio

$
0
0

     Hi Byron.

 

     A bin logic scheme that fits into a -1701 is shown below.  It uses about 20% fewer instructions than what I've previously been using, while maintaining separate control over attack and decay times.  Depending on what else is included in your overall project, this may allow you to keep the full 16 bins, or at least reduce the number you need to take out.

Voice-16-filter-fits_sch_pic.jpg

     Though it appears rather intricate, it uses only simple blocks.  It saves on instructions by getting more mileage out of the ABCD Comparator, which now performs the whole fast-attack, slow decay function with the help of the feedback block and a little math.  Here's how it works:  With the sound level above threshold, the ABCD Comparator selects its C input.  This is its own output plus a small number labeled Attack above.  Each sample interval adds the Attack amount as long as the sound is above threshold.  When the output reaches 1.0, the AB Comparator in the loop freezes it there (A Clipper block would have worked as well, but the AB Comparator is more economical).  The 10-90% rise time Trise = 0.8 / ((Attack) x fs).  With below-threshold sound, the active D input is the loop output times the number labeled Decay -- which is set just below 1.0.  Each sample interval multiplies by Decay again, setting up the first-order differential equation dy/dt = y x (G-1) / (1/fs)  = y x fs x (G-1).  The result is the exponential decay, y = e^(fs x (G-1) x t).  The resulting fall time is Tf = 2.2 / (fs x (1-G)).  Adjusting these numbers sets the bins' rise and fall times.  All this shows the power of feedback and math to accomplish needed functions in a uniquely economical way.

 

     The attached project implements the above bin logic with all 16 filters.  At first I heard stuttering in the podcast I was listening to, only to find the same when plugging my headphone directly into my laptop.  Turns out it can't handle the mp3 and SigmaStudio's live USBi connection together.  Threshold adjustment works similarly to the original design.  I've also experimented with having the threshold adapt by summing in a slow envelope of the overall input, which you can add in if it fits and you're so inclined.

 

     If you need to change the number of bins, space them by a constant multiple.  When spaced this way the Q of all filters is identical.  I'm sure there's a formula to figure the best Q for a given bin spacing, but I experiment by plotting (with the Stimulus and Probe blocks) several filters summed directly.  Have fun with your project!

 

 

     Best regards,

 

     Bob


Viewing all articles
Browse latest Browse all 28044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>