Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 22:25
    sschmidTU commented #507
  • Jan 16 22:24
    sschmidTU edited #1125
  • Jan 16 22:21
    sschmidTU edited #1125
  • Jan 16 22:20
    sschmidTU edited #1125
  • Jan 16 22:19
    sschmidTU edited #1125
  • Jan 16 22:17
    sschmidTU commented #507
  • Jan 16 22:16
    sschmidTU edited #1125
  • Jan 16 22:15
    sschmidTU edited #1125
  • Jan 16 22:10
    sschmidTU commented #507
  • Jan 16 22:10
    sschmidTU commented #507
  • Jan 16 22:10
    sschmidTU commented #507
  • Jan 16 22:09
    sschmidTU commented #507
  • Jan 16 22:08
    sschmidTU commented #507
  • Jan 16 21:57
    rvilarl commented #507
  • Jan 16 13:21

    sschmidTU on develop

    fix beams not colored like stem… (compare)

  • Jan 16 13:02
    sschmidTU edited #1125
  • Jan 16 13:01
    sschmidTU commented #507
  • Jan 16 12:11
    sschmidTU edited #1125
  • Jan 16 12:10

    sschmidTU on develop

    fix ledger lines not colored in… (compare)

  • Jan 16 11:58
    sschmidTU edited #1125
Simon
@sschmidTU
second: not sure, would be a general javascript thing.
you must be loading extremely large scores, it should generally not take more than a few seconds.
2 replies
for very large scores, you could split them into multiple pages on multiple OSMD instances using the draw* options. would require a bit of setup though.
3 replies
processing time is 90% Vexflow, so there isn't much we can do except rendering less.
there is a performance optimization mode in the early access (sponsor) version, which is currently being tested, and especially effective for large scores.
Simon
@sschmidTU
A good practice is greying out the UI (or something similar) while the UI thread is busy, so that the user knows the UI is unresponsive.
5 replies
anseldu
@anseldu
How can I get the notes playing under the current cursor?
Simon
@sschmidTU
@anseldu osmd.cursor.NotesUnderCursor()
FaceBlack
@rianlu
I have a question, does anyone know how to deal with it?
The treble clef is displayed at the beginning of the score, and then there is a treble clef at the end of the 8th bar. Normally, the 9th bar should be the treble clef, but when I cut from the 9th bar, he The treble and bass clef is still displayed.
image.png
image.png
Simon
@sschmidTU
@rianlu can you share a sample?
FaceBlack
@rianlu
@sschmidTU
Simon
@sschmidTU
I took a look at it, but it's not easy to solve, it results from the way key instructions are saved and looked up when you select which measures to draw (start drawing from measure 9). it's better to submit an issue on github for complex problems like this. and please add the sample.
FaceBlack
@rianlu
Ok, thanks!
vivachenx
@vivachenx

I have a question, does anyone know how to deal with it?

AudioPlayer function is not available on the mobile (iOS Android), no sound

@sschmidTU Can you give me permission for the sponsor exclusive channels ?
Simon
@sschmidTU
@vivachenx see DM. About the audio player function, it should work on Android, I tested it. In which browser doesn't it work?
On iOS, unfortunately there are currently issues with audio playback in the browser. The audio library we use has problems with iOS playback as well. At the moment, it doesn't look like there is a simple fix, unfortunately. Maybe we have to wait for a iOS/Safari update, because on a Macbook, it also doesn't work in Safari, but it works in Firefox and Chrome.
I opened an issue for it here:
opensheetmusicdisplay/osmd-extended#38
Luc Bonnin
@lucbonnin
Hi everyone.
I'm new to OSDM but I've 2 (I guess) easy question :
1- is there a way to draw vexFlow canvas on a single infinite line ?
2- is there a way to catch a js event when each note are drawn ? (so that we can add stuff on the DOM on our own code, out of the canvas and music score such as note name A4/La)
FaceBlack
@rianlu
@lucbonnin Add this to setOptions: renderSingleHorizontalStaffline: true
Luc Bonnin
@lucbonnin
Thanks. For the 2nd question do you have any clue?
Simon
@sschmidTU
@lucbonnin Hi! There is no event for note drawing, but you can still manipulate the DOM and add things when using SVG. Simply get a (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.
Luc Bonnin
@lucbonnin
@sschmidTU cool. If I can navigate through the dom, extract each "SVGElement" data (such as pitch detail, like "A4#", I will be able to do my stuff)
I'll give it a try as I was not using OSDM until I realize drawing music score from an XML file and keeping all these drawings and details that a musician need to play, is not easy at all and very time consuming, so better give it a gtry to OSDM that should work like a charm
Simon
@sschmidTU
@lucbonnin one more tip, for extracting musical data, i would use OSMD's data model, not the SVG. I don't think the SVG can tell you the pitch ("A4#"). Instead, try something like osmd.graphic.measureList[0][0].staffEntries[1].graphicalVoiceEntries[0].notes[0].vfnote or graphicalnote.sourceNote.Pitch.getHalfTone()
vivachenx
@vivachenx
image.png
I want to display the music score on my phone, but it is too crowded, and each line can only display very little content, I want to know what API can adjust these
FaceBlack
@rianlu
set osmd.zoom and osmd.render()?
vivachenx
@vivachenx
Actually I don’t want the zoom effect, I want to increase the width of a bar a bit
But I don’t know which API can adjust this
Simon
@sschmidTU
@vivachenx Decreasing the zoom (e.g. osmd.zoom = 0.5) is a decent way of getting more sheet music on the screen.
I'm confused about you wanting "to increase the width of a bar a bit", that seems contrary to your goal of getting more sheet music on the screen.
Unfortunately it's not easy to increase the width of a specific measure, maybe we could add an option for that. What does the measure look like? In EngravingRules, there are some options to add more padding/spacing for specific elements in a measure or certain measures like PickupMeasureWidthMultiplier.
vivachenx
@vivachenx
@sschmidTU Hello Simon, Thank you for your answer.
In fact, I need both of these functions. I want to increase the spacing between notes or the width of bars, because in some cases, the notes are too crowded, and there may be overlaps.
image.png
like this
Simon
@sschmidTU
that looks really weird, i'm not sure why the measures are that cramped. can you share the musicxml?
Simon
@sschmidTU
also, was that rendered on a phone?
vivachenx
@vivachenx
Yes i rendered it on my phone
And i have set drawingParameters: "compacttight"
Simon
@sschmidTU
image.png
Okay, well, compacttight can be problematic with spacing, especially on such a narrow screen.
After setting compacttight mode, try adjusting the parameters it sets (see above):
VoiceSpacingMultiplierVexflow
VoiceSpacingAddendVexflow
You should try increasing them a bit, e.g. 0.8 and 3.0.
Simon
@sschmidTU
@vivachenx or even more, until the spacing is big enough.
vivachenx
@vivachenx
Thanks. Let me try
vivachenx
@vivachenx
@sschmidTU Thank you very much simon, it works
I have another question, if I don't want to render any content related to the tempo tag on the page, how should I set it up, or modify the source code
image.png
The part of the red box in the picture above
Simon
@sschmidTU
@vivachenx You can disable metronome marks / tempo indications like this: osmd.rules.MetronomeMarksDrawn = false
(in Typescript, use osmd.EngravingRules)
vivachenx
@vivachenx
@sschmidTU Thanks, I tried it, it works
Ansel Du
@anseldu_gitlab

@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 :)

}