RPE Chart Utils
    Preparing search index...

    Class NoteBuilder

    Fluent wrapper around a single Note.

    Provides property setters that return this for chaining and a .toLine() method to navigate back to the containing line.

    new NoteBuilder(chart, 0, 0)
    .setX(50)
    .setSpeed(1.5)
    .setTint([255, 128, 0])
    .setAlpha(200);
    Index

    Constructors

    Properties

    chart: RpeJson
    lineIndex: number
    noteIndex: number

    Accessors

    Methods

    • Set note type (1=Tap, 2=Hold, 3=Flick, 4=Drag).

      Parameters

      • type: 1 | 2 | 3 | 4

      Returns this

    • Set the X position.

      Parameters

      • x: number

      Returns this

    • Translate the X position by dx.

      Parameters

      • dx: number

      Returns this

    • Set which side of the line the note is on (1 = above, 2 = below).

      Parameters

      • side: 1 | 2

      Returns this

    • Flip the note to the other side.

      Returns this

    • Set the note speed multiplier.

      Parameters

      • speed: number

      Returns this

    • Scale the note speed by a factor.

      Parameters

      • factor: number

      Returns this

    • Set the visual size multiplier.

      Parameters

      • size: number

      Returns this

    • Scale the note size by a factor.

      Parameters

      • factor: number

      Returns this

    • Set the opacity (0–255).

      Parameters

      • alpha: number

      Returns this

    • Set whether the note is fake (non-scoring).

      Parameters

      • fake: boolean

      Returns this

    • Set the Y offset.

      Parameters

      • y: number

      Returns this

    • Set the judge area multiplier (RPE standard hitbox multiplier).

      Parameters

      • size: number

      Returns this

    • Set the explicit judge size (PhiZone Player extension). Overrides judgeArea when present. Pass undefined to remove it.

      Parameters

      • size: number | undefined

      Returns this

    • Set the Z-index rendering override. Pass undefined to remove it.

      Parameters

      • z: number | undefined

      Returns this

    • Set the Z-index for the hit-effect sprites. Pass undefined to remove it.

      Parameters

      • z: number | undefined

      Returns this

    • Set the note's start beat. Also shifts the end beat for hold notes if they would become invalid.

      Parameters

      • beat: number

      Returns this

    • Set the note's end beat (only meaningful for Hold notes, type=2). Must be >= the note's start beat.

      Parameters

      • beat: number

      Returns this

    • Set the visible time (beats before hit that the note appears).

      Parameters

      • time: number

      Returns this

    • Set a custom hitsound.

      Parameters

      • hitsound: string

      Returns this

    • Set the tint color [r, g, b] or null to clear.

      Parameters

      • color: [number, number, number] | null

      Returns this

    • Set the hit-effects tint color [r, g, b] or null to clear.

      Parameters

      • color: [number, number, number] | null

      Returns this

    • Move the note's start beat by beatOffset. For hold notes, the end beat is also shifted by the same amount.

      Parameters

      • beatOffset: number

      Returns this

    • Set the hold duration in beats (only meaningful for type-2 hold notes). The end beat is calculated as startBeat + duration.

      Parameters

      • durationBeats: number

      Returns this

    • Remove this note from its line. After calling this, the builder is invalidated — do not call further methods.

      Returns Note | undefined

      The removed Note data.