Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PitchClass

A pitch class represents a set of pitches separated by octaves. For example, the pitch class "E" represents "E0", "E1", "E2", etc.

Pitch classes are interned. interned. This enables the use of the ECMAScript Set to implement sets of note classes.

See Wikipedia pitch class.

Hierarchy

  • PitchClass

Implements

Index

Properties

Static all

all: ReadonlyArray<PitchClass> = _.times(12).map(PitchClass.fromSemitones,)

An array of pitch classes, indexed by pitch class number [0…12].

Accessors

name

  • get name(): string

Methods

add

asPitch

  • asPitch(octave?: number): Note

asPitchClass

  • asPitchClass(): this

toString

  • toString(): string

transposeBy

Static fromMidiNumber

Static fromSemitones

Static fromString

Generated using TypeDoc