Skip to content

Only play nightcore hat sounds when tick rate is a multiple of 2#36459

Merged
peppy merged 2 commits intoppy:masterfrom
eeliogata:fix-nightcore-hat-sounds
Mar 6, 2026
Merged

Only play nightcore hat sounds when tick rate is a multiple of 2#36459
peppy merged 2 commits intoppy:masterfrom
eeliogata:fix-nightcore-hat-sounds

Conversation

@eeliogata
Copy link
Copy Markdown
Contributor

Closes #13513

Matches stable behavior where hat only plays when the slider tick rate is a multiple of 2.

public NightcoreBeatContainer(double sliderTickRate)
{
Divisor = 2;
playHats = Precision.AlmostEquals(sliderTickRate % 2, 0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost equals with a modulo is not going to work how you may want it to.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you intending to resolve this in your latest push? It's still kind of an issue.

sliderTickRate is hopefully never negative so that isn't a fail case, but you could still get something like 1.9999998 which would fail this check as written.

Copy link
Copy Markdown
Member

@peppy peppy Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I intended to do here was match stable on a code level.

Do you think we should be doing better? The PR's original AlmostEquals would be closest to what I'd consider changing this to, if you prefer that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess if the thought here is to mostly follow stable then it's probably fine.

@peppy
Copy link
Copy Markdown
Member

peppy commented Mar 6, 2026

@bdach before I even begin look into this one (turns out this is resolving an issue which was in the project), you recently touched nightcore and may have thoughts on this.

@peppy peppy moved this from Inbox to Pending Review in osu! team task tracker Mar 6, 2026
@bdach
Copy link
Copy Markdown
Collaborator

bdach commented Mar 6, 2026

you recently touched nightcore and may have thoughts on this

Not many other than what I mentioned in the OP of #36702:

This does not bring back the behaviour wherein hat samples only play if the slider tick rate is even because that only kind of makes sense in common time, and if common time is mixed with waltz time or other time signatures, it just gets weird.

Stable nightcore just did not really appear to attempt to accommodate waltz time in any way. It seemed to assume everything is always in 4/4.

@peppy
Copy link
Copy Markdown
Member

peppy commented Mar 6, 2026

Right, I think what you said there makes some sense, but based on what's being said here this may be a scenario we want to match stable to restore sanity (since people are using very specific "workarounds" to make things sound as they want for already ranked maps). Could you get behind that? If so I'll check this change matches stable and get it in.

@bdach
Copy link
Copy Markdown
Collaborator

bdach commented Mar 6, 2026

Bringing this back is a mostly subjective call so I'm neither firmly here or there really. You could decide to bring it back and I wouldn't really have any meaningful reasons to oppose it. Just note that lazer's special treatment of 3/4 means that some maps will not match stable anyway. And I don't even mean something in graveyard mapped 10 years ago.

One example is given in the aforementioned PR and it's https://osu.ppy.sh/beatmapsets/534385#osu/1131956:

Screenshot 2026-03-06 at 07 48 19

You could say it's a pretty pathological example in how it uses 3/4 and 4/4 timing points next to each other in an attempt to compensate for very irregular timing, but it also is in ranked...

@peppy
Copy link
Copy Markdown
Member

peppy commented Mar 6, 2026

One example is given in the aforementioned PR and it's https://osu.ppy.sh/beatmapsets/534385#osu/1131956:

This is fucked and I wish I never saw this.

@peppy peppy self-requested a review March 6, 2026 07:25
@peppy peppy force-pushed the fix-nightcore-hat-sounds branch from 4a8b055 to 0f60ab9 Compare March 6, 2026 07:33
@peppy
Copy link
Copy Markdown
Member

peppy commented Mar 6, 2026

@bdach can you link me to something explaining "lazer's special treatment of 3/4"? I guess you mean this?

case 3:
switch (beatInSegment % 6)

Also, the example you give has a tick rate of 1 which means with this PR's change it will stop playing hats (for the best i think?)

@bdach
Copy link
Copy Markdown
Collaborator

bdach commented Mar 6, 2026

can you link me to something explaining "lazer's special treatment of 3/4"?

Uh... well, stable nightcore just does not check time signature in the same way and assumes 4/4.

Support for waltz time nightcore in lazer blames back to 72404bf.

I don't have anything else to link, it's just all down to the basic fact that lazer tries to do anything different in 3/4.

Also, the example you give has a tick rate of 1 which means with this PR's change it will stop playing hats (for the best i think?)

Yeah maybe that specific example was fine, I don't recall at this time.

Copy link
Copy Markdown
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly not gonna pretend I've crosschecked this against stable, let's just get in and deal with issues as people report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Nightcore mod beats behave differently from stable

3 participants