Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
vgmlib - SMS VGM player for BGM and SFX
#11
I did make a few changes - some bigger than others Wink

I combined the vgmplayer and vgmdriver source files, just for convenience

I also dropped Play_X_Times() in favour of Play_Once() - I don't really see a use-case for playing a tune 2x, 3x etc, it's either one and done or loop indefinetly for me - and I've gone backwards and forwards on whether to force a stop at the end of playback. Honestly, I can't remember how I've left that exactly.

More fundamentally, I noticed there was some confusion in the source between different specs of the VGM spec. I think I've sorted those now - and one of the side effects of that is that I no longer have to manually set the loop point in the play_BGM() functions. Weirdly, SFX work better with the header stripped, and BGM works better with it still in place - but I haven't really had a chance to investigate that further, it shouldn't really make a difference either way.

There are still some things that don't work properly, if at all - if there's too much in the noise channel, then I get a bunch of random squeaks and squalls, and samples aren't supported in the VGM format as far as I can tell?

I've been concentrating on getting the games out of the door, but I can put a revised version of your demo project together in the next couple of weeks if you'd like?

I still get slightly jarring stops/starts when i switch music - it can overtake itself I think. I've been considering whether to set up a queuing system, so rather than just having one tune in memory at a time, I can set up a "play this next" array, and switch that in. Haven't really had a chance to think about that properly yet.

My music guy tells me he has to put in lots of "sshhh" effects in to avoid feedback, but I guess that's just inevitable - and we have quite often forgotten to put the FF99 block in Furnace to "end" the song - especially problematic in SFX

NOW, SAYING ALL THAT...

Sorry, if any of that comes across as negative - this lib has been utterly transformative in actually filling in the last couple of gaps of my dev process. Honestly, can't thank you enough for taking the time to put it together Smile
Reply
#12
Oh, and for anyone doing music using this driver, we've found the best practise is to keep the music in channels 1 and 2 and leave the sfx in channel 3. Keeps interruptions due to sfx at a minimum this way

I also fixed a small bug in the sfx with priority flash so that now works as expected. IIRC sfx didn't trigger at all unless the with priority flag was set - it should now pay sfx either way, but priority fx will take precedence
Reply
#13
Are you using the T6W28 version of the driver?

With SMS music, for sure the noise channel's interactions with channel 3 are present, potentially messing up music if sfx is using them or vice versa.  IIRC, the T6W28 has them separated on one register.  I can't recall if it's left or right.  So you can potentially get music still playing correctly in one side of stereo while sfx is using the other, but it's not as simple as completely separate sounds on each register in the same channel.  It's more that the noise channel can be used without affecting channel 3.  I don't recall all the nuances at this point.

Using the first 2 channels for BGM and the latter 2 for SFX is perfectly legit, though.  I will say, there are some good sounds you can get out of 3 and 4 that are not possible on 1 and 2, and they can really add to the music.  For example, it's possible to get much deeper bass sounds out of channels 3/4 combo.  Kind of like bass guitar sounds.

Furnace has a specific option for composing for T6W28 where the differences are more apparent compared to SMS.


It's entirely possible the driver itself needs some bug fixes.  I have to admit, I mostly stumbled my way through the asm there.

If you're open to it, I'd love to merge changes back into the repo I have on github.
Reply
#14
Yes, the T6W28 version is the one I'm using - I'm clueless with music, so I've got a friend doing it remotely - not ideal for experimentation

Can you add me to the repo and I'll create a branch, or would it be easier for me to pull a fork and you can merge back in at your leisure?

Edit: https://github.com/Ahchay
Reply
#15
(11-01-2025, 06:00 PM)Ahchay Wrote: Yes, the T6W28 version is the one I'm using - I'm clueless with music, so I've got a friend doing it remotely - not ideal for experimentation

Can you add me to the repo and I'll create a branch, or would it be easier for me to pull a fork and you can merge back in at your leisure?

Edit: https://github.com/Ahchay

I added you as a collaborator.  Update as you see fit.

BTW, I've got wav playback integrated and interacting nicely with this driver/library.  Maybe we could branch into a more all-inclusive library.
Reply
#16
Sorry - meant to merge into a new branch, but have updated to main instead. I really should work out how to use git properly some time

Anyway, all my changes are now in - have a look and see what you think

I've used the bubble bobble intro for testing as it's shorter and easier to spot the loop - use left/right to switch the looping style in the demo

I'd be very interested in getting the wav playback working again too - I had a crack at that and had compiler errors everywhere
Reply
#17
One thing i would love to do with the driver is to control the volume programmatically - it can still be jarring when you switch between tunes, so a quick fade out before starting the next tune wood be very helpful i think?

No idea how feasible that is?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)