Jump to content


Photo

Fmod Sound System Engine [closed - project abandoned]


  • This topic is locked This topic is locked
1143 replies to this topic

#601 zmaj

zmaj

    GMC Member

  • GMC Member
  • 327 posts
  • Version:Unknown

Posted 20 July 2011 - 08:58 AM

Posted 06 July 2011 - 11:25 PM
Yes, there is a fmod option option that allows saving directly to file. nope I'm not adding it. You can use the source to make your own dll if you want.


hm...
Will you put and other involved files with source..
IN source you "invoke" some for me unknown GM related files...

Tnx in advance
  • 0

zmmaj

Leader of ZmajSoft team at

http://www.zmajsoft.com

I-Goo creator and author at

http://i-goo.tk


#602 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 20 July 2011 - 05:06 PM

gmapi is on the gmc... it not needed if you dont use the 2 functions that uses it... simply comment out the gmapi calls and references if you dont want the trouble
  • 0

#603 PhiL Blunt

PhiL Blunt

    GMC Member

  • New Member
  • 112 posts
  • Version:GM:Studio

Posted 21 July 2011 - 10:52 PM

how do i check if a song has ended?

currently trying "if FMODInstanceIsPlaying(global.Song)= 0 .." and have tried FMODInstanceGetPosition.

tia
  • 0
Mature, Chilled & Friendly. Low level poster. I Don't really have that much to say TBH.
twitter: @Blunt_Games, websites: www.bluntgames.co.uk - www.ignitegamejam.com - www.bluntconcepts.wordpress.com - urbanbeatz music store - Nogrip (MODS)

#604 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 21 July 2011 - 11:36 PM

FMODInstanceIsPlaying... you are probably passing a sound instead of an instance if it's not working for you
  • 0

#605 PhiL Blunt

PhiL Blunt

    GMC Member

  • New Member
  • 112 posts
  • Version:GM:Studio

Posted 22 July 2011 - 01:01 AM

i cant seem to get it to work. it works if the test is called before the songs loads, which or course i dont want it to do. so i have an alarm to do the test.
but no matter which way i do it i cant seem to get it to work. i just want the end of the song to signal the end of the room.
do you think you could build a quick example? just to see if the function is working, its prolly my fail.. over tired.
  • 0
Mature, Chilled & Friendly. Low level poster. I Don't really have that much to say TBH.
twitter: @Blunt_Games, websites: www.bluntgames.co.uk - www.ignitegamejam.com - www.bluntconcepts.wordpress.com - urbanbeatz music store - Nogrip (MODS)

#606 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 22 July 2011 - 01:22 AM

See my How do I section in the scripts and in the main post
  • 0

#607 PhiL Blunt

PhiL Blunt

    GMC Member

  • New Member
  • 112 posts
  • Version:GM:Studio

Posted 22 July 2011 - 02:40 AM

sorted, thank you.
  • 0
Mature, Chilled & Friendly. Low level poster. I Don't really have that much to say TBH.
twitter: @Blunt_Games, websites: www.bluntgames.co.uk - www.ignitegamejam.com - www.bluntconcepts.wordpress.com - urbanbeatz music store - Nogrip (MODS)

#608 zmaj

zmaj

    GMC Member

  • GMC Member
  • 327 posts
  • Version:Unknown

Posted 24 July 2011 - 03:14 PM

gmapi is on the gmc... it not needed if you dont use the 2 functions that uses it... simply comment out the gmapi calls and references if you dont want the trouble



