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
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
better db to linear 0-1 (especially array)
4 posts
• Page 1 of 1
better db to linear 0-1 (especially array)
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:
next send that signal to an array limit module made by trogluddite.
Replace the min with the same value in a string:
so next make two floats with these two values:
and
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
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
-
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)
That's an interesting approach, but in no way better than the usual
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.
- 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: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: better db to linear 0-1 (especially array)
How's exp(0.115129254649702 * n) ?
- juha_tp
- Posts: 60
- Joined: Fri Nov 09, 2018 10:37 pm
Re: better db to linear 0-1 (especially array)
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.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 61 guests