Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FrettedInstrument

A fretted instrument is a string instrument that can be fretted.

This API assumes that all strings have the same number of frets, and that each string can be independently fretted. These assumptions don't actually hold for all instruments.

Fret 0 represents the open (un-fretted) string, or nut.

Hierarchy

Index

Constructors

constructor

  • new FrettedInstrument(name: string, stringPitches: Note[] | string, fretCount: number): FrettedInstrument

Properties

fretCount

fretCount: number

fretNumbers

fretNumbers: number[]

An array from [fretCount-1]. This is useful for enumerating over.

name

name: string

stringCount

stringCount: number

stringNumbers

stringNumbers: ReadonlyArray<number>

An array from [0…stringCount-1]. This is useful for enumerating over.

stringPitches

stringPitches: ReadonlyArray<Note>

Methods

forEachStringFret

  • forEachStringFret(callback: function): void

pitchAt

  • pitchAt(__namedParameters: object): Note

Generated using TypeDoc