Jump to content


Photo

Fmod Sound System Engine


  • Please log in to reply
873 replies to this topic

#741 jpatt94

jpatt94

    GMC Member

  • New Member
  • 13 posts
  • Version:GM8

Posted 04 August 2012 - 10:40 PM

Hello, I recently discovered this dll and I'm very excited to see what I'll be able to do with it, so first I want to thank you for making a awesome dll.

However, I have been experiencing a strange problem with the 3d sound. I'm currently working on an online FPS and I'm using 3d sounds for my gun shot sound effects because I want to be able to place instances of those sounds on other player's computers whenever and wherever they or someone else shoots (obviously) As of now all the sounds when you shoot are at the player's (x,y,z) which is also where I set the listener to be. Shooting a gun sounds as it normally would without 3d (as I wanted) but whenever I am at a certain area of my map all of a sudden the sounds either stop working completely or they get a strange reverberated effect. I believe it only happens when the listener (player) object is outside of the room's dimensions (I drew the level model backwards because I needed more space) and I'm not sure if this would commonly lead to error or not. Also it only happens with my rocket launcher weapon which uses the same sound to shoot as used for the explosion of the rocket (which has its 3d sound position set to its coordinates)
I am not sure if this matters but all my files are .wav.

Any help on this matter would be very much appreciated.

Thank you in advance!!!
  • 0

#742 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 04 August 2012 - 11:36 PM

Yes, I think playing outside the defined world region is reported by FMOD to have ill repercussions. but this is only if you used FMODBlockersInit which takes the cube dimensions. but not the x,y,z origins of the cube

If you dont have that in your game then there are other things to consider

Did you call FMODUpdate every step? like the sample controller does?
Are you sure the position of the sound does not somehow get to be right between the listener's hears? (same coord)
  • 0

#743 jpatt94

jpatt94

    GMC Member

  • New Member
  • 13 posts
  • Version:GM8

Posted 05 August 2012 - 01:07 AM

I have the SampleSoundControllerObj that was included in the demo that calls FMODUpdate every end step.

Actually the sound and listener have the same coordinates but that doesn't effect the sound in most areas of the map, just in the one area. I'm not using any of the blocking functions at the moment.
  • 0

#744 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 05 August 2012 - 05:11 AM

Actually the sound and listener have the same coordinates but that doesn't effect the sound in most areas of the map, just in the one area. I'm not using any of the blocking functions at the moment.


That's the problem, usually the player generated sounds should be 2d. Right now it's bang between the virtual ears and FMOD does not quite know what side to play the sound so it may play full left, full right or not a all.

A solution, if you want to keep it 3d, play the sound at player.z + 5
  • 0

#745 gamemakerfun300

gamemakerfun300

    GMC Member

  • GMC Member
  • 42 posts
  • Version:GM:Studio

Posted 06 August 2012 - 06:19 AM

How would I have one song play and then right after that song plays it loops a different song?
  • 0

#746 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 06 August 2012 - 05:48 PM

How would I have one song play and then right after that song plays it loops a different song?


sound1 = FMODSoundAdd(..);
sound2 = FMODSoundAdd(..);
instance = FMODSoundPlay(sound1);

step
if(!FMODInstanceIsPlaying(instance)) instance = FMODSoundLoop(sound2)
  • 0

#747 gamemakerfun300

gamemakerfun300

    GMC Member

  • GMC Member
  • 42 posts
  • Version:GM:Studio

Posted 06 August 2012 - 06:08 PM

I tried doing that but the sound is a fuzzy and loud
  • 0

#748 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 06 August 2012 - 07:57 PM

I tried doing that but the sound is a fuzzy and loud

The code I gave should not do anything like that. post your code, the sound loading bits and the playing bits
  • 0

#749 damdam60

damdam60

    GMC Member

  • New Member
  • 2 posts
  • Version:GM8.1

Posted 16 August 2012 - 08:41 PM

Hi,

I've just discovered this dll which seems to be really great, but I have some problem with the fonction 'FMODInstanceFadeVolume'

I have an object sound manager, which is initialized at the start of the game. (init all my bgm and se)

Then , my obj has a end step event, where i put this code :

if   !FMODInstanceIsPlaying(global.BGM)
{
global.BGM = FMODSoundLoop(global.MUSIC_02,0);
 FMODInstanceFadeVolume(global.BGM, 0,0.5,room_speed*5, "");

So it plays the bgm correctly, but it doesn't fade at all. Can someone explain me how to make this fonction working?

Thanks in advance if you take the time to answer me :)

ps srry for the syntax error but I dont speak English very well :'(
  • 0

#750 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 17 August 2012 - 03:54 AM

