Examples of Game Logic Modulating Music?
Moderator: Moderators
-
- Posts: 1
- Joined: Fri Oct 14, 2022 1:24 pm
Examples of Game Logic Modulating Music?
Hi All,
I’m trying to find interesting instances of NES game logic/events modulating the music.
Aside from button presses or collisions triggering sounds, are there examples of games changing song playback speed, pitch or looping behavior? anything generative or unusual?
Any examples, info or resources would be appreciated.
Thanks
I’m trying to find interesting instances of NES game logic/events modulating the music.
Aside from button presses or collisions triggering sounds, are there examples of games changing song playback speed, pitch or looping behavior? anything generative or unusual?
Any examples, info or resources would be appreciated.
Thanks
Re: Examples of Game Logic Modulating Music?
Tetris. When the stack is near the top it speeds up.
Super Mario Bros. When time is almost out it speeds up.
Excitebike, if you hit reset the sweep filter changes on the title screen.
Super Mario Bros. When time is almost out it speeds up.
Excitebike, if you hit reset the sweep filter changes on the title screen.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Examples of Game Logic Modulating Music?
The most fancy one I can think of off the top of my head is a GB game instead of NES, but GB Adventures of Lolo will dynamically switch between 5 different variations of the BGM depending on which direction you're facing and whether you're standing on grass. This is something that could've easily been done on the NES though which is why I'm mentioning it.
The way it sounds like it works is, the music data is broken up into 2-beat sections, and after the current section plays, the music engine checks the game variables to see which version of the next 2-beat section to play. There's two dynamic BGMs the game can play, and both are 16 beats in length, so the overall song loop is short, but it seamlessly shifts between 5 variations of itself as it reacts to what you're doing.
Another GB game, and simple to do on the NES, Pinball: Revenge of the Gator will endlessly loop a short "intro" section of the main BGM while it waits for you to launch your ball into play. Once the ball enters the playfield proper, the intro will stop looping and proceed into the main BGM.
On the NES itself:
- SMB2's pause screen mutes the two square channels. This is probably the only "true" dynamic music I can think of, where the playback of the music itself is modified, and not simply another track being loaded.
- SMB and SMB3 switch to a faster version of the current BGM track when the timer runs low. Tetris also does this when your stack gets too high, and then switches back to the "normal" track when your stack goes back down. For SMB and Tetris, this isn't a dynamic tempo adjustment; the game is switching to a different song which is simply a faster version of the original song. SMB3 I'm not sure, but it does start the song over.
- A Boy and His Blob will play an entire musical cue that leads back into the BGM when you cancel Blob's current transformation.
- In American Gladiators, the "wall" stage has semi-dynamic music based on how many opponents are currently on the screen (0, 1, or 2), plus the pitch shifts up one semitone each time the BGM switches between the "alone" and "pursuit" variations. While the "pursuit" variation is playing, the triangle channel will be muted or unmuted depending on whether you have 1 (muted) or 2 (unmuted) pursuers.
- A really weird example, Metal Gear 2: Snake's Revenge will dynamically switch between DPCM drums and noise-channel drums depending on whether a text box is open (noise) or closed (samples).
The way it sounds like it works is, the music data is broken up into 2-beat sections, and after the current section plays, the music engine checks the game variables to see which version of the next 2-beat section to play. There's two dynamic BGMs the game can play, and both are 16 beats in length, so the overall song loop is short, but it seamlessly shifts between 5 variations of itself as it reacts to what you're doing.
Another GB game, and simple to do on the NES, Pinball: Revenge of the Gator will endlessly loop a short "intro" section of the main BGM while it waits for you to launch your ball into play. Once the ball enters the playfield proper, the intro will stop looping and proceed into the main BGM.
On the NES itself:
- SMB2's pause screen mutes the two square channels. This is probably the only "true" dynamic music I can think of, where the playback of the music itself is modified, and not simply another track being loaded.
- SMB and SMB3 switch to a faster version of the current BGM track when the timer runs low. Tetris also does this when your stack gets too high, and then switches back to the "normal" track when your stack goes back down. For SMB and Tetris, this isn't a dynamic tempo adjustment; the game is switching to a different song which is simply a faster version of the original song. SMB3 I'm not sure, but it does start the song over.
- A Boy and His Blob will play an entire musical cue that leads back into the BGM when you cancel Blob's current transformation.
- In American Gladiators, the "wall" stage has semi-dynamic music based on how many opponents are currently on the screen (0, 1, or 2), plus the pitch shifts up one semitone each time the BGM switches between the "alone" and "pursuit" variations. While the "pursuit" variation is playing, the triangle channel will be muted or unmuted depending on whether you have 1 (muted) or 2 (unmuted) pursuers.
- A really weird example, Metal Gear 2: Snake's Revenge will dynamically switch between DPCM drums and noise-channel drums depending on whether a text box is open (noise) or closed (samples).
Last edited by Drag on Fri Oct 14, 2022 4:05 pm, edited 1 time in total.
Re: Examples of Game Logic Modulating Music?
Perhaps you may be interested in the Famicom game Otocky:
Otocky can be described as a musical side-scrolling shoot 'em up. The player's spaceship has a ball for a weapon, which can be fired in eight directions; each direction corresponds to a different musical note. The note plays when the player presses the fire button, and is also quantized in time so that it matches the beat playing in the background. By using the weapon selectively the player can improvise music while playing. [...]
Otocky is notable for being one of the first games that include creative/procedural generative music [...]
- Individualised
- Posts: 309
- Joined: Mon Sep 05, 2022 6:46 am
Re: Examples of Game Logic Modulating Music?
Speaking of, I have noticed that a small section of the SMB2U/Doki Doki Panic overworld theme with the 2 pulse channels muted was reused as the slot machine/cards minigame music in SMB3. I haven't seen anyone else make the connection or mention it on the internet.
I think this is incorrect. I'm pretty certain they did not store each theme in SMB1 twice with one sped up. You can check the disassembly. Maybe the faster variants have separate music IDs but they're not actually separate songs. Though interestingly, this seems to be a common misconception on the internet due to a combination of a misconception about what NSFs are, and the most common NSF of Super Mario Bros. having the faster variants as separate tracks. (The same NSF includes a glitched version of the Game Over theme and a fast variant of the pipe cutscene jingle, which have commonly been mistakenly labelled as unused content, with the sources saying that they're from track X of the NSF as if the NSF is something that's part of the game itself.)Drag wrote: ↑Fri Oct 14, 2022 4:01 pm - SMB and SMB3 switch to a faster version of the current BGM track when the timer runs low. Tetris also does this when your stack gets too high, and then switches back to the "normal" track when your stack goes back down. For SMB and Tetris, this isn't a dynamic tempo adjustment; the game is switching to a different song which is simply a faster version of the original song. SMB3 I'm not sure, but it does start the song over.
Re: Examples of Game Logic Modulating Music?
I was assuming they were separate music IDs. For sure, they point to the same physical note data (but with a different tempo setting in the header, or some other extra sequencing commands), but I meant to point out that the game behaves as though it's loading a new song (i.e., the song restarts but with a faster tempo), instead of, for example, a tempo variable simply being adjusted while the song continues seamlessly. Maybe that level of distinction is unnecessary but I wanted to point it out regardless.Individualised wrote: ↑Fri Oct 14, 2022 6:50 pmI'm pretty certain they did not store each theme in SMB1 twice with one sped up. You can check the disassembly. Maybe the faster variants have separate music IDs but they're not actually separate songs.
- Individualised
- Posts: 309
- Joined: Mon Sep 05, 2022 6:46 am
Re: Examples of Game Logic Modulating Music?
Good point. If I remember correctly, atleast for the overworld theme, in SMB1 it tries to restart the song at the same "pattern" (the game doesn't use a tracker format of course but the term still works I suppose) that it left off at, though this may be a useful side effect of technical limitations as the overworld song is split into several chunks of data.Drag wrote: ↑Sat Oct 15, 2022 12:36 pmI was assuming they were separate music IDs. For sure, they point to the same physical note data (but with a different tempo setting in the header, or some other extra sequencing commands), but I meant to point out that the game behaves as though it's loading a new song (i.e., the song restarts but with a faster tempo), instead of, for example, a tempo variable simply being adjusted while the song continues seamlessly. Maybe that level of distinction is unnecessary but I wanted to point it out regardless.Individualised wrote: ↑Fri Oct 14, 2022 6:50 pmI'm pretty certain they did not store each theme in SMB1 twice with one sped up. You can check the disassembly. Maybe the faster variants have separate music IDs but they're not actually separate songs.
Re: Examples of Game Logic Modulating Music?
I'm not sure if this is quite what you want, but Wizards & Warriors III gradually increases the tempo of the music in the ascent to Malkil. This does not seem to be dependent on player input or location, though. If you wait long enough, the music eventually stops altogether (because it's too fast?).
Re: Examples of Game Logic Modulating Music?
I have once done an experiment like this, but that project is on hold for now. The game logic would change the global transpose variable every x frames to make the pitch go up and down on the continue screen, which would just be the same fours beats of data repeated over and over again to save some space. So a plain nsf rip would come out sounding like the same short loop over and over again instead of the intended way.
- Jedi QuestMaster
- Posts: 688
- Joined: Thu Sep 07, 2006 1:08 pm
- Location: United States
- Contact:
Re: Examples of Game Logic Modulating Music?
The Battletoads intro theme switches the drum sample on and off depending on what's on screen.
In-Game: https://youtu.be/NspFiTAVtfk
NSF: https://youtu.be/7kB6OXGVJ0c
The Jurassic Park stampede/t-rex theme seems to have some pitch / speed dynamics, but I'm not sure what this is based on:
In-Game: https://youtu.be/Rica13n3mBU
NSF: https://youtu.be/y5v1dJ83vDg
A number of Rare games disable the square leads when paused:
• Snake Rattle 'n' Roll
• A Nightmare on Elm Street
• Danny Sullivan's Indy Heat
• Battletoads & Double Dragon
Edit: Metroid loops the title screen music, but lets it end on the menu screen.
In-Game: https://youtu.be/NspFiTAVtfk
NSF: https://youtu.be/7kB6OXGVJ0c
The Jurassic Park stampede/t-rex theme seems to have some pitch / speed dynamics, but I'm not sure what this is based on:
In-Game: https://youtu.be/Rica13n3mBU
NSF: https://youtu.be/y5v1dJ83vDg
A number of Rare games disable the square leads when paused:
• Snake Rattle 'n' Roll
• A Nightmare on Elm Street
• Danny Sullivan's Indy Heat
• Battletoads & Double Dragon
Edit: Metroid loops the title screen music, but lets it end on the menu screen.
Re: Examples of Game Logic Modulating Music?
Does lag count? Lots of games do that.
I think there’s a track in Marble Madness that speeds up and up each loop.
Zelda 2’s NSF seems to have some copies of same song with subtle variations in volume. I haven’t played this game a whole lot but never noticed it. Are these swapped around in real time?
I think there’s a track in Marble Madness that speeds up and up each loop.
Zelda 2’s NSF seems to have some copies of same song with subtle variations in volume. I haven’t played this game a whole lot but never noticed it. Are these swapped around in real time?
- Individualised
- Posts: 309
- Joined: Mon Sep 05, 2022 6:46 am
Re: Examples of Game Logic Modulating Music?
Not sure if this counts. Battletoads' sound engine only supports PCM output during downtime.Jedi QuestMaster wrote: ↑Sun Oct 16, 2022 1:38 pm The Battletoads intro theme switches the drum sample on and off depending on what's on screen.
In-Game: https://youtu.be/NspFiTAVtfk
NSF: https://youtu.be/7kB6OXGVJ0c
Re: Examples of Game Logic Modulating Music?
(This is not a game, so this may not count.)
Konami's Doremiko on FDS:
https://www.youtube.com/watch?v=v4EbFb9kUOo
Okay, it includes a piano keyboard, so you can perform music live, but even without the keyboard, you can use the joypad to (limitedly) manipulate the music being played back.
(Now this is a geme.)
Otocky:
https://www.youtube.com/watch?v=4A2mzS6toMo
It's a very inventive horizontal shooter (cute, too) where different weapons sound like different instruments and produce different tones according to the direction you're shooting at, i.e. you're basically playing your own music in the game. It was designed Iwai Toshio, an artist involved in experimental art. He later designed Sound Fantasy for the SFC, which was some sort of spiritual successor of Otocky, but the game was shelved for unknown reasons, which was later recycled and published by Maxis as SimTunes on PCs.
Konami's Doremiko on FDS:
https://www.youtube.com/watch?v=v4EbFb9kUOo
Okay, it includes a piano keyboard, so you can perform music live, but even without the keyboard, you can use the joypad to (limitedly) manipulate the music being played back.
(Now this is a geme.)
Otocky:
https://www.youtube.com/watch?v=4A2mzS6toMo
It's a very inventive horizontal shooter (cute, too) where different weapons sound like different instruments and produce different tones according to the direction you're shooting at, i.e. you're basically playing your own music in the game. It was designed Iwai Toshio, an artist involved in experimental art. He later designed Sound Fantasy for the SFC, which was some sort of spiritual successor of Otocky, but the game was shelved for unknown reasons, which was later recycled and published by Maxis as SimTunes on PCs.
Re: Examples of Game Logic Modulating Music?
<pedantry>Actually, SimTunes is based on only one component of Sound Fantasy (Pix Quartet), and that part was in turn based on an art installation he did called Music Insects. SimTunes exists because Maxis heard about that installation and decided it would make a good product.</pedantry>
Re: Examples of Game Logic Modulating Music?
Digdug 1, being a faithful port of the arcade game, the main BGM only plays as you move Taizo Hori. I guess this is simply done by calling the sound routine only frames where the d-pad is pressed as opposed to every frame.