Umgh...
After few hard day's I was compile new dll based on your DLL.
I was never work before with Microsoft Visual C++ 2008, so you can imagine my problems. :(
At last... YES !
I was aded output as WavWriter.
but i still have trouble with
gmapiinternal.h
I believe you was there define next:
gm::CGMAPI* gmapi = NULL;
pds_list_add
In a fact, I dont know how you are put a GM commands there.... :(
So, My new dll could't make few commands related to this gm lists...

Idea is to make engine capable to record and play several files at once...
In very this moment I trying to add out_mp3 native Fmod plug_in...
It will be nice, to save one or several sound/'s as *.mp3 directly...

And I haven't still idea how Winamp DSP work... That will be next.
For any else DSP i was found remarks on Fmod forum and manual, but no and for Winamp support... :(

So, Can you help me ?
Please put Gm related files for download ( I am not a C or C++ expert), and I can't find'em on any post here.
Or send me on Email please...

Tnx in advance

EDIT:
Sorry man, I was found at last GmApi... That is whole 20 pages... Oh my...

zmmaj

Edited by zmaj, 24 July 2011 - 03:49 PM.

  • 0

zmmaj

Leader of ZmajSoft team at

http://www.zmajsoft.com

I-Goo creator and author at

http://i-goo.tk


#609 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 27 July 2011 - 02:24 PM

Holy crap !
I just converted my 3MB MP3s to .OGG to make them smaller...
...changed FMODsoundAdd(working_directory"+\Resources\BGM-1.MP3") to
FMODsoundAdd(working_directory"+\Resources\BGM-1.OGG")...
... and FMOD does not load anything... <_< !!!

Proof :

The global var containing the ID of the sound is equal to... 0 !

Edited by NikaB, 27 July 2011 - 02:25 PM.

  • 0

#610 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 27 July 2011 - 10:41 PM

Holy crap !
I just converted my 3MB MP3s to .OGG to make them smaller...
...changed FMODsoundAdd(working_directory"+\Resources\BGM-1.MP3") to
FMODsoundAdd(working_directory"+\Resources\BGM-1.OGG")...
... and FMOD does not load anything... <_< !!!

Proof :

The global var containing the ID of the sound is equal to... 0 !


Hmmm...

Proof is asking FMOD to give you the last error using the support functions
1) do a show_message(FMODErrorStr(FMODGetLastError())) right after the sound add
2) Possibly the ogg is encoded with options not supported. that could be the case. Try different options when converting to ogg.
3) Try to open up the file with VisualMusic? Or in the effect room in the demo
  • 0

#611 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 28 July 2011 - 08:31 AM


Holy crap !
I just converted my 3MB MP3s to .OGG to make them smaller...
...changed FMODsoundAdd(working_directory"+\Resources\BGM-1.MP3") to
FMODsoundAdd(working_directory"+\Resources\BGM-1.OGG")...
... and FMOD does not load anything... <_< !!!

Proof :

The global var containing the ID of the sound is equal to... 0 !


Hmmm...

Proof is asking FMOD to give you the last error using the support functions
1) do a show_message(FMODErrorStr(FMODGetLastError())) right after the sound add
2) Possibly the ogg is encoded with options not supported. that could be the case. Try different options when converting to ogg.
3) Try to open up the file with VisualMusic? Or in the effect room in the demo


show_message(FMODErrorStr(FMODGetLastError()))

RESULT : An invalid object handle was used.

:blink:

EDIT : I used the Vorbis option when converting the mp3 into an ogg. So everything (theorically) must be fine. But it still bugs...

EDIT 2 : Says "failed to load sound" in the demo !

EDIT 3 : When I double click on the ogg to play it by Final Media Player, there is a video pic preview. Nothing just a text : "No video stream in input". Maybe FMOD thinks it's a video ? :wacko:

Edited by NikaB, 28 July 2011 - 08:46 AM.

  • 0

#612 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 28 July 2011 - 08:43 AM

...
RESULT : An invalid object handle was used.

:blink:

Are you sure you called this right after YourSound = FMODsoundAdd(working_directory"+\Resources\ BGM-1.MP3")

Because that error is usually an error for SoundPlay.

And have you tried

3) Try to open up the file with VisualMusic? Or in the effect room in the demo
  • 0

#613 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 28 July 2011 - 08:45 AM

>>EDIT 2 : Says "failed to load sound" in the demo !

Try to load the sound streamed, pass 0 for 3d and 1 for streamed


and send me the original mp3 and .ogg file in a PM so I can report to Firelight about a possible bug.
  • 0

#614 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 28 July 2011 - 08:50 AM

I already tried to do it in my program. 0 for 3d, 1 for streamed. Nothing.
EDIT : I will do all you've said (send the files)
but not right now sorry. I'm a bit lazy :P

