Sound programming: Tone production in Python?
Peter Hansen
peter at engcorp.com
Thu Jan 23 08:42:19 EST 2003
Dennis Lee Bieber wrote:
>
> Peter Hansen fed this fish to the penguins on Wednesday 22 January 2003
> 07:05 pm:
>
> > Just a stray question: what do you mean by zero-offset in this
> > context? I've written signal generators that can output arbitrary
> > periodic waveforms including sinewaves in this manner, but I don't
> > recall ever having to worry about anything I would have called the
> > "zero offset".
> >
> As an bystander, I suspect what this refers to is that...
>
> sin() (or cos() ) traditionally returns values from -1.0 to +1.0.
>
> If you map that to an 8-bit unsigned integer, then
> -1.0 => 0
> 0.0 => 127
> +1.0 => 255
Ah, of course, "DC offset". I should have guessed that's what he meant...
"Zero offset" was making me think "in the time axis". :-(
Thank you.
-Peter
More information about the Python-list
mailing list