This question is originally part of this question, but this issue seems to be different from the former one, so I think it's better to start another question for it.
Usually, human can't hear sound with a frequency lower than 20 Hz, but what's confused is, the output of the following code can generate very slight shrieks, to be precise, two shrieks for every period, and the pitch of the sound will be lower with lower SampleRate
:
Play[Sin[2 Pi t], {t, 0, 1}]
Play[Sin[2 Pi t], {t, 0, 1}, SampleRate -> 4000]
Play[Sin[2 Pi t], {t, 0, 1}, SampleRate -> 2000]
After some trial, I noticed that the frequency of the slight shrieks seems to be equal to the SampleRate
, i.e.
Play[Sin[2 Pi t], {t, 0, 5}, SampleRate -> 2000]
and
Play[Sin[2000 2 Pi t], {t, 0, 1}, SampleRate -> 4000 2 Pi]
have same pitch. (Remember to regulate volume since the shriek generated by the former sample is really slight. )
It's probably another kind of artifact, but can someone explain it in detail?
Some more information: the shrieks are at the position of peaks and valleys of sine wave i.e.
Play[Sin[2 Pi t], {t, 0, 1}, SampleRate -> 2000]
has $2$ shrieks while
Play[Cos[2 Pi t], {t, 0, 1}, SampleRate -> 2000]
has $0.5+1+0.5$ shrieks.
Edit:
I should admit that I've misheard the position of the shrieks. With the code below, it's easy to distinguish that there's no sound at peaks and valleys:
Column[{Animate[Plot[Sin[2 Pi u], {u, 0, t}, PlotRange -> {{0, 5}, {-1, 1}}],
{t, 0, 5}, AnimationRate -> 1, AnimationRepetitions -> 1],
EmitSound@Play[Sin[2 Pi t], {t, 0, 5}, SampleRate -> 2000]}]
I've posted the question in sound.SE and the answer I got there is in line with @CL.'s answer. Click here to read the answer (with a self-made video!).