Re: [Flightgear-devel] Sound positioning and orientation

2008-08-22 Thread Erik Hofman
Maik Justus wrote:
 Hi Erik,
 Erik Hofman schrieb am 21.08.2008 14:25:
 Hi,
 ...
 There are two options, modify the code to reflect what is described in 
 README.xmlsound or modify the README file.

   
 I would prefer to modify the README file. I made some asymmetric sound 
 for helicopters (S58, bo105) and adjusted them, that the result give the 
 correct sound. But if there are other aircrafts with asymmetric sound 
 (e. g. multi engine aircrafts), which have wrong sound now... Does 
 anyone know of an aircraft, with wrong sound?

Okay you got a point here. The docs are updated now (README.xmlsound).
Also after checking the positioning and orientation code it all seemed 
to work properly already, the wrong documentation gave me the wrong 
impression.

This led to one good thing though; the move of the code from the main 
loop to the FGFX class makes it rather easy to add support for multiple 
sound sources, just create a new FGFX class for every aircraft (and 
update the  code to get the models position, which should be a one 
liner) and it should work properly.

Erik

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread James Turner

On 21 Aug 2008, at 13:25, Erik Hofman wrote:

 I'm working on proper Listener positioning for sound playback in
 FlightGear and encountered a difference between the coordinate system
 described in README.xmlsound (which describes a right handed system  
 that
 doesn't exists, it describes a left handed system instead) and the
 actual coordinate system of OpenAL (which is directly used, without  
 any
 conversions, at the moment).

Wow, great that you're working on this, it was something on my medium  
term list of things to consider.

While you're at it, can you make the sounds code be a proper  
subsystem, and also remove the dependency on the viewer classes by  
getting the listener information from the property tree? I.e migrate  
the ugly code out of the main loop in main.cxx.

James



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread Erik Hofman
James Turner wrote:
 On 21 Aug 2008, at 13:25, Erik Hofman wrote:
 
 I'm working on proper Listener positioning for sound playback in
 FlightGear and encountered a difference between the coordinate system
 described in README.xmlsound (which describes a right handed system  
 that
 doesn't exists, it describes a left handed system instead) and the
 actual coordinate system of OpenAL (which is directly used, without  
 any
 conversions, at the moment).
 
 Wow, great that you're working on this, it was something on my medium  
 term list of things to consider.
 
 While you're at it, can you make the sounds code be a proper  
 subsystem, and also remove the dependency on the viewer classes by  
 getting the listener information from the property tree? I.e migrate  
 the ugly code out of the main loop in main.cxx.

I knew it! :)
Ok, I' l take a look at that, good idea.

Erik

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread James Turner

On 21 Aug 2008, at 13:33, Erik Hofman wrote:

 I knew it! :)
 Ok, I' l take a look at that, good idea.

One of the things on my medium-term list is to carry on the subsystem- 
ification work. To reach the ultimate goal (mainloop just does  
'update' on the subsystemgr) will take a long time, but there's a lot  
of low-hanging fruit, and it all gets code out of Main/, which can  
only be a good thing.

James

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread Erik Hofman
James Turner wrote:
 On 21 Aug 2008, at 13:33, Erik Hofman wrote:
 
 I knew it! :)
 Ok, I' l take a look at that, good idea.
 
 One of the things on my medium-term list is to carry on the subsystem- 
 ification work. To reach the ultimate goal (mainloop just does  
 'update' on the subsystemgr) will take a long time, but there's a lot  
 of low-hanging fruit, and it all gets code out of Main/, which can  
 only be a good thing.

This is now committed for the SGSoundMgr code, it has been moved tot FGFX.

Erik

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread James Turner

On 21 Aug 2008, at 15:31, Erik Hofman wrote:

 This is now committed for the SGSoundMgr code, it has been moved tot  
 FGFX.

Just in case you care, my longer term plan for the sound code was to  
create an SGSoundSource (in the simgear code), which would basically  
be a wrapper around an OpenAL source. This could then be hung off an  
AIModel, and potentially, we could add a new kind of multiplayer  
message to trigger a sound remotely.

something like (incomplete!):

class SGSoundSource
{
public:
void setVelocity(SGVec3d)
void setOrientation(SGQuatd)

void setPosition(); // either cart or geod, whichever makes more sense

void playOnce(... sound id , ampltidue  );
void playLooped(  same as above , loopCount or -1);
}

