Hi Guys,
I'm putting together a little music disk of XMs and MODs, and I would like them to play one after the other, for example, when one ends, start playing the next one.
can I use get_music_position (slot) somwehow to do this ? eg. compare the position with the known 'end position' and if they match skip to the next tune ?
thanks, Phil.
spiny / torment
get_music_position (slot)
Re: get_music_position (slot)
ah, 'get music pattern' seems to do what I want, am I right in thinking that it just increments until the module ends ? and if so, all I need to do is note how many 'patterns' each mod contains and skip track based on that ? I am aware that each mod will have a different amount of patterns.
Re: get_music_position (slot)
figured it out
track2: // 30 patterns
track2pos = get_music_position (2) // 1 -127
track2pat = get_music_pattern (2) // 1-30 for this module
sum = track2pat + track2pos // add both to get an integer to compare against
if ( sum < 156 ) // number is max pattern plus 127 - 1, so will change tune at position 126 of the very last pattern
{
print ( "TRACK 2", -200,-200, #ffffff )
print ( "POSITION $track2pos", -200,-150, #FFffff )
print ( "PATTERN $track2pat", -200,-100, #FFffff )
print ( "SUM $sum", -200,-50, #FFffff )
}
else { music3 } // jump to next track
track2: // 30 patterns
track2pos = get_music_position (2) // 1 -127
track2pat = get_music_pattern (2) // 1-30 for this module
sum = track2pat + track2pos // add both to get an integer to compare against
if ( sum < 156 ) // number is max pattern plus 127 - 1, so will change tune at position 126 of the very last pattern
{
print ( "TRACK 2", -200,-200, #ffffff )
print ( "POSITION $track2pos", -200,-150, #FFffff )
print ( "PATTERN $track2pat", -200,-100, #FFffff )
print ( "SUM $sum", -200,-50, #FFffff )
}
else { music3 } // jump to next track