[ACE] ANY SIMPLE (ER) WAY TO PLAY MULTIPLE BGM'S AT ONCE?

Posts

Pages: 1
Hi all, a project I'm working on involves a lot of audio bits. One idea I had was to have multiple layers/aspects of a BGM prompted in and out of play by the player. (This is BGM I made myself, so splitting them into pieces is no problem.) The issue is that Ace's in-engine audio functions offer a maximum of 2 looping channels to play with: BGM and BGS. It goes without saying that the layers involved in my stuff exceeds that number rather quickly.

Now, I am aware of this script: MCI Audio Player. I can't get it to work unfortunately, I just find it too confusing. An error that keeps occurring reads:
Script 'Game_Interpreter' line1411: NoMethodError occured. undefined method 'gsub' for nil:NilClass

Which I assume involves line 254 of the script:
@filepath = path.gsub(/\\/, '/')

I have no idea what any of this is, perhaps I'm implementing the script calls incorrectly. If anyone is willing to try this script out themselves and then walk me through the steps then that would be one possible solution to my issue. Support for the script only seems to be on boards I don't have accounts to or a demo for XP, which I don't have access to. (A reminder that I'm looking for a solution for ACE, be sure to set the line 207 of the script to "RPG_VERSION = 2")


However, that script is offering a large variety of functions when really all I may be looking for is one or two of them. If no one can figure the above method out then basically, if there is an alternate method to making Ace's built in audio functions available for multiple files simultaneously, I am all ears! :)

Much appreciated, `skai
Oh man, I was excited when I started reading about the script until I saw the codec pack dependency. I don't like the restrictions of RPG Maker's music player to the point that I converted an XP script that would run a modified version of winamp in a self contained DLL. It had no external dependencies and barring a few issues like no setting on the F1->Music seetings that couldn't be fixed it seemed alright... until I found it to be the cause of crashes when certain animations played without rhyme or reason. I ultimately tossed it out because of that and the stuff I was trying to get it to do like crossfade tracks. I just don't want to deal with external dependencies with RPG Maker :(


Anyways back on track! The path variable is nil and looking at the code that's because it couldn't find the music to play. Double check that the file exists that you're trying to play and I'll open the demo in XP when I get home and I can provide a more concrete example.
Yeah, the file exists (I mean, I would hope so, I made it haha!). Though, I'm wondering if it's a matter of which folder it's in... At this point I'm wondering if there's any syntax the script won't accept or if again, I may be using the script calls incorrectly. Maybe there's something minor I'm not editing, or maybe I have a misunderstanding of how the script works entirely. Anyway, I don't think the codec pack should be too much of a hassle since I'm not really introducing any esoteric file formats. RM games are mainly optimized for Windows and I'm mainly working with .wav's at the moment (rendering with the DAW takes out the need of that audacity looping stuff), which I would assume anyone who has access to Windows has the codec for.

Just to reiterate, though it is neat that the script involves all that fancy stuff, all I'm really trying to get out of it is the ability to play more than two different BGM's and control their volumes. It's like the difference between designing a mix and one of those dj sets, I'm fine with the former haha. Anyway, here's hoping we can come to a solution!

Always a pleasure Mr. Spirit! :)
I looked at it and it'll fail on any sound file that isn't in your game's folder, like sound effects. Make sure every RTP audio file you use is in your game folder.
Well uh, this an entirely non RTP game, so all the audio I'm using is already in the folder... so I'm stuck at the same error. Do you think you can show me all the other steps you did? I'm still wondering if I'm using the script calls wrong, I know there's both the call and all the other methods involved, not sure which ones may be mandatory. And you tried it in Ace correct?
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5478
Do you need to be able to stop individual files before they're done playing, or is it enough to be able to stop them all simultaneously? Because the easy way to do this would be to make them sound effects instead of background music. You can play an infinite number of SE files at once, and run the script
Audio.se_stop

in a Script Call to stop them all at once. You'll just need a timer to loop each of them.

Keep in mind that sound keeps playing while the game is minimized, but the timer doesn't keep running, so... actually that fact will probably cause any solution to mess up if the player minimizes the game, not just this solution. Which makes this solution as good as any other. Unless you want to recode the entire Audio class (not an attractive alternative).
The only issue with that is the looping aspect I mentioned in the OP, SE's don't loop by default. And yeah, the looping stuff is needed because the timing is actually important for what I'm trying to do; basically I want all files involved playing at once, and then changing the volume of each in and out. By default BGM's and BGS's are already able to change volume from their current position, which is really all the functionality I need, but all I'm looking for is the ability to do the same thing for more files.

I went ahead and made a lil' video just to demonstrate what I'm aiming at:


This is done with something playing on both the BGM and BGS channels, I'm really just trying to do the above but just for more stuff.
What I did was put
print "Filename: #{filename}\n"

on line ~242 after
def open(filename)

To see what file it was trying to play in the console window. Once I saw the file name I saw it wasn't in the game folder and it was in the RTP and when I moved the file to the game folder it found the file fine.

Can you upload a demo project showing the error you're having so I can try to diagnose it?
Sure I can probably get one ready for you, I'll just have to take some of the extra stuff so that it'll be an easier download! I'll probably PM you the link, expect it soon!
Pages: 1