When I change the clef from "treble" to "bass" in my score, the notes remain on the same line and spaces and are therefore not accurate in the new clef.
Ok, so after googling around I figured out that I need to add the clef key to StaveNote initialization, but it would be nice have that in the documentation somewhere.
You are correct, including Clef elements does not impact the StaveNotes in the voice. You must manually provide the StaveNote with the expected clef on construction.
So to make a note in bass clef:
const noteInBassClef = new Vex.Flow.StaveNote({
clef: 'bass',
keys: ['c/4'],
duration: '4'
});
That's really too bad, it would be AWESOME if the notes were universal, and the staff's clef defined how notes were drawn; ESPECIALLY if you could change the clef dynamically (which you cant, bleh), and the notes updated automatically.