RPE Chart Utils
    Preparing search index...

    Function removeNotes

    • Remove all notes from a line that satisfy a predicate.

      line.numOfNotes is updated to the surviving count.

      Parameters

      • chart: RpeJson

        The RPE chart (modified in place).

      • lineIndex: number

        Index of the target line.

      • predicate: (note: Note, index: number) => boolean

        Return true for each note that should be removed.

      Returns Note[]

      Array of removed notes (in original order).

      // Remove all fake notes from line 0
      removeNotes(chart, 0, note => note.isFake === 1);

      // Remove all flick notes
      removeNotes(chart, 0, note => note.type === 3);