• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

RGSS FmodEx extension

Arkadious

Developer of Fragmentum
50
Posts
8
Years
Ohw, I forgot the FmodEx DLL x)
Here's a link : https://download.psdk.communityscriptproject.com/downloads/fmodex.dll (I don't know if it's the good version since the link is old but it's the same size of the dll from my project ^^)

I've done a test it looks like the second time the music is play (if you do bgm_play two time in a row) it's played the square of the speed needed. In my test it plays 1.4 faster than RMXP plays it (tempo = 140%)
I'll make a patch ^^

Edit : In fact RMXP is doing **** with Midi... I tested the music battle1.mid (from RMVX RTP), it's 1m12s long according to LMMS (1:14 without the blank). I tested the music on RMXP at 150%, it's 1m15s long according to Camtasia Studio 8... The music is just more shrill (aigu in French).
51 second is 1.4 faster than 1m12s.

To see if there's a real bug on your project, test the music at 150% if the duration between two blanks is 48s you have no problem with the pitch ^^

I just give a patch for the more than 100% pitch bug of RGSS FmodEx :
https://download.psdk.communityscriptproject.com/downloads/RGSS FmodEx.dll

Yeah, the music seems to playing normally now when the pitch is at 100%. At 150%, the time between blanks (or skips) is 48 seconds. I guess the values above normal pitch and what the pitch is actually is are different.
 
Last edited:

MysteriousUser94

Guest
0
Posts
Yes x)
We should probably try with an ogg file to see what is the pitch factor.
 

MysteriousUser94

Guest
0
Posts
Ok, so the RGSS uses a weird command to makes mid files shrill while it makes waveform type files faster...
Unfortunately there's no function that edits the note of a sequential file in FmodEx, I can only edit the ChannelVolume ^^'
 

Arkadious

Developer of Fragmentum
50
Posts
8
Years
Ok, so the RGSS uses a weird command to makes mid files shrill while it makes waveform type files faster...
Unfortunately there's no function that edits the note of a sequential file in FmodEx, I can only edit the ChannelVolume ^^'

Well at least we've now figured out what the hell's been going on. :)
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
Someone, please tell me what I type when I want the loop to start at 7 seconds and 817939 milliseconds, may be rounded up to 8174. Also, what do I put at the end section when it should end the loop at 1 minute, 28 seconds and 71691 milliseconds? If the first one had to be rounded, end should be rounded to 7169.
 

MysteriousUser94

Guest
0
Posts
817939 milliseconds = 818 seconds = 13 minutes.
You should edit your file with Audacity and add the LOOPSTART and LOOPLENGTH tags. These tags are in "PCM sample unit" that are strictly when the decoder read an sample (so you wont have 817939 milliseconds but 308000 and you type 308000).

You can also do ::FmodEx.set_unit(::FmodEx::TIMEUNIT_PCM) and use PCM sample unit instead of milliseconds with the script ^^
 
4
Posts
7
Years
Sorry for my vanilla looking profile and all that, but seriously, YOU'RE A LIFE SAVER! The old audio format support files and scripts from the Pokemon essentials wiki disappeared and I had a frustrating time trying to find a way to literally just put in ogg files! I'm so glad you posted this here! Really helpful!
 
37
Posts
7
Years
  • Age 28
  • Seen Apr 14, 2024
I really hope this thread isn't totally dead.

I just tried installing these scripts, and had to add in the RGSS104E.dll, but I still get an error message stating
"This isn't the RGSS104 library !" followed by the programmatically thrown exception "Failed to load RGSS Linker." Does this mean I need to install the .dll in my OS folder? and if so does that mean everyone playing the game must do so as well?

Help would be greatly appreciated- It's probably something really obvious that I'm overlooking.
** EDIT **

Ok, so I figured out the issue- I opened Game.ini with text edit and changed the default library to RGSS104E. It works, but when RPGMaker XP saves data, I have to change it back every time from RGSS102E. Any advice as to how to change the default library in RPGMaker XP?
Thanks.

I'm having the same issue, after placing both scripts and adding the files of the first post to the game's folder, and also after adding the RGSS104E.dll file (which I founded in another zip in this same thread, maybe in page 2 or 3), when I start the game from the project it shows that error message. I've done everything in the post so I don't know what the hell is going on, any idea of what should I do? Thanks ^^
 

MysteriousUser94

Guest
0
Posts
There's one thing to know : RMXP replace the loaded DLL with it's own RGSS DLL. If you use RMXP 1.01 or 1.02 instead of RMXP 1.05 or 1.03 the RGSS DLL will be the wrong DLL (RGSS102J / RGSS100J) and then the RGSS Linker will fail to load.

You can try to rename RGSS104E.dll to RGSS102E.dll or RGSS102J.dll (idk which DLL essentials uses, check your Game.ini to know).

You can also do the same thing in the System Files of RMXP.
 
37
Posts
7
Years
  • Age 28
  • Seen Apr 14, 2024
There's one thing to know : RMXP replace the loaded DLL with it's own RGSS DLL. If you use RMXP 1.01 or 1.02 instead of RMXP 1.05 or 1.03 the RGSS DLL will be the wrong DLL (RGSS102J / RGSS100J) and then the RGSS Linker will fail to load.

