POV-Ray : Newsgroups : povray.off-topic : Too many pipes? Server Time
10 Oct 2024 04:36:51 EDT (-0400)
  Too many pipes? (Message 31 to 40 of 51)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Orchid XP v8
Subject: Re: Too many pipes?
Date: 22 Oct 2008 15:48:48
Message: <48ff83a0$1@news.povray.org>
>> Reminds me of something I had some time ago. It was a software synth 
>> based on the physical characteristics of the instrument, I think it 
>> was put out by Creative at the time, bundled with their sound card. 
>> I've since forgotten the name of it, though. Ahh, called WaveGuide:
> 
> The Reaktor product from Native Instruments features a sound module 
> named "Steam Pipe" which uses a (1D) digital waveguide to simulate 
> string and wind instruments. It does a delightful flute sound. ;-)

Here ya go:

http://download.orphi.me.uk/Music/G3/Silhouettes.ogg

This entire piece of music was created using *only* Steam Pipe. 
Everything you hear is a digital waveguide simulation.

Neat, isn't it?

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


Post a reply to this message

From: triple r
Subject: Re: Too many pipes?
Date: 22 Oct 2008 19:35:00
Message: <web.48ffb77345093b77e0c9e9540@news.povray.org>
Invisible <voi### [at] devnull> wrote:

> So apparently the wave equation tells us that the 2nd derivative of some
> physical quanitity "u" with respect to time is equal to the square of
> the wave propogation constant multiplied by the Laplacian of "u".
>
> ...which would probably mean something if I could figure out what a
> Laplacian is! :-S
>
> According to Wikipedia, the Laplacian of u is the sum of all partial 2nd
> derivatives of u with respect to every coordinate axis.
>
> ...so...the total curvature then? ._.

In a realistic setting, this could be pressure and velocity, in which case they
usually just differ by a phase of 90 degrees, if I recall correctly.

Or, think of it as a string under tension.  If it has a positive second
derivative, then it is curved upward and that part of the string will tend to
accelerate upward. According to Newton's 2nd law, F=ma, so if the curvature
acts as a force, then it is proportional to the acceleration, a=d^2(u)/dt^2.
Using the constant c^2, which happens to end up as the wave speed, this gives
the 1-D wave equation:

d^2(u)/dt = c^2 * d^2(u)/dx^2.

For two dimensions, you just have curvature acting in two directions, so you add
them up and

d^2(u)/dt^2 = c^2 * ( d^2(u)/dx^2 + d^2(u)/dy^2 ) = c^2 * Laplacian(u)

To solve this, remember that the second derivative can be written discretely as

d^2(f)/dx^2  =  ( f(i+1) - 2*f(i) + f(i-1) ) / ( dx^2 )

where f(i+1) and f(i-1) are the neighboring grid points and dx is the grid
spacing.  Applying this to the time and space derivatives across a
two-dimensional grid, (assuming dx=dy),

( u(n+1) - 2*u(n) + u(n-1) ) / dt^2 = c^2 * ( u(i+1,j) + u(i-1,j) + u(i,j+1) +
u(i,j-1) - 4*u(i,j) ) / dx^2

Assuming you know the previous two time steps and that the right-hand side is
evaluated at time level n, just solve for u(n+1):

u(n+1) = 2*u(n) - u(n-1) + (c*dt/dx)^2 * ( u(i+1,j) + u(i-1,j) + u(i,j+1) +
u(i,j-1) - 4*u(i,j) )

So to solve the equation, make three grids.  Set grids (n-1) and (n) to zero.
Solve for (n+1).  Then transfer (n)->(n-1) and (n+1)->n.  Now you're back where
you started so just repeat over and over.  This should be stable as long as
(c*dt/dx) < 1.  This is called the CFL number and ensures that waves don't
travel across more than one cell per time step.

To make it interesting, just say instead that

d^2(u)/dt^2 - c^2*Laplacian(u) = f(x,y,t)

where f(x,y,t) is just any old forcing function that can depend on space and
time and makes it actually move.

Sorry.  That got a little long.  Hope it's remotely useful...

 - Ricky


Post a reply to this message

From: scott
Subject: Re: Too many pipes?
Date: 23 Oct 2008 02:54:32
Message: <49001fa8@news.povray.org>
> To do things in realtime, you must take shortcuts :)
> 
> Wonder if there's a sound card out there that has a programmable DSP 
> that's got enough parallelism to add as much realism to your simulation 
> as possible.

I imagine a GPU would be quite good at this sort of thing.


Post a reply to this message

From: Michael Zier
Subject: Re: Too many pipes?
Date: 23 Oct 2008 03:51:07
Message: <49002ceb@news.povray.org>
Am Tue, 21 Oct 2008 12:30:58 +0100 schrieb Invisible:

