Skip to content

ChartRecording

namespace Griff.Modules.Rhythm;
public static class ChartRecording

Turns what was tapped along to a song into a chart’s notes: each press at the beat the player heard it (the song as it had reached the speakers, less the player’s audio offset, by the lanes’ tempo and first beat), snapped to the grid; a key held down for half a beat or more is a hold to where it was let go, snapped too.

public static List<ChartNote> Notes(IEnumerable<ChartTap> taps, ChartTiming timing, ChartSnap snap, double audioOffset, double from = -Infinity, int lanes = 2147483647)

The notes taps make, earliest first (then by lane): each pressed at the beat it was heard on, allowing for audioOffset (milliseconds the player hears the sound late), snapped to snap; those snapping before from (the beat recording started at) or into a lane past lanes are left out, and two in a lane on one beat are one (the longer hold).

public static double Round(double beat)

A beat to four places, as a chart keeps it.

public const double HoldAtLeast

A press held at least this many beats is a hold note; a shorter one is a tap.