Riptide in Space!

June 16, 2024 0 By Mason Coghill

The Hour of Code project I decided to do was the “NASA Space Jam” in which you make a song (or honestly any noise) out of orbiting planets! I immediately thought of trying to recreate the song Riptide by Vance Joy since I have been learning some Ukulele songs. Initially the website walks you through basic steps like how to make planets and how to make a string so that the planets “strum” the song you played.

I initially got carried away however and decided to make our own solar system instead of music.

As you can likely see, I tried to colour code the planets and set their size relative to how big they truly are, and then increase the period to make sure the orbit is the right distance.

 

 

 

 

 

 

 

 

 

 

Up first in recreating Riptide was learning the timing and somewhat accurate notes. Not realizing there is 4 measures in a loop, I simply just adjusted the first measure to account for the rhythm. As you can see with the angle number, one measure would be 140 degrees in length meaning that if we recreated it 3 more times, the 4 measures would be 560 degrees in length which is way past the 360 degrees in a circle.

This meant that in order for us to have a perfect loop, each measure had to be 90 degrees in length so we had to do some shady math in order to make this work. For the most part, it did work! The notes were somewhat accurate and the timing looked right. When we hit play though…the further the song progressed the more laggy the website became and the timing was way way way off.

 

 

With 20 planets orbiting in order to make the song loop… I think we overloaded the websites capacity. So in theory, our song works!

In terms of coding though, it did not feel like coding which could be a good and a bad thing.

Good because I don’t enjoy coding and do not really desire to learn it so for people who are similar to me, this would be a fun alternative.

Bad though because I felt like it did not teach me anything about coding whatsoever.

That being said, this is a Grade 2+ activity so we can’t expect it to replicate a Computer Science 110 class like the one here at the UofR.

Coding is important because without it, we would not have many luxuries in life. ANYTHING with a computer chip inside of it requires coding. Even our refrigerators likely need a computer chip which gives it instructions in how to run. Despite coding being incredibly important for our daily function, I am happy to live without learning how to deal with it!