POV-Ray : Newsgroups : povray.off-topic : FFT Toy Server Time
6 Sep 2024 11:17:22 EDT (-0400)
  FFT Toy (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Darren New
Subject: Re: FFT Toy
Date: 29 Jan 2009 12:04:57
Message: <4981e1b9$1@news.povray.org>
Mike Raiford wrote:
> Boy did that post look suspicious.. lol.

I was gonna run it in a VM, myself. :-)

-- 
   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: Orchid XP v8
Subject: Re: FFT Toy
Date: 1 Feb 2009 06:46:49
Message: <49858ba9$1@news.povray.org>
Mike Raiford wrote:
> Invisible wrote:
> 
>>
>> I don't have any .NET components installed at all. And I don't plan on 
>> changing. ;-)
> 
> Why?
> 
>> OTOH, if you think that's bad, try convincing Windows users to 
>> download and install the GTK+ runtime so they can run your cool toy. o_O
>>
> 
> I'll install GTK+ if you install .NET :)

My home PC has Visual Studio installed, which *insists* on installing 
the .NET runtime for some reason. So I had a go with your toy...

It's quite similar to this:

http://www.falstad.com/fourier/

Not without the sound. ;-)

(CAUTION: If you turn the sound on, turn your speakers down first! It 
comes out at maximum volume.)

You may also find this interesting:

http://www.falstad.com/dfilter/

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


Post a reply to this message

From: Mike Raiford
Subject: Re: FFT Toy
Date: 1 Feb 2009 13:13:30
Message: <4985e64a@news.povray.org>
Orchid XP v8 wrote:

> My home PC has Visual Studio installed, which *insists* on installing 
> the .NET runtime for some reason. So I had a go with your toy...
> 
> It's quite similar to this:
> 
> http://www.falstad.com/fourier/

Shockingly :) Except I show the whole complex system.

> Not without the sound. ;-)
> 
> (CAUTION: If you turn the sound on, turn your speakers down first! It 
> comes out at maximum volume.)

Very fun toy to play with :)

> You may also find this interesting:
> 
> http://www.falstad.com/dfilter/
> 


I like this the best.. Such fun messing with the filters. FWIW, I now 
know why the Chebyshev cab be called resonant.


Post a reply to this message

From: Invisible
Subject: Re: FFT Toy
Date: 2 Feb 2009 04:45:46
Message: <4986c0ca@news.povray.org>
>> You may also find this interesting:
>>
>> http://www.falstad.com/dfilter/
> 
> I like this the best.. Such fun messing with the filters. FWIW, I now 
> know why the Chebyshev can be called resonant.

And WHO SAID that physics is borig, eh? ;-) Seems pretty fun to me...

I'll have to throw together a toy for displaying the transfer function 
in 3D. ;-)


Post a reply to this message

From: Mike Raiford
Subject: Re: FFT Toy
Date: 2 Feb 2009 08:24:18
Message: <4986f402$1@news.povray.org>
Invisible wrote:
>>> You may also find this interesting:
>>>
>>> http://www.falstad.com/dfilter/
>>
>> I like this the best.. Such fun messing with the filters. FWIW, I now 
>> know why the Chebyshev can be called resonant.
> 
> And WHO SAID that physics is borig, eh? ;-) Seems pretty fun to me...
> 
> I'll have to throw together a toy for displaying the transfer function 
> in 3D. ;-)

I quite enjoy falstad's Java applets...

Interestingly the IIR filters can also be created with an analog circuit 
(using the very same poles and zeros, in fact) . I think I seriously 
annoyed my wife with the filtering applet. ;)

Its kind of nice knowing enough to predict what will happen when moving 
a pole or a zero on the chart (Custom IIR)

Interestingly modern computers are fast enough to run an arbitrary FIR 
filter with little (actually no) trouble. Though I imagine the reason 
the MT32 emulator went IIR is twofold: 1. It approximates rather closely 
the original analog filter in the real device, 2. 32 channels of audio 
need to be filtered simultaneously in real time. IIR is vastly faster.

Why do I keep bringing up the MT32 emu? It was the first DSP project I 
ever played with the source code to. I'm familiar with it, and I 
understand the hardware.


-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: FFT Toy
Date: 2 Feb 2009 08:42:12
Message: <4986f834$1@news.povray.org>
Mike Raiford wrote:

