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

Lanes core #222

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Lanes core #222

wants to merge 25 commits into from

Conversation

Purplo-cf
Copy link
Contributor

Parsing and engine support for trill and tremolo lanes on Guitar, Drums, and trill lanes on Pro Keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For Guitar and Keys, every note inside of a trill and tremolo phrase is assumed to be part of the lane. There are special considerations for drum rolls and cymbal swells where that is not always the case. Only the notes that appear the most in the phrase will get the appropriate lane flag.

Chord tremolos are still possible here if more than one note is tied for the most appearances, but kick notes will not be included in the case of a tie. Kick tremolos are only possible when kick notes are the undisputed winner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note.LaneNote is read during generic BaseEngine and TrackPlayer logic to get around instrument-specific property names. GuitarNote returns NoteMask to allow for tremolo chords.

Copy link
Contributor Author

@Purplo-cf Purplo-cf Oct 27, 2024

Choose a reason for hiding this comment

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

TotalLanes/CurrentLaneIndex keep track of how many lanes are left at the current time in the chart. If there aren't any left, then lane logic is skipped.

RequiredLaneNote is the next expected player input to extend the leniency window while lane behavior is active. This stays constant during tremolo phrases, and alternates between two values during trill phrases.

NextTrillNote and RequiredLaneNote swap values every time a player input satisfies the current RequiredLaneNote value.

LaneExpireTime is the timestamp where lane behavior will be turned off if the player does not keep inputting the RequiredLaneNote value. While CurrentTime < LaneExpireTime, overstrum inputs that are part of the lane are ignored and missed notes that are part of the lane will be counted as hits instead. This time added to the update queue while lane behavior is active so that leniency will always be turned off at the exact specified time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't handle the engine stuff, but just a suggestion: put this information in the struct as summary comments.

}

// Intercept a missed note while a lane phrase is active with allowances remaining
protected bool HitNoteFromLane(TNoteType note)
Copy link
Contributor Author

@Purplo-cf Purplo-cf Oct 27, 2024

Choose a reason for hiding this comment

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

A check for HitNoteFromLane should be included anywhere that MissNote can be called across all engines. This will call HitNote on a note that is about to be missed or skipped if it that note is part of the active lane phrase. If there is no active lane that can hit this note, the method returns false and MissNote will happen like usual.

@@ -384,12 +465,83 @@ protected virtual void MissNote(TNoteType note)
}
}

protected void SubmitLaneNote(int newNote)
Copy link
Contributor Author

@Purplo-cf Purplo-cf Oct 27, 2024

Choose a reason for hiding this comment

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

SubmitLaneNote is called from MutateStateWithInput across all engines. Once a lane has been activated, LaneExpireTime will be extended by player inputs regardless of those inputs actually hitting any notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TremoloFrontEndPercent determines how much to increase LaneExpireTime when the active lane is satisfied. This is expressed as a percentage of the current maximum frontend size. A value of 1.0 will forgive every note in the hit window. Larger values will extend the forgiveness threshold even further.

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