Thanks, still not quite sure how to implement this though.
I currently build the items in the menu using this:
const scaleList = Object.values(musicalVariable.scales).map(scale => `${scale.scaleName} - ${scale.scaleCharacter}`);
Which draws from a variable
const musicalVariable = {
scales: {
majorScale: {
countKeys: 7,
keys: [0, 2, 4, 5, 7, 9, 11],
scaleName: "major",
keysUpDn: [0, 2, 4, 5, 7, 9, 11, 9, 7, 5, 4, 2, 0],
scaleIntUp: [2, 2, 1, 2, 2, 2, 1],
scaleIntDn: [1, 2, 2, 2, 1, 2, 2],
scaleIntUpDn: [2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2],
relativeNoteCOffset: 0,
isMode: false,
scaleCharacter: "\n The major scale is bright, happy, and uplifting, often used in various genres of music including pop, classical, and jazz. It forms the basis for many harmonic and melodic structures."
},
//way more scales below this...
You can see that the scaleList
is built using the code above to become major - \n The major scale is bright, happy, and...etc
and I have successfully populated the menu with scaleList
from my custom module using a listener in the values
field of the widget
But this seems to ignore the \n