Mod-Conversion

First!
Let me start by saying that although I am an old Amiga - guy, I have never been one who was much interested in sound, or playing music. I know that the MOD-Format existed probably a short time after it first appeared and I can remember the labels on my ST-01 and ST-02 disk, but I never really did anything related to music.

That did not change!

All the brabbling below are things I found out the last couple of days while getting "Mod2Vectrex" integrated into VIDE. So please forgive me if I make any mistakes, just send me some words of correction and I'll keep on trying to do my best.


Thanks
My thanks at this place especially goes to the guys (and girls?) behind Nuance and Metalvotze who not only did great Vectrex demos, but also are refreshingly open in sharing their sourcecode. The original Pascal source to the coding behind my Mod2Vectrex class were programmed by "Fieser Wolf", thanks for sharing!

Start
Mod to vectrex conversion is not a trivial thing - at least if you want nice results.

Sure - you can read the "Notes" of a mod file and convert them to vectrex notes, but that alone will in most places not be sufficient.

There are significant differences in the way music is handled in the two formats:

(This might not be an easy task, since there are two stumbling blocks:

  1. Mod writers often do not name their instruments very descriptive

  2. You have to know how the vectrex sound routines work in order to find settings for "instruments")

I have tried to help in form of a nice little window with some features:
(The piece of music you see is the one from "lineart", which is VERY easy to convert!)



Mod2Vectrex


IBXM

At the top of the panel you can see a cut down version of the IBXM ((c)2011 mumart@gmail.com) - player, with that you can play the to be processed MOD file and listen to it, and chose easily whether you like it or not.

Instrument table

Below that you see a table with information of the loaded mod:

Channel/Voice selection

Below that table there are some more settings.
First there are 12 radio buttons, with these you can set which of the 4 mod channels (voices) should be converted to what vectrex channel - here only testing helps!

Voice usage

Below that you see four numbers, these are the sums of notes played in each of the four channels. In the example provided you can see, that the first three mod-channels play over a thousand notes and the fourth channel only about a hundred. This so far seems to be a perfect candidate to be dropped out...

Voice enable/disable

Below that you see four checkboxes which are per default all set to enabled. Each of the checkboxes represent a "play enabler" for IBXM. With these checkboxes you can turn on/off single voices while playing the original mod. This also enables you the chose which channel might be "drop-worthy".

ADSR/TWANG



ADSR


The last possible settings are the ADSR (Attack, Decay, Sustain, Release) and TWANG (Vibrato) table.
(See also Programming the Vectrex - Sound)
The vectrex mod formats supports different ADSR / TWANG settings for each voice.


Note:
Each pattern can have different ADSR and TWANG tables. The values you find here are used in ALL patterns. If you want to differentiate you have to change the generated sourcecode!


Note again:
The ADSR and TWANG values are copied to the source AS IS, if you put errors in there or supply the wrong count of values, strange sounds may occur!


Instruments
This might be confusing, there are actually "3" different entities lurking behind the label "instrument".

  1. The Instruments which are mod file inherent, these are samples which are played in different frequencies to acchieve different tones.

  2. In the table of the mod conversion, you can set the vectrex "translation" instruments. This originated in the way vectrex (or the PSG) generates sounds and how the sound format of the orginal BIOS was defined. There are two "states" a sound register can produce output from: NOISE and TONE. The noise is generated PSG internally and the input "frequency" defines the noise - this is not equavalent to a "tone-frequency". For that reason you can select in the table:

The last checkbox

... is on the bottom left. With these you can alter output settings. But this is more for historic reasons, if I were you I would always use "indirect output", that output is better readable and allows you through definitions to more easily change the resulting sources.

Resulting source



Mod2Vectrex-generated source


The resulting sourcecode is one asm file (+ example player) which contains all song data. The file has a few different "chapters":

Some technical background:

Many a mod file can be found at:
http://modarchive.org/
or
http://amp.dascene.net/home.php