Turn a motif cell into note events.
A MotifNote already carries the NoteEvent fields, but a cell wraps them in an object; this unwraps it, so a motif can be humanized, grooved, or written out like any other line.
The motif to convert.
The cell's notes, copied, in the order they are stored.
import { generateMotif, humanize, majorKey, motifToNoteEvents } from '@libraz/libcantus';humanize(motifToNoteEvents(generateMotif({ key: majorKey(0), bars: 2 }))); Copy
import { generateMotif, humanize, majorKey, motifToNoteEvents } from '@libraz/libcantus';humanize(motifToNoteEvents(generateMotif({ key: majorKey(0), bars: 2 })));
Turn a motif cell into note events.
A MotifNote already carries the NoteEvent fields, but a cell wraps them in an object; this unwraps it, so a motif can be humanized, grooved, or written out like any other line.