Let’s play a song!!
I made an interactive musical web page where users can build chords by placing their mouse over the designated notes. I thought it would be fun for multiple users to login and play the chords together. And in doing this, I began to understand the limits of synchronous programming.
So I started with this p5 sketch and met with Shawn to help port it over to work with my socket server. The end result works ok on it’s own - try it out!!!
The problem is that as soon as new users login, it gets a bit squirrelly trying to get through the draw loop. So I sat down with Cassie and she showed me some ways to create this sketch again using a for loop of <div>’s with class ID’s for hovering events and such. Here is what she showed me. This will work much better when more users are on.