Random Melody Loop Not Working

I'm attempting to make a music app where you can click the buttons to play a corresponding note and then click the random melody button to play a random 5 note melody. However, the loop is not working as wanted to play a melody. What it currently does is play a random note from whatever key is selected, but not a random sequence of 5 notes. I'm trying to think of how to fix this, but haven't been able to make any progress in a few days. Any help or suggestions would be greatly appreciated.

This may help you

http://www.appinventor.org/Xylophone2

2 Likes

It'd be helpful if you would upload your project's .aia file. I'll try to look into it.

This link should be the .aia on google drive. My project has three screens, and this issue is on the third screen, titled CustomSong. I've begun to change the code however using the suggestion from TIMAI2, though this is still giving me a 701 error with the button unable to load the sources.

1 Like

Could you please tell me what generatemelody does? I don't seem to understand why you added a loop.
image

Apart from this and the randommelody procedures, everything looks great!

Try this one and see if it works for you

1 Like