Author Topic: How to get your FF7 MP3 soundtrack to loop [as] seamlessly [as possible]  (Read 55536 times)

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Note: If you have FF7 Remix installed, you can skip down to step 2b!
Ways to get FF7's internal MIDI to mute (only use one of these):
*download LoopBe1 and set that as your midi device in FF7 Configuration (note that if you've got Aali's custom driver, you have to re-apply the registry key after running FF7 Configuration)
*Use Aali's custom driver's "FakeMidi" option found in the OpenGL.cfg file (Note that older versions of the driver have been known to have a faulty "FakeMidi" device, make sure it's up to date)
*Use a blank midi.lgp file, like the one Nero created and overwrite the old one with it (though keep in mind that you should back it up if you want to be able to listen to the old midi music whenever you want)

There have been a ton of people on the forums asking about how to get their mp3's to loop properly using Ficedula's FF7Music, so I figured I'd start this topic as a quick step-by-step tutorial on how to do it

Step 1: Acquire a complete soundtrack, properly named as shown below and with silence cropped out of beginning and end:
Code: [Select]
aseri = "Hurry!"
aseri2 = "Hurry Faster! (Hurry up!)"
ayasi = "Lurking in the Darkness"
barret = "Barret's Theme"
bat = "Fighting (Let the Battles Begin)"
bee = "Honeybee Manor"
bokujo = "Farm Boy"
boo = "Lifestream"
cannon = "The Makou Cannon is Fired~Shinra Explodes" (medley)
canyon = "Cosmo Canyon"
cephiros = "Those Chosen by the Planet"
chase = "Crazy Motorcycle"
chu = "Those Who Fight Further"
chu2 = "J-E-N-O-V-A"
cinco = "Cinco de Chocobo"
cintro = "Those Chosen by the Planet" (heartbeat intro only)
comical = [Unused in game]
condor = "Fortress of the Condor"
corel = "Mining Town"
corneo = "Don of the Slums"
costa = "Costa del Sol"
crlost = "Tango of Tears"
crwin = "A Great Success"
date = "Interrupted by Fireworks"
dokubo = "Underneath the Rotting Pizza"
dun2 = "Chasing the Black Caped Man"
earis = "Aerith's Theme"
earislo = "Flowers Blooming in the Church"
elec = "Electric de Chocobo"
fan2 = "Fanfare" (full)
fanfare = "Fanfare" (opening)
fiddle = "Fiddle de Chocobo"
fin = "World Crisis"
geki = "Debut"
gold1 = "Gold Saucer"
guitar2 = "On the Other Side of the Mountain"
gun = "Shinra Army Wages a Full Scale Attack"
hen = "Who Am I?"
hiku = "The Highwind Takes to the Skies"
horror = "Trail of Blood"
iseki = "You Can Hear the Cry of the Planet"
jukai = "Forested Temple"
junon = "Off the Edge of Despair"
jyro = "Steal the Tiny Bronco"
ketc = "Cait Sith's Theme"
kita = "The Great Northern Cave"
kurai = "Anxious Heart"
lb1 = "Birth of a God"
lb2 = "One Winged Angel"
lb2_awe = "One Winged Angel" (AWE)
ld = "Judgement Day"
makoro = "Makou Reactor"
mati = "Ahead On Our Way"
mekyu = "Reunion"
mogu = "The Moogle Takes to the Skies" (first 15s of "The Highwind Takes to the Skies")
mura1 = "Parochial Town"
nointro = "Those Chosen by the Planet" (no heartbeat intro)
oa = "Opening~Bombing Mission" (medley)
ob = "Bombing Mission"
odds = "Place Your Bets! (Racing Chocobos)"
over2 = "Continue"
parade = "Rufus' Welcoming Ceremony"
pj = "Jenova Absolute"
pre = "Final Fantasy VII Prelude Theme"
red = "Red XIII's Theme"
rhythm = "Turks' Theme"
riku = "Shinra Explodes" (part 1)
ro = "The Countdown Begins"
rocket = "Oppressed People"
roll = "Staff Roll"
rukei = "Sandy Badlands"
sadbar = "Mark of the Traitor"
sadsid = "Sending a Dream into the Universe"
sea = "Secret of the Deep Sea"
seto = "Great Warrior"
si = "Shinra Explodes" (part 2)
sid2 = "Cid's Theme"
sido = "It's Difficult Standing on Both Feet, isn't it?"
siera = "If You Open Your Heart"
sinra = "Shinra Company"
sinraslo = "Infiltrating Shinra Tower"
snow = "Buried in the Snow"
ta = "Final Fantasy VII Main Theme"
tb = "Final Fantasy VII Main Theme" (from middle)
tender = "Holding my Thoughts in my Heart"
tifa = "Tifa's Theme"
tm = "On That Day, Five Years Ago"
utai = "Wutai"
vincent = "The Nightmare's Beginning (Vincent's Theme)"
walz = "Waltz de Chocobo"
weapon = "Weapon Raid"
yado = "Goodnight Until Tomorrow"
yufi = "Descendant of Shinobi"
yufi2 = "Stolen Materia"
yume = "Who Are You?"

You can get pre-cropped songs from FFT (whenever he uploads them) or from here (compliments of willis936) or you can use this patch.

or if you prefer to do it yourself, grab Audacity from here
and crop your audio files by opening up your mp3's, highlighting the horizontal areas (shown below), and cutting them out.

This can be done by clicking on an area between silence and sound, zooming in for precision, pressing shift+end or shift+home, and pressing ctrl+x.
...and repeat for all files.
*note that some songs (like Bombing Mission, for example) will require you to cut some of the track out in order to loop effectively, whereas some songs cannot really *loop* but only start over quickly (like Debut). Also remember that you cannot make any changes to the mp3 while it's playing or paused.

Step 2:
Open \ficedula\ff7music.ini in your FF7 folder (assuming you've got FF7Music Installed, if not, grab that before any of this) with notepad.
Check this line:
Code: [Select]
[Setup]
InputPlugin=C:\Program Files\Square Soft, Inc\Final Fantasy VII\ficedula\in_xxx.dll
if this says in_mp3.dll and you're running a 64-bit OS, you need Covarr's or my version of FF7Music.

Step 2a:
If you've got the old version of FF7Music and you have "in_mp3.dll" as your mp3 plugin and a 32-bit OS, this is what you do, otherwise scroll down to the next step
Under where it says "LoopFudge=2000" (shown below) change that to something lower but not considerably so. The optimal number for your machine will vary but I find that 250 works fine for me.


Step 2b:
If you did step 2a, this part isn't necessary.
Hopefully, this will already be done in future versions of FF7 Remix. However, since the wave configuration data isn't stored in any of the FF7Music files, that'll be a little tricky to do...
Open FF7Music, and click the configure button, then, under the setup tab, click the configure button for the output plugin.
Your options should look like this:

Set your pre-buffer to something low, but not too low. (again, ~250 works fine for me...though you can only scroll in multiples of 4 so...248. You can actually scroll in multiples of 1 by hitting the left/right arrow keys, too, but meh.)
and set your buffer ahead to the difference between the buffer and the pre-buffer. (as shown in the screencap)
Close the window, and hit save and exit, and restart ff7music.

Step 3:
Run your game, wait for a song to loop. If something bad happens (quality sucks, song doesn't loop, song doesn't play, song stutters, etc...) you went too low. If you can still hear a considerable silence (longer than ~0.3 sec) you should check steps 1 & 2.

Click Here to see the results. (and keep in mind that it can actually be reduced lower than this)
« Last Edit: 2009-09-26 22:55:00 by titeguy3 »

willis936

  • *
  • Posts: 370
    • View Profile
This is great, thanks.   :-D

However, I can't find that in the .ini, is that the same as the buffer in out_wave.dll?

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Check the image of it I just posted^^. Hopefully that'll help you find it. It's different, I believe. If it were the same as in your mp3 driver, then I don't believe it would have to be configurable through ff7music, but I could be wrong.
« Last Edit: 2009-08-14 02:55:01 by titeguy3 »

willis936

  • *
  • Posts: 370
    • View Profile
Hmm, that's very strange.  I'm using the .ini that came with covarr's guide but it has no loopfudge.


Curlyoxide

  • *
  • Posts: 40
    • View Profile
Hmm yeah mine doesn't have the option either in the ini
« Last Edit: 2009-08-14 04:14:53 by Curlyoxide »

obesebear

  • *
  • Posts: 1389
    • View Profile
I have LoopFudge.  FF7Music version 1.5.1.1  (check this by going to FF7Music, right click, properties, and click the "details" tab)

Torazo

  • *
  • Posts: 19
    • View Profile
I also have version 1.5.1.1 and I do not have that option... Although I could add it, but I am not certain as to whether or not that would be good for this program version.

These are what came in version 1.5.1.1 when I downloaded it.

[Setup]
InputPlugin=C:\FF7\in_mad.dll
OutputPlugin=C:\FF7\out_wave.dll
Volume=255
Pan=0
Profile=OSTRemastered
Paths=C:\Mp3\;C:\FF7\OstRE\
ProfileList=PSF;FilenamesOnly;OSTRemastered
Loop=1
Remember=2
ResumeExclusions=aseri2,bat,chu,chu2,crwin,crlost,fanfare,fan2
ResumeAfter=aseri2,bat,chu,chu2,fan2,
ObeyStop=1
MidiDevice=1
MuteMidi=1
MaxMidi=0
PassThru=0
EmulateRamp=1
StopDelay=0
« Last Edit: 2009-08-14 04:37:33 by Torazo »

willis936

  • *
  • Posts: 370
    • View Profile
I have 1.5.1.1 as well.  It seems covarr made some changes to this already since his .ini is different than the default by more than a little.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
I've posted my version of ficedula so that you can have the option too. I also included the file guide as a text file for your convenience. Enjoy!  :-D

willis936

  • *
  • Posts: 370
    • View Profile
>.<

Does anyone else notice that the music stops playing after the first battle in the bombing mission?
I've never had this problem before.  Also, I haven't used your .ini yet.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
you're using the fakemidi option in the custom graphics driver aren't you?

Set fakemidi to false, download Loopbe1 and set that as your midi device in FF7 Config. (then re-apply the custom driver registry key)

willis936

  • *
  • Posts: 370
    • View Profile
I'm already using loopbe, I guess I don't know why I'm using fakemidi.

:p
Thanks!

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
no problem, and I've figured out why Covarr's version of ff7music.ini didn't have a loopfudge option. He used the Mad mp3 decoder (in_mad.dll), which doesn't have a configurable buffer (hence the loopfudge option doesn't do anything), whereas the old in_mp3.dll file DOES have that option. Only according to Covarr, that version doesn't seem to be compatible with 64-bit operating systems...

Can anybody attest that using in_mp3.dll on a 64-bit machine doesn't work and explain to me what goes wrong? I'm currently rummaging through the source code of the Mad mp3 decoder trying to find something that'll help, but it'd be nice if the incompatibility were fixable...
« Last Edit: 2009-08-14 06:15:05 by titeguy3 »

willis936

  • *
  • Posts: 370
    • View Profile
Hmm, it's really late here, but I running 7 x64.  I'll redownload it, copy the .ini bits I need then test it out tomorrow.

Also, crap.  Now when I try to disable the driver music string and run ff7music, nothing comes out, period.  But it does successfully cancel out the midis which it didn't do before.
« Last Edit: 2009-08-14 07:25:09 by willis936 »

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Alright, I've modified the setup to work with 64 bit OS's. It should work fine now even without the loopfudge option. I'll modify the instructions accordingly.

But so it turns out that you can modify either loopfudge or the out_wave settings. I haven't tried modifying both of them but my guess is that loopfudge overrides the out_wave buffer...or just adds to it.
« Last Edit: 2009-08-14 08:30:08 by titeguy3 »

secondadvent

  • *
  • Posts: 287
    • View Profile
i sort of manually edited all of my mp3 files to loop better a while ago... but there was still some slowness in between songs, which is now pretty much gone with loopfudge set to 250. it is likely that i can set it even lower, but i think that 250 sounds pretty good for now :P. this is a pretty nice little tutorial, though all i really changed was the loopfudge value... guess i was a little bit farther than most people  :roll:

Harruzame

  • *
  • Posts: 473
  • Mondai Nai....
    • View Profile
How come your link to your version of FFVII music is unavailable? Not to the original Sticky: FFVII music though..

obesebear

  • *
  • Posts: 1389
    • View Profile
no problem, and I've figured out why Covarr's version of ff7music.ini didn't have a loopfudge option. He used the Mad mp3 decoder (in_mad.dll), which doesn't have a configurable buffer (hence the loopfudge option doesn't do anything), whereas the old in_mp3.dll file DOES have that option. Only according to Covarr, that version doesn't seem to be compatible with 64-bit operating systems...

Can anybody attest that using in_mp3.dll on a 64-bit machine doesn't work and explain to me what goes wrong? I'm currently rummaging through the source code of the Mad mp3 decoder trying to find something that'll help, but it'd be nice if the incompatibility were fixable...
Win 7 x64 build 7201
in_mp3.dll  ---Nullsoft MPEG Audio Decoder 3.52.

Works perfectly

willis936

  • *
  • Posts: 370
    • View Profile
Has anyone noticed that "good night until tomorrow" cuts off a second or two early.  Also, I just played through Wutai and noticed that the part where Corneo has a dramatic turn around and the continue music starts to play, it's supposed to stop shortly after it starts but it doesn't.  Probably an ff7music thing that can't be helped.

All this and I still can't get ff7music to work without the plugin (meaning the bombing mission music stop issue).

obesebear

  • *
  • Posts: 1389
    • View Profile
Has anyone noticed that "good night until tomorrow" cuts off a second or two early.  Also, I just played through Wutai and noticed that the part where Corneo has a dramatic turn around and the continue music starts to play, it's supposed to stop shortly after it starts but it doesn't.  Probably an ff7music thing that can't be helped.

All this and I still can't get ff7music to work without the plugin (meaning the bombing mission music stop issue).
http://forums.qhimm.com/index.php?topic=5387.msg105250#msg105250

For Aali's newest driver .7.1, open the .cfg file and change the part that says #plugins to look like this:
Code: [Select]
# plugins
# a movie plugin is required, the music plugin is optional, but required to make FF7Music work
movie_plugin = plugins/ffmpeg_movies.fgp
music_plugin = plugins/ff7music.fgp

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
I encountered the Good night until tomorrow problem as well, I just added a minute of silence to the end of it though with audacity using the Generate....Silence option. Did the same for fan2.mp3

@Harruzame, try it again, I just uploaded it last night so it was probably still processing.
« Last Edit: 2009-08-14 17:53:53 by titeguy3 »

willis936

  • *
  • Posts: 370
    • View Profile
It does look like that.   D:

Also, by changing the input priority to highest in the in_mad/mp3/psf.dll I can get away with a pre-buffer of under 100ms.

Also, my good night... mp3 has a few seconds of silence on the end already.(?)
« Last Edit: 2009-08-14 18:02:22 by willis936 »

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Yeah, but if you add more, it won't loop.

willis936

  • *
  • Posts: 370
    • View Profile
Hmm, I'm noticing covarr's .ini doesn't make use of some of the looped (modified) OST songs.  I'll try to correct this.

Is fan2 the shortened one (only the dun dun dun dah dan dundah) and fanfare the looped one?
« Last Edit: 2009-08-15 03:23:43 by willis936 »

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
fan2 is the long one. It loops if you leave it on that screen for long enough, and I think that's awkward...