I'm pretty sure that I heard that AGS uses Media player to play midi's... if so maybe someone can tell me the midi controler event that tells Media player to loop from this point.
What I mean is I use AnvilStudio, and for instance in RM2K you can make a midi and set (at some point) a midi controler event b06f on channel 0 with a value of 111 the midi will not repeat from the beginning, but at that exact spot in the midi.
Its helpful to have a nice intro to your midi then start looping after the intro.
While this isn't directly related to AGS, it is, because I have many midi's that have intros, I just want to know how to make it so they don't loop from the very beginning at the end. So I can use them in my game.
AGS uses Media Player to play AVI/MPG videos, not MIDI music.
However, if it's a standard MIDI command then AGS's midi player might support it too - if it's some sort of custom event then it probably doesn't.
Well I'm not exactly sure if it is standard or not, I know it does work in RM2K, but it doesn't work in AGS, I guess I could do some research on it and play with all the commands in anvil and let everyone know if i find the controler event... Just a bad day as alll my stuff gets packed up tomarrow because I'm moving to Fort Lewis WA... maybe when I come back (if someone else hasn't found it by then)
PS any particular API you use for midi's or what? (Maybe if I have an Idea it will speed up my google searches :))
Quote from: Alynn on Sun 11/01/2004 15:31:23
Well I'm not exactly sure if it is standard or not, I know it does work in RM2K, but it doesn't work in AGS, I guess I could do some research on it and play with all the commands in anvil and let everyone know if i find the controler event... Just a bad day as alll my stuff gets packed up tomarrow because I'm moving to Fort Lewis WA... maybe when I come back (if someone else hasn't found it by then)
PS any particular API you use for midi's or what? (Maybe if I have an Idea it will speed up my google searches :))
I'm guessing AGS uses the midi player built into Allegro.
As for the looping thing, I'm pretty sure that's a special behaviour programmed into RM2K - the RM2K manual specifically mentions that it does that, but gives no other information about midi events, so I figure that's something Enterbrain invented themselves.
Possible workaround (not tested):
Use GetMIDIPosition() to check whether the MIDI's going to loop at a point and then use SeekMIDIPosition() to jump to the looping point, for example, if you want a midi to loop when it reaches beat 100 and jumps to beat 20 immediately, put in repeatedly execute function:
If (GetMIDIPosition()==100) SeekMIDIPosition(20);
I know it may be complicated but I'm not really familiar with MIDI's and that's what I can think of at the moment.