Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • IGrid

Implemented by

Index

Properties

Readonly data

data: readonly ITile[]

Readonly height

height: number

The height of the grid in tiles

Readonly width

width: number

The width of the grid in tiles

Methods

clearAllTiles

  • clearAllTiles(): void

Optional dispose

  • dispose(): void

getPlayheadX

  • getPlayheadX(): number
  • Get the x position on the grid where the playhead currently is

    Returns number

    The x position

getTileValue

  • getTileValue(x: number, y: number, instrument?: number): boolean
  • Gets whether a grid tile is currently lit up (armed)

    Parameters

    • x: number

      The x position, measured in grid tiles

    • y: number

      The y position, measured in grid tiles

    • Optional instrument: number

    Returns boolean

    Whether the tile is lit up

setMuted

  • setMuted(muted: boolean): void
  • Sets whether the ToneMatrix grid is muted.

    Parameters

    • muted: boolean

      True for muted, false for unmuted

    Returns void

setSize

  • setSize(newWidth?: number, newHeight?: number, newNoteLength?: null | number | typeof DEFAULT): void
  • Update the size of the grid. Note: If shrinking, tiles outside the space of new grid may be lost

    Parameters

    • Optional newWidth: number

      New width in tiles

    • Optional newHeight: number

      New height in tiles

    • Optional newNoteLength: null | number | typeof DEFAULT

      New note length. If not set, use previous value, or recalculate the default if using the default value previously. If using the DEFAULT symbol explicitly recalculate the default.

    Returns void

setTileValue

  • setTileValue(x: number, y: number, bool: boolean, instrument?: number): void
  • Sets whether a grid tile is currently lit up (armed)

    Parameters

    • x: number

      The x position, measured in grid tiles

    • y: number

      The y position, measured in grid tiles

    • bool: boolean

      Whether the tile should be turned on (true) or off (false)

    • Optional instrument: number

    Returns void

Optional update

  • update(): void

Generated using TypeDoc