Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Hxy effect #13

Merged
merged 3 commits into from
Nov 15, 2015
Merged

Conversation

hillerstorm
Copy link
Collaborator

Tested against 0xx00.xm.

The effect is in use in the last few patterns, col 1, every 8th row.

To jump there instantly set a breakpoint in xm.js:play(),
run the following code in the debugger and then resume:

player.cur_songpos=12;player.cur_pat=18;player.cur_row=0

@hillerstorm
Copy link
Collaborator Author

That song also has lots of E9x in the beginning (second pattern).
I have read some conflicting info about that effect though.

wiki.openmpt.org says the following:

Retriggers the current note every x ticks. This effect also works with parameters greater than the current speed setting if the next row also contains an E9x effect.

It also states that E9x does not use a memory, which would mean that E90 does nothing.
Since the tempo in this song is 3, none of the E94s and E95s would do anything (except when used one after another, to continue on the next row). Seems a bit odd.

wiki.multimedia.cx however, says this:

Retrig note.

This effect retrigs the sample on every x-th tick. It doesn't use the counter, which is used by Rxy. Instead it uses the normal tick counter, which is reset on every row. Thus, it is more similar to the protracker version of the retrig effect, while Rxy is more similar to the Scream Tracker (and Impulse Tracker) version of retrig. Please note that similar does not mean 100% compatible :)

Notes:

  • If the parameter x is 0, this effect retrigs the sample only once - on tick 0.
  • If the parameter x is not 0, this effect retrigs on every x-th tick, except on tick 0.
  • Although this effect does not use the Rxy counter and never increments it, it resets it whenever a retrig occurs, except on tick 0.
  • This effect also does not touch the Rxy effect memory.

Which would still mean that the notes are never retriggered in this song at all, but the wording suggests that Rxy is a lot more complicated than the current implementation (Rxy on wiki.multimedia.cx)

I started trying to implement it but got confused :)

@a1k0n
Copy link
Owner

a1k0n commented Nov 15, 2015

LGTM. I forgot to remove some other missing effects from the readme.

Hmm, re: E9x, it seems the best way to find out would be to load up Fasttracker 2 in DosBox and try it out... I would trust OpenMPT to get it right though. Also their description is consistent with what the .xm author apparently expected...

a1k0n added a commit that referenced this pull request Nov 15, 2015
@a1k0n a1k0n merged commit bb5555f into a1k0n:master Nov 15, 2015
@a1k0n
Copy link
Owner

a1k0n commented Nov 15, 2015

@hillerstorm I just tried this in FT2; it appears wiki.multimedia.cx is correct. E9x if x >= speed appears to do nothing, even if repeated on the next rows. So, retrigger when cur_tick % x == 0.

I didn't realize Rxy had a separate counter, either; my implementation is probably wrong.

@hillerstorm hillerstorm deleted the implement_Hxy_effect branch June 5, 2020 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants