let textVoiceTickables = []
// Add the scale name as text via an extra voice
let scaleNameText = new Vex.Flow.TextNote({
text: scaleName, // "scaleName" retrieved from tonal.js, saved in Vuex
font: {[...]},
duration: 'w' // WHOLE NOTE
})
.setLine(2)
.setStave(currStaff)
.setJustification(Vex.Flow.TextNote.Justification.LEFT)
textVoiceTickables.push(scaleNameText)
// Add empty text notes for the remaining duration (up to 48 quater notes)
for (let i = 0; i < 44; i++) {
const ghost = new Vex.Flow.TextNote({ text: '', duration: 'q' }) // QUATER NOTES
ghost.setLine(2)
ghost.setStave(currStaff)
ghost.setJustification(Vex.Flow.TextNote.Justification.LEFT)
textVoiceTickables.push(ghost)
}
const voiceForScaleNameText = new Vex.Flow.Voice({ num_beats: 48, beat_value: 4, resolution: Vex.Flow.RESOLUTION })
voiceForScaleNameText.addTickables(textVoiceTickables)
voiceForScaleNameText.setStave(currStaff)