|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> OK, well suffice it to say that if you have an odd number of samples,
>> it's not possible to make half of them negative and half of them
>> positive. ;-)
>>
>> If you manually sum sinewaves, it does the right thing automatically.
>
> Ahh, makes sense.
Yeah.
I don't know if you know this already, but... the sinc function is the
impulse response of a perfect lowpass filter - which would be the ideal
kind of antialias filter.
If you take a digital signal and just throw away some of the samples to
change the pitch, you get aliasing. (High frequencies become distorted
into lower ones.)
Sure, you take the average of several points instead of just using one
of those points. This is equivilent to applying a moving-average filter
to the signal before downsampling it. If you look at the frequency
response for such a filter, you'll see it doesn't actually remove high
frequencies especially efficiently.
If, on the other hand, you apply a (windowed) sinc filter first, this
*will* remove high frequences more efficiently. Then when you
downsample, there won't be any high frequencies to alias.
Trouble is, a "perfect" lowpass filter requires an infinite kernel -
which isn't computable. (But note that if you're manipulating equations
rather than numerical samples, the magic of integral calculus means it
usually *can* be computed!) That's why it must be a "windowed" sinc.
sinc 0 = 1
sinc x = (sin x) / x
(This is actual, valid Haskell source code, BTW.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> sinc 0 = 1
> sinc x = (sin x) / x
>
> (This is actual, valid Haskell source code, BTW.)
That explains at least why sounds that have been slowed always seem to
get a bit electronic sounding.
The aliasing I was speaking of, btw was more on the lines of taking a
sweep, say from 440-3520hz you'll hear a "banding" artifact in the sweep
where if you use the sum of harmonics square wave, the banding doesn't
occur.
--
~Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
> sweep, say from 440-3520hz you'll hear a "banding" artifact in the sweep
When I say banding, I mean it almost sounds like mach banding looks. (it
sounds like sudden jumps in frequency, instead of a smooth transition)
--
~Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> sweep, say from 440-3520hz you'll hear a "banding" artifact in the sweep
>
> When I say banding, I mean it almost sounds like mach banding looks. (it
> sounds like sudden jumps in frequency, instead of a smooth transition)
How were you generating the sweep?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
> Mike Raiford wrote:
>
>> sweep, say from 440-3520hz you'll hear a "banding" artifact in the sweep
>
> When I say banding, I mean it almost sounds like mach banding looks. (it
> sounds like sudden jumps in frequency, instead of a smooth transition)
...which probably means the way you're generating the waves constrains
them to have integer wavelengths. ;-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
>
> How were you generating the sweep?
>
Its been a while since I did it ... I can't remember.
--
~Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> Mike Raiford wrote:
> ...which probably means the way you're generating the waves constrains
> them to have integer wavelengths. ;-)
Probably. :)
--
~Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Its been a while since I did it ... I can't remember.
Oh just because I once made a program to generate a sweep something like
this:
for sample = 0 to 100000
frequency = sample / 1000
wave[sample]= waveFunction(sample/sampleRate*2*pi*frequency)
Where waveFunction can be your sine wave, square wave or whatever.
But of course it doesn't work like that as I found out...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
>> Its been a while since I did it ... I can't remember.
>
> Oh just because I once made a program to generate a sweep something like
> this:
>
> for sample = 0 to 100000
> frequency = sample / 1000
> wave[sample]= waveFunction(sample/sampleRate*2*pi*frequency)
>
> Where waveFunction can be your sine wave, square wave or whatever.
>
> But of course it doesn't work like that as I found out...
>
>
I think I had something similar. I really can't remember though. I then
moved to a wavetable method, where I had generated a cycle of saw,
square, and triangle at a low enough frequency where I wouldn't need to
stretch it. For sine, I think I just used the sine function (can't
remember, exactly). and dropped the appropriate number of samples to
raise pitch, using an even spacing. It worked pretty well with the
generated waves. Basically just scaling the waves up and down.
--
~Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
> I remind her that things like mobile phones will not invent
> themselves, and actually it takes a *HUGE* number of people
> to get a product like that onto the market.
I dug piers out of the mud with a shovel during the construction of the
Motorola building in Austin, TX. So there's +1 person.
Regarding the "geeks having a life" stuff, I suppose it means what you
mean by "geek." I think there are two types:
1. The person who f**ks with computers, programming, etc. so much that
he is eventually able to turn his hobby into a career. Those I know of
this type really do have no lives. After the long work hours, the junk
food, the smoking, and WOW, there isn't much time or energy left for a life.
2. The person who learns some highly-technical skill at College. My
brother is this type. I'm not sure he can program or hack his OS at all.
He is hard-working and compulsive, but not WOW compulsive. He finds
plenty of time in his day for preparing food, exercising, etc.
Kind of like the distinction between a gifted burnout blues guitar
player and a Juilliard-schooled orchestra player. Both are skilled, bot
only one is killing himself for his craft.
-Shay
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |