1 (edited by 4throck 2016-05-09 11:46:53)

Topic: TXT MOD to 1Tracker

Hi,

I'm working on a Python script that will convert a TXT with MOD data (patterns and notes) and print something that 1Tracker can understand.

It' can't really import or export anithing, so it's copy/paste based but it works well.

Input txt is something like:

sequence 00010201020403040304020102060705080901020102040304101012111211

ModPlug Tracker  XM
|........C..|A-302...G40|E-503...F0D|A-503...F80|C-603......|E-508...F0D|A-508...F80|C-608......
|...........|===........|...........|...........|...........|...........|...........|...........
|...........|...........|...........|...........|...........|...........|...........|...........
|...........|...........|...........|...........|...........|...........|...........|...........
|...........|...........|...........|...........|...........|...........|...........|...........
|...........|...........|...........|...........|...........|...........|...........|...........
|...........|...........|...........|...........|D-603......|...........|...........|D-608......
|...........|...........|...........|...........|...........|...........|...........|...........
|...........|G-302......|D-603......|G-503......|...........|D-608......|G-508......|...........
|...........|===........|...........|...........|...........|...........|...........|...........

(each ModPlug Tracker  XM marks a new pattern)

and the output is:

0000 .... A-1. E-3. A-3. C-4. E-3. A-3. C-4. .
0001 .... .... .... .... .... .... .... .... .
0002 .... .... .... .... .... .... .... .... .
0003 .... .... .... .... .... .... .... .... .
0004 .... .... .... .... .... .... .... .... .
0005 .... .... .... .... .... .... .... .... .
0006 .... .... .... .... D-4. .... .... D-4. .
0007 .... .... .... .... .... .... .... .... .
0008 .... G-1. D-4. G-3. .... D-4. G-3. .... .
0009 .... .... .... .... .... .... .... .... .
0010 .... .... .... .... C-4. .... .... C-4. .
0011 .... .... .... .... .... .... .... .... .
0012 .... .... D-4. .... .... D-4. .... .... .
0013 .... .... .... .... .... .... .... .... .
0014 .... .... .... .... E-4. .... .... E-4. .
0015 .... .... .... .... .... .... .... .... .
0016 .... D-2. A-3. F-3. .... A-3. F-3. .... .

I have some support for changing octaves for specific intruments, and mapping instruments to drum sounds.
All requires manual messing with the code, so It's not something I'll release, unless someone is really into doing a proper converter :-)

Attaching the Golden Axe theme so that you can hear it working :-)

Post's attachments

golden_axe.1tm 93.91 kb, 11 downloads since 2016-05-09 

You don't have the permssions to download the attachments of this post.

2 (edited by 4throck 2016-05-09 11:48:24)

Re: TXT MOD to 1Tracker

And the Outrun Europa tune :-)

Forgot to mention, the engine is Octode!

Post's attachments

out_europa2.1tm 30.21 kb, 12 downloads since 2016-05-09 

You don't have the permssions to download the attachments of this post.

Re: TXT MOD to 1Tracker

Hi mate, welcome back to the 1bit-forum smile

Nice examples! I think some people would indeed appreciate a proper xm21tm converter. It's not even terribly difficult to do. Check Shiru's engine packages or my github (for example this for some C++ resp. Perl examples of how to read out XM data. Also, I believe this is the most accurate XM file format specification. If you're interested let me know and I'll post a walkthrough in the tutorial thread.

Re: TXT MOD to 1Tracker

I went for 1tm because of drum support. Beepola seems to ignore the drum data on import...
For that I guess that I could try to make something that writes a native Beepola file...

Will try to sort my code a bit so that the instrument handling part is more obvious. People might be interested in that.
Just a bunch of IFs for now, but the logic behind may be useful. For example,priority handling of multiple drum sounds :-)
Haven't' implemented support for instruments with different tunings, so that it transposes notes.

Re: TXT MOD to 1Tracker

Well, I'm a huge fan of 1tracker, so I certainly don't mind big_smile

I'd be interested in your instrument handling logic in any case. Perhaps Shiru and/or ccowley could even be convinced to add this kind of functionality to their editors.

Re: TXT MOD to 1Tracker

Hi 4throck, good to see you back smile


Nice work !