Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: [1]   Go Down

Author Topic: Emulating F00, the correct way  (Read 8564 times)

0 Members and 1 Guest are viewing this topic.

Saga Musix

  • TMA Moderator
  • Top Poster
  • ****
  • Offline Offline
  • Posts: 2571
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free module music and more!
Emulating F00, the correct way
« on: December 21, 2013, 13:58:05 »

MilkyTracker simply stops processing an XM when encountering an F00 ("set speed to 0") command. However, what FT2 internally does is completely different from that. As you might know, FT2 counts ticks backwards, e.g. at speed 6, it counts 5,4,3,2,1,0. So what does it do at speed 0? It counts 65535, 65534, 65533, ... ;) This results in a quite different behaviour if therer are any effects on the same row  as the F00 command, plus it means that the command never truly stops the module.
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug Tracker

raina

  • Milkytracker Moderator
  • Great Poster
  • ***
  • Offline Offline
  • Posts: 719
    • View Profile
    • raina.kapsi.fi
Re: Emulating F00, the correct way
« Reply #1 on: December 21, 2013, 20:42:24 »

This behavior is actually by design and just about the only intentional departure from FT2-like playback.

Saga Musix

  • TMA Moderator
  • Top Poster
  • ****
  • Offline Offline
  • Posts: 2571
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free module music and more!
Re: Emulating F00, the correct way
« Reply #2 on: December 22, 2013, 00:56:15 »

What would be the rationale for departing from FT2's behaviour here?
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug Tracker

raina

  • Milkytracker Moderator
  • Great Poster
  • ***
  • Offline Offline
  • Posts: 719
    • View Profile
    • raina.kapsi.fi
Re: Emulating F00, the correct way
« Reply #3 on: December 22, 2013, 16:49:39 »

That there's no rational use for F00 other than stopping playback. This was a change to the original behavior, which was ignoring F00 entirely.

Saga Musix

  • TMA Moderator
  • Top Poster
  • ****
  • Offline Offline
  • Posts: 2571
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free module music and more!
Re: Emulating F00, the correct way
« Reply #4 on: December 23, 2013, 00:08:51 »

What you are neglecting here is that MilkyTracker's behaviour prevents any notes / envelopes that are still playing from fading out, and yes, there are actually modules out there which exploit FT2's behaviour. There's really no rationale in not processing ticks any more as opposed to processing just a very large amount of ticks.
For "normal" usage, the difference between not processing any output and waiting for 65536 ticks to finish is not noticeable anyway, since a single line at 125 BPM will last about 22 minutes.

I can't believe that I'm more pedantic about correct FT2 emulation than Milky users here. :P
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug Tracker

raina

  • Milkytracker Moderator
  • Great Poster
  • ***
  • Offline Offline
  • Posts: 719
    • View Profile
    • raina.kapsi.fi
Re: Emulating F00, the correct way
« Reply #5 on: December 23, 2013, 16:17:51 »

Don't get me wrong, I wouldn't mind this getting fixed. There just hasn't been any interest in doing that before, getting to the bottom of yet more silliness for questionable gain. Thanks for the specifics. I believe I saw Df mentioning on IRC that he could implement the fix. Sorry for being too tired and inactive a user to challenge your pedanticism. ;)

Deltafire

  • Milkytracker Moderator
  • Rising Star
  • *
  • Offline Offline
  • Posts: 195
    • View Profile
Re: Emulating F00, the correct way
« Reply #6 on: July 27, 2015, 21:10:58 »

It seems quite easy to make F00 stop the song playback but allow instrument envelopes to continue; however it's more difficult to make the effect commands keep running (I'm not sure what FT2 does in this situation, I couldn't get it running in DosBox to check).
Logged

Saga Musix

  • TMA Moderator
  • Top Poster
  • ****
  • Offline Offline
  • Posts: 2571
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free module music and more!
Re: Emulating F00, the correct way
« Reply #7 on: July 27, 2015, 21:33:51 »

Since MilkyTracker has a backwards-running counter like FT2, shouldn't it be trivial to set the tick count to 65535?
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug Tracker

Deltafire

  • Milkytracker Moderator
  • Rising Star
  • *
  • Offline Offline
  • Posts: 195
    • View Profile
Re: Emulating F00, the correct way
« Reply #8 on: July 27, 2015, 22:12:24 »

MilkyTracker's ticker counts upwards unfortunately, I tried setting it to -65535 but the effect commands stop working.
Logged

Saga Musix

  • TMA Moderator
  • Top Poster
  • ****
  • Offline Offline
  • Posts: 2571
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free module music and more!
Re: Emulating F00, the correct way
« Reply #9 on: July 28, 2015, 13:47:36 »

Hm, weird, I thought I saw it counting downwards somewhere... Anyway, OpenMPT's tick count also counts upwards. I simply set the total tick count to 65536 there, then it simply takes a while to count up.
One thing to keep in mind when implementing this is to treat WAV rendering separately - in that case you'd still want to stop the tune immediately (or at least wait until no more samples are playing), so this behaviour should kick in when the disk writer is off.
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug Tracker
Pages: [1]   Go Up