tcmullet wrote: ↑Wed Jan 02, 2019 6:45 pm
Where did you get the .61
Sample values may be represented as integers (usually 8, 16 or 24 bit) or as floating point numbers (usually 32-bit). When integer formats are used, the numeric values are "normalized" to a range of +/- 1.0. This is why the vertical ruler on the left end of a track shows a range of +/- 1.0.
For floating point formats, the literal range of +/- 1.0 is "valid" audio, in that +/- 1.0 represent "full scale" (0 dB, full track height). 32-bit float also supports values greater than 0 dB, which makes it an extremely useful format when working with sound (if you inadvertently cause the level to exceed 0 dB, then it can be recovered back to the "valid" range without loss.)
A single sample value may be found using the
Nyquist Prompt and the command SND-FETCH.
Example for a mono track:
The above command fetches the value of the first sample in the selection.
To see the values of the first three sample of the selection, you can use:
Code: Select all
;version 4
(print (snd-fetch *track*))
(print (snd-fetch *track*))
(print (snd-fetch *track*))
Click the "Debug" button to see the three results.
I got the figure of 0.61 by looking at sample values in several places where there was one of the high values, with a low value either side (such as the 3rd, 4th and 5th samples). I then took the average of the outer two "correct" values, and subtracted that from the value of the "too high" sample, so as to derive an approximation of the offset.
Testing a few values this way gave "offset" results in the range of about 0.60 to 0.62.
The code in my previous post can run in the
Nyquist Prompt. Try it
