help with custom sound

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

help with custom sound

Post by crisman »

I made a custom sound, and I want it to play inside a small area. I did the script playSounAt, but it won't work, and I get an error:

Trying to play non-mono 3D sound

the complete script is: playSoundAt("fountain", 11, 26, 5)
I don't understand how I have to modify the sound, I already transformed it from stereo to mono, but still doesn't work. Funny thing is: if I use the script playSound("fountain") it works wonderfully. But obviously is not what I want since I hear the fountain everywhere...
Any advice?? Am I missing something?
I use audacity for audio editing, exported the file from .mp3 to .ogg
Thank you!
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: help with custom sound

Post by Komag »

it definitely has something to do with the exact sound format and mono/stereo/something. Some of the original sounds also won't work and give the same error, while others work fine with it.
Finished Dungeons - complete mods to play
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

Re: help with custom sound

Post by antti »

I think the catch here might be that it should be .wav

We use .ogg only for the music so there might be some unexpected behavior if they are used elsewhere.
Steven Seagal of gaming industry
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: help with custom sound

Post by crisman »

Thanks for the answer, but unfortunately it doesn't seem to work neither. I've converted it in .ogg, .wav, even .mp3 but still not working.
PlaySound instead works with all format. Not sure what I'm doing, maybe I wrote the script playSoundAt ina a wrong way?
I've also converted stereo to mono - but still no luck :(
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: help with custom sound

Post by Komag »

you can test your script using "teleport" sound, it will work if the script is right:

Code: Select all

playSoundAt("teleport", 1, 14, 18)
this would play it on level 1 at x14 y18 - it's somewhat quiet so you should try standing one square away to test, turned to your left or right so you can hear whether it's working directionally.
Finished Dungeons - complete mods to play
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: help with custom sound

Post by crisman »

Thanks for the tip Komag, the script worked perfectly, so it's a problem of the file format somehow...
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: help with custom sound

Post by LordGarth »

sounds should be 16 bit wav files. Also you can set min and max distance

minDistance = 5,
maxDistance = 6,

LG
Dungeon Master and DOOM will live forever.
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: help with custom sound

Post by crisman »

it turns out I was already exporting files in 16 bit D:
So unfortunately it's not this problem.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: help with custom sound

Post by petri »

crisman wrote:Trying to play non-mono 3D sound
If you are still getting this error, then your wav is in stereo. 3D sounds must be mono.
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: help with custom sound

Post by crisman »

Thank you everyone, now it works!
I've redone everything from beginning from my .mp3. I think my mistake was converting the .ogg I originally made the first time into the .wav I've have used until now.
Otherwise I don't know what else could it be...
Post Reply