>> And WHO SAID that physics is borig, eh? ;-) Seems pretty fun to me...
>>
>> I'll have to throw together a toy for displaying the transfer function 
>> in 3D. ;-)
> 
> I quite enjoy falstad's Java applets...

Yes, there's some good stuff there! :-D

> Interestingly the IIR filters can also be created with an analog circuit 
> (using the very same poles and zeros, in fact).

Yes. That's where the whole IIR design theory comes from in the first 
place, from *long* before we had electronic computers...

Of course, it's not quite the same. With electronics, you have to 
remember that your "10 Ohm" resisters are actually 10 Ohm +/- 10%. ;-)

And also, it seems you cannot make a digital IIR with *exactly* the same 
frequency response as the corresponding analogue IIR - although it's a 
pretty close match. But analogue IIRs are designed in the s-domain, 
which is a different "shape" to the z-domain. It's quite easy to map 
coordinates from one domain to the other, but the resulting function 
doesn't behave in exactly the same way.

> I think I seriously 
> annoyed my wife with the filtering applet. ;)

Oh yeah - you have a wife, don't you?

[I'm not jelous. Much.]

> Its kind of nice knowing enough to predict what will happen when moving 
> a pole or a zero on the chart (Custom IIR)

I tried to build a unit for Reaktor that does this, but without much 
success. (Again, the mathematics isn't "hard", it's just fiddly. And 
Reaktor isn't terrifically flexible...)

> Interestingly modern computers are fast enough to run an arbitrary FIR 
> filter with little (actually no) trouble.

Yes, the DSP guide talks about using IIRs to avoid needing slow FIRs, 
but today computers are that much faster that even a Java applet running 
on a JVM emulator runs easily fast enough to do a naive 2,000-point 
convolution directly. If you wanted faster, an FFT-convulation should 
easily give it to you.

> Though I imagine the reason 
> the MT32 emulator went IIR is twofold: 1. It approximates rather closely 
> the original analog filter in the real device, 2. 32 channels of audio 
> need to be filtered simultaneously in real time. IIR is vastly faster.

Yes.

If you want a digital filter to precisely disect a signal (e.g., for 
technical analysts), you want the most accurate filter you can get. But 
if you just want to make interesting noises, precision is not important. 
Indeed, resonance, ripple, and other "artifacts" that are usually to be 
avoided suddenly become useful and interesting! :-D

Ever heard of the Kurplus-Strong algorithm?


Post a reply to this message

From: Mike Raiford
Subject: Re: FFT Toy
Date: 2 Feb 2009 09:20:53
Message: <49870145@news.povray.org>
Invisible wrote:
> Of course, it's not quite the same. With electronics, you have to 
> remember that your "10 Ohm" resisters are actually 10 Ohm +/- 10%. ;-)

Right, unless you have 1% resistors.

> And also, it seems you cannot make a digital IIR with *exactly* the same 
> frequency response as the corresponding analogue IIR - although it's a 
> pretty close match. But analogue IIRs are designed in the s-domain, 
> which is a different "shape" to the z-domain. It's quite easy to map 
> coordinates from one domain to the other, but the resulting function 
> doesn't behave in exactly the same way.

That was one of things that threw me, if you look at poles and zeros 
diagrams, many of them are in the s domain, so you have to remember to 
wrap them around a unit circle. when you look at them.

>> I think I seriously annoyed my wife with the filtering applet. ;)
> 
> Oh yeah - you have a wife, don't you?
> 
> [I'm not jelous. Much.]
> 

Oh, don't be. I have a son, too. :) He's getting to the "human parrot" 
stage, now.. Gotta watch myself. He's great fun now. Can't wait till 
he's old enough to take an interest in some of the things I do.

>> Its kind of nice knowing enough to predict what will happen when 
>> moving a pole or a zero on the chart (Custom IIR)
> 
> I tried to build a unit for Reaktor that does this, but without much 
> success. (Again, the mathematics isn't "hard", it's just fiddly. And 
> Reaktor isn't terrifically flexible...)
> 

I thought about downloading the demo to play around with. What was 
interesting was dragging a pole ever so slightly out of the unit circle 
at certain angles (frequency) would cause it to give a screeching 
feedback then go unstable. Of course a pole beyond the unit circle is 
obviously not a stable configuration. It was interesting to see just how 
far I could push it before the applet would decide not to render.

>> Interestingly modern computers are fast enough to run an arbitrary FIR 
>> filter with little (actually no) trouble.
> 
> Yes, the DSP guide talks about using IIRs to avoid needing slow FIRs, 
> but today computers are that much faster that even a Java applet running 
> on a JVM emulator runs easily fast enough to do a naive 2,000-point 
> convolution directly. If you wanted faster, an FFT-convulation should 
> easily give it to you.
>

The JVM has come a long way, too. If I understand correctly much of the 
code in the VM gets translated to native machine code for the platform 
its on. CLR is much the same way.

>> Though I imagine the reason the MT32 emulator went IIR is twofold: 1. 
>> It approximates rather closely the original analog filter in the real 
>> device, 2. 32 channels of audio need to be filtered simultaneously in 
>> real time. IIR is vastly faster.
> 
> Yes.
> 
> If you want a digital filter to precisely disect a signal (e.g., for 
> technical analysts), you want the most accurate filter you can get. But 
> if you just want to make interesting noises, precision is not important. 
> Indeed, resonance, ripple, and other "artifacts" that are usually to be 
> avoided suddenly become useful and interesting! :-D

Of course. Much like guitarists discovered an interesting artifact of 
their amplifiers. Turn up the gain so the signal starts clipping makes 
the guitar sound much more interesting. :)

Dunno why, synthesizers have always fascinated me. More the 
waveform-based, rather than sample-based. Twisting tones into 
instruments is just cool. :)

