I'm sorry, I saw that this thread was almost a year old at this point and figured you had moved on with other things, and I certainly can't find the source code of the dll anywhere online. My asking for the source was if you didn't want to add it yourself for whatever reason. By all means, if you want to add my request, don't let me stop you. ^_^;

Hi, I'm sort of new to all this (sound looping) and I know the forum has been dead of a little while, but I've got a question that I hope you could answer.

I want to make the music of (let's say) Gym battles loop and I'm using my own music for it. I find the sections that I want it to start looping from and end at, and put it in like this:
What do I need to do next to get it to loop because at the moment it's just getting to the full end of the song and then starting from the beginning. The music files are in ogg format.

Try to remove the ".ogg" in the loop table.
You can also not use the loop table and take a software like Audacity to put the "LOOPSTART" and "LOOPLENGTH" tags (in PCM unit and not ms). I made something inside the library that load the loop information inside the file. (Works also for MP3.)

It would be cool if somebody could help me!
I used this Script and it works perfectly, but the loop only works if I play the BGM by myself, that means it dont works in Wild Battles or in Cities.
Can somebody please tell me how I can get it work in Wild battles, etc. ?

I don't know why this has started to happen but after a while using this script, the pitch and speed of the BGM in the Indigo Plateau increases beyond RPG XP's normal limit. However, if you look at the settings of the BGM music for that map, it's fine. It also doesn't decrease if you manually decrease it. I have yet to notice this on other maps. I can confirm it's the scripts as I've back into the map after commenting those two out and it's gone back to normal. I don't want to have to go back to the other method of looping music as this one is so convenient and easy. I really like it.

Is there anywhere in particular the two scripts need to be in Essentials to work perfectly or is just the RGSS Linker before FmodEx after the Debug-Compiler scripts section?

Edit (31/12/2016 at 5:28pm): I'll test this out a little more and make another post if anything happens. I have a hunch as to why its doing what it's doing.
Edit (31/12/2016 at 5:49pm): Just tried it with two clean copies of Essentials 16.2 and it only happens when the RGSS Linker and FmodEx scripts are in.

I don't know where the script should be in Essentials to work perfectly, I can only tell you that in PSDK it's like one of the first script to be loaded (before the RMXP scripts).

Can you give a little example project with the bug ? (I'll try to patch this if I can ^^)

PS : You can get me on Discord : Nuri Yuri#0158, it'll be much faster to get an answer x)

No worries :) Honestly it's fine. I'll try to get a video recording of it and I'll give you the link to it once it's done so you can see what I mean. Thanks a bunch.
Edit (06/01/2017): Here's the link https://www.youtube.com/watch?v=GKeWcHUuppM&feature=youtu.be
And when you put in the new .dll's, Essentials gives an error on line 28 of the FmodEx script saying it expected version FmodEx version 4.68.97 instead of 4.68.80

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 muk 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 beetween two blanks is 48s you have no problem with the pitch ^^

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 ^^

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.

I tried changing the mid file to an ogg and played it. The ogg at 150% pitch sounds identical to how it sounds if you're using the mid file at 150% pitch with the FmodEx script. Otherwise at 100% pitch they both sounds normal. I'll try making a video to show what I mean.

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 ^^'

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 ^^'

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.

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 ^^

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!

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?

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 ^^

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).

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.

The PokéCommunity

Meta

Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, or The Pokémon Company International. We just love Pokémon.