Playing Multichannel files / playing audio from different speakers during OpenDS simulation

Hello all!

I’m currently building an experiment using the OpenDS driving simulator, which is built on the jmonkey game engine. In my experiment, audio files are play during different times/locations in simulation. I wanted to play the sounds from different speakers, so I used Audacity to make multichannel files and tested them to ensure that files played from the specified speaker. They worked as expected. Then I tried to play the sound files within the simulator. They did play in the correct speakers, but the sound was low volume and in very slow motion.

I’m not sure how to fix this issue. I’m not sure if the issue is related to my use of multichannel files, or that I’m not using the and tags found in my scene.xml file below:

<?xml version="1.0" encoding="UTF-8"?>

<sounds>	

<!-- FOR LISTENING CONDITIONS !! RANDOMIZE KEY AT WILL -->
	<sound id="talk1" key="Sounds/Effects/Audio Stimuli/S75F2_LEFT.wav">
		<positional value="false" />
		<directional value="false" />
		<loop>false</loop>
		<volume>0.5</volume>
		<pitch>1</pitch>
	</sound>	
	<sound id="talk2" key="Sounds/Effects/Audio Stimuli/S10M2_RIGHT.wav">
		<positional value="false" />
		<directional value="false" />
		<loop>false</loop>
		<volume>0.5</volume>
		<pitch>1</pitch>
	</sound>

Additionally, when changing the positional and directional values to ‘true’, then add a translation vector (below), then sound will play from the back speaker. I have not been able to get sound to play from other directions however.

<?xml version="1.0" encoding="UTF-8"?>

<sounds>	

<!-- FOR LISTENING CONDITIONS !! RANDOMIZE KEY AT WILL -->
	<sound id="talk1" key="Sounds/Effects/Audio Stimuli/S75F2_LEFT.wav">
		<positional value="true">
		<translation>
			<vector jtype="java_lang_Float" size="3">
				<entry>1</entry>
				<entry>0.5</entry>
				<entry>-200</entry>
			</vector>
		</translation>
            </positional>
		<directional value="true" />
		<loop>false</loop>
		<volume>0.5</volume>
		<pitch>1</pitch>
	</sound>	

Can anyone point me in a good direction for solving this issue? Thanks for any and all help!

UC

From the wiki:

Note that setPositional(false) is pretty important when you use stereo sounds. Positional sounds must always be mono audio files

Have you read through the wiki?
https://wiki.jmonkeyengine.org/jme3/beginner/hello_audio.html

1 Like

Hi Jayfella,

Thank you for your reply!

Yes, I have read through that article. Although it had some good information, I could not find the specific solution to my problem. I’ll keep reading however, and hopefully will find what I’m looking for.

Thanks again,
UC

  1. Try a higher volume value
  2. vector there, is x,z,y. if you want to play sound at left, try 90, 0, 0.