Hi! Today I want to make a xylophone recording and playing back notes. I know there is one tutorial in App Inventor, but I want to use my own coding instead. I will use another alternative way to store a song.
Here are the instructions: Xylophone Advanced.pdf (324.4 KB)
The assignment is proved difficult and I even don't know how to do it.
For the designer part:
I'll set some variables to do the process: lastPair, lastTime, song.
When I press any of the buttons, it will make a sound corresponding to the note.
The variables and procedures of the code:

Step 1 of the code: (I have no problem for that currently)
Step 2 of the code: (when one of the note buttons click, what will happen?)
Step 3 of the code: (most confusing

Here are all the codes that I have made.
But when I tested the app, it has a runtime error showing that the index originally need to change to 1 but the length of the list is 0...
Also, I cannot record or playback any of the notes, which is the most concerning for me.
It is complicated, and I don't know how to solve the problem or finish the app in success.
Thus, please help me or give me some advice! Thank you!