> Ever heard of the Kurplus-Strong algorithm?

Nope :) I'm sure wikipedia has. It has, and looks like I read the 
article, so Yes. :)

Very much the IIR plucked string in the applet.

-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: FFT Toy
Date: 2 Feb 2009 09:37:17
Message: <4987051d$1@news.povray.org>
>> Of course, it's not quite the same. With electronics, you have to 
>> remember that your "10 Ohm" resisters are actually 10 Ohm +/- 10%. ;-)
> 
> Right, unless you have 1% resistors.

Even then, you have to be careful that your design won't malfunction 
wildly if one of the two "identical" resistors isn't quite "identical", 
for example.

With digital IIR, you just have to be careful about numerical stability.

>> And also, it seems you cannot make a digital IIR with *exactly* the 
>> same frequency response as the corresponding analogue IIR - although 
>> it's a pretty close match. But analogue IIRs are designed in the 
>> s-domain, which is a different "shape" to the z-domain. It's quite 
>> easy to map coordinates from one domain to the other, but the 
>> resulting function doesn't behave in exactly the same way.
> 
> That was one of things that threw me, if you look at poles and zeros 
> diagrams, many of them are in the s domain, so you have to remember to 
> wrap them around a unit circle. when you look at them.

Yeah, it's tricky. There are several possibly ways to map the s-domain 
to the z-domain - including advanced techniques where one specific 
frequency maps exactly while the rest are all approximate. (E.g., so you 
end up with a correct cutoff frequency even if the rolloff angle is 
different.)

>> Oh yeah - you have a wife, don't you?
>>
>> [I'm not jelous. Much.]
>>
> 
> Oh, don't be. I have a son, too. :) He's getting to the "human parrot" 
> stage, now.. Gotta watch myself. He's great fun now. Can't wait till 
> he's old enough to take an interest in some of the things I do.

Yeah, I think I have a picture somewhere on my harddrive of him doing 
his "it's time to ****ing FEED ME!" expression. Except that, of course, 
you can never tell if he means "feed me" or something else - just "I'M 
NOT FRIGGIN HAPPY!"

I just hope he doesn't grow up to be an idiot. Because, man, that would 
be seriously upsetting as a parent, I imagine... o_O

>>> Its kind of nice knowing enough to predict what will happen when 
>>> moving a pole or a zero on the chart (Custom IIR)
>>
>> I tried to build a unit for Reaktor that does this, but without much 
>> success. (Again, the mathematics isn't "hard", it's just fiddly. And 
>> Reaktor isn't terrifically flexible...)
> 
> I thought about downloading the demo to play around with.

What, Reaktor?

> What was 
> interesting was dragging a pole ever so slightly out of the unit circle 
> at certain angles (frequency) would cause it to give a screeching 
> feedback then go unstable. Of course a pole beyond the unit circle is 
> obviously not a stable configuration. It was interesting to see just how 
> far I could push it before the applet would decide not to render.

The numerical stability depends on the exact kind of arithmetic you use. 
(Integer, fixed-point, floating-point, single-precision, 
double-precision, denormals...) A Chebyshev LP filter with high-order 
basically involves turning the feedback path gain up higher and higher, 
and the input gain lower and lower (to keep the passband at unit gain), 
until the whole thing becomes completely unworkable.

Still, I gather that with analogue electronics, anything much beyond 6 
poles is basically hopeless...

> The JVM has come a long way, too. If I understand correctly much of the 
> code in the VM gets translated to native machine code for the platform 
> its on. CLR is much the same way.

...CLR is on more than one platform? :-P

>> If you want a digital filter to precisely disect a signal (e.g., for 
>> technical analysts), you want the most accurate filter you can get. 
>> But if you just want to make interesting noises, precision is not 
>> important. Indeed, resonance, ripple, and other "artifacts" that are 
>> usually to be avoided suddenly become useful and interesting! :-D
> 
> Of course. Much like guitarists discovered an interesting artifact of 
> their amplifiers. Turn up the gain so the signal starts clipping makes 
> the guitar sound much more interesting. :)

Indeed. ;-) Distortion is the new hifi.