You can try to rename RGSS104E.dll to RGSS102E.dll or RGSS102J.dll (idk which DLL essentials uses, check your Game.ini to know).

You can also do the same thing in the System Files of RMXP.

Oh gosh, that may had been the issue, I've got the verson 1.02 and I've checked the ini and was "...2J...", so I renamed "...104E..." to "...102J...". Now it doesn't show any error and the game in debug mode loads so I guess now it should work, I will try it. Thanks a lot ^^ and sorry for asking after a long time.
 

MysteriousUser94

Guest
0
Posts
No problem :p

In my project I solved this kind of issue by rewritting Game.exe :p
 
25
Posts
7
Years
  • Age 23
  • Seen Apr 29, 2022
I keep getting this error message when I try to load my save file:


Exception: FmodEx::Error
Message: FMOD error! (23) File not found.

Audio Module Script (FmodEx):65:in `initialize'
Audio Module Script (FmodEx):65:in `bgm_play'
Audio Module Script (FmodEx):65:in `bgm_play'
Game_System:61:in `bgm_play_internal2'
Game_System:72:in `bgm_play_internal'
Game_System:51:in `bgm_play'
AudioPlay:60:in `pbBGMPlay'
Game_Map:132:in `autoplay'
PField_Field:1989:in `pbAutoplayOnSave'
PScreen_Load:397:in `loadWhenAutoUpdating'

I think it has something to do with the game not being able to find the correct audio files when it loads a map? Do you know how I could fix this?
 

MysteriousUser94

Guest
0
Posts
Did you remove any audio file after saving the game ?

You can try to add "print filename" before the line 65 of the script to see what file FmodEx does not find ^^
 

yonicstudios

Game Developer
54
Posts
8
Years
The parameter position seems to be missing from FmodEx.bgm_play(), but there is such parameter on the FmodEx::Sound initializer. It kind of buzzes me off because I don't want to have a new FmodEx::Sound that runs independently from the BGM channel just to mess around with the playing position.

I have two almost identical BGMs, and I'd like to play the next BGM at the position the previous BGM was when it stopped, so that it can create a smooth transition between both tracks.


This won't produce any effect:

Code:
position = FmodEx.bgm_sound.get_position # Get previous bgm play position
newBGM = FmodEx.bgm_play("Audio/BGM/ambient02.ogg") # Load new bgm
newBGM.set_position(position) # The new bgm will start from the same position

Is there a way to place the new FmodEx::Sound in the BGM channel so that it behaves exactly like a BGM sound would?
 
Last edited:

MysteriousUser94

Guest
0
Posts
I tested this :
Code:
FmodEx.set_unit(FmodEx::TIMEUNIT_PCM)
FmodEx.bgm_sound.pause(true)
position = FmodEx.bgm_sound.get_position
bgm = FmodEx.bgm_play("Audio/BGM/24 Pokemon Center.flac")
bgm.set_position(position)
There's a short time with no music due to the slowness of Ruby but the music starts at the right point.

If you want to make a FmodEx::Sound "acting" like a BGM you should do this :
Code:
FmodEx.set_unit(FmodEx::TIMEUNIT_PCM)
old_bgm = FmodEx.bgm_sound
old_bgm.pause(true)
position = old_bgm.get_position
new_bgm = FmodEx::Sound.new(filename = "Audio/BGM/24 Pokemon Center.flac", 100, 100, position, true, true)
new_bgm.instance_variable_set(:@name, filename)
FmodEx.bgm_stop
FmodEx.instance_variable_set(:@bgm_sound, new_bgm)
The problem here is that the ME wont affect the new BGM because I used a C++ variable in the code for the ME Thread (to prevent Ruby Thread Violation).

There's something you can probably do otherwise :
Play the two bgm a the same time and set the volume to 0 for the one you don't want to be hear. (The best thing is also to prevent ME to affect the Main BGM so you should use FmodEx::Sound ^^)
 

yonicstudios

Game Developer
54
Posts
8
Years
I tested this :
Code:
FmodEx.set_unit(FmodEx::TIMEUNIT_PCM)
FmodEx.bgm_sound.pause(true)
position = FmodEx.bgm_sound.get_position
bgm = FmodEx.bgm_play("Audio/BGM/24 Pokemon Center.flac")
bgm.set_position(position)
There's a short time with no music due to the slowness of Ruby but the music starts at the right point.
When trying this out, an error points out that neither FmodEx::TIMEUNIT_PCM nor FmodEx.set_unit are defined. Taking a wild guess, it might be that I'm using an old version of the dll?
 

MysteriousUser94

Guest
0
Posts
Yes you have an old version. Since I upgraded to RGSS3 I didn't updated the RGSS1 FmodEx plugin :/
Does it works without the line that bug ?
 

yonicstudios

Game Developer
54
Posts
8
Years
No, it produces the same result as I was having.

I'd try out the FmodEx::Sound solution, but I need to play a couple or two MEs.

As for playing two BGMs at the same time, do you mean having one as FmodEx::Sound and the other one being the BGM?
 
Back
Top