Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   RPGMaker (http://zelaron.com/forum/forumdisplay.php?f=188)
-   -   help with 'super mario world' style music change (http://zelaron.com/forum/showthread.php?t=41907)

Feggy 2007-03-04 09:40 PM

help with 'super mario world' style music change
 
hey was wondering if anyone could help me with an event I'm trying to make in my game.

in the game, I've been trying to make one midi file replace another midi file seamlessly.
E.G.
Alex is walking threw a forest and picks up a magic wand, and when he does, a trumpet is added to the current song. (don't worry thats not my game lol)

this is done by having 2 Midi files. 'midi file 1' being the basic song with no trumpet, and 'midi file 2' being the exact same song only having a trumpet melody over it.

this is done by turning off 'Midi file 1' when ever the wand is picked up, and starts 'midi file 2' where 'midi file 1' left off. so, in essence, the basic song is being played, but when the wand is picked up, a trumpet is added to the song.

if you have played "Super Mario world", you will know what I'm talking about (when Mario jumps on Yoshi, tribal drums are added to the song).

i know that it may have something to do with checking the "MIDI Play Pos.(Tick)" in change variable, but i just can't seem to figure it out. any help or a link to any tuts that show this would be really appreciated:) thanks.

***EDIT***
forgot to mention, I'm using RM2k3

BlueCube 2007-03-06 09:16 PM

I cannot think of a way to play a midi except by starting from the beginning of the song. Maybe an interstitial song (like some sort of victory music) followed by a fade-in of the new song would work in your case. Try it to see what it sounds like.

Chruser 2007-03-07 07:35 AM

Hmm, if there actually is some way to jump into a midi, you could measure the BPM of the "original" music, and set a timer when it original midi starts to play. Whenever the timer hits certain key points, (e.g. the time corresponding to eight beats) you can check for conditions to change the music. I haven't used RPGMaker for almost two years though, so I don't know what is possible to do these days. If RPGMaker has a modulo operator, it would help a lot.

If you can't jump into a midi file, start off with something really repetitive and switch to a more complex piece? :)

BlueCube 2007-03-07 07:19 PM

Quote:

Originally Posted by Chruser
Hmm, if there actually is some way to jump into a midi, you could measure the BPM of the "original" music, and set a timer when it original midi starts to play. Whenever the timer hits certain key points, (e.g. the time corresponding to eight beats) you can check for conditions to change the music. I haven't used RPGMaker for almost two years though, so I don't know what is possible to do these days. If RPGMaker has a modulo operator, it would help a lot.

If you can't jump into a midi file, start off with something really repetitive and switch to a more complex piece? :)

The problem is, there's nothing in RM2k3 that I know of that will let you play a midi from anywhere but the beginning. (Or any sort of media file, for that matter)

Feggy 2007-03-08 05:07 AM

one thing i've learned about reading theres threads is that, when it comes to rpg maker, BlueCubes word is gospel lol thanks for the advice guys, i'll try it out and see how it works.

i just got hit by a brainwave lol, i got an idea now to have song 1 play as an SFX and song 2 play as a BGM (song 1 will be the basic song, and song 2 will be the instument i want to play over it). i'll have them start at the same time but have the BGM volume set to 0%, and whenever the event goes off, BGM gets turned up and plays over the original theme (which is actually just playing as a sound effect). all i gotta do then is figure out how long the song is, make a timer, and make the sfx loop.
is there any bugs im missing, kuz this feels a little to easy for something that had me pulling out my hair a few days ago lol


All times are GMT -6. The time now is 12:38 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.