Airplane example

40 views
Skip to first unread message

Doug McCorkle

unread,
Mar 11, 2011, 10:29:45 PM3/11/11
to osgaudi...@googlegroups.com
Hello,

I thought we had an example that had a sound tied to an airplane that went in a circle but I seem to be unable to find it. Did we ever have an example like this?

Doug

Paul Martz

unread,
Mar 12, 2011, 11:32:35 AM3/12/11
to osgaudi...@googlegroups.com
On 3/11/2011 8:29 PM, Doug McCorkle wrote:
> I thought we had an example that had a sound tied to an airplane that went in a circle but I seem to be unable to find it. Did we ever have an example like this?

That's Example_osgaudio, and it's in osgAudio/examples/osgaudio. The bee.wav
sound is associated with the glider, but both the glider and the cessna fly in
circles above a checkerboard. Is that the one you mean?

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/

Chris 'Xenon' Hanson

unread,
Mar 12, 2011, 11:37:50 AM3/12/11
to osgaudi...@googlegroups.com
On 3/11/2011 8:29 PM, Doug McCorkle wrote:
> Hello,
> I thought we had an example that had a sound tied to an airplane that went in a circle but I seem to be unable to find it. Did we ever have an example like this?

I think it's the osgaudio_scene.osg file, to be viewed in osgaudioviewer.

> Doug


--
Chris 'Xenon' Hanson, omo sanza lettere. Xe...@AlphaPixel.com http://www.alphapixel.com/
Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen

Doug McCorkle

unread,
Mar 12, 2011, 1:48:20 PM3/12/11
to osgaudi...@googlegroups.com

On Mar 12, 2011, at 10:37 AM, Chris 'Xenon' Hanson wrote:

On 3/11/2011 8:29 PM, Doug McCorkle wrote:
Hello,
I thought we had an example that had a sound tied to an airplane that went in a circle but I seem to be unable to find it. Did we ever have an example like this?

 I think it's the osgaudio_scene.osg file, to be viewed in osgaudioviewer.

You all both pointed out different examples so I will dig into them and see what I find.

Doug

Doug McCorkle

unread,
Mar 14, 2011, 8:38:08 PM3/14/11
to osgaudi...@googlegroups.com

On Mar 12, 2011, at 10:32 AM, Paul Martz wrote:

> On 3/11/2011 8:29 PM, Doug McCorkle wrote:
>> I thought we had an example that had a sound tied to an airplane that went in a circle but I seem to be unable to find it. Did we ever have an example like this?
>
> That's Example_osgaudio, and it's in osgAudio/examples/osgaudio. The bee.wav sound is associated with the glider, but both the glider and the cessna fly in circles above a checkerboard. Is that the one you mean?

Should we delete the README in here:

trunk/examples/osgaudio

it appears to be empty.

Doug

Doug McCorkle

unread,
Mar 14, 2011, 8:42:00 PM3/14/11
to osgaudi...@googlegroups.com

Also, in this examples it seems that when we zoom in and out that things should get quieter. Is that an incorrect assumption? If not how do I make the example behave appropriately.

Doug

Paul Martz

unread,
Mar 14, 2011, 8:51:39 PM3/14/11
to osgaudi...@googlegroups.com
> Should we delete the README in here:
>
> trunk/examples/osgaudio

Done.
-Paul

Paul Martz

unread,
Mar 14, 2011, 8:57:30 PM3/14/11
to osgaudi...@googlegroups.com
On 3/14/2011 6:42 PM, Doug McCorkle wrote:
> Also, in this examples it seems that when we zoom in and out that things should get quieter. Is that an incorrect assumption? If not how do I make the example behave appropriately.

Seems to work OK in OpenAL but is broken in FMOD. Can you open an issue for this?

Chris 'Xenon' Hanson

unread,
Mar 14, 2011, 9:02:26 PM3/14/11
to osgaudi...@googlegroups.com
On 3/14/2011 6:42 PM, Doug McCorkle wrote:
>>> That's Example_osgaudio, and it's in osgAudio/examples/osgaudio. The bee.wav sound is associated with the glider, but both the glider and the cessna fly in circles above a checkerboard. Is that the one you mean?
> Also, in this examples it seems that when we zoom in and out that things should get quieter. Is that an incorrect assumption? If not how do I make the example behave appropriately.

Hmm. I don't know why it would be misbehaving. AFAIK osgViewer does zooming by moving
the camera position (not FOV adjustment) so sound falloff SHOULD respond.

I assume you're on FMOD. osgAudio doesn't handle much of the fancy stuff, it's just a
wrapper to shove state down to openAL or FMOD. I can try to find some time to get my
osgAudio built to current and try it out if you want.

Is this Windows, Mac or Linux? Is it consistent on more than one platform? Has anyone
tried it with the openAL backend?

We could also go back and see if osgAL worked in this situation, and if any of the
osgAudioLow examples can test the situation.

Basically, I don't have an answer, but I can probably look into it tomorrow night.

Chris 'Xenon' Hanson

