The formula $mq(len)$ has the correct count, but my problem is the formula $mi(track)$. When the first track of the playlist/album is played, it is counted as 0. The second track is counted as 1 and so on. I want to see how it is resolved.
Hi there,
The $mq(len)$ function will show the length of a playlist (a.k.a. how many tracks/songs in a playlist).
While the $mi(track)$ function will show the index number of the current track/song. And every index number is always start from 0 (zero).
- Any first element will have the index number of 0
- The second element will have the index number of 1
- … and so on
An illustration:
Let’s say we have 10 songs in a playlist, so $mq(len)$ will show 10. And if the current song is the first song, then $mi(track)$ will show 0. The next song in the track will have the index number of 1, and so on.
If the current song is the 6th song, then $mi(track)$ will show the index number of 5.
Playlist length: 10 songs
And the index number of every song in the playlist: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
So, both functions, $mq(len)$ and $mi(track)$, have different functionalities/usage.
I’m not sure if this answers your question, but that’s what I know so far.
I hope this would help.