API: live tone API - DBC-Works/live-tone GitHub Wiki

Properties

Functions

  • registerPlaying(playing: Stoppable): void
  • start(): void
  • setBpm(bpm: number): void

Scale object

Classes

ScaleInfo

  • get name(): string
  • get rawNotes(): readonly string[]
  • notes(key: string, octave: number, range: number = 1): readonly string[]

Ary object

Functions

  • makeShuffled<T>(array: readonly T[]): readonly T[]
  • choose<T>(array: readonly T[]): T

Itr object

Functions

  • fromFirst<T>(array: readonly T[]): Generator<T>
  • fromLast<T>(array: readonly T[]): Generator<T>
  • roundTrip<T>(array: readonly T[], fromFirst: boolean = true): Generator<T>
  • shuffle<T>(array: readonly T[]): Generator<T>
  • random<T>(array: readonly T[]): Generator<T>

Nmb object

Functions

  • randomNumber(n: number): number
  • randomInRange(begin: number, end: number): number
  • oneIn(n: number): boolean

Chr object

Functions

  • chord(root: string, type: string): string[]
  • majorDiatonicChords(root: string): Array<string[]>
  • naturalMinorDiatonicChords(root: string): Array<string[]>
  • harmonicMinorDiatonicChords(root: string): Array<string[]>
  • melodicMinorDiatonicChords(root: string): Array<string[]>
⚠️ **GitHub.com Fallback** ⚠️