(vexflow)graphicalnote.getSVGGElement()
and you can manipulate it. That's what others do, like for changing the color of notes without re-rendering, and noone has seemed to need events for that so far.
osmd.graphic.measureList[0][0].staffEntries[1].graphicalVoiceEntries[0].notes[0].vfnote
or graphicalnote.sourceNote.Pitch.getHalfTone()
osmd.zoom = 0.5
) is a decent way of getting more sheet music on the screen.EngravingRules
, there are some options to add more padding/spacing for specific elements in a measure or certain measures like PickupMeasureWidthMultiplier
.
VoiceSpacingMultiplierVexflow
VoiceSpacingAddendVexflow
@anseldu
osmd.cursor.NotesUnderCursor()
thanks very much! Simon @sschmidTU
another question is here ~~:)~ :
where can I get complete parameter list when I create the osmd object?
such as:
this.osmd = new OpenSheetMusicDisplay(this.$refs.scorediv,
{
followCursor: true,
autoResize: false,
backend: "svg", // svg or canvas : backendType{0,1}
drawFromMeasureNumber: 1,
drawUpToMeasureNumber: Number.MAX_SAFE_INTEGER,
drawingParameters: "compact",
drawPartNames: false,
MetronomeMarksDrawn: false,
...
// Complete parameter list, preferably with parameter explanation :)
}
osmd.EngravingRules.FingeringTextSize = 2.0
), though not all of the EngravingRules are meant to be modified:@anseldu_gitlab also, take a look at our Wiki:
https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/wiki
thank u verry much! and another question: when will be available ---> play back a metronome together with the music (with pre-count) ?
@lucbonnin Hi, first of all, you can use iterator.CurrentVoiceEntries directly:const currentTopNote = osmd.cursor.Iterator.currentVoiceEntries[0].notes[0];
To get a GraphicalNote from Note:const gNote = osmd.rules.GNote(currentTopNote);
gnote.getSVGGElement()
It's even easier if you're using a cursor and not just an iterator:osmd.cursor.GNotesUnderCursor()[0].getSVGGElement()
@sschmidTU Thank you for your work, this is a very useful api ! Helped me solve a big problem
thank you very much, glad to hear! :)
Other questions. 2 easy one I guess :
1- spacingBetweenTextLines seems to not adding spaces between 2 lines of notes. (I'm using it as osmd.setOption() before rendering. (and after this setOptions I'm using a osmd.zoom = 1.2 (not sure if it is perturbing something here)
2- I've tried to use the transpose calculator from the demo sample but it seems to not work at all on my local :( Seems to not transpose anything. + while parsing the data using osmd.cursor, I got the same "pitch.toString()" displayed. Maybe I'm using the wrong data or missing something
osmd.EngravingRules.MinimumDistanceBetweenSystems
. A system in a music sheet is what you would usually call a line, and a "line break" is more properly called a system break (new-system in MusicXML)VoiceSpacingMultiplierVexflow
or VoiceSpacingAddendVexflow
in EngravingRules though to increase spacing in general.