Saturday, October 26, 2013

G88 and the sound is gone!

For some reason, slide effect Gxx in music track wasn't played properly. Let me investigate ...

  • ::playRow() checks EFFECT_PORTA_NOTE. It will complain about instruments that change, then, capture the cell's note as "target note" and record the slidetune_speed from parameters. The playing note in the channel remains unchanged, although the "pattern cell" has the new one.
  • ::handleEffects() is for per-row effects. It also process some "volume column effects", but PORTA_NOTE is a "per-tick" effect.
  •  but I have checked that the PORTA_NOTE (effect #3) happens always on the 'regular' column.
  • xmtell.pl confirms there is a note on the cell that has PORTA_NOTE. Yet, when processing the row to setup channel state (including target note and slide speed), the cell mentions having EMPTY_NOTE ^^".
Reason ? The musical cells in an XM pattern may either be stored as is, or packed using a "magic bytes" that indicate which fields (effect, volume ...) are present and which are missing. For some reason, libntxm code was resetting the note to "EMPTY_NOTE" when the cell was stored in plain mode. I'd say there was no chance 0xt0b could debug that properly since he had no effects support -- thus likely only tested modules with no effects (where no cell can ever be "complete", obviously.


Pour éviter des bruits désagréables entre deux notes de la mélodie, mon frère a utilisé assez abondamment les effets de glissé pour enchaîner deux notes sans relancer le sample depuis le début. Mais dans la release d'origine, ces notes étaient curieusement silencieuses. Après pas mal de bourlinguage dans le code de la libNTXM d'0xtob, j'ai fini par me rendre compte que c'était lié avec la présence de "cellules pleines" (avec une note, un volume, un effet et ses paramètres). C'est maintenant réglé, ce qui veut dire que vous avez bien mérité une version révisée du niveau anniversaire.

Now, I have another issue with G00... parameter value 00 for an effect means "same value as the last effect" I used to do that on demand when processing per-tick effect, but for porta-to-note, I need to apply it earlier, when the finetune speed is defined.

So, enjoy g88 revision of the anniversary level.
  • camera control with UP and DOWN dpad directions;
  • improved spongebop bounces;
  • fixed music;
  • fixed crash/stall upon level reload.

2 comments:

cyborgjeff said...

cool, plus qu'à arriver à le faire tourner sur un émulateur pour que je puisse en faire un petit article :)

puisque ma DS est dans sa boite.

PypeBros said...

bin sors ta DS de ta boîte, hein!