20 May '13 - 05:08 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: MO3 trashes MIDI macros  (Read 1990 times)
saga
Posts: 1363


« on: 11 Sep '11 - 19:03 »
Reply with quoteQuote

Hi Ian,
I think there's a big problem with either MO3 or UNMO3 (I guess it's the former, but I really do hope it's not) concerning MIDI macros. If you read Impulse Tracker's MIDI.TXT carefully, you can see that MIDI macros can contain several variables, not only the "z" variable - those variables are (in lower-case) a,b,c,n,p,u,v,x,y,z. Compliant trackers / players should subsitute them by the appropriate content when parsing the macro. Upper-case letters A-F are constants.
What's the problem? Well, if you take a macro that has upper-case letters A-F (f.e. by simply taking the default resonance macros in the Z80-Z8F range), the resonance parameter (last two characters of the macro) are converted to lower case when converting the file back to IT with UNMO3. That is not correct. The default resonance macros have no variables in them, so they should be completely upper-case.
Now, when converting the attached IT file to MO3 and opening it with OpenMPT 1.19, it sounds OK, as OpenMPT 1.19 and older only handle the "z" variable and interpret all other characters als constants, but with the upcoming OpenMPT 1.20's new macro system (which can handle all variables, not just z), the resonance macros (in the Z80-ZFF range) are broken. If the letters are indeed stored as lower-case in the MO3 files, I'd suggest to cast them to upper-case in UNMO3.EXE/DLL, so that compliant applications can handle the macros correctly.

* test.7z (0.47 KB - downloaded 2 times.)
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 12 Sep '11 - 17:15 »
Reply with quoteQuote

The MIDI macros are actually stored in numerical form in MO3, but UNMO3 was indeed converting them back to string form in lowercase. Here's an update to try...

   www.un4seen.com/stuff/unmo3.exe

Let me know if there is still a problem with it.
Logged
saga
Posts: 1363


« Reply #2 on: 12 Sep '11 - 18:32 »
Reply with quoteQuote

Thanks, that seems to work. Can I now have an updated unmo3.dll as well, please? Smiley
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #3 on: 13 Sep '11 - 14:15 »
Reply with quoteQuote

Yep, here you go...

   www.un4seen.com/stuff/unmo3dll.zip

Let me know if any more dodginess shows up Smiley
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines