Tons of music/sfx issues

CutterCross

Active member
Okay, so I managed to import my music correctly without the ROM glitching out and taking a grey dump all over the screen, but I've ran into a few more issues.


First off, the Pulse 2 channel gets muted whenever switching to another screen with the same music. And when you die, all the music cuts out completely.

https://www.youtube.com/watch?v=WABVyfdDgqY&feature=youtu.be

Also, for some reason music loaded into the 2nd or 4th music slot (and I'm assuming all the rest of the even-numbered music slots) won't play anything in-game. They all play fine on the title screen, but not in the game itself.
To temporarily solve this issue, I had to create "Dummy" songs to separate my music into the odd-numbered slots so they would play properly.

fk4H9Ks.png


I hope these issues will be resolved soon.
 

darbybtg

New member
I am having the same exact issue. Once I enter screen 2 I am missing a Pulse channel (which happens to have the lead melody). And when I die my music stops completely.
 

RadJunk

Administrator
Staff member
If you guys made your own music and SFX, make sure your SFX end with a *stop note*...otherwise that channel that the SFX uses might get stuck in a loop and never free up again.

As for post-death...simple way would be to disable the SoundStop in the death script for now. This is happening because the game ignores the PlaySound script on screen load if it's the same value as the screen before it. It's a quick patch to make it know if you had died or not, but I haven't figured out the best place to place this for the most broad range of circumstances. So the best thing to do is just disable StopSound in your death script for now. :)
 

CutterCross

Active member
TheNew8bitHeroes said:
If you guys made your own music and SFX, make sure your SFX end with a *stop note*...otherwise that channel that the SFX uses might get stuck in a loop and never free up again.

As for post-death...simple way would be to disable the SoundStop in the death script for now. This is happening because the game ignores the PlaySound script on screen load if it's the same value as the screen before it. It's a quick patch to make it know if you had died or not, but I haven't figured out the best place to place this for the most broad range of circumstances. So the best thing to do is just disable StopSound in your death script for now. :)
My sfx already end with stop notes, so that's can't be the problem. Whenever a sfx plays on the starting screen, the channel goes back to playing the music. It's only when I LEAVE the first screen into another screen with the same music the channel cuts out entirely.
 

darbybtg

New member
Yeah, I used the included sound effects, but I added my own custom music. I just switch pulse 1 and 2 in my song. Now it’s missing the harmony track but sounds cool enough for my first game.
 

stevenshepherd

New member
I have the same issue. When leaving the first screen a pulse drops out and never comes back. I am using the built in music and haven't set up sound effects yet.
 

chronosv2

New member
I can also confirm the pulse2 channel cutting out when switching screens if the music is the same. I know I haven't touched the sound code.
 

jorotroid

Member
Additional observations:
  • Switching to a different track in the next screen does not cut out the pulse channel nor does switching back to the previous track.
  • On what CutterCross was talking about with the 2nd and 4th slots, I can confirm that moving a track to a different slot will let the track play.
  • Very rarely, the tracks that don't work will actually work properly. Because it's so rare, I couldn't get video of it. I'm also not 100% sure if the correct track was played or simply the second track (when I intended to play slot 4).
  • If I let a broken slot "play" for too long, first you will start hearing some low sounds, then all hell will break loose. (Check out around 0:37 in the video)

Here is a video illustrating some of this.
https://youtu.be/CS7meyfQnfs
 

CutterCross

Active member
jorotroid said:
Additional observations:
  • Switching to a different track in the next screen does not cut out the pulse channel nor does switching back to the previous track.
  • On what CutterCross was talking about with the 2nd and 4th slots, I can confirm that moving a track to a different slot will let the track play.
  • Very rarely, the tracks that don't work will actually work properly. Because it's so rare, I couldn't get video of it. I'm also not 100% sure if the correct track was played or simply the second track (when I intended to play slot 4).
  • If I let a broken slot "play" for too long, first you will start hearing some low sounds, then all hell will break loose. (Check out around 0:37 in the video)

Here is a video illustrating some of this.
https://youtu.be/CS7meyfQnfs
I ran into something similar to your last point about all hell breaking loose on the screen. When I first imported my music into NESmaker I only loaded 1 sfx and applied it to all the labels in the sfx tab. This was the result: https://www.youtube.com/watch?v=InIDQoK_I6A&feature=youtu.be
 

CutterCross

Active member
jorotroid said:
Interesting. So are you saying that problem stops if you load a different sound effect for each label?
Yeah, after I did that the problem went away and haven't encountered it since. I don't really know what's the direct cause of the problem though.
 

jorotroid

Member
I just tried switching to music in the Beta Assets folder. They all give the same issues, except my music was the only one that resulted in the low sounds and hell breaking loose.
 

jorotroid

Member
CutterCross said:
Yeah, after I did that the problem went away and haven't encountered it since. I don't really know what's the direct cause of the problem though.

Ok, so I threw together some random sfxs and put one in each label. You were right, that did stop hell from breaking loose. Also interesting is that it changed the sound that occurred when entering a screen with slots 2 or 4 music. Before as in my video, it gave a sort of lawn mower revving sound. Now the sound is much more tonal. I can't tell if it sounds like one of my sfx or music because it plays so quickly.
 

jorotroid

Member
OMG, I need to switch to working on something else for a while. I tried using the NO CHANGE option, and now the hell breaking loose has return with a vengeance. The low sounds play much more frequently, and the glitch/crash happens much sooner. Then I tried changed to another track for that screen and no matter what I did all hell would still break loose regardless of the track. Then I tried to change the track in a neighboring screen and things returned to only slots 2 and 4 not working and the pulse channel cutting out. And now I can't seem to reproduce the no tracks working issue I just mentioned.
 

CutterCross

Active member
jorotroid said:
OMG, I need to switch to working on something else for a while. I tried using the NO CHANGE option, and now the hell breaking loose has return with a vengeance. The low sounds play much more frequently, and the glitch/crash happens much sooner. Then I tried changed to another track for that screen and no matter what I did all hell would still break loose regardless of the track. Then I tried to change the track in a neighboring screen and things returned to only slots 2 and 4 not working and the pulse channel cutting out. And now I can't seem to reproduce the no tracks working issue I just mentioned.
Joe specificly said in his videos not to use STOP_MUSIC or NO_CHANGE, most likely because of those glitches.
 

jorotroid

Member
I found it! Oh my god, I found it!

Ok. So there is a SongToPlay and a songToPlay variable being defined in the code. The capital one is defined in ZP_and_vars.asm and the lower case one is defined in SystemVariables.asm. I'm not sure if this was a typo or if it was intentional to have two variables with similar names. I also don't know if this was specifically causing the problem because there is another issue. I'm not sure if I personally added more variables to ZP_and_vars, but in my export, SongToPlay ends up getting assigned to address 0101 which is also where a stream_flags variable gets declared in ggsound_ram.inc.

Nevertheless, I commented out SongToPlay in ZP_and_vars, and changed all other instances of it to songToPlay. Now the second pulse channel works fine and all songs I have play fine (not taking into account my music composition skills). Here's where you will find those instances:
  • 2 instances in LoadScreenData.asm
  • 1 instance in HandleScreenLoads.asm

I wasn't even looking for this. I was just seeing what more I could do with my label extracting script when I noticed the overlap. Though I was hoping the label extractor could help find this problem, so mission accomplished, I guess.
 

dale_coop

Moderator
Staff member
Ooooh! Nice catch, jorotroid!
The glitchy sounds/music was always bothering me...
Can't wait to test that, thank you <3
 
Top Bottom