Options
All
  • Public
  • Public/Protected
  • All
Menu

Displays a pianoroll with pitches on the vertical axis and time on the horizontal. When connected to a player, the visualizer can also highlight the notes being currently played.

Hierarchy

  • Visualizer

Index

Constructors

Properties

Methods

Constructors

constructor

  • Visualizer constructor.

    @param sequence The NoteSequence to be visualized. @param canvas The element where the visualization should be displayed. @param config Visualization configuration options.

    Parameters

    • sequence: INoteSequence
    • canvas: HTMLCanvasElement
    • Default value config: VisualizerConfig = {} as VisualizerConfig

    Returns Visualizer

Properties

noteSequence

noteSequence: INoteSequence

Methods

redraw

  • redraw(activeNote?: INote): number
  • Redraws the entire note sequence, optionally painting a note as active

    Parameters

    • Optional activeNote: INote

      (Optional) If specified, this Note will be painted in the active color.

    Returns number

    The x position of the painted active note. Useful for automatically advancing the visualization if the note was painted outside of the screen.

Generated using TypeDoc