a1k0n/jsxm

Adding the missing effects.

Opened this issue · 2 comments

Hello.
I really like this project :) and i hope in the future there will be support for all the xm effects.

a1k0n commented

Yep, I was looking at it this morning. The rest shouldn't be too difficult to add; some are fairly tricky like note delay (I am liable to break corner cases of portamento in the process) so I'd like to throw a bunch of tests in first.

I'll enumerate the currently missing effects here (using OpenMPT's guide):

Effect column:

  • 7xy - Tremolo - easy
  • E3x - Glissando control - unlikely to implement
  • E4x - Vibrato waveform - vibrato is hardcoded to sine; not too hard to support this
  • E5x - Set finetune - need to add per-channel finetune control and set it to sample finetune on trigger
  • E6x - Pattern loop - ugh.
  • E7x - Tremolo waveform - same as E4x
  • E9x - retrigger - should be easy since Rxy is already done
  • EDx - Note delay - tricky, special case like portamento.
  • EEx - Pattern delay - Have to think about this one. Requires player state cleanup.
  • Gxx - Global volume - Need to add a global volume control, currently hardcoded to -10dB.
  • Hxy - Global volume slide - same as above
  • Kxx - Delayed key-off - should be easy
  • Lxx - Envelope position - also easy
  • Pxy - Panning slide - easy
  • Txy - Tremor - Probably easy, depending on envelope behavior
  • X1x / X2x - Extra Fine Portamento - easy, since we're in javascript and can modify period by 0.25.

Volume column:

  • gxx - tone portamento - medium effort since portamentos are all special cased
  • hxx / uxx - vibrato depth / speed - easy, aliased to 4xy
  • lxx / rxx - panning slide - easy

The effects are implemented in a table in xmeffects.js and anything marked "easy" above can probably be implemented completely within that file. Pull requests appreciated.

a1k0n commented

Gxx done, thanks @hillerstorm!