> Dunno why, synthesizers have always fascinated me. More the 
> waveform-based, rather than sample-based. Twisting tones into 
> instruments is just cool. :)

I've always loved synthesizers because... I like the crazy music they 
make! :-D My dad has some old Moog recordings on LP. Obviously the 
synthesizer itself is pretty lame, but some of the compositions people 
put together... they don't make recordings like that any more.

>> Ever heard of the Kurplus-Strong algorithm?
> 
> Nope :) I'm sure wikipedia has. It has, and looks like I read the 
> article, so Yes. :)
> 
> Very much the IIR plucked string in the applet.

And then you get into the whole "waveguide synthesis" thing, like 
Reaktor's Steampipe instrument. Very neat...


Post a reply to this message

From: Mike Raiford
Subject: Re: FFT Toy
Date: 2 Feb 2009 11:04:32
Message: <49871990@news.povray.org>
Invisible wrote:
>>> Of course, it's not quite the same. With electronics, you have to 
>>> remember that your "10 Ohm" resisters are actually 10 Ohm +/- 10%. ;-)
>>
>> Right, unless you have 1% resistors.
> 
> Even then, you have to be careful that your design won't malfunction 
> wildly if one of the two "identical" resistors isn't quite "identical", 
> for example.
> 
> With digital IIR, you just have to be careful about numerical stability.
> 

Real world is never as nice and neat as ideal..

> 
> Yeah, it's tricky. There are several possibly ways to map the s-domain 
> to the z-domain - including advanced techniques where one specific 
> frequency maps exactly while the rest are all approximate. (E.g., so you 
> end up with a correct cutoff frequency even if the rolloff angle is 
> different.)
> 

Hmmm. That I did not know...

> 
> Yeah, I think I have a picture somewhere on my harddrive of him doing 
> his "it's time to ****ing FEED ME!" expression. Except that, of course, 
> you can never tell if he means "feed me" or something else - just "I'M 
> NOT FRIGGIN HAPPY!"

He's in the point in a vague direction and grunt. If you don't figure 
out what he wants immediately, he goes thermonuclear on you. Quite fun. 
Just the tip of the terrible twos iceberg, I'm afraid.

> I just hope he doesn't grow up to be an idiot. Because, man, that would 
> be seriously upsetting as a parent, I imagine... o_O

Me, too. I can only hope our guidance through his early years will lead 
to him making sound decisions later in life.

Of course he has the option to ignore all of our guidance advice and 
upbringing, too. :/

>> I thought about downloading the demo to play around with.
> 
> What, Reaktor?
> 

Yes, They have a time-limited demo (with no saving ability) just to play 
with. I imagine I won't be able to do terribly much in 30 minutes ... 
but I can play for a bit.

> 
> The numerical stability depends on the exact kind of arithmetic you use. 
> (Integer, fixed-point, floating-point, single-precision, 
> double-precision, denormals...) A Chebyshev LP filter with high-order 
> basically involves turning the feedback path gain up higher and higher, 
> and the input gain lower and lower (to keep the passband at unit gain), 
> until the whole thing becomes completely unworkable.

Right. Eventually rounding error will add up causing instability.

