Regarding inability of Python Module Winsound to produce beep in decimal frequency

Roel Schroeven roel at roelschroeven.net
Mon Aug 16 03:49:05 EDT 2021


Op 15/08/2021 om 7:01 schreef Chris Angelico:
> On Sun, Aug 15, 2021 at 1:02 PM John O'Hagan <research at johnohagan.com> wrote:
> >
> > > On 2021-08-13 17:17, Chris Angelico wrote:
> > > > Is it really? In my experience, no human ear can distinguish 277Hz
> > > > from 277.1826Hz when it's played on a one-bit PC speaker, which the
> > > > Beep function will be using.
> >
> > Rounding to integer frequencies will produce disastrously out-of-tune
> > notes in a musical context! Particularly for low notes, where a whole
> > semitone is only a couple of Hz difference. Even for higher notes, when
> > they're played together any inaccuracies are much more apparent.
>
> But before you advocate that too hard, check to see the *real*
> capabilities of a one-bit PC speaker.
We're not necessarily talking about the PC speaker here: (almost) all 
computers these days have sound cards (mostly integrated on the 
motherboard) that are much more capable than those one-bit PC speakers. 
Beep uses that sound card, when available. I don't know how accurate the 
generated sound is though.

-- 
"Now, the invention of the scientific method and science is, I'm sure we'll all
agree, the most powerful intellectual idea, the most powerful framework for
thinking and investigating and understanding and challenging the world around
us that there is, and that it rests on the premise that any idea is there to be
attacked and if it withstands the attack then it lives to fight another day and
if it doesn't withstand the attack then down it goes. Religion doesn't seem to
work like that; it has certain ideas at the heart of it which we call sacred or
holy or whatever. That's an idea we're so familiar with, whether we subscribe
to it or not, that it's kind of odd to think what it actually means, because
really what it means is 'Here is an idea or a notion that you're not allowed to
say anything bad about; you're just not. Why not? - because you're not!"
         -- Douglas Adams



More information about the Python-list mailing list