A320277 A digitized pure tuning tone, sampled at standard settings for consumer audio: a(n) = floor(sin(2*Pi*(440/44100)*n)*32767).
0, 2052, 4097, 6126, 8130, 10103, 12036, 13921, 15752, 17521, 19222, 20846, 22389, 23844, 25205, 26467, 27625, 28675, 29612, 30433, 31134, 31713, 32167, 32494, 32695, 32766, 32709, 32524, 32210, 31770, 31206, 30518, 29711, 28787, 27750, 26604, 25354, 24004, 22559, 21026, 19410
Offset: 0
Keywords
References
- A. Davison, Killer Game Programming in Java, O'Reilly Media, 2005, page 254.
Links
- KVR, How to get each sample of a sine wave given sample rate, frequency, bit depth
- Wikipedia, Audio bit depth
- Wikipedia, Pulse-code modulation
- Wikipedia, Sampling
Programs
-
Mathematica
a[n_]:= Floor[Sin[2*Pi*(440/44100)*n]*32767]; Array[a, 50, 0] (* Stefano Spezia, Nov 02 2018 *)
-
Python
import math for x in range(100): floatval = math.sin(2*math.pi*(440/44100)*x)*32767 intval = int(floatval) print(intval, end=', ')
Comments