cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A320277 A digitized pure tuning tone, sampled at standard settings for consumer audio: a(n) = floor(sin(2*Pi*(440/44100)*n)*32767).

This page as a plain text file.
%I A320277 #42 Mar 29 2025 20:00:32
%S A320277 0,2052,4097,6126,8130,10103,12036,13921,15752,17521,19222,20846,
%T A320277 22389,23844,25205,26467,27625,28675,29612,30433,31134,31713,32167,
%U A320277 32494,32695,32766,32709,32524,32210,31770,31206,30518,29711,28787,27750,26604,25354,24004,22559,21026,19410
%N A320277 A digitized pure tuning tone, sampled at standard settings for consumer audio: a(n) = floor(sin(2*Pi*(440/44100)*n)*32767).
%C A320277 This sequence represents sample values for the simplest sound: a pure tone with no harmonics (i.e., a sine wave) with 0 phase shift, of digital peak amplitude, pitched at the standard tuning frequency (A440), and sampled at the standard sampling rate and bit depth resolution for consumer audio: 44100 Hz and 16 bits, respectively.
%C A320277 Since the maximum signed integer value that can be stored in 16 bits is (2^15)-1=32767, the method used to convert the floats to integers is to multiply the floats by 32767 then cast to integer.
%C A320277 The numerator and the denominator of the g.f. have degrees respectively equal to 2204 and 2205. - _Stefano Spezia_, Nov 02 2018
%D A320277 A. Davison, Killer Game Programming in Java, O'Reilly Media, 2005, page 254.
%H A320277 KVR, <a href="http://www.kvraudio.com/forum/viewtopic.php?t=476550">How to get each sample of a sine wave given sample rate, frequency, bit depth</a>
%H A320277 Wikipedia, <a href="http://en.wikipedia.org/wiki/Audio_bit_depth">Audio bit depth</a>
%H A320277 Wikipedia, <a href="http://en.wikipedia.org/wiki/Pulse-code_modulation">Pulse-code modulation</a>
%H A320277 Wikipedia, <a href="http://en.wikipedia.org/wiki/Sampling_(signal_processing)">Sampling</a>
%t A320277 a[n_]:= Floor[Sin[2*Pi*(440/44100)*n]*32767]; Array[a, 50, 0] (* _Stefano Spezia_, Nov 02 2018 *)
%o A320277 (Python)
%o A320277 import math
%o A320277 for x in range(100):
%o A320277     floatval = math.sin(2*math.pi*(440/44100)*x)*32767
%o A320277     intval = int(floatval)
%o A320277     print(intval, end=', ')
%K A320277 sign
%O A320277 0,2
%A A320277 _Jim Singh_, Oct 08 2018