Hi,

I've just discovered this dll which seems to be really great, but I have some problem with the fonction 'FMODInstanceFadeVolume'

I have an object sound manager, which is initialized at the start of the game. (init all my bgm and se)

Then , my obj has a end step event, where i put this code :

if   !FMODInstanceIsPlaying(global.BGM)
{
global.BGM = FMODSoundLoop(global.MUSIC_02,0);
 FMODInstanceFadeVolume(global.BGM, 0,0.5,room_speed*5, "");

So it plays the bgm correctly, but it doesn't fade at all. Can someone explain me how to make this fonction working?

Thanks in advance if you take the time to answer me :)

ps srry for the syntax error but I dont speak English very well :'(


The faders are implemented (poorly) via a series of controlling GM object instances.

the volume one is FMODFaderObj. If it's not in you project, the fader wont work.

I suggest you code your fading yourself

create
vol = 0;
inc = 1/room_speed; //one second from 0 to 1

step
FMODInstanceSetVolume(global.BGM,vol);
vol+=.01;
vol = min(1,vol);
  • 0

#751 damdam60

damdam60

    GMC Member

  • New Member
  • 2 posts
  • Version:GM8.1

Posted 17 August 2012 - 05:41 AM

OK, I understand.

It seems strange that its not mentioned in the 'How To' script, I dont know how i could find this without someone explaining me !

Anyway, I thank you a lot for your (fast) answer.

I'm going to test it soon :)
  • 0

#752 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 20 August 2012 - 04:30 AM

OK, I understand.

It seems strange that its not mentioned in the 'How To' script, I dont know how i could find this without someone explaining me !

Anyway, I thank you a lot for your (fast) answer.

I'm going to test it soon :)


The how-to script is very old. this topic's main post has a bunch of how-tos listed. And I pretty much answered every questions 3-5 times here over the years. So if you have trouble, come back to the thread and see if it's been solved for you already.
  • 0

#753 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 08 September 2012 - 11:03 PM

Is this able to record from the internal speakers and save as a .wav? I want to know because I was thinking about making a music creation software.

(My Windows 7 does not support internal microphone, as time goes on, newer and newer laptops are being made with this feature intentionally disabled to prevent free music recording.)
  • 0

#754 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 08 September 2012 - 11:55 PM

Some have tried to save wav file. but it's just not technically feasible in GM
  • 0

#755 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 513 posts
  • Version:GM:Studio

Posted 20 September 2012 - 01:25 AM

Do you think this could be used for sound cancellation? Like, taking the input from the microphone, negating it, and putting the new inverted frequency out the speakers?
  • 0

#756 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 20 September 2012 - 02:04 AM

Do you think this could be used for sound cancellation? Like, taking the input from the microphone, negating it, and putting the new inverted frequency out the speakers?


No. not really
  • 0

#757 Wiiboy4ever

Wiiboy4ever

    GMC Member

  • GMC Member
  • 96 posts

Posted 21 September 2012 - 09:16 PM

Hi, this looks awesome!

Only thing is, things look a little complex/confusing. Could you maybe use a simpler example that uses only like one or two files and has the basic sound options like volume control?

Also, is it possible to set different types of sounds and arrange their volumes accordingly? Life if you're doing a volume options menu in your game and you want to set sound effects volume different from the bgm's?
  • 0

#758 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 21 September 2012 - 09:35 PM

Hi, this looks awesome!

Only thing is, things look a little complex/confusing. Could you maybe use a simpler example that uses only like one or two files and has the basic sound options like volume control?

Also, is it possible to set different types of sounds and arrange their volumes accordingly? Life if you're doing a volume options menu in your game and you want to set sound effects volume different from the bgm's?

Read the how to section in the first post.

There are 4 sound groups you can use to control the volume on a per TYPE basis... or you can set the volumes per sound or per sound instance.
  • 0

#759 Wiiboy4ever

Wiiboy4ever

    GMC Member

  • GMC Member
  • 96 posts

Posted 21 September 2012 - 10:48 PM

Read the how to section in the first post.

There are 4 sound groups you can use to control the volume on a per TYPE basis... or you can set the volumes per sound or per sound instance.

I didn't see a type howto in the section. :(

And what's the difference between a sound and sound instance?
  • 0

#760 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 22 September 2012 - 01:32 AM


Read the how to section in the first post.

There are 4 sound groups you can use to control the volume on a per TYPE basis... or you can set the volumes per sound or per sound instance.

I didn't see a type howto in the section. :(

And what's the difference between a sound and sound instance?


Think as a sound is the file. the instance is what is playing the file. or think of it like a sound is an object and an instance is an instantiation of an object.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users