SmoNote contains the pitch and duration of a note or chord. It can also contain arrays of modifiers like lyrics, articulations etc. Also information about the beaming, flag etc.

### Hierarchy

- SmoNote

### Implements

- Transposable

## Index

### Constructors

- constructor

### Accessors

- isTuplet
- defaults
- parameterArray

### Methods

- addDynamic
- addLyric
- addPitchOffset
- getModifiers
- makeHidden
- removeDynamic
- toggleAddPitch
- toggleArticulation
- toggleFlagState
- toggleOrnament
- transpose
- addPitchOffset
- clone
- deserialize
- sortPitches
- toggleEnharmonic

## Constructors

### constructor

- new SmoNote(params: SmoNoteParams): SmoNote

- - Defined in src/smo/data/note.ts:80

  #### Parameters

  - ##### params: SmoNoteParams

  #### Returns SmoNote

## Accessors

### isTuplet

- get isTuplet(): boolean

- - Defined in src/smo/data/note.ts:497

  Return true if this note is part of a tuplet

  #### Returns boolean

### Static defaults

- get defaults(): SmoNoteParams

- - Defined in src/smo/data/note.ts:144

  Default constructor parameters. We always return a copy so the caller can modify it

  #### Returns SmoNoteParams

### Static parameterArray

- get parameterArray(): string[]

- - Defined in src/smo/data/note.ts:137

  used in serialization

  internal

  #### Returns string[]

## Methods

### addDynamic

- addDynamic(dynamic: SmoDynamicText): void

- - Defined in src/smo/data/note.ts:225

  Add a new dynamic to thisnote

  #### Parameters

  - ##### dynamic: SmoDynamicText

  #### Returns void

### addLyric

- addLyric(lyric: SmoLyric): void

- - Defined in src/smo/data/note.ts:263

  Add a lyric to this note, replacing another in the same verse

  #### Parameters

  - ##### lyric: SmoLyric

  #### Returns void

### addPitchOffset

- addPitchOffset(offset: number): void

- - Defined in src/smo/data/note.ts:451

  Add another pitch to this note at `offset` 1/2 steps

  #### Parameters

  - ##### offset: number

  #### Returns void

### getModifiers

- getModifiers(type: string): SmoNoteModifierBase[]

- - Defined in src/smo/data/note.ts:240

  Get all note modifiers of a type, either a lyric or a dynamic

  #### Parameters

  - ##### type: string

    ctor

  #### Returns SmoNoteModifierBase[]

### makeHidden

- makeHidden(val: boolean): void

- - Defined in src/smo/data/note.ts:489

  set note opacity on/off

  #### Parameters

  - ##### val: boolean

  #### Returns void

### removeDynamic

- removeDynamic(dynamic: SmoDynamicText): void

- - Defined in src/smo/data/note.ts:232

  Remove the dynamic from this note.

  #### Parameters

  - ##### dynamic: SmoDynamicText

  #### Returns void

### toggleAddPitch

- toggleAddPitch(pitch: Pitch): void

- - Defined in src/smo/data/note.ts:550

  used to add chord and pitch by piano widget

  #### Parameters

  - ##### pitch: Pitch

  #### Returns void

### toggleArticulation

- toggleArticulation(articulation: SmoArticulation): void

- - Defined in src/smo/data/note.ts:376

  Toggle the ornament up/down/off

  #### Parameters

  - ##### articulation: SmoArticulation

  #### Returns void

### toggleFlagState

- toggleFlagState(): void

- - Defined in src/smo/data/note.ts:175

  Up, down auto (tri-state)

  #### Returns void

### toggleOrnament

- toggleOrnament(ornament: SmoOrnament): void

- - Defined in src/smo/data/note.ts:361

  Toggle the ornament up/down/off

  #### Parameters

  - ##### ornament: SmoOrnament

  #### Returns void

### transpose

- transpose(pitchArray: number[], offset: number, originalKey: string, destinationKey: string): Transposable

- - Defined in src/smo/data/note.ts:543

  transpose a note or grace note to a key-friendly enharmonic

  #### Parameters

  - ##### pitchArray: number[]

  - ##### offset: number

  - ##### originalKey: string

    keySignature from original note

  - ##### destinationKey: string

    keySignature we are transposing into

  #### Returns Transposable

### Static addPitchOffset

- addPitchOffset(note: Transposable, offset: number): void

- - Defined in src/smo/data/note.ts:437

  Add another pitch to this note at `offset` 1/2 steps

  #### Parameters

  - ##### note: Transposable

  - ##### offset: number

  #### Returns void

### Static clone

- clone(note: SmoNote): SmoNote

- - Defined in src/smo/data/note.ts:609

  Copy the note, give it unique id

  #### Parameters

  - ##### note: SmoNote

  #### Returns SmoNote

### Static deserialize

- deserialize(jsonObj: any): SmoNote

- - Defined in src/smo/data/note.ts:665

  restore note modifiers and create a SmoNote object

  #### Parameters

  - ##### jsonObj: any

  #### Returns SmoNote

### Static sortPitches

- sortPitches(note: Transposable): void

- - Defined in src/smo/data/note.ts:397

  Sort pitches in pitch order, Vex likes to receive pitches in order

  #### Parameters

  - ##### note: Transposable

  #### Returns void

### Static toggleEnharmonic

- toggleEnharmonic(pitch: Pitch): Pitch

- - Defined in src/smo/data/note.ts:524

  cycle through the list of enharmonics for this note.

  #### Parameters

  - ##### pitch: Pitch

  #### Returns Pitch

Generated using TypeDoc