POV-Ray : Newsgroups : povray.binaries.animations : 3D Sound Test 1 : Re: 3D Sound Test 1 Server Time
18 Jul 2024 16:16:27 EDT (-0400)
  Re: 3D Sound Test 1  
From: Slime
Date: 17 Sep 2004 10:25:31
Message: <414af3db$1@news.povray.org>
I am also getting reversed stereo sound.

You asked for help in how to make the system easier to use, so let me give
you my thoughts...

> #declare camera_location = <0,0.3,1.2-0.5*clock>;
> #declare camera_forward = z+0.1*x*clock;
> #declare camera_up = y;

You should make it possible to read these values automatically if screen.inc
has been included. This lets the user use an interface that they may be more
familiar with (and is also more flexible).

> sound_set_dobbler_velocity(100)

I notice this is the only place where velocity seems to be mentioned. It
seems to me like it would be more intuitive for the user to be allowed to
specify the camera's velocity as a vector and each sound's velocity as a
vector. (Or maybe they could specify the positions of these objects through
macros and then you could calculate their velocities that way.) Geting an
object's velocity relative to the camera would be a simple subtraction, and
then the amount of doppler effect on an object would probably have something
to do with the dot product of the object's velocity with the direction from
the object to the camera. This way your macros do the work and I only have
to think about where everything's moving.

I guess maybe you're already doing that just by using the object's positions
from the text file in your java program.

> sound_set_listener(camera_location,camera_forward,camera_up)
>
> //          name     starttime endtime  translate        gain pitch
> sound_point("ship1", 1000*0,   1000*10, ship1_translate, 2.0, 1.0)
> //               name    sound_filename       time
> sound_point_loop("ship1","wavdata/engine.wav",1000*0)
>
> //          name     starttime endtime  translate        gain pitch
> sound_point("ship2", 1000*0,   1000*10, ship2_translate, 1.0, 1.0)
> //               name    sound_filename       time
> sound_point_loop("ship2","wavdata/hovercraft.wav",1000*0)
>
> sound_end()

This part all seems pretty intuitive.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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