EDIT : oh, and yes I called the debug function just after loading the sound.

Edited by NikaB, 28 July 2011 - 09:06 AM.

  • 0

#615 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 28 July 2011 - 05:53 PM

Sln: mp3->ogg... Use audacity; I know this converter works
  • 0

#616 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1890 posts
  • Version:GM7

Posted 02 August 2011 - 08:00 PM

question: does FMODSetWorldScale() affect the distance at which a 3d sound can be heard (as i'd expect), or only the doppler effect? let's say my game has different resolutions, and each one has a larger 'view' size (so that at larger resolutions you can see more of the room at once). would it be a good idea to change the world scale for each, so that when the view is larger you can hear things at a greater distance? e.g. if the player uses a resolution 2x normal size, the world scale should be set to 2? or to 0.5?

btw, some of the questions in your question function seem to be outdated. for instance, you write

"Question-Why can I change the pitch of groups but not the pitch of an instance??
Answer-The feature is not included in FMOD, Use the FMODInstanceSetFrequency"

but there actually are functions to change the pitch of an instance, and they do seem to work -- FMODInstanceSetPitch() works from my testing of it

btw2, i know i said i'd send you my game so you can see the water effects and star field etc., i haven't forgotten, i'm just late/lazy, but still will send you the game when it's in a stable state

Edited by rinkuhero, 02 August 2011 - 08:12 PM.

  • 0

#617 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 02 August 2011 - 11:17 PM

question: does FMODSetWorldScale() affect the distance at which a 3d sound can be heard (as i'd expect), or only the doppler effect? let's say my game has different resolutions, and each one has a larger 'view' size (so that at larger resolutions you can see more of the room at once). would it be a good idea to change the world scale for each, so that when the view is larger you can hear things at a greater distance? e.g. if the player uses a resolution 2x normal size, the world scale should be set to 2? or to 0.5?

The distance (for the min max dist of a sound) is in meters. the worldscale reflects how many meters per pixel the movement does.

If a 4 meter car is 32 pixels then the world scale would be 4/32 (I think or is it 32/4)... anyway, I never though of using it to limit the distance based on the view. My guess is, if you want to have you sound heard twice as far, you should probably re-initialize the sounds' min max value. I think new sound instantiated will use the new values.


btw, some of the questions in your question function seem to be outdated. for instance, you write

"Question-Why can I change the pitch of groups but not the pitch of an instance??
Answer-The feature is not included in FMOD, Use the FMODInstanceSetFrequency"

but there actually are functions to change the pitch of an instance, and they do seem to work -- FMODInstanceSetPitch() works from my testing of it

Because the question was posted between 2 versions. I added the former later on

If it's in the main post, I'll remove it

btw2, i know i said i'd send you my game so you can see the water effects and star field etc., i haven't forgotten, i'm just late/lazy, but still will send you the game when it's in a stable state

it's alright. I totally forgot
  • 0

#618 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1890 posts
  • Version:GM7

Posted 03 August 2011 - 02:30 AM

thanks for the replies. you're right about FMODSetWorldScale() -- i did some tests and the max/min distance in pixels isn't affected by it just by changing the scale value; i'll try re-initializing min and max to see if that works.

.
  • 0

#619 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1890 posts
  • Version:GM7

Posted 03 August 2011 - 11:16 PM

i discovered a bug in FMODGroupFadePitch (and possibly other Fade functions) -- if you set two fades simultaneously or set one fade before another fade has finished fading to the desired pitch (or volume, etc.) it will may reach the correct pitch and just get stuck at a weird pitch forever. the use of those functions isn't necessary for my game and i made do without them, but when i experimented them i encountered numerous problems with using the fading functions. they also seem to go slower than expected -- i would set it to fade to a certain level in, say, 20 frames, but it actually took many more frames than that to reach said level, even if i had no other fades active at the same time
  • 0

#620 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 03 August 2011 - 11:42 PM

Yeah... those are gml coded since FMOD does not have them. I guess I did not test it enough. you can implement your own method easily enough though

at = get volume
dec = volume/numframes

step
at-=dec
set volume at

if(get volume == 0) done
  • 0

#621 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 08 September 2011 - 02:53 AM

I don't know if this is in the right place, but I followed the link from this topic (Which is the same topic) and then clicked "Add Reply". But I have a question:
When you upload your game, does it upload the files that were used in this application? Like if you wanted to make a compressed sound reply gaplessly and then upload it, would it upload the files it used to do that? Or would the downloader have to download that (Fmod Sound System Engine) separately?

Edited by -DarkAceZ-, 09 September 2011 - 12:46 AM.

  • 0
Posted Image
Rate this topic: 0 | 1 | 2 | 3 | 4 | 5

#622 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 08 September 2011 - 03:11 AM

I don't know if this is in the right place, but I followed the link from this topic and then clicked "Add Reply". But I have a question:
When you upload your game, does it upload the files that were used in this application? Like if you wanted to make a compressed sound reply gaplessly and then upload it, would it upload the files it used to do that? Or would the downloader have to download that (Fmod Sound System Engine) separately?

You zip your game and the dlls and the sounds the game needs... Or you use GM's add include file system
  • 0

#623 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 08 September 2011 - 02:02 PM

OK, that's nice!
But now I wonder what I didn't do. I know I need to do something before it works, and obviously I didn't do it yet. When I created the action "Execute Code" I pasted this in it:
threeD = false;
streamed = true;
sound = FMODSoundAdd("music_nucget.mp3", threeD, streamed );
start = 0;
end = 1; 
FMODSoundSetLoopPoints(sound,start,end);
instance = FMODSoundLoop(sound);
(I'm trying to get an mp3 to play gaplessly) But it has a problem with "FMODSoundAdd"...

Here's the error:

COMPILATION ERROR in code action
Error in code at line 3:
   sound = FMODSoundAdd("music_nucget.mp3", threeD, streamed );
           ^
at position 10: Unknown function or script: FMODSoundAdd

I didn't do this,
LoadFMOD();
FMODinit(100);
which I'm guessing that's where I messed up. I'm not sure where to put it though. (I don't know where "game_start" is...)


The four things I did do:
Added sound "music_nucget".
Placed "GMFMODSimple.dll" into C:\Users\<USER>\AppData\Roaming\GameMaker.
Placed "fmodex.dll" into C:\Users\<USER>\AppData\Roaming\GameMaker.
And execute code on the sound object:
threeD = false;
streamed = true;
sound = FMODSoundAdd("music_nucget.mp3", threeD, streamed );
start = 0;
end = 1; 
FMODSoundSetLoopPoints(sound,start,end);
instance = FMODSoundLoop(sound);

  • 0
Posted Image
Rate this topic: 0 | 1 | 2 | 3 | 4 | 5

#624 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 08 September 2011 - 07:00 PM

did you merge the gmk (gm7) or import the resource file (gm8+)?
  • 0

#625 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 08 September 2011 - 10:56 PM

...Uh what? I'm using Gamemaker 8.1...
I downloaded the GMFMODSimpleDemo.zip from here: http://www.host-a.ne...DSimpleDemo.zip (on the first post on this topic) and extracted it, then copied the fmodex.dll file and the GMFMODSimple.dll files from C:\Users\<USER>\Downloads\GMFMODSimpleDemo to C:\Users\<USER>\AppData\Roaming\GameMaker.
I'm not sure if that answers your question...
  • 0
Posted Image
Rate this topic: 0 | 1 | 2 | 3 | 4 | 5

#626 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 09 September 2011 - 12:04 AM

...Uh what? I'm using Gamemaker 8.1...
I downloaded the GMFMODSimpleDemo.zip from here: http://www.host-a.ne...DSimpleDemo.zip (on the first post on this topic) and extracted it, then copied the fmodex.dll file and the GMFMODSimple.dll files from C:\Users\<USER>\Downloads\GMFMODSimpleDemo to C:\Users\<USER>\AppData\Roaming\GameMaker.
I'm not sure if that answers your question...


did you added the resources to your game? GM Menu: File/Import Resources/
Select GMFMODSimple.gmres
Say you want it all imported if it ask. Then you will have the functions and objects
  • 0

#627 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 09 September 2011 - 12:44 AM

"Importing and Exporting of resources is not available in the Lite Edition"... D'oh!!!!!!

Well, if I was allowed I'd upgrade I would, but until then... I can't do this. :|

Edited by -DarkAceZ-, 09 September 2011 - 12:46 AM.

  • 0
Posted Image
Rate this topic: 0 | 1 | 2 | 3 | 4 | 5

#628 HD Blood

HD Blood

    GMC Member

  • GMC Member
  • 14 posts

Posted 09 September 2011 - 02:24 PM

I have the following problem: When I init the FMOD.dll ( FMODinit(7) ) I get a blue screen of death saying: "Physical memory dump". and something about a missing DLL, (I don't remember the DLL name)
When I use a smaller number like: FMODinit(1), my PC sometimes don't crash.. (sometimes!)

Its pretty hard to use this DLL if my PC crash every time!

I have the latest version: V0.4.28.9. I have an old PC with Windows XP, 1024MB RAM, 128MB graphics card...
Sure, you can blame my old PC!.. but when I use this DLL, there's no problem at all! (it used the same FMOD.dll)

Can you solve this problem?
  • 0
Learning: C++
GML - HTML - PHP - Many GMDLLs

#629 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 09 September 2011 - 06:39 PM

I have the following problem: When I init the FMOD.dll ( FMODinit(7) ) I get a blue screen of death saying: "Physical memory dump". and something about a missing DLL, (I don't remember the DLL name)
When I use a smaller number like: FMODinit(1), my PC sometimes don't crash.. (sometimes!)

Its pretty hard to use this DLL if my PC crash every time!

I have the latest version: V0.4.28.9. I have an old PC with Windows XP, 1024MB RAM, 128MB graphics card...
Sure, you can blame my old PC!.. but when I use this DLL, there's no problem at all! (it used the same FMOD.dll)

Can you solve this problem?


Does the demo exe work?
  • 0

#630 HD Blood

HD Blood

    GMC Member

  • GMC Member
  • 14 posts

Posted 10 September 2011 - 07:06 AM

Does the demo exe work?

Back then, nothing works.

But now.. I'm not sure about this, but it seems the problem has solved itself.. I can now even use: FMODinit(1000)? Don't know how long it takes before my PC crash again?

Maybe some of my drivers I installed has solved the problem, but I'm not sure about this, because its a month ago. If my PC crash again, I will report it immediately.

Edited by HD Blood, 10 September 2011 - 07:07 AM.

  • 0
Learning: C++
GML - HTML - PHP - Many GMDLLs

#631 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 26 November 2011 - 10:00 PM

I am trying to draw a line that represents how far on in a music file the player is but it always returns 0. How would I do it? Here is what I have:
Information about object: object32
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Create Event:

execute code:

global.soundposition = 0

Step Event:

execute code:

global.soundposition = FMODInstanceGetPosition(global.mymusic)

Draw Event:

execute code:


draw_line_color(x,y,global.soundposition*1000,y,c_red,c_green)
  • 0

#632 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 27 November 2011 - 04:59 AM

is global.mymusic a sound or a sound instance. The function takes the instance of the sound you started, not the sound object. See the comments in the functions that starts a sound playing and the comments for this function
  • 0

#633 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 27 November 2011 - 12:39 PM

It is the global variable that represents my sound.
  • 0

#634 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 27 November 2011 - 03:33 PM

if it's the variable that stored the result of SoundAdd then it's wrong. You need to pass the variable that holds the result of SoundPlay


remember, in fmod, you can SoundPlay the same sound many times, each play has an instance to setup each play individually.
  • 0

#635 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 27 November 2011 - 07:40 PM

I fixed it, I used another global variable for sound play.
Heres what I did

FMODAllStop()
global.mymusic = FMODSoundAdd(filename);


global.soundplaying = FMODSoundPlay(global.mymusic);

And for the line object:
global.soundposition = FMODInstanceGetPosition(global.soundplaying)

Edited by gmcsdobbie, 27 November 2011 - 07:49 PM.

  • 0

#636 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 27 November 2011 - 10:15 PM

I am trying to get an equalizer to work but freeing the effect does not do anything. When I press E to add the effect it is being added on and not reset so it sounds bad.
Information about object: objectEqualizer_Control
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Create Event:

execute code:

effect = 0

Key Press Event for E-key Key:

execute code:

FMODEffectFree(effect)
//FMOD_DSP_TYPE_PARAMEQ 10
effect = FMODInstanceAddEffect(global.soundplaying,10);
//or
//effect = FMODGroupAddEffect(,10);
//Don't forget to FMODEffectFree(effect) when you no longer need it eg: instance is done playing

//Not Needed if you did not change the default
//Center freq
//Frequency center. 20.0 to 22000.0. Default = 8000.0.
FMODEffectSetParamValue(effect,0,get_integer("Center frequency:",31));

//Not Needed if you did not change the default
//Octave range
//Octave range around the center frequency to filter. 0.2 to 5.0. Default = 1.0.
FMODEffectSetParamValue(effect,1,get_integer("octave range",1));

//Not Needed if you did not change the default
//Frequency gain
//Frequency Gain. 0.05 to 3.0. Default = 1.0.
FMODEffectSetParamValue(effect,2,get_integer("Enter gain",1));
  • 0

#637 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 28 November 2011 - 07:09 AM

It should work however you can verify making an equalizer by hand in the effect demo screen. The add and remove seems to work. I made one in the interface by adding 4 param eq effects, the first for the low band and the last for the high band and 2 mid ranges.
  • 0

#638 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 28 November 2011 - 07:25 PM

This is really not working. I am trying to make a multi band graphic equalizer. I have a global variable for gain which always stays in the range 0.05 to 3 When I increase this variable, i notice that the bass increases normally. When I decrease it though after increasing it, the bass goes super high, and clipping occurs. I have looked at the variable in debug mode and it never goes out of the range. Why is the bass being boosted when this variable is reduced? I am changing this variable at run time by using buttons which change the variable and call this script:

//Center frequency,gain
FMODEffectFree(effect)
//FMOD_DSP_TYPE_PARAMEQ 10
effect = FMODInstanceAddEffect(global.soundplaying,10);
//or
//effect = FMODGroupAddEffect(<yourgroup>,10);
//Don't forget to FMODEffectFree(effect) when you no longer need it eg: instance is done playing

//Not Needed if you did not change the default
//Center freq
//Frequency center. 20.0 to 22000.0. Default = 8000.0.
FMODEffectSetParamValue(effect,0,argument0);

//Not Needed if you did not change the default
//Octave range
//Octave range around the center frequency to filter. 0.2 to 5.0. Default = 1.0.
FMODEffectSetParamValue(effect,1,4);

//Not Needed if you did not change the default
//Frequency gain
//Frequency Gain. 0.05 to 3.0. Default = 1.0.
FMODEffectSetParamValue(effect,2,argument1);

Edited by gmcsdobbie, 28 November 2011 - 10:28 PM.

  • 0

#639 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 29 November 2011 - 03:54 AM

PM me the gmk, the whole project, gmk, dlls and sounds included in a zip.
  • 0

#640 Loaf

Loaf

    Just loafing around

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

Posted 29 November 2011 - 06:17 AM

Could someone create me a barebones example file with nothing but 3D sound and volume functions? The scripts are overwhelmingly bloated for my taste, and there is so much code going on in objects its a bit confusing. I'm not a fan of the structure of this to be honest, I'd rather not use it, but apparently there are no decent alternatives I can find.

I'd give credit to whoever helps for their assistance.

:duck:


#641 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 29 November 2011 - 09:15 AM

Could someone create me a barebones example file with nothing but 3D sound and volume functions? The scripts are overwhelmingly bloated for my taste, and there is so much code going on in objects its a bit confusing. I'm not a fan of the structure of this to be honest, I'd rather not use it, but apparently there are no decent alternatives I can find.

I'd give credit to whoever helps for their assistance.

Samples Folder in the gmk, and gmres has the Sample objects with not bloating. A simple matter of dropping them in the room and looking at about 3 lines of code for each object.

And read the HowToUse script
  • 0

#642 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 29 November 2011 - 01:21 PM

PM me the gmk, the whole project, gmk, dlls and sounds included in a zip.

I will need your email address to send you the file.
  • 0

#643 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 29 November 2011 - 08:56 PM

Use pm and use host-a or even Yoyo sandbox for the file transfer
  • 0

#644 Loaf

Loaf

    Just loafing around

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

Posted 30 November 2011 - 03:14 AM

Samples Folder in the gmk, and gmres has the Sample objects with not bloating. A simple matter of dropping them in the room and looking at about 3 lines of code for each object.

And read the HowToUse script


Would you be able to tell me what scripts I need specifically for 3D sound and toggling sound volume only? I want it as stripped back as possible and I'm not sure what the dependencies are.

:duck:


#645 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 30 November 2011 - 04:14 AM


Samples Folder in the gmk, and gmres has the Sample objects with not bloating. A simple matter of dropping them in the room and looking at about 3 lines of code for each object.

And read the HowToUse script


Would you be able to tell me what scripts I need specifically for 3D sound and toggling sound volume only? I want it as stripped back as possible and I'm not sure what the dependencies are.


Look at the 10 lines of code in the sample controller, listener and 3d sound object. I wont repeat here what I covered at great time and effort in the comments. You cant strip it. why would you set yourself up for disaster later. You can strip out the folders, rooms and object with the Demo keywords in. They are not part of the API
  • 0

#646 Loaf

Loaf

    Just loafing around

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

Posted 30 November 2011 - 08:30 AM

You cant strip it. why would you set yourself up for disaster later.


I know what I want from this DLL. I want 3D sound, and I want volume controls. If it can't offer me those functions without needing a web of scripts that heavily bloat the game and are of absolutely no use to me, then its **** as far as I am concerned. I'll look for something else.

Thanks for the prompt response however.

:duck:


#647 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 30 November 2011 - 08:40 AM

It's hard to help people unwilling to just look at the sample objects. So yeah, it's **** to you.
  • 0

#648 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 01 December 2011 - 11:06 PM

Update:
Added Equalizer demo in the "How To" section in first post
  • 0

#649 Loaf

Loaf

    Just loafing around

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

Posted 02 December 2011 - 07:42 AM

Why does sound seem to warp when I move closer and further in 3D sound? I tried to create a radio with 3D sound and it warps out of key when I move in and out.

:duck:


#650 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17047 posts
  • Version:GM:Studio

Posted 02 December 2011 - 08:12 AM

Why does sound seem to warp when I move closer and further in 3D sound? I tried to create a radio with 3D sound and it warps out of key when I move in and out.


Because of Doppler effect, change it with the FMODSetWorldScale function. It's called after the FMODInit in the sample controller to set it to .05. Maybe you did not use the sample controller, the default is 1.
//export double FMODSetWorldScale(double scale)
//Sets the scale of the worls.
//Default scale is 1 meter per pixel
//it affects the doppler effect
//if your player moves 3 pixels in one second
//it will appear to the sound system as though he moved
//3 meters per second
//reduce the value to reduce the overall doppler effects in the game

also see FMODSetDopplerFPS if you want to nuke the doppler
//export double FMODSetDopplerFPS(double fps)

//Sets the sound system's framespersecond value to use in doppler effect calculations
//fps is the frame per second of your game. (room_speed or fps)
//set to 0 (default) to disable the doppler effect

//You may play with this value to achive the right doppler effect for your game
//though using wolrd scale is recommended


or if you only want to nuke the doppler for that 3d sound, FMODSoundSet3dDopplerMax
//export double FMODSoundSet3dDopplerMax(double sound, double dopplerval)
//Call this to set the sound doppler setting

//doppler settings 0 to 5) 0 - none 1 - normal, 5 is maximum
//This turns off doppler for this sound
//sound = FMODSoundAdd("sound.wav",true);
//FMODSoundSet3dDopplerMax(sound,0);
//Sound must be 3d



In any case, you should set the world scale properly. I discussed this a few years back, Simplified, make it low enough not to be distinguishable by a walking player but distinguishable by driving cars.
  • 0




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users