Wohlstand / OPN2BankEditor

A small cross-platform editor of the OPN2 FM banks of different formats (Downloads in README below)
GNU General Public License v3.0
40 stars 8 forks source link

VGM importer glitchy behaviour #94

Closed freq-mod closed 2 years ago

freq-mod commented 4 years ago

On some rare occasions, VGM importer won't detect every instrument in .vgm file. example - 15 - Expander.zip - importer sees only 3 instruments, while there are much more than that (such as detuned piano playing on YM2612 Channel 0 and 1, is missing).

Wohlstand commented 4 years ago

I guess, because they are PSG instruments which aren't supported yet :thinking:

Wohlstand commented 4 years ago

I trying to listen a song, and I hear some similar to PSG, lemme dump this VGM file into text file :thinking:

Wohlstand commented 4 years ago

Yes, I did the full dump, and I see lot of SN76496 related commands, which were not handling as instruments.

freq-mod commented 4 years ago

there are psg instruments, sure but there are a few FM sounds that aren't handled ch0ch1isolated.zip - 2612 ch0 and ch1 isolated, instrument that aren't imported can be heard

Wohlstand commented 4 years ago

Damn, I tried to import instruments from this file: Earthworm Jim 2 - Anything But Tangerines.vgz.zip And I got two of them only...

freq-mod commented 4 years ago

There is a VGM player called MDPlayer which allows you to see FM parameters as file is being played, so that one can be helpful while debugging - https://github.com/kuma4649/MDPlayer

freq-mod commented 3 years ago

I tried to research this bug, seems like that kind of VGMs that aren't read at all (there are such cases, see zip) or read incompletely are of version 1.50. Anything other than that doesn't display such behaviour, but can be other way round - ridden with duplicates or near-duplicates Example - vgm.zip - YM2608 VGM ver. 1.71, produced by BambooTracker, bank editor sees almost 300 instruments

Wohlstand commented 2 years ago

Good news, just now I took care of this, and I fixed the real reason for this bug: because of improper handling of 0x8n commands, there was caused a wrong offset that led to the breakage of the further command parsing. Should work fine now, @freq-mod, can you test this?

freq-mod commented 2 years ago

Sonic 3 & Knuckles - Icecap Zone 1.vgm.zip -anotherproblem is created I'm afraid,this file contains allegedly 130 instruments (I don't think so), some of them are exact duplicates

Wohlstand commented 2 years ago

The reason for duplicates is because I guess, there are some cases where some characteristics got toggled at the instrument like the LFO level or something also. Maybe add some options to configure VGM importer for duplicates detection behavior and make it ignore LFO changes and something also?

freq-mod commented 2 years ago

Good idea

Wohlstand commented 2 years ago

Also, there is some music where CC74 implemented and it alters the modulators, so, it will obviously produce the ton on different instruments. Adding an extra heuristic would make other issues, that should be done as togglable properties, and could be made as a different discussion, the main problem in a form of missing instruments has been resolved.