Referenced script can be found here:
https://forums.rpgmakerweb.com/index.php?threads/cross-fade-audio-script.2472.
In simple terms, the script allows you to cross-fade two BGMs, where one fades out while another fades in. The author rigged it in a way where the second BGM is played as a BGS instead, allowing two different "play" methods to be called at the same time.
I've dissected the script quite a bit because I'm not liking how long the second BGM takes to fade-in. So I decided to adjust two things; the time it takes to fade-out the current BGM and the time it takes to fade-in the changed one (the one being treated as a BGS). The fade-out time I found easily:
(Line 147)
As you can see I experimented by changing the fadeout time to 120 frames, which works. Obviously the fade-in time is still obnoxiously long so it still sounds bad.
Here is my trouble; I can't for the life of me find the method used to fade-in the audio. I'm guessing it's somewhere in here:
(Lines 166-179)
But I'm not knowledgeable enough to decipher something that's not put it simple numbers. Can anyone help me out and see if it's possible to change the fade-in time and how? Also some enlightenment on the method used itself would be nice, since I am learning RGSS3 bit by bit.
Thank you to anybody who can help!
https://forums.rpgmakerweb.com/index.php?threads/cross-fade-audio-script.2472.
In simple terms, the script allows you to cross-fade two BGMs, where one fades out while another fades in. The author rigged it in a way where the second BGM is played as a BGS instead, allowing two different "play" methods to be called at the same time.
I've dissected the script quite a bit because I'm not liking how long the second BGM takes to fade-in. So I decided to adjust two things; the time it takes to fade-out the current BGM and the time it takes to fade-in the changed one (the one being treated as a BGS). The fade-out time I found easily:
Code:
cp_bgm_fade(120) #1000
As you can see I experimented by changing the fadeout time to 120 frames, which works. Obviously the fade-in time is still obnoxiously long so it still sounds bad.
Here is my trouble; I can't for the life of me find the method used to fade-in the audio. I'm guessing it's somewhere in here:
Code:
def bgs_play(*args) ## Changes method for ambient sounds
check_fades
if $fades
bgm_play(*args) if CP::FADE_AUDIO::DO_BGM
else
unless $switch
cp_bgs_play(*args)
@bgs = args
else
cp_bgm_play(*args)
@bgm = args
end
end
end
(Lines 166-179)
But I'm not knowledgeable enough to decipher something that's not put it simple numbers. Can anyone help me out and see if it's possible to change the fade-in time and how? Also some enlightenment on the method used itself would be nice, since I am learning RGSS3 bit by bit.
Thank you to anybody who can help!