That's me guessing wildly, but feels about right - and very easy to  
hook into the AI / MP code. Probably want a Nasal interface for it as  
well.

Quite far down my current ToDo list, though.

James


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread Anders Gidenstam
On Thu, 21 Aug 2008, James Turner wrote:


 On 21 Aug 2008, at 15:31, Erik Hofman wrote:

 This is now committed for the SGSoundMgr code, it has been moved tot
 FGFX.

 Just in case you care, my longer term plan for the sound code was to
 create an SGSoundSource (in the simgear code), which would basically
 be a wrapper around an OpenAL source. This could then be hung off an
 AIModel, and potentially, we could add a new kind of multiplayer
 message to trigger a sound remotely.

Why not trigger multiplayer sounds via property changes (in the same way 
as most of the other sounds are handled)?

Switching to only sending properties when they change would make it 
feasible to have a bunch of MP enabled properties for the sounds.

Cheers,

Anders
-- 
---
Anders Gidenstam
WWW: http://www.gidenstam.org/FlightGear/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread James Turner

On 21 Aug 2008, at 17:02, Anders Gidenstam wrote:

 Why not trigger multiplayer sounds via property changes (in the same  
 way
 as most of the other sounds are handled)?

 Switching to only sending properties when they change would make it
 feasible to have a bunch of MP enabled properties for the sounds.

I'm not familiar enough with how 'other' sounds are handled to be  
sure, but my issue is that currently all 'positioned' sounds originate  
from the aircraft - there needs to be some additional data/struct/ 
class exposed at the C++ level to specify a bit more information about  
sources. Of course it can have a Nasal interface, but I have the  
impression you're talking about something a bit different.

Changing MP to only send properties when the change is a separate, but  
worthwhile improvement, I guess, but I don't (again) know enough to  
comment for sure. And equally, there's plenty of scope to add new MP  
messages types, the same way chat is currently handled. For 'event'y  
thing like playing a one-off sounds, using property changes doesn't  
seem exactly elegant to me, though I know it's a common idiom.

James

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread Anders Gidenstam
On Thu, 21 Aug 2008, James Turner wrote:

 I'm not familiar enough with how 'other' sounds are handled to be
 sure, but my issue is that currently all 'positioned' sounds originate
 from the aircraft - there needs to be some additional data/struct/
 class exposed at the C++ level to specify a bit more information about
 sources. Of course it can have a Nasal interface, but I have the
 impression you're talking about something a bit different.

My comment was on the talk about adding extra MP message types for sound.

I'm not familiar with the sound internals, but sounds created by a MP/AI 
model should of course be positioned relative to that model. So adding 
that possibility would be great.

 Changing MP to only send properties when the change is a separate, but
 worthwhile improvement, I guess, but I don't (again) know enough to
 comment for sure. And equally, there's plenty of scope to add new MP
 messages types, the same way chat is currently handled. For 'event'y
 thing like playing a one-off sounds, using property changes doesn't
 seem exactly elegant to me, though I know it's a common idiom.

Using properties would match nicely with the XML sound configs and be 
analogous to the way animation of MP/AI 3d models are handled.

Btw, if you mean the in-program chat I'm fairly sure it is done using a 
MP enable string property.

Cheers,

Anders
-- 
---
Anders Gidenstam
WWW: http://www.gidenstam.org/FlightGear/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Sound positioning and orientation

2008-08-21 Thread Maik Justus
Hi Erik,
Erik Hofman schrieb am 21.08.2008 14:25:
 Hi,
 ...
 There are two options, modify the code to reflect what is described in 
 README.xmlsound or modify the README file.

   
I would prefer to modify the README file. I made some asymmetric sound 
for helicopters (S58, bo105) and adjusted them, that the result give the 
correct sound. But if there are other aircrafts with asymmetric sound 
(e. g. multi engine aircrafts), which have wrong sound now... Does 
anyone know of an aircraft, with wrong sound?
 I think I already know the answer, but which of the two is preferred by 
 others?

 If no one cares that much I'll modify the SimGear code to reflect what 
 is described in the README file to prevent the need to modify too many 
 configuration files.

   
I am not sure, if there is any need to modify configuration files if 
only the documentation is corrected.
 Erik
   
Maik

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel