POV-Ray : Newsgroups : povray.off-topic : DFT and FFT Server Time
6 Sep 2024 13:18:28 EDT (-0400)
  DFT and FFT (Message 46 to 55 of 55)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mike Raiford
Subject: Re: DFT and FFT
Date: 20 Jan 2009 11:23:05
Message: <4975fa69$1@news.povray.org>
Warp wrote:
> Mike Raiford <"m[raiford]!at"@gmail.com> wrote:
>> cat mysound.wav | /dev/snd
> 
>> "You can't cat a wav file!"
> 
>   The amount of things wrong in everything of the above is mind-boggling. ;)
> 
>   (For one, you are trying to run /dev/snd as if it was a program. Of course
> that's not the only problem.)
> 

Hmm, does Linux use the same format as DOS for redirection? e.g. it 
should be > /dev/snd (or whatever)

I know what I did was truly ugly, but it worked, that's what was funny.

But, I can't remember the syntax (It's been years since I've really used 
  linux from a command line.)

-- 
~Mike


Post a reply to this message

From: Warp
Subject: Re: DFT and FFT
Date: 20 Jan 2009 12:15:54
Message: <497606ca@news.povray.org>
Mike Raiford <"m[raiford]!at"@gmail.com> wrote:
> Hmm, does Linux use the same format as DOS for redirection? e.g. it 
> should be > /dev/snd (or whatever)

  | is a pipe: The standard output of the program on the left side is
redirected to the standard input of the program on the right side.
However, /dev/snd is not a program and cannot be run.

  If you want to redirect the standard output of a program to a file
(or, in this case, a device), > is the operator for it.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: DFT and FFT
Date: 20 Jan 2009 12:39:57
Message: <49760c6d$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> It's actually RIFF - a multilation of the Amiga IFF format with all the 
>> 4-byte values incorrectly written backwards. (Hence "R" for "reverse".)
> 
>   I think the R stands for Resource.

That's what Microsoft wants you to think. Originally it was "reverse", until 
they realized how few people were familiar with the Amiga formats or something.

It's *exactly* IFF, with the endianness reversed. :-)

Altho it does annoy me when I see it mentioned in the press how "RIFF is an 
extensible format created by Microsoft...."

I do like how PNG took it a step farther and encoded into the chunk names 
whether you need to understand the chunk to parse the file, etc.

-- 
   Darren New, San Diego CA, USA (PST)
   "Ouch ouch ouch!"
   "What's wrong? Noodles too hot?"
   "No, I have Chopstick Tunnel Syndrome."


Post a reply to this message

From: Invisible
Subject: Re: DFT and FFT
Date: 21 Jan 2009 04:17:14
Message: <4976e81a$1@news.povray.org>
Mike Raiford wrote:

> cat mysound.wav | /dev/snd
> 
> "You can't cat a wav file!"
> 
> "Yeah, I can. Watch"
> 
> I hit enter and ... after a short burst of static, it plays the file, 
> albeit at the wrong sampling rate.
> 
> "Huh, I didn't know you could do that ..."

Now try doing that with a sound that's been LZW-compressed. ;-)

Doesn't sound very nice...


Post a reply to this message

From: Mike Raiford
Subject: Re: DFT and FFT
Date: 21 Jan 2009 08:37:24
Message: <49772514$1@news.povray.org>
Invisible wrote:

> 
> Now try doing that with a sound that's been LZW-compressed. ;-)
> 
> Doesn't sound very nice...

I imagine it's about as pleasing as loading an MP3 as a raw PCM audio 
file and playing it. For some reason this one audio app I have 
recognizes every MP3 correctly, except for a handful of files from one 
particular album. Weird.

-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: DFT and FFT
Date: 21 Jan 2009 08:40:18
Message: <497725c2$1@news.povray.org>
>> Now try doing that with a sound that's been LZW-compressed. ;-)
>>
>> Doesn't sound very nice...
> 
> I imagine it's about as pleasing as loading an MP3 as a raw PCM audio 
> file and playing it.

Yes.

Indeed, *any* data compressed with an efficient compression algorithm 
should sound roughly like white noise. If it doesn't, further 
compression should be possible.

> For some reason this one audio app I have 
> recognizes every MP3 correctly, except for a handful of files from one 
> particular album. Weird.

Maybe the audio app is looking for the ID3 tag or something, and these 
few files don't have one? Who knows...


Post a reply to this message

From: Mike Raiford
Subject: Re: DFT and FFT
Date: 21 Jan 2009 09:06:12
Message: <49772bd4@news.povray.org>
Invisible wrote:

> Maybe the audio app is looking for the ID3 tag or something, and these 
> few files don't have one? Who knows...

I think they may have an ID3v2 tag in a non-standard location.

-- 
~Mike


Post a reply to this message

From: Orchid XP v8
Subject: Re: DFT and FFT
Date: 22 Jan 2009 02:35:48
Message: <497821d4@news.povray.org>
Invisible wrote:

