Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

better db to linear 0-1 (especially array)

For general discussion related FlowStone

better db to linear 0-1 (especially array)

Postby wlangfor@uoguelph.ca » Tue May 19, 2020 8:41 pm

most methods involve using code or asm and that's not as efficient as this. I was working ona metering solution for My boardstation EQ and came up with this, so as to avoid any zero's. It's as close as you can get to -INF


First, send the signal to a nan to 0 made by trog or exonerate, on the top value of the selector, add this value in a string:
Code: Select all
-897.06939697265625


next send that signal to an array limit module made by trogluddite.

Replace the min with the same value in a string:
Code: Select all
-897.06939697265625


so next make two floats with these two values:
Code: Select all
0.00109043


and

Code: Select all
0.978191


and use all of it as follows

signal--->nan to 0 (edited)--->(0.00109043*signal)--------->(0.978191+signal)--------------> (final result 0-1)

this can be useful for just about anything. You could use it for floats also instead of arrays in a similar manner.

Robert
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
wlangfor@uoguelph.ca
 
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada

Re: better db to linear 0-1 (especially array)

Postby tulamide » Tue May 19, 2020 9:49 pm

That's an interesting approach, but in no way better than the usual
Code: Select all
10^(n/20)
## or
10^(n * 0.05)


You're converting strings (this alone takes longer than above calculation), use two code blocks and still multiply and add. It's ok, but not better.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: better db to linear 0-1 (especially array)

Postby juha_tp » Wed May 20, 2020 7:11 pm

How's exp(0.115129254649702 * n) ?
juha_tp
 
Posts: 56
Joined: Fri Nov 09, 2018 10:37 pm

Re: better db to linear 0-1 (especially array)

Postby wlangfor@uoguelph.ca » Fri May 22, 2020 11:29 pm

good feedback thanks, My goal however was to avoid the presence of a zero, other than in the case of a 0dBFS. So as to convert and utilize, which db conversion can miss.
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
wlangfor@uoguelph.ca
 
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada


Return to General

Who is online

Users browsing this forum: No registered users and 51 guests