Basically, what I do is
1. Get the total number of MP3s. ( TotalMP3 or ArrayOfMP3.MaxIndex() )
2. Create a new array (ArrayOfRandom), and store in it the same values as the index like this
ArrayOfRandom[1]:=1 ArrayOfRandom[2]:=2 ArrayOfRandom[3]:=3
and so on, till TotalMP3.
3. Randomize this array by interchanging the values stored at a random index with another index, so that the new array is entirely random.
4. Now I can refer to any element in the array by an index (NowPlayingIndex), and it will be a random value lying between 1 to TotalMP3. Let this element be alpha.
5. Then I use it to find ArrayOfMP3[alpha], which will hence be random.
Thus, by changing NowPlayingIndex, I can go backward or forward in the list of songs stored in the array. Note that boundary conditions need to be applied while changing NowPlayingIndex.
What help do you need with your code? I didn't really understand.
Could you tell me why, and how, do you use GDIP.ahk?
Thanks for explaining usage of BASS_ChannelSeconds2Bytes