Track

The notes written for one channel of the chip, in the order they start. A track with a loop repeats that stretch for as long as the song plays.

Import

import { Track } from '@halleyfante/chiptune';

A track that loops

Constructor

new Track({ notes: readonly Note<Settings>[], loop?: Loop })
OptionDescription
notesIn the order they start.
loopLeft out for a track that plays once.

Properties

NameTypeDescription
notesreadonly Note<Settings>[]
loopLoop | undefined
lengthnumberIn ticks: up to the end of the loop when the track loops, and up to the end of its last note otherwise.