Convert Xm/It/Mod Import Procedures To Lua

Before you boo and hiss me off the stage, hear me out.

Somewhere inside Renoise is old rickety XM/IT/MOD import code.

If this were ported to Lua, people could in theory contribute to improving the routine. In practice, they can be redirected to the code when they ask “why such and such feature is not perfect?”

Coroutines for the winrar.

PS: MIDI too?

Just writing a better file converter is only one part of the job. The real problem is that the internal XRNX playback is not 100% backwards compatible to all the other tracker playback formats out there: for example our pitch, vibrato, retrigger commands, instrument envelopes behave different. Actually every module format’s commands behave different.

So, for a perfect IT/Mod playback Renoise would have to support all the pattern commands that such formats do use, play instruments the way those old formats did, and so on.
Basically would need to write a new playerengine for every format we would like to support, or add tons of compatibility settings and try to reverse engineer all their (also buggy) behavior. This is a fulltime job. Other players tried to do so before and didn’t managed to do so. See XMPlay for example: http://www.un4seen.com/

Some features cannot be made perfect, also not through lua.
As i explained in the other request-topic about IT import, the pitch envelope has a different scaling range than Impulse Tracker itself has (Renoise has 24, IT has 32). So to get that perfect for adaption this would mean:
You have to check the whole song for which tracks use that instrument and which notes, than figure out which scale is used and hopefully not the full scale is used. The latter means you can shift the pitch envelope settings for that instrument and adjust the notes in the tracks accordingly.
If both the full positive and negative range is being used, you can’t correct anything here.

This is only one feature difference explanation.

All good arguments, but my request is not to write a better file converter.

My request is a 1 to 1 port of the existing converters to Lua.

Nothing changes in terms of functionality, but it opens the door for people to tweak.

The initial work is annoying. but then it’s done forever, is offset to the community.