Displaying 9 results from an estimated 9 matches for "samplerang".
Did you mean:
samplerange
2012 Feb 17
3
Regain play analysis patches
...out of the box.
>
> Here are two ideas:
>
> 1. Use bc(1) to compute the raw samples
> 2. Use perl(1) to compute the raw samples
>
> To generate raw unsigned samples using bc(1) for example:
>
> samplerate = 1000;
> duration = 2;
> bitspersample = 24;
>
> samplerange = 2 ^ (bitspersample-1) - 1;
> samplemidpoint = 2 ^ (bitspersample-1);
>
> pi = 4 * a(1);
>
> scale = 18;
> obase = 16;
>
> for (ix = 0; ix < duration * samplerate; ++ix) {
> ? sample = samplemidpoint + samplerange * s(2 * pi * ix / samplerate);
> ? s = scale;
&...
2012 Feb 20
0
Regain play analysis patches
...he LSB :
http://refspecs.linuxfoundation.org/LSB_1.0.0/gLSB/command.html
Earl
??? awk -- '
??? BEGIN {
??????????? samplerate = 8000;
??????????? tone = 1000;
??????????? duration = 1;
??????????? bitspersample = 24;
??????????? samplemidpoint = lshift(1, (bitspersample-1));
??????????? samplerange = samplemidpoint - 1;
??????????? pi = 4 * atan2(1,1);
??????????? for (ix = 0; ix < duration * samplerate; ++ix) {
??????????????????? sample = sin(2 * pi * tone * ix / samplerate);
??????????????????? sample *= samplerange;
??????????????????? sample += samplemidpoint;
??????????????????? s...
2012 Feb 15
4
Regain play analysis patches
Brian Willoughby wrote:
> What about using the C library sin() and cos() functions to generate
> the test audio instead of sox? I did not see a description of how
> the test files are generated, so maybe this is easy or maybe it is
> hard. The benefit of shipping the test audio generation source code
> around with the FLAC sources is that the tests won't break when
2012 Feb 17
0
Regain play analysis patches
...m when there are
so many other options that will work well enough out of the box.
Here are two ideas:
1. Use bc(1) to compute the raw samples
2. Use perl(1) to compute the raw samples
To generate raw unsigned samples using bc(1) for example:
samplerate = 1000;
duration = 2;
bitspersample = 24;
samplerange = 2 ^ (bitspersample-1) - 1;
samplemidpoint = 2 ^ (bitspersample-1);
pi = 4 * a(1);
scale = 18;
obase = 16;
for (ix = 0; ix < duration * samplerate; ++ix) {
? sample = samplemidpoint + samplerange * s(2 * pi * ix / samplerate);
? s = scale;
? scale = 0;
? sample /= 1;
? sample;
? scale = s;...
2014 Nov 30
4
awk vs. mawk
...samplemidpoint *= 2;
+ for (s = 0; s < duration * samplerate; s++) {
+ sample = sin(2 * pi * tone * s / samplerate);
+ sample = int(amplitude * sample);
+ for (b = 0; b < bitspersample/8; b++) {
+ printf("%c", sample % 256);
+ sample /= 256;
}
+ }
- samplerange = samplemidpoint - 1;
-
- pi = 4 * atan2(1,1);
-
- for (ix = 0; ix < duration * samplerate; ++ix) {
- sample = sin(2 * pi * tone * ix / samplerate);
- sample *= samplerange;
- sample += samplemidpoint;
-...
2012 Feb 26
3
PATCH: Add test for metaflac --add-replay-gain
...that harmonics can be processed correctly.
+
+tonegenerator ()
+{
+??? awk -- '
+??? BEGIN {
+??????????? samplerate = '$1';
+
+??????????? tone = 1000;
+??????????? duration = 1;
+??????????? bitspersample = 24;
+
+??????????? samplemidpoint = lshift(1, (bitspersample-1));
+??????????? samplerange = samplemidpoint - 1;
+
+??????????? pi = 4 * atan2(1,1);
+
+??????????? for (ix = 0; ix < duration * samplerate; ++ix) {
+??????????????????? sample = sin(2 * pi * tone * ix / samplerate);
+??????????????????? sample *= samplerange;
+??????????????????? sample += samplemidpoint;
+?????????????...
2014 Dec 03
0
awk vs. mawk
...samplerate = '$1';
tone = 1000;
duration = 1;
bitspersample = 24;
-
- samplemidpoint = 1;
- for (sps = 0 ; sps < bitspersample - 1 ; sps++) {
- samplemidpoint *= 2;
- }
-
+ samplemidpoint = 2^(bitspersample - 1);
samplerange = samplemidpoint - 1;
pi = 4 * atan2(1,1);
@@ -127,7 +112,7 @@ tonegenerator ()
}
}
- }' /dev/null |
+ }' /dev/null | \
flac${EXE} --silent --no-error-on-compression-fail --force-raw-format \
--endian=big --channels=1 -...
2014 Dec 10
1
awk vs. mawk
...000;
> duration = 1;
> bitspersample = 24;
> -
> - samplemidpoint = 1;
> - for (sps = 0 ; sps < bitspersample - 1 ; sps++) {
> - samplemidpoint *= 2;
> - }
> -
> + samplemidpoint = 2^(bitspersample - 1);
> samplerange = samplemidpoint - 1;
>
> pi = 4 * atan2(1,1);
> @@ -127,7 +112,7 @@ tonegenerator ()
> }
> }
>
> - }' /dev/null |
> + }' /dev/null | \
> flac${EXE} --silent --no-error-on-compression-fail --force-raw-...
2014 Dec 11
2
awk vs. mawk
...samplerate = '$1';
tone = 1000;
duration = 1;
bitspersample = 24;
-
- samplemidpoint = 1;
- for (sps = 0 ; sps < bitspersample - 1 ; sps++) {
- samplemidpoint *= 2;
- }
-
+ samplemidpoint = 2^(bitspersample - 1);
samplerange = samplemidpoint - 1;
pi = 4 * atan2(1,1);
@@ -127,7 +112,7 @@ tonegenerator ()
}
}
- }' /dev/null |
+ }' /dev/null | \
flac${EXE} --silent --no-error-on-compression-fail --force-raw-format \
--endian=big --channels=1 -...