Class Note

Represents a note.


import { Note } from "@nbsjs/core";

// Instrument ID 0 is always harp
new Note(0, {
"key": 42,
"velocity": 80
});

new Note(0, {
"key": 42,
"velocity": 20,
"panning": 50
});

// Notes do not have tick information tied to them!
// This is stored within the layer's "notes" object

Properties

instrument: number = 0

ID of the instrument used by the note.

key: number = defaultNoteOptions.key

Key of the note block.

From 0 to 87. 33 to 57 is within the 2-octave limit.

0 is A0 and 87 is C8.
panning: number = defaultNoteOptions.panning

Stereo position of the note block.

From -100 to 100.

0 means center panning.
pitch: number = defaultNoteOptions.pitch

Fine pitch of the note block.

The max in Note Block Studio is limited to -1200 and +1200.

0 designates no fine-tuning. ±100 cents is a single semitone difference.
velocity: number = defaultNoteOptions.velocity

Velocity (volume) of the note block.

From 0% to 100%.

Constructors

  • Construct a new note.

    Parameters

    • instrument: number

      ID of the instrument used by the note.

    • options: NoteOptions = defaultNoteOptions

      Options for the note

    Returns Note