> 
>> Thinking of writing a simulator? ;-)
> 
> Well let's put it this way: What do you think my chances of building a
> working set of organ pipes are? :-P Last time I tried to cut wood, I
> couldn't even cut it straight! :-/ I figure I have far more chance of
> building an organ simulator...

Maybe this is something for you: http://www.kokkinizita.net/linuxaudio/
aeolus

Haven't tried it yet, but looks interesting.


Post a reply to this message

From: Mike Raiford
Subject: Re: Too many pipes?
Date: 23 Oct 2008 08:49:21
Message: <490072d1$1@news.povray.org>
scott wrote:
>> To do things in realtime, you must take shortcuts :)
>>
>> Wonder if there's a sound card out there that has a programmable DSP 
>> that's got enough parallelism to add as much realism to your 
>> simulation as possible.
> 
> I imagine a GPU would be quite good at this sort of thing.
> 

I suspect you're right. It has built-in support for parallel operations. 
Can you repurpose a GPU for that sort of thing?

-- 
~Mike


Post a reply to this message

From: Mike Raiford
Subject: Re: Too many pipes?
Date: 23 Oct 2008 08:51:13
Message: <49007341$1@news.povray.org>
Orchid XP v8 wrote:
>>> Reminds me of something I had some time ago. It was a software synth 
>>> based on the physical characteristics of the instrument, I think it 
>>> was put out by Creative at the time, bundled with their sound card. 
>>> I've since forgotten the name of it, though. Ahh, called WaveGuide:
>>
>> The Reaktor product from Native Instruments features a sound module 
>> named "Steam Pipe" which uses a (1D) digital waveguide to simulate 
>> string and wind instruments. It does a delightful flute sound. ;-)
> 
> Here ya go:
> 
> http://download.orphi.me.uk/Music/G3/Silhouettes.ogg
> 

I'll download and listen when I get home ...

> This entire piece of music was created using *only* Steam Pipe. 
> Everything you hear is a digital waveguide simulation.
> 
> Neat, isn't it?
> 

It is. I know the AWE64 software synth portion was quite nice. guitars 
sounded like guitars, etc ..

-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: Too many pipes?
Date: 23 Oct 2008 08:54:08
Message: <490073f0@news.povray.org>
Mike Raiford wrote:

> Can you repurpose a GPU for that sort of thing?

Probably.

The math isn't even that complex - there's just *a lot* of it.


Post a reply to this message

From: scott
Subject: Re: Too many pipes?
Date: 23 Oct 2008 09:49:30
Message: <490080ea$1@news.povray.org>
>>> Wonder if there's a sound card out there that has a programmable DSP 
>>> that's got enough parallelism to add as much realism to your simulation 
>>> as possible.
>>
>> I imagine a GPU would be quite good at this sort of thing.
>>
>
> I suspect you're right. It has built-in support for parallel operations. 
> Can you repurpose a GPU for that sort of thing?

A GPU is basically very fast if you want to perform exactly the same 
function on big arrays of data.  Nowadays there are very few limitations on 
what you can and can't do, and the few remaining are easily got around by 
using temporary arrays and multiple functions.

Even if your algorithm apparently doesn't work on huge arrays of data, it 
can often be forced to do so in order to get a big speed up.  eg With an IFS 
program that transforms one point repeatedly to generate a picture, on the 
GPU you can transform millions of points in parallel and you get the same 
result.


Post a reply to this message

From: Darren New
Subject: Re: Too many pipes?
Date: 23 Oct 2008 13:50:09
Message: <4900b951$1@news.povray.org>
Mike Raiford wrote:
> It is. I know the AWE64 software synth portion was quite nice. guitars 
> sounded like guitars, etc ..

There's an artist named Larry Fast who has a one-man band called 
"Synergy."  He produces what was called "electronic music" a few decades 
ago, more rock than trance-like. In the liner notes of his first album 
talking about what instruments he used, he lists a dozen synthesizers 
and such, and ends with "and no guitars." In his second album, other 
synthesizers, and "and still no guitars."  Third album the same. Fourth 
album, one of the synthesizers is "Madrong M-500 guitar synthesizer."[1] 
And at the bottom, he adds "Finally, guitars, sort of."

[1] I don't know the exact brand offhand, no. :-) Don't google "madrong".

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

From: Mike Raiford
Subject: Re: Too many pipes?
Date: 23 Oct 2008 16:28:03
Message: <4900de53$1@news.povray.org>
Darren New wrote:

> 
> [1] I don't know the exact brand offhand, no. :-) Don't google "madrong".
> 

Oh, good. it doesn't come up with anything nasty, thankfully.

(And just what did you think I was gonna do if you said don't google for 
[X] ... Google it, of course ;) )
-- 
~Mike


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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