unread,
Mar 14, 2011, 9:03:21 PM3/14/11
to osgaudi...@googlegroups.com
On 3/14/2011 6:57 PM, Paul Martz wrote:
> On 3/14/2011 6:42 PM, Doug McCorkle wrote:
>> Also, in this examples it seems that when we zoom in and out that things should get
>> quieter. Is that an incorrect assumption? If not how do I make the example behave
>> appropriately.
> Seems to work OK in OpenAL but is broken in FMOD. Can you open an issue for this?

Ok, thanks for confirming that, Paul. It would also be good to know about platform.\

Paul Martz

unread,
Mar 14, 2011, 9:34:34 PM3/14/11
to osgaudi...@googlegroups.com
On 3/14/2011 7:02 PM, Chris 'Xenon' Hanson wrote:
> On 3/14/2011 6:42 PM, Doug McCorkle wrote:
>>>> That's Example_osgaudio, and it's in osgAudio/examples/osgaudio. The bee.wav sound is associated with the glider, but both the glider and the cessna fly in circles above a checkerboard. Is that the one you mean?
>> Also, in this examples it seems that when we zoom in and out that things should get quieter. Is that an incorrect assumption? If not how do I make the example behave appropriately.
>
> Hmm. I don't know why it would be misbehaving. AFAIK osgViewer does zooming by moving
> the camera position (not FOV adjustment) so sound falloff SHOULD respond.

We did modify the code to require that the app set the Camera in the SoundRoot:
http://code.google.com/p/osgaudio/wiki/PortingNotes
...to support multi-windowed environments (as opposed to the old osgAL mechanism
of just taking the first Camera encountered during cull). But this example
appears to do this correctly. Indeed it works for OpenAL.
-Paul

Doug McCorkle

unread,
Mar 14, 2011, 9:59:42 PM3/14/11
to osgaudi...@googlegroups.com

On Mar 14, 2011, at 8:02 PM, Chris 'Xenon' Hanson wrote:

> On 3/14/2011 6:42 PM, Doug McCorkle wrote:
>>>> That's Example_osgaudio, and it's in osgAudio/examples/osgaudio. The bee.wav sound is associated with the glider, but both the glider and the cessna fly in circles above a checkerboard. Is that the one you mean?
>> Also, in this examples it seems that when we zoom in and out that things should get quieter. Is that an incorrect assumption? If not how do I make the example behave appropriately.
>
> Hmm. I don't know why it would be misbehaving. AFAIK osgViewer does zooming by moving
> the camera position (not FOV adjustment) so sound falloff SHOULD respond.
>
> I assume you're on FMOD.

Yes.

> osgAudio doesn't handle much of the fancy stuff, it's just a
> wrapper to shove state down to openAL or FMOD. I can try to find some time to get my
> osgAudio built to current and try it out if you want.
>
> Is this Windows, Mac or Linux?

Mac.

> Is it consistent on more than one platform?

I do not know.

> Has anyone
> tried it with the openAL backend?
>
> We could also go back and see if osgAL worked in this situation, and if any of the
> osgAudioLow examples can test the situation.

FMOD works properly in the osgaudioocclude example so it appears to be something in the osgaudio example.

Doug

Doug McCorkle

unread,
Mar 15, 2011, 1:25:24 PM3/15/11
to osgaudi...@googlegroups.com

I think this problem is tied to the size of the scene and the issue noted in "[osgaudio-users] Problems with the osgaudioocclude example". If you scale down the whole scene by 0.1 in the osgaudio example you will notice that as you zoom in and out that the sound will get louder and softer. If you also set the setReferenceDistance to 10 the differential in levels is quite noticeable. I am not sure how all of these variables fit together but it seems like some distance setting is not being handled correctly in FMOD for the size of the "world" and then at the user level the setReferenceDistance is not being handled properly. Any ideas how to correct this?

Doug

Chris 'Xenon' Hanson

unread,
Mar 15, 2011, 1:37:53 PM3/15/11
to osgaudi...@googlegroups.com
On 3/15/2011 11:25 AM, Doug McCorkle wrote:
> I think this problem is tied to the size of the scene and the issue noted in "[osgaudio-users] Problems with the osgaudioocclude example". If you scale down the whole scene by 0.1 in the osgaudio example you will notice that as you zoom in and out that the sound will get louder and softer. If you also set the setReferenceDistance to 10 the differential in levels is quite noticeable. I am not sure how all of these variables fit together but it seems like some distance setting is not being handled correctly in FMOD for the size of the "world" and then at the user level the setReferenceDistance is not being handled properly. Any ideas how to correct this?

Ok. I recall this. There's an API call that tells the underlying sound system how
(dimensionless) scene units map to real world units (where sound physics are calculated).
Perhaps this isn't being called by the demo apps, or perhaps the demo apps are using an
incorrect value, or the default value is poorly chosen?

Paul Martz