> A Chebyshev low-pass filter arranges poles in a semicircle. The 
> resonance comes from deforming this circle to make it elliptical. As you 
> do so, the poles get nearer to the line, and the "ripples" you see are 
> actually the edges of the peak surrounding each pole. I'll draw you a 
> graph if you like... ;-)

...and what *is* the most advanced graphing tool known?

Yeah, that's right! ;-)

The first image shows a plot of the transfer function for a 3-pole 
Butterworth filter. (I.e., a lowpass filter with 0% ripple.) You can't 
see it terribly well from this angle, but those three mountain peaks 
(poles) are arraned in a semicircle.

The second image is the same thing, but I've cut a slice through the 
graph along the critical line to reveal the filter's frequency response 
(red). As you can see, it's flat in the middle, and tapers down at 
either side. (The X-axis is frequency, with 0 Hz in the middle and 
negative/positive frequencies on each side.) Normally you'd look at the 
s-domain the other way round, but in 3D you can't see the cut very well, 
so I've rotated it.

The third image is the same as the second, except that I've made the 
semicircle elliptical. (You can't see this very much with this camera 
angle. Feel free to change it...) Notice how the frequency response now 
has "ripples" - corresponding to the edges of the peaks.

The radius of the circle is the cutoff frequency, and the 
ellipticallness is the ripple (and cutoff slope). The parts to fiddle 
with are the lines that #define the R1-R3 and I1-I3 variables. Set the 
radius of both equal for a Butterworth filter, and then decrease R# only 
for Chebyshev.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message


Attachments:
Download 'iir-02.jpg' (30 KB) Download 'iir-03.jpg' (31 KB) Download 'iir-04.jpg' (31 KB) Download 'us-ascii' (2 KB)

Preview of image 'iir-02.jpg'
iir-02.jpg

Preview of image 'iir-03.jpg'
iir-03.jpg

Preview of image 'iir-04.jpg'
iir-04.jpg

From: Mike Raiford
Subject: Re: DFT and FFT
Date: 22 Jan 2009 08:47:38
Message: <497878fa$1@news.povray.org>
Orchid XP v8 wrote:
> Invisible wrote:
> 
>> A Chebyshev low-pass filter arranges poles in a semicircle. The 
>> resonance comes from deforming this circle to make it elliptical. As 
>> you do so, the poles get nearer to the line, and the "ripples" you see 
>> are actually the edges of the peak surrounding each pole. I'll draw 
>> you a graph if you like... ;-)
> 
> ...and what *is* the most advanced graphing tool known?
> 
> Yeah, that's right! ;-)
> 
> The first image shows a plot of the transfer function for a 3-pole 
> Butterworth filter. (I.e., a lowpass filter with 0% ripple.) You can't 
> see it terribly well from this angle, but those three mountain peaks 
> (poles) are arraned in a semicircle.
> 
> The second image is the same thing, but I've cut a slice through the 
> graph along the critical line to reveal the filter's frequency response 
> (red). As you can see, it's flat in the middle, and tapers down at 
> either side. (The X-axis is frequency, with 0 Hz in the middle and 
> negative/positive frequencies on each side.) Normally you'd look at the 
> s-domain the other way round, but in 3D you can't see the cut very well, 
> so I've rotated it.
> 
> The third image is the same as the second, except that I've made the 
> semicircle elliptical. (You can't see this very much with this camera 
> angle. Feel free to change it...) Notice how the frequency response now 
> has "ripples" - corresponding to the edges of the peaks.
> 
> The radius of the circle is the cutoff frequency, and the 
> ellipticallness is the ripple (and cutoff slope). The parts to fiddle 
> with are the lines that #define the R1-R3 and I1-I3 variables. Set the 
> radius of both equal for a Butterworth filter, and then decrease R# only 
> for Chebyshev.
> 

Gotta love POV-Ray for visualizing a surface. I'm guessing then what the 
Q parameter (to the resonant filter) then was adjust the elipticalness 
of the surface, then ...

-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: DFT and FFT
Date: 22 Jan 2009 08:53:29
Message: <49787a59$1@news.povray.org>
>> ...and what *is* the most advanced graphing tool known?
> 
> Gotta love POV-Ray for visualizing a surface.

Yeah, you do...

> I'm guessing then what the 
> Q parameter (to the resonant filter) then was adjust the elipticalness 
> of the surface, then ...

Precisely.

I've you look at the code I posted, I've got

#declare R1 = 0.5*cos(A1); #declare I1 = 2*cos(A1);
...

If you had both of them with "2*", you'd have a no-ripple filter with a 
2 Hz cutoff frequency. By making the first coefficient smaller than the 
second, you're making the circle more elliptical. I'm not sure precisely 
why that makes the rolloff steeper, but it's quite visually "obvious" 
why it makes the thing ripple. (At least, I hope it is...)

There's a formula that tells you "how elliptical" you need to make it 
for X amount of ripple and Y amount of rolloff. I don't know that 
formula off the top of my head...


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.