ZoomTen / pokered-sgb-audio

(WIP) Pokémon Red but with Super Game Boy music
7 stars 0 forks source link

What's going on with the music converter/compiler? #1

Open nikku4211 opened 3 years ago

nikku4211 commented 3 years ago

Every time I convert over a MIDI, like this remix I made, the SNES outputs some weird glitchy audio instead of my song.

wild.zip

Is it a problem with the converter, the MIDI, the compiler, or a source file?

ZoomTen commented 3 years ago

The converter definitely needed more work, and I haven't tested it with many MIDIs It's optimized for simple MIDIs with just the right amount of channels and with a no polyphony per channel (like actual SNES songs would) Try comparing your midi with the one already in the repo (under audio/sgb/midi/wild.mid)

I'll probably have to check for time resolution issues as the output from the mid2sbn asm converter has a lot of notes with length 0

nikku4211 commented 3 years ago

Lel, oops, my song has overlooked polyphony.

imagine writing a MIDI converter that applies dynamic channel allocation

this post was made by the monophonic channel gang

I split the polyphony in the lead to its own track, but now it still doesn't convert over properly. I don't know if it's because of the different drum tracks all referring to channel 10, or something else.

If you can't have multiple tracks referring to the same channel, then you can't have drums that span for 2 channels, as MIDI only uses channel 10 for the drums, everything else is melodic.

wild.zip

ZoomTen commented 3 years ago

I pushed some changes that unfortunately didn't address the length 0 problem

It's because some notes overlap still with each other, notably the kick and snare track So as you said, it would require me to make a converter that has dynamic channel allocation - which is a bit more complicated that just making a converter and I don't think I could handle that yet

I fixed your midi so that it would convert, also included is the generated ASM file and SPC rip

You may notice the hi-hats that are not percussion, but instead have the synth strings instrument now. This is because the converter now allows program numbers to stay as-is on the output, and in the SGB sound set those instruments are mapped to the hi-hats.

wild_fixed.zip

nikku4211 commented 3 years ago

Cool, now I need to try using 2MIDI instead of OpenMPT for converting .IT files to .MIDIs to see if that'll sound better.