[arm-allstar] real world audio values *CORRECTED*
David McGough
kb4fxc at inttek.net
Sat May 27 22:43:53 EDT 2023
Hi Chris,
I just looked back at those original numbers and realized I made an
error---I used the incorrect exponentiation function in Octave. *SIGH*
...See below.
73, David K4FXC
Here are the corrected values, as output from a simple C program:
---------------------------------------------------------------------
[root at RPi4B-dev ~]# cat dsplvl.c
#include <math.h>
#include <stdio.h>
void main()
{
for (double db = 0; db > -61; db -= 1.0) {
int i;
i = (int)(999.0 * pow(10.0, db / 20.0));
printf ("txdsplvl = %3.1d, target db = %5.1lf, real = %6.4lf\n", i, db, 20.0 * log10( (double)i / 1000.0));
}
}
[root at RPi4B-dev ~]# cc dsplvl.c -lm
[root at RPi4B-dev ~]#
[root at RPi4B-dev ~]# ./a.out
txdsplvl = 999, target db = 0.0, real = -0.0087
txdsplvl = 890, target db = -1.0, real = -1.0122
txdsplvl = 793, target db = -2.0, real = -2.0145
txdsplvl = 707, target db = -3.0, real = -3.0116
txdsplvl = 630, target db = -4.0, real = -4.0132
txdsplvl = 561, target db = -5.0, real = -5.0207
txdsplvl = 500, target db = -6.0, real = -6.0206
txdsplvl = 446, target db = -7.0, real = -7.0133
txdsplvl = 397, target db = -8.0, real = -8.0242
txdsplvl = 354, target db = -9.0, real = -9.0199
txdsplvl = 315, target db = -10.0, real = -10.0338
txdsplvl = 281, target db = -11.0, real = -11.0259
txdsplvl = 250, target db = -12.0, real = -12.0412
txdsplvl = 223, target db = -13.0, real = -13.0339
txdsplvl = 199, target db = -14.0, real = -14.0229
txdsplvl = 177, target db = -15.0, real = -15.0405
txdsplvl = 158, target db = -16.0, real = -16.0269
txdsplvl = 141, target db = -17.0, real = -17.0156
txdsplvl = 125, target db = -18.0, real = -18.0618
txdsplvl = 112, target db = -19.0, real = -19.0156
txdsplvl = 99, target db = -20.0, real = -20.0873
txdsplvl = 89, target db = -21.0, real = -21.0122
txdsplvl = 79, target db = -22.0, real = -22.0475
txdsplvl = 70, target db = -23.0, real = -23.0980
txdsplvl = 63, target db = -24.0, real = -24.0132
txdsplvl = 56, target db = -25.0, real = -25.0362
txdsplvl = 50, target db = -26.0, real = -26.0206
txdsplvl = 44, target db = -27.0, real = -27.1309
txdsplvl = 39, target db = -28.0, real = -28.1787
txdsplvl = 35, target db = -29.0, real = -29.1186
txdsplvl = 31, target db = -30.0, real = -30.1728
txdsplvl = 28, target db = -31.0, real = -31.0568
txdsplvl = 25, target db = -32.0, real = -32.0412
txdsplvl = 22, target db = -33.0, real = -33.1515
txdsplvl = 19, target db = -34.0, real = -34.4249
txdsplvl = 17, target db = -35.0, real = -35.3910
txdsplvl = 15, target db = -36.0, real = -36.4782
txdsplvl = 14, target db = -37.0, real = -37.0774
txdsplvl = 12, target db = -38.0, real = -38.4164
txdsplvl = 11, target db = -39.0, real = -39.1721
txdsplvl = 9, target db = -40.0, real = -40.9151
txdsplvl = 8, target db = -41.0, real = -41.9382
txdsplvl = 7, target db = -42.0, real = -43.0980
txdsplvl = 7, target db = -43.0, real = -43.0980
txdsplvl = 6, target db = -44.0, real = -44.4370
txdsplvl = 5, target db = -45.0, real = -46.0206
txdsplvl = 5, target db = -46.0, real = -46.0206
txdsplvl = 4, target db = -47.0, real = -47.9588
txdsplvl = 3, target db = -48.0, real = -50.4576
txdsplvl = 3, target db = -49.0, real = -50.4576
txdsplvl = 3, target db = -50.0, real = -50.4576
txdsplvl = 2, target db = -51.0, real = -53.9794
txdsplvl = 2, target db = -52.0, real = -53.9794
txdsplvl = 2, target db = -53.0, real = -53.9794
txdsplvl = 1, target db = -54.0, real = -60.0000
txdsplvl = 1, target db = -55.0, real = -60.0000
txdsplvl = 1, target db = -56.0, real = -60.0000
txdsplvl = 1, target db = -57.0, real = -60.0000
txdsplvl = 1, target db = -58.0, real = -60.0000
txdsplvl = 1, target db = -59.0, real = -60.0000
txdsplvl = 0, target db = -60.0, real = -inf
More information about the ARM-allstar
mailing list