Art & Music: Musical Notes and Scales (Spring 2024)

I think your updated version sounds so amazing! The chords and the melody blend together so seamlessly.

Melody – 03/20/24

I got my melody working, but I'm having trouble importing the work I did already with the piano animation into my project. When I import the block, it drags itself to the palette and removes itself.
So, I'm not sure how to do that...

(I mistakenly posted my work and comments for the past week to the wrong link. This is a copy from that page.)

Initial Post (posted March 20th):

My project is based on fireflies. As the user plays on the MIDI keyboard, fireflies appear and fly around. Since fireflies come out during the evening, the Stage also gets progressively darker using the ghost effect with new keys being pressed. (Please feel free to play lots of notes to really see the effect.) I used random elements for where the fireflies show up and how they fly around, but eventually, they will fly up offstage and disappear. Each firefly is a clone.

While I was able to work around it, my MIDI keyboard did not work for the Dot example (although it was working in class). As of now, my MIDI keyboard works for my implementation.

For revisions, I'm thinking about controlling the direction that the firefly moves based on the octave of the note. I want higher pitched notes to spawn fireflies higher in the sky that move around faster (but in a smaller area) and the opposite for lower notes (which would slowly fly off). I'd also want to make the movement more smooth. I'm also open to suggestions.

Update (March 24th):
I used a similar chord progression to what I had come up with for Zelda's Lullaby when making my own melody. I also used the same base notes (though in a different order and rhythm) to start off the melody as a nod to what I've been doing so far in this class. I'm a huge fan of the marimba and toms, which give the song a softer feel.
I then incorporated my Summon Fireflies block, which creates a new clone with a firefly costume with each new note played. To help differentiate between newer notes and old notes, the Firefly clones start off with a brighter-glowing costume. The Firefly clone flies around a little bit before eventually moving offstage, during which their costume changes to a dimmer glowing bug. I did not end up incorporating different movements based on note pitch, but I did change the movement to spawn closer to the ground and to fly up offstage, which I feel looks more natural than flying off to the side. As such, the animation continues past the music as the fireflies fly offscreen, which is intentional.

Update 2 (March 27th):
After finding that the "ghost effect" is different in light (Flat) vs. dark mode, I updated the program to make it work regardless of mode. Now, instead of relying on the Stage to set the ghost effect, there is a different sprite that has the Background and darkens it by changing the brightness.

Forum 1:
I was pretty happy with my animation from Assignment 10, so I decided to begin working on my final project. I'm not sure exactly what I want to do yet, but as of now, I want to make an old-Zelda-style game wherein the player has to explore around a dungeon. Each new room of the dungeon forms itself when the player goes through a door or entryway.
This is a small start. I haven't read any Snap! resources on games yet, but this is what I was able to come up with. I implemented a way for the Player to move around as well as what happens when the Player runs into a Wall or wants to collect a Gem. As of now, the Player can walk around the Stage and collect a Gem, which is accompanied by an approximation of the well-known Zelda games' sound effect of when you collect something.
This is extremely rough. There's only the one room, and there are no animations (though the Player sprite flips around in funny ways). The Player can also walk off the left side of the Stage without stopping. And my code is in a very, very long block in a messy workspace.
If you want to try it, use the arrow keys (not WASD) to move the Player.

Update (March 31st):
Updated link (pun intended) to reflect Assignment 12 name.
My vision for this game is a Zelda-themed minigame, wherein the player tries to defeat as many monsters as possible (and thus gain as many points as possible) before the time ends. The player will alternate between defeating monsters in the field (the place you start in) and getting powerups, hearts, or extra time in the cave (black square in the upper right). You also have to go there to get your sword.
This game is now playable (though not very fun at the moment). Control the player with arrow keys, go up into the cave, get the For-Legal-Reasons-NOT-the-Master-Sword, and then attack the Enemy (orange monster) with space. You defeat it and get 10 points, unless it defeats you by running into you 3 times. You can also grab the Gem, but it doesn't really do anything right now. My goals for revisions and future work is to be able to spawn more monsters, put in powerups in the cave, and implement a timer (as well as visual elements like heart symbols to keep track of health, a visible timer, etc.).

Very cool project! See if you can consolidate code a little bit for readability.

I like the chords! I am not sure where you music visualization component is, however.

The visualization looks great! I did have a question regarding your melody drum beats. I noticed that the Snare Drum's beats are sixteenth notes, but they are pretty regular, so they could probably be eighth notes without much difference to the listener. Was making them sixteenth notes to better align them with the Cabasa (visually, they are easier to follow), or did you want to ensure that they were shorter than eighth notes?

After many hours, I have a working proof of concept. Note that the black keys are not set up properly, but as it is a proof of concept it should do.
Working Proof of Concept

The main code works as likely TuneScope works. For loops, it extends the tracks to the appropriate length, it compare all tracks, and then creates breaks in all tracks where there is a break in one. This leads to the tracks all having notes the same length. For example, if Track 1 has a C4 Whole note and Track 2 has a two G4 Half notes, Track 1 would be converted into two C4 Half notes so that the two tracks have notes the same length. This way, when current note updates with the highest-most changed note, it triggers the counter to move to the next note block, which will (so long as current note is not lagging behind play tracks) always transition the visualization to the proper note.

Notes to improve: After developing an algorithm for figuring out where the black keys go, I ran out of energy (and time in the night) and decided to leave the project where it's at now. The piano code is kinda mega ugly, but what matters is that it is merely a visualization for the other code, which is much more clean.