chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.56k stars 471 forks source link

Inaccurate music in-game? #83

Closed amysgames closed 2 months ago

amysgames commented 5 years ago

Hello! So I've been experimenting with this neat tool, and I've noticed a few issues with in-game music. Namely, it doesn't seem like it's playing notes in the correct octave, and it's not detecting tempo changes at all. This only applies when I run the game; the editor itself plays the music no problem. I'm not sure if it's compatibility issues with MilkyTracker, GB hardware constraints I'm not aware of, or something else?

WAUthethird commented 5 years ago

Open the .mod file in OpenMPT and see if the issues arise or not.

amysgames commented 5 years ago

It sounds the same in OpenMPT as it does in MilkyTracker. I tried saving it in OpenMPT and that didn't help.

I'm also fairly new to tracking, myself, so I'm not sure if maybe I did something wrong?

WAUthethird commented 5 years ago

Hmm, I do know that the Hz of the song is changed automatically when compiling the game, (to match hardware requirements) so it's normal if it sounds a bit higher or sped-up. Are the differences very drastic?

amysgames commented 5 years ago

It's definitely noticeable. It's playing it a full octave lower than what plays in MilkyTracker, and it disregards my tempo settings entirely (I tried setting it to something different with no change).

The instrument choices are drastically different as well, though I'd understand if there's some hardware limitations there.

JasonB32 commented 5 years ago

I'm having the exact same issue and I had no idea what was going on, I use OpenMPT as well, and yes Milkytracker plays it fine too, but GB Studio through GBT Player is playing it slower and lower :(

RichardULZ commented 5 years ago

I'll make a tutorial on openMTP with Mod2GBT eventually, but right now, here's all the documentation.

Limits of mod2gbt (Most important document!) https://github.com/AntonioND/gbt-player/blob/master/mod2gbt/mod_instructions.txt

Always start from a base file! Instruments must have the right layout. Download effects_test.mod https://github.com/AntonioND/gbt-player/tree/master/mod2gbt

A complete guide from zalo's ZGB which uses the same GBT player. https://github.com/Zal0/ZGB/wiki/Music

Exerpt from mod instruction.txt Fnn - Sets speed to nn (in hexadecimal). Valid values are 01h to 1Fh. The higher the value, the slower the song. BPM speed not supported.

Channel 4 must always play note C5.

Only use instruments in the right channels ch12 for channel 1 and 2, ch3 for... you get it.

If you have any issues, send me a .mod file, ill be happy to help.

JasonB32 commented 5 years ago

Oh if you could please do a tutorial that would be great!!!

amysgames commented 5 years ago

Oh, so it is a compatibility thing, then. Alright, good to know.

With those restrictions in mind, I've managed to put together something that sounds a lot closer to what I want, but I guess there's not much I can do about the incorrect tempo (speed 5 is too fast and speed 6 is too slow). Oh well.

Thank you!

RichardULZ commented 5 years ago

Try to space your song out differently! If your song is lacking depth, try out stereo panning, and fade the volume of any instruments over time with volume commands to get them more natural.

Tracker ticks often run at 50hz, but the Gameboy is 60, so GBT does a funky conversion from 50 to 60 for player consistency, Haven't tried to disable that yet, but it's possible...

Digital-Down commented 5 years ago

Similar problem here, sounds are much higher pitched in GBSTUDIO as opposed to the tracker and notes are sometimes more consistent than others. Sometimes completely unrecognizable. I’ll read up on the documentation posted in a prior comment.

timsamoff commented 5 years ago

Just chiming in (no pun intended) to ask if there's a more GUI method of creating the proper Mod files... I have downloaded several Mods -- and created a couple of my own (presumably via incompatible means) -- and none of them play correctly in GB Studio. For instance, test the following Mod (not mine), made with Music Box, which is software that should output GB compatible Mod files:

catg2.mod.zip

I don't mind using Tracker software, but nothing seems to come out right.

RichardULZ commented 5 years ago

@timsamoff you must open a template or example file designed for gb studio or mod2gbt, they are set up in a very specific way with instuments that must not be modified. I highly recommend openMTP as its a more windows like GUI than most trackers. It is still like learning a tracker.

Read all the document links i posted, the zalo one is a good start, and for audio issues, the mod_instructions.txt is your trouble shooter guide.

timsamoff commented 5 years ago

@RichardULZ: Thanks, but like I said, I'm looking for something comparable for Mac.

WAUthethird commented 5 years ago

@timsamoff: Try MilkyTracker.

timsamoff commented 5 years ago

@WAUthethird: I did, but maybe I just messed up the template instruments somehow. I'll give it another go if it's the only option.

WAUthethird commented 5 years ago

@timsamoff If nothing else, there's always Wine.

timsamoff commented 5 years ago

@WAUthethird: Yes. I have a Windows machine as well. I was just trying to keep everything going on one. ;)

WAUthethird commented 5 years ago

@timsamoff I see. Hope MilkyTracker works out for you, then.

timsamoff commented 5 years ago

@RichardULZ and @WAUthethird: I have composed some music that is working perfectly now, EXCEPT that none of the tempo data is saved in the file. Is this possible? Or am I stuck at 125 BPM?

timsamoff commented 5 years ago

@RichardULZ and @WAUthethird: I have composed some music that is working perfectly now, EXCEPT that none of the tempo data is saved in the file. Is this possible? Or am I stuck at 125 BPM?

Sorry! Just figured out the Fxx commands!