Open nitzanrh opened 4 years ago
osmd.rules.ArticulationPlacementFromXML = false
. We had originally always put the articulation on the opposite of the stem, because it usually looks better. But it's best to follow the XML by default.osmd.EngravingRules.TremoloStrokeScale
and osmd.EngravingRules.TremoloYSpacingScale
,
it seems 1.7 and 1.5 work well (up to 3 strokes):
osmd.EngravingRules.TremoloStrokeScale = 1.7;
osmd.EngravingRules.TremoloYSpacingScale = 1.5;
the problem is that these strokes are added from the tip of the stem towards the notehead by Vexflow, so if you have too many strokes with too much spacing, you can't fit more than 2 or 3 strokes.
Hi sschimdUT,
Thanks for your quick reply on the matter, and for pushing the fixes so quickly!
I built the js.min file from the latest Github build and I'm trying to use the new EngravingRules, but I don't see any changes in the score:
console.log("STROKES BEFORE RENDER", osmd.EngravingRules.TremoloStrokeScale)
console.log("SPACING BEFORE RENDER", osmd.EngravingRules.TremoloYSpacingScale)
osmd.EngravingRules.TremoloStrokeScale = 2.0;
osmd.EngravingRules.TremoloYSpacingScale = 2.0;
osmd.render();
console.log("STROKES AFTER RENDER", osmd.EngravingRules.TremoloStrokeScale)
console.log("SPACING AFTER RENDER", osmd.EngravingRules.TremoloYSpacingScale)
The results from console are as expected, ie 1 before the render and 2 after the render, but the tremolo strokes look the same... What am I missing?
Cheers, Nitzan
Oh, I forgot to mention the Vexflow fix file I added.
You'll have to copy src/VexFlowPatch/src/tremolo.js
(and the other files in that folder if you wish) to node_modules/vexflow/src/
.
edit: prebuild script is now done and integrated on develop.
Nope, still can't get it to work.
Just to make sure, here is what I did: I downloaded the osmd src files as mentioned here: https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/wiki/Build-Instructions I replaced the tremolo.js file with the one you provided: https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/blob/develop/src/VexFlowPatch/src/tremolo.js Then ran "npm run build"
Cheers, Nitzan
Hmm, that is strange. I added the prebuild script to develop yesterday that does the Vexflow patch for you.
Can you pull the latest develop branch again, and run npm install? (you'll need the ncp package now)
And make sure this line runs without errors:
ncp src/VexFlowPatch/src/ node_modules/vexflow/src/
npm run build
will be done automatically by npm install
.
You can also try this in our official demo, which i updated as well: https://opensheetmusicdisplay.github.io/demo/
Hi @sschmidTU ,
Thanks for your detailed post and apologies for my late reply.
Regarding tremolos: I tried it out on the demo and the YSpacing works well, however I think the StrokesScale doesn't work as I expected it to; for example if you use 0.4 the tremolo line doesn't 'go through' the beam, it barely touches it. I would expect the line to still be centred around the beam (ie the beam should pass through the middle of the tremolo line). Also, I think the tremolo lines should be thicker (see my first post for a screenshot on a different platform, or even the Wikipedia entry for tremolo). Perhaps add another Engraving rule for line width (aka thickness)? IE you would have 3 paramters for the tremolo rules: Y-spacing, length (aka scale?) and width (aka thickness). I hope this makes sense :)
Regarding ties: I managed to solve this by adding a slur instead of a tie, which I think also makes more sense from a duration point of view.
Regrading parentheses: this is very important for my application, however I understand this might not be top priority for OSMD. I can come up with a 'hacky' way of drawing the parentheses myself, but I'm kinda stuck on how to recognise them via OSMD: do you have any suggestion as to how can I 'mark' them in XML via Musescore in a way that wouldn't affect their display is OSMD but will allow me to differentiate them from the other notes?
Cheers, Nitzan
Hi there,
I'm working on implementing OSMD with a drum related app, and there are a few 'conventions' in the drum notation world that I find OSMD not supporting/not presenting properly:
Attached is the XML file: (https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/files/5251738/playbackTest.xml.zip)
Screenshot of the file rendered in OSMD
Screenshot of the file rendered in a different XML rendering software (other than ignoring the parentheses, all looks fine)
I understand that all of these are VERY specific rendering situations, as most of them are unique to the drums/percussion world. My question is whether there are any plans to fix/add any of them. If not, I would appreciate your guidance as to how to go about fixing them on my own :)
Cheers, Nitzan