unread,
Mar 15, 2011, 1:55:42 PM3/15/11
to osgaudi...@googlegroups.com
On 3/15/2011 11:37 AM, Chris 'Xenon' Hanson wrote:
> On 3/15/2011 11:25 AM, Doug McCorkle wrote:
>> I think this problem is tied to the size of the scene and the issue noted in "[osgaudio-users] Problems with the osgaudioocclude example". If you scale down the whole scene by 0.1 in the osgaudio example you will notice that as you zoom in and out that the sound will get louder and softer. If you also set the setReferenceDistance to 10 the differential in levels is quite noticeable. I am not sure how all of these variables fit together but it seems like some distance setting is not being handled correctly in FMOD for the size of the "world" and then at the user level the setReferenceDistance is not being handled properly. Any ideas how to correct this?
>
> Ok. I recall this. There's an API call that tells the underlying sound system how
> (dimensionless) scene units map to real world units (where sound physics are calculated).
> Perhaps this isn't being called by the demo apps, or perhaps the demo apps are using an
> incorrect value, or the default value is poorly chosen?

I imagine this might be related to the overly sensitive Doppler we've been
seeing with FMOD?

Doug McCorkle

unread,
Mar 15, 2011, 2:05:46 PM3/15/11
to osgaudi...@googlegroups.com

On Mar 15, 2011, at 12:37 PM, Chris 'Xenon' Hanson wrote:

> On 3/15/2011 11:25 AM, Doug McCorkle wrote:
>> I think this problem is tied to the size of the scene and the issue noted in "[osgaudio-users] Problems with the osgaudioocclude example". If you scale down the whole scene by 0.1 in the osgaudio example you will notice that as you zoom in and out that the sound will get louder and softer. If you also set the setReferenceDistance to 10 the differential in levels is quite noticeable. I am not sure how all of these variables fit together but it seems like some distance setting is not being handled correctly in FMOD for the size of the "world" and then at the user level the setReferenceDistance is not being handled properly. Any ideas how to correct this?
>
> Ok. I recall this. There's an API call that tells the underlying sound system how
> (dimensionless) scene units map to real world units (where sound physics are calculated).
> Perhaps this isn't being called by the demo apps, or perhaps the demo apps are using an
> incorrect value, or the default value is poorly chosen?

If I set the setReferenceDistance to 1 then everything works well for the osgaudio with no mods to the scale. Also, if the distance to the listener is greater than 9.99999 x 10^8 then the sound level jumps back up to its default level. This one is very strange.

In regards to the first issue, it appears that the functions of interest are:

_system->set3DSettings

_FMODChannel->set3DMinMaxDistance

I am not sure why we get odd behavior and the sound level does not drop off when the reference distance is set to 10 or 70 because from the docs it appears that it should be dropping off.

Doug

Chris 'Xenon' Hanson

unread,
Mar 15, 2011, 2:16:08 PM3/15/11
to osgaudi...@googlegroups.com
On 3/15/2011 11:55 AM, Paul Martz wrote:
> I imagine this might be related to the overly sensitive Doppler we've been seeing with FMOD?

I expect you're right.

Doug McCorkle

unread,
Mar 15, 2011, 3:56:29 PM3/15/11
to osgaudi...@googlegroups.com

On Mar 15, 2011, at 1:16 PM, Chris 'Xenon' Hanson wrote:

> On 3/15/2011 11:55 AM, Paul Martz wrote:
>> I imagine this might be related to the overly sensitive Doppler we've been seeing with FMOD?
>
> I expect you're right.

Hmmm. Were there any hints on what direction we needed to go to resolve this?

Doug

Chris 'Xenon' Hanson

unread,
Mar 15, 2011, 4:13:30 PM3/15/11
to osgaudi...@googlegroups.com
On 3/15/2011 1:56 PM, Doug McCorkle wrote:
>>> I imagine this might be related to the overly sensitive Doppler we've been seeing with FMOD?
>> I expect you're right.
> Hmmm. Were there any hints on what direction we needed to go to resolve this?

I can look at it tonight.

> Doug

Doug McCorkle

unread,
Mar 15, 2011, 4:46:14 PM3/15/11
to osgaudi...@googlegroups.com

This same behavior can be seen in the osgaduiooclussion example too. Just change the reference distance to 10 or 70 and things start acting strange. Anyway, see what you find in your testing. FMOD is definitely doing something odd here.

Doug

Doug McCorkle

unread,
Mar 15, 2011, 9:21:34 PM3/15/11
to osgaudi...@googlegroups.com
Hey Chris,

I just tested on windows with OpenAL and I think that the linear roll off in FMOD is what is comparable to what OpenAL is doing. If you add the FMOD linear flag into the sound creation for FMOD and retest things and set the max distance to something of moderate range I think you will find that it sounds very similar to OpenAL.

Doug


Doug

--
You received this message because you are subscribed to the Google Groups "osgAudio-users" group.
To post to this group, send email to osgaudi...@googlegroups.com.
To unsubscribe from this group, send email to osgaudio-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osgaudio-users?hl=en.


Doug McCorkle

unread,
Mar 15, 2011, 10:24:30 PM3/15/11
to osgaudi...@googlegroups.com

Chris 'Xenon' Hanson

unread,
Mar 16, 2011, 12:04:50 AM3/16/11
to osgaudi...@googlegroups.com
I'm gonna work on this in the morning when my mind is fresh.
Reply all
Reply to author
Forward
0 new messages