
panchokoster":1i5zrds8 said:great script!, but I got an error in battle (even in the demo) it says 'FMOD Ex returned error 58' it seems to be related to the animation_process_timing method, I got the error just defending with all the battlers a few times.
there are also argument errors with some scripts when they say something like Audio.se_play('se_name'),
but you can fix it just changing the line 1257 of your script to
'def Audio.se_play(filename, volume = 100, pitch = 100) ', right?
def update
$game_system.update
@command_window.update
......
......
BwdYeti":17r08req said:I went into the skills menu and mashed directions and the bgm cut out. I made it start playing again by talking to one of the people, went back into skills and did it again, and got an error.
Script 'FmodEx *' line 312: RuntimeError occured.
FMOD Ex returned error 36
Cowlol":3i2aq27b said:Well, not directly. RMXP default Audio class recognizes control change 111 event in a MIDI and uses it as a loop start point. I'm not sure how to do that with FMOD, though I do plan on supporting something similar for OGGs (using tags).
Frieza2000":2i6xaa66 said:I've found a small side effect of this script. Usually you can use the Play BGM event to play an AVI or MPG video, if ungracefully (unless you use the Scene_Movie script), but this script doesn't recognize those extensions so you get a file not found error. I tried adding the extensions to the array but that caused a different error and I'm not too confident in my ability to debug it. I'm going to give it a try in a few weeks, but if anyone else wants to save me the effort it would be greatly appreciated. Movies and music make an excellent combination.
If I can recall, standard Audio module is built-in, and hidden from end users. Audiofile class is also hidden, but at least its definition is provided in help file.Frieza2000":15flsb6h said:What if I just rename the standard Audio class and have the movie script call that? Can it be run concurrently with FMOD?
def self.bgm_play(name, volume, pitch, position = 0, looping = true)
Audio.bgm_play('Audio/BGM/' +
'Hooray beer',100,100,0,false)
def self.bgm_play(name, volume, pitch, position = 0, looping = $fmod_looping)
$fmod_looping = false
Audio.bgm_play('Audio/BGM/' +
'Hooray beer',100,100,0)
def self.bgm_play(name, volume, pitch, position = 0, looping = true)
def Audio.bgm_play(filename, volume = 100, pitch = 100, position = 0, fade_in = false)
def Audio.bgm_play(filename, volume = 100, pitch = 100, position = 0,
fade_in = false, loop = true)
if @bgm_fading_out and !fade_in
@next_bgm = RPG::AudioFile.new(filename, volume, pitch)
@next_bgm_position = position
return
end
start_volume = volume
if fade_in
@bgm_target_volume = volume unless @bgm_fading_in
@bgm_fading_in = true
start_volume = 0
end
@bgm_fading_out = false
# If a ME is playing we wait until it's over before playing BGM
unless @me_playing
FMod::bgm_play(filename, start_volume, pitch, position, loop)
end
@playing_bgm = RPG::AudioFile.new(filename, volume, pitch)
@memorized_bgm = @playing_bgm
@memorized_bgm_position = position
end
==FmodEx *==
#module Audio
module FAudio
#def Audio.bgm_play(filename, volume = 100, pitch = 100, position = 0,
def FAudio.bgm_play(filename, volume = 100, pitch = 100, position = 0,
#def Audio.bgm_stop
def FAudio.bgm_stop
#def Audio.bgs_play(filename, volume = 100, pitch = 100, position = 0)
def FAudio.bgs_play(filename, volume = 100, pitch = 100, position = 0)
#def Audio.bgs_stop
def FAudio.bgs_stop
Then rename the calls to them in Game_System:
==Game_System *==
#Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch, pos)
Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch, pos)
#Audio.bgm_stop
FAudio.bgm_stop
#Audio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume, bgs.pitch, pos)
FAudio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume, bgs.pitch, pos)
#Audio.bgs_stop
FAudio.bgs_stop
#Audio.bgs_stop
FAudio.bgs_stop
Audio.bgs_play('Audio/BGM/' +
'The Dance Of Eternity',100,100)
FMod::bgs_play('Audio/BGS/' +
'OOT_AfterBoss_Glow',100,100,start_position)
Audio.bgs_play('Movies/' +
'Inferno Punch',100,100)
Audio.bgs_stop
$scene = Scene_Movie.close_scene
$scene=Scene_Movie.new('Inferno P' +
'unch')
$scene = Scene_Map.new
@>Play BGM: 'The Dance Of Eternity',100,100
@>Script: FMod::bgm_play('Audio/BGM/' +
'The Dance Of Eternity',100,100,
start_position,false)
@>Script: Audio.bgm_play('Audio/BGM/' +
'The Dance Of Eternity',100,100,
start_position)
@>Text: Wait
@new_start_position = FMod::bgm_position
@>Text: Memorized
@>Script: Audio.bgm_play('Audio/BGM/' +
'The Dance Of Eternity',100,100,
@new_start_position)
@>Text: Restored
def self.selectBGMFilename(name)
name = name.gsub("/", "\\")
# See if file exists in game folder
localname = self.checkExtensions(name, FModEx::FMOD_FILE_TYPES)
if FileTest.exist?(localname)
return localname
end
# See if file exists in RTP
commonname = self.checkExtensions(getRTPFolder + name, FModEx::FMOD_FILE_TYPES)
if FileTest.exist?(commonname)
return commonname
end
# An invalid name was provided
return name
end