> Still, I gather that with analogue electronics, anything much beyond 6 
> poles is basically hopeless...
> 

Hmmm, that would be a rather ugly circuit design, I imagine....

> 
> ...CLR is on more than one platform? :-P
> 

Look at mono.

> I've always loved synthesizers because... I like the crazy music they 
> make! :-D My dad has some old Moog recordings on LP. Obviously the 
> synthesizer itself is pretty lame, but some of the compositions people 
> put together... they don't make recordings like that any more.

Ooh, Moog.. neat :) Wish I could find some really good synth tracks.


>> Very much the IIR plucked string in the applet.
> 
> And then you get into the whole "waveguide synthesis" thing, like 
> Reaktor's Steampipe instrument. Very neat...

I remember you posting something created with Steampipe.

-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: FFT Toy
Date: 2 Feb 2009 11:17:03
Message: <49871c7f$1@news.povray.org>
Mike Raiford wrote:

> Real world is never as nice and neat as ideal..

On the contrary...

http://www.xkcd.com/538/

;-)

>> Yeah, it's tricky. There are several possibly ways to map the s-domain 
>> to the z-domain - including advanced techniques where one specific 
>> frequency maps exactly while the rest are all approximate. (E.g., so 
>> you end up with a correct cutoff frequency even if the rolloff angle 
>> is different.)
> 
> Hmmm. That I did not know...

If you just remap all the points on a line into a circle, the distances 
between the poles and zeros changes, which changes the shape of the 
transfer function (and hence frequency response). You can minimise this, 
but not eliminate it.

Or so I discovered when I tried to *do* this stuff! ;-)

>> Yeah, I think I have a picture somewhere on my harddrive of him doing 
>> his "it's time to ****ing FEED ME!" expression. Except that, of 
>> course, you can never tell if he means "feed me" or something else - 
>> just "I'M NOT FRIGGIN HAPPY!"
> 
> He's in the point in a vague direction and grunt. If you don't figure 
> out what he wants immediately, he goes thermonuclear on you. Quite fun. 
> Just the tip of the terrible twos iceberg, I'm afraid.

LOL @ thermonuclear.

I never cease to be amazed by the energy efficiency of small humans. 
They are so small, yet so ably produce deafening levels of sound. It's 
quite astonishing! ;-)

>> I just hope he doesn't grow up to be an idiot. Because, man, that 
>> would be seriously upsetting as a parent, I imagine... o_O
> 
> Me, too. I can only hope our guidance through his early years will lead 
> to him making sound decisions later in life.
> 
> Of course he has the option to ignore all of our guidance advice and 
> upbringing, too. :/

Hmm... I bet that would suck though. Man, being a parent just sounds 
really stressful and unrewarding...

>>> I thought about downloading the demo to play around with.
>>
>> What, Reaktor?
>>
> 
> Yes, They have a time-limited demo (with no saving ability) just to play 
> with. I imagine I won't be able to do terribly much in 30 minutes ... 
> but I can play for a bit.

Yes, IIRC you install the program and it runs in "demo mode" until you 
type in the license code. (So you *are* getting the "full program", only 
with saving disabled and a timelimit imposed.)

It can, of course, load anything created with the registered version of 
the program... ;-)

>> Still, I gather that with analogue electronics, anything much beyond 6 
>> poles is basically hopeless...
> 
> Hmmm, that would be a rather ugly circuit design, I imagine....

The DSP guide claims that they're usually designed with biquads. (A 
biquad being a design that produces two poles and two zeros.) Cascade as 
many biquads as you need for the number of poles you want. But I'm told 
that high-order filters require you to configure the circuits in 
inherantly unstable ways, so they tend to not work properly.

> Ooh, Moog.. neat :) Wish I could find some really good synth tracks.

I've got some chewed up tapes of a chewed up LP featuring Bach's Toccata 
& Fugue in D minor, and also something called "13 variations on a theme 
of Paganini".

>> And then you get into the whole "waveguide synthesis" thing, like 
>> Reaktor's Steampipe instrument. Very neat...
> 
> I remember you posting something created with Steampipe.

If you only play with one thing, play with Steampipe.

Kontact gives you real recordings of a real flute, which do sound more 
"real". But only Streampipe lets you very the breath pressure so that at 
first there's only hissing, then suddenly a note, and the note goes out 
of tune, and finally it jumps up an octave... You can't do that with a 
recording.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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