Note
One sound of a track: a pitch held for a stretch of ticks, together with what the channel that plays it needs to know to sound it.
Import
import { Note } from '@halleyfante/chiptune';Playing a note
Constructor
new Note({ frequency: number, start: number, length: number, settings: Settings })| Option | Description |
|---|---|
frequency | In hertz. |
start | In ticks from the beginning of the track. |
length | In ticks. |
settings | How the channel that plays the note should sound it. |
Properties
| Name | Type | Description |
|---|---|---|
frequency | number | |
start | number | |
length | number | |
settings | Settings | |
end | number | The first tick after the note. |
key | number | Counted as in MIDI, where 60 is middle C and 69 is the A at 440 hertz. An old chip plays slightly out of tune, so this is the nearest key. |