milkytracker/MilkyTracker

Regression on AMF import

Opened this issue · 3 comments

It's not importing. I remember previously being able to load this attached Allister Brimble track from The Lion King for Amiga/PC. Now it just gives "Error while loading/unknown format".
TITLE.AMF.zip

Hi syntaxErrol (funny handle hehe)
Thank you for reporting this.
btw did you test both the zipped and unzipped version of the AMF file?

I only zipped the file up to make GitHub accept the attachment. Btw, there's a difference if I drag the file into the Milky window. Instead of throwing that aforementioned error, Milky imports the song as a sample.

thanks.
I'm brainstorming here, but perhaps that AMF file has a different header?

https://github.com/milkytracker/MilkyTracker/blob/master/src/milkyplay/LoaderAMF.cpp#L46-L49

Here you can see the loader checks for ASYLUM Music Format in the header while TITLE.AMF only contains AMF as the header:

$ hexdump -C TITLE.AMF
00000000  41 4d 46 0e 6c 69 6f 6e  5f 74 69 74 6c 65 00 00  |AMF.lion_title..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 1f 05 14 00  04 c1 3f 3f c1 00 00 00  |..........??....|
...

When I add AMF as acceptable header, milkytracker loads empty patterns and 1 empty instrument:

image

Perhaps there are multiple versions of AMF?