Jump to content
Sign in to follow this  
_qor

play3D sound cannot find sound-file

Recommended Posts

Hey there,

I wanted to add my music to the mission as a sound source.

So I created a description.ext to define where the sound is located!

To call it ingame I created a trigger with OnAct: _soundSource = createSoundSource ["WOTW", position speaker, [], 0]

So the sound WOTW should come from a little radio with the name "speaker". But I get the message "No entry 'bin\config.bin/cfgVehicles.WOTW'".

By the way, is this the right way to create a sound which differs in regard to its loudness relating to the distance between player and soundsource?

Edited by _qoR

Share this post


Link to post
Share on other sites

Have a look at this little test mate. See if it helps. It uses say3D.

---------- Post added at 09:39 AM ---------- Previous post was at 09:34 AM ----------

Your code should work. I'm not familiar with "WOTW"... is that actually a sound?

Try this code see if it works...

flies = createSoundSource ["Sound_Flies", position speaker, [], 0];

Edited by twirly
Fixed code

Share this post


Link to post
Share on other sites

say 3D is what I tried before. Problem was, that I thought

the sound was hearable all over the map although I only tried to go 20 meters away.

I tried with your demo mission to walk 300 meters away and the

sound really sounded more quiet! I'm gonna lower the volume and have another attempt!

Kinda curious! There are two guys sitting next to a small radio and listening to the song like its the very house-party of the century, although I turned the olume pitch to 0.1...

But great! The volume is quiet down at least a bit and at a distance of about 20 meters you can only notice a dim crying from the radio.

But it seems that you cant set the volume lower than 0.1?! And its still kinda concert loudness!

Gonna have a try with making the soundfile more quiet itself!

Okay, after I normalized the music-file to -12dB and changed the volume to 0.005 I've got an admissible loudness!

You also can tune your music-files for "radio-sound" by lower 70-180 Hertz (less bass) and increase 3k-6k (scratchy sound) with the equalizer.

Easily made with Audacity.

Edited by _qoR

Share this post


Link to post
Share on other sites

In your CfgSounds, you can add a third parameter after the volume and pitch, which the radius in which the sound can be heard. So you can actually modify that distance without altering the volume of your sound.

Also, make sure your sound is recorded in mono, not stereo.

Soundsource needs a sound defined in the CfgVehicles.

Share this post


Link to post
Share on other sites

There are no troubles with stereo recordings so far!

Or perhaps that is why you need to restart the editor sometimes after altering the description.ext.

Apart from that, everything is alright with my stereo soundfile.

But what means "in your CfgSounds"? How can I set that third parameter?

That would be a great possibility because the sound really acts unrealistically: you hear it right in front of the sound source hardly louder than at 100 meters distance!

Edited by _qoR

Share this post


Link to post
Share on other sites

Here's your basic cfgSounds:

class CfgSounds
{
sounds[] = {};
class MySound
{
	name = "my_sound_name";
	sound[] = {"sounds\mysound.ogg", [color="#008000"]1[/color], 1, [color="#FF0000"]60[/color]};
	titles[] = {};
};
};

The first parameter (in green) is the volume. It can take numeric values (here it's 1) or "db" values. I'm not exactly sure what those do, but basically they seem to change either the volume or the priority of the sound.

The second parameter is the pitch (speed the sound is played at)

The last, optional, in red, is the radius in which the sound is heard.

Though you absolutely need a mono sound if you want it to fare decently in space. Stereo will always sound messed up.

Share this post


Link to post
Share on other sites

Ah I see!

I give it a try with a mono soundfile, guess it will work exactly as I actually wanted it to ;)

Edited by _qoR

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×