Andrew Que Sites list Photos
Projects Contact

May 04, 2021

Rendering Space Debris

   As my MOD player becomes more and more functional I decided it was time to tackle a classic MOD.  I asked my good friend Zen what his favorite MOD was, and he said Space Debris.  This has to be among the all time greatest MODs ever composed.  The work of Finnish composer Markus Kaarlonen for the Horizon Party of 1990 this composition is both a musically and implementation complex.  Playing it back would be a challenge.
   I knew from looking at the MOD I would need to get the following effect functional:
  • Vibrato.
  • Vibrato + volume slide.
  • Portamento + volume slide.
  • Retrigger.
  • Fine volume slide up/down.
   Vibrato had been on my list for awhile.  My biggest issue implementing it was proving I did it correctly.  I had to find some MOD files that used vibrato with various parameters.  There are two.  The first determines the depth or how much the vibrato shifts the note.  The other is the speed at which the vibrato operates.  Once I was convinced I had this implemented correctly it was time for a test. 
   Found some interesting things about how MODs handle notes.  Setting the sample always resets the volume even if no note is played.  In Space Debris, some of the samples have 0 for the initial volume and volume slides are used to fade them in.  Setting the sample was a way to cause a volume reset and start a new slide.  The other thing I found was that the volume parameter is allowed to be set above 64 in the parameter although it shouldn't be allowed.  I had to limit that as there were two places the volume was set higher than 64.
   Fine volumes were very simple.  Retrigger wasn't too hard and I used the effect myself to make a kind of multi-hit snare drum sound.  Seems I may have learned this from Space Debris.  So, I am now able to render Space Debris and I'm fairly convinced this is accurate.
Space Debris

May 03, 2021


Sometime in 1994 I found the mod mod.softhunter which is a variation of J. S. Bach’s Toccata and Fugue in D minor. A truncated version of the toccata starts off with a strong synth instrument before giving way to the fugue played with a guitar which is then accompanied with a simple beat. The song is kind of fun but one that created problems for some MOD players. Otto Chrons’ Dual Module Player (DMP) rendered the MOD just fine, but other plays such as Kay Bruns’ Mod4Win did not.

Since this is a problem child I decided to have a look at rendering it myself. I had always believed the problem to be that the effect pattern break was implemented incorrectly. This effect has parameters which are supposed to specify the offset into the next pattern at which to begin the next note. Until this experiment I thought DMP implemented this position jump and Mod4Win did not. Turns out that assumption was incorrect. The MOD incorrectly uses pattern break. A position is specified but unless this is ignored the playback doesn’t render correctly. Interestingly, VLC which uses the ModPlug library, renders this module just fine. I’m not sure if ModPlug knows to ignore the pattern break parameters of certain files or just didn’t implement them. At the moment, I don’t have any MOD files that require a fully functional pattern break to work, so I cannot test it.

For my own player I added the pattern break’s parameters. It wasn’t until I slowed down DMP I could see that the pattern break parameters were being ignored. When I ignored the parameters the playback was mostly correct—mostly. On pattern 17 there are two speed changes in the first division. One sets the speed to 6 ticks/division, and second sets the speed to 0 ticks/division. My player would effectively skip every note at 0 ticks/division until the speed changed to something else. I simply added an ignore to speed settings of 0 ticks/division. My reference documentation says most players treat this speed as 1 tick/division. So this is probably a second item to cause incompatibility between players.