Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:11
    GimmeSomeJazz commented #1280
  • 07:04
    joshstovall commented #1280
  • Nov 28 11:19
    GimmeSomeJazz commented #1280
  • Nov 28 11:03
    sschmidTU labeled #1280
  • Nov 28 11:03
    sschmidTU commented #1280
  • Nov 28 10:58
    GimmeSomeJazz opened #1280
  • Nov 24 18:05
    sschmidTU edited #1278
  • Nov 24 18:05
    sschmidTU edited #1278
  • Nov 24 17:41

    sschmidTU on develop

    fix(Tempo): Increase TempoYSpac… (compare)

  • Nov 24 16:52

    sschmidTU on fermata-inverted-placement

    (compare)

  • Nov 24 16:50
    sschmidTU closed #1278
  • Nov 24 16:50

    sschmidTU on develop

    fix(Fermata): Fix inverted ferm… (compare)

  • Nov 24 16:50
    sschmidTU closed #1279
  • Nov 24 16:49
    sschmidTU edited #1279
  • Nov 24 16:39
    sschmidTU edited #1279
  • Nov 24 16:39
    sschmidTU edited #1279
  • Nov 24 16:38
    sschmidTU assigned #1279
  • Nov 24 16:38
    sschmidTU opened #1279
  • Nov 24 16:35

    sschmidTU on fermata-inverted-placement

    fix fermata inverted placement,… (compare)

  • Nov 24 16:33
    sschmidTU labeled #1278
Hallvord R. M. Steen
@hallvors
If I have a MusicXML-file OSMD won't render but MuseScore will, do you want a bug report? Quite likely I have made a mistake somewhere in the file, I have done some editing by hand..
(Also, feel free to ignore the stroke and fill question - I'll use CSS filters for my styling needs :) )
Simon
@sschmidTU
I'll see if we can restrict width only but not height in the script.
sure, you can send a bug report, though it's easy to make some mistakes in the XML that MuseScore will tolerate but we won't.
phamconganh
@phamconganh
image.png
@sschmidTU can I hide the note word?
phamconganh
@phamconganh
@sschmidTU one more thing! Can I create a custom cursor and add some cursor?
Hallvord R. M. Steen
@hallvors
I added !pageWidth>0 to the if before setting pageWidth to 1440, it worked but I don't know if it's the best way to fix it: if (endlessPage && !pageWidth > 0) {
Simon
@sschmidTU
@hallvors yes, i believe that should do it.
Simon
@sschmidTU
@phamconganh you mean the letters? i don't know where those come from, maybe they are ChordSymbols. have you tried osmd.rules.RenderChordSymbols = false?
otherwise please share a MusicXML sample.
@phamconganh you can try creating a new cursor yourself. there will also be osmd.rules.DefaultColorCursor in osmd 0.9.3
phamconganh
@phamconganh
@sschmidTU
<direction placement="above">
<direction-type>
<words>G</words>
</direction-type>
<staff>1</staff>
</direction>
this is a sample. In your demo, it is "CharlesGounod_Meditation.xml" file
phamconganh
@phamconganh
image.png
@sschmidTU i try "osmd.rules.RenderChordSymbols = false" and it does not change.
Simon
@sschmidTU

@phamconganh that is a weird MusicXML sample.
you can't easily remove these "words" expressions yet,
we can create an EngravingRule for that soon,
but you can try something like this after osmd.load():

removeUnknownExpressions() {
    for (let i: number = 0; i < osmd.graphic.ParentMusicSheet.SourceMeasures.length; i++) {
        const sourceMeasure: SourceMeasure = osmd.graphic.ParentMusicSheet.SourceMeasures[i];
        for (let j: number = 0; j < sourceMeasure.StaffLinkedExpressions.length; j++) {
            if (!this.graphicalMusicSheet.MeasureList[i] || !this.graphicalMusicSheet.MeasureList[i][j]) {
                continue;
            }
            for (let k: number = 0; k < sourceMeasure.StaffLinkedExpressions[j].length; k++) {
                sourceMeasure.StaffLinkedExpressions[j][k].unknownList = [];
            }
        }
    }
}

but i haven't tested this. this is modified from MusicSheetCalculator.calculateMoodAndUnknownExpressions().

rvilarl
@rvilarl
In the sources there are some changes apply to vexflow (vexflowpatch). Would it make sense to include the sources of vexflow into osmd rather than vexflowpatch and decide what to update from vexflow or what to patch?
rvilarl
@rvilarl
In the sources there is only one reference to process.env: "public drawableBoundingBoxElement: string = process.env.DRAW_BOUNDING_BOX_ELEMENT;" would it make sense to replace that by an option in IOSMDOptions?
rvilarl
@rvilarl
I made a prototype to support several cursors simustaneously with different colors and types. How would you suggest to approach the implementation of their configuration as additional parameters in the constructor of OpenSheetMusicDisplay(I did it this way): "constructor(container: string | HTMLElement, cursorColors: string[], cursorTypes: number[], options: IOSMDOptions = OSMDOptions.OSMDOptionsStandard())" or with additional IOSMDOptions?
Simon
@sschmidTU

@rvilarl

In the sources there are some changes apply to vexflow (vexflowpatch). Would it make sense to include the sources of vexflow into osmd rather than vexflowpatch and decide what to update from vexflow or what to patch?

No, or I don't understand. Adding all vexflow classes that we don't patch is unnecessary, and would make it hard to see what we patched in vexflow.

In the sources there is only one reference to process.env: "public drawableBoundingBoxElement: string = process.env.DRAW_BOUNDING_BOX_ELEMENT;" would it make sense to replace that by an option in IOSMDOptions?

No, that is only used for continuous integration testing anyways, and i think it's currently mostly unused.

I made a prototype to support several cursors simustaneously with different colors and types. How would you suggest to approach the implementation of their configuration as additional parameters in the constructor of OpenSheetMusicDisplay(I did it this way): "constructor(container: string | HTMLElement, cursorColors: string[], cursorTypes: number[], options: IOSMDOptions = OSMDOptions.OSMDOptionsStandard())" or with additional IOSMDOptions?

It's great you made a prototype able to show multiple cursors!
However, i would avoid bloating the constructor, and i would simply add methods to add cursors. Maybe even locate these methods in the cursor class instead of OpenSheetMusicDisplay. Alternatively, cursorColors and cursorTypes could easily be integrated into IOSMDOptions.

it may make sense to remove the process.env usage, but since it isn't used for anything right now, it seems unimportant.
actually, our demo/index.js uses process.env.STATIC_FILES_SUBFOLDER as well.
Simon
@sschmidTU
karma.conf.js uses it as well (testing, npm test)
rvilarl
@rvilarl
Sorry I did only look into the src directory which is the one that I integrated in my app.
Simon
@sschmidTU
@rvilarl when you feel the code is clean enough for a first look, feel free to submit a pull request, and we can review the code together and try to get it into OSMD.
no problem!
rvilarl
@rvilarl
Simon you probably already realised that I am making trials with vexflow 3.0.9. I am surprised that in combination with osmd the alignment of the voices containing rests is not working properly. I have made a simple try using native vexflow and I do get them aligned. Could you provide a hint?
I will make a pull request with the cursors topic. :)
Simon
@sschmidTU
the formatter in vexflow 3.0.9 seems to be erratic, that's why we haven't switched yet, see #915.
there were a few discussions on vexflow recently and some pull requests merged to fix some formatting issues a few days ago, but i would guess that it isn't quite there yet.
rvilarl
@rvilarl
I know, but I do get the first compass of "Prelude_and_Fugue_in_Cmajor-_J._S._Bach.mxl" from Musescore with native vexflow and this is not the case with osmd. I use formatter.format rather than formatter.formatToStave as osmd does.
rvilarl
@rvilarl
Please ignore the last comment I was using 1.2.93 with native vexflow. I will post this issue in vexflow.
By the way the fix #971 makes the Prelude in E Minor from Chopin look much better, thank you!
Simon
@sschmidTU
yes, that was bugging me as well, glad to hear, my pleasure :)
rvilarl
@rvilarl
Hi Simon, I have made a pull request with the multiple cursors. First time I do that with Github, hopefully fine. If you like the proposal I will look into fixing the testing.
rvilarl
@rvilarl
I have fixed the testing and eslint issues :)
Simon
@sschmidTU
nice! will take a look at it asap.
rvilarl
@rvilarl
Hi, is the lack of pedal marks a matter of priority or a matter of complexity
Simon
@sschmidTU
it's probably rather priority. I just saw that Vexflow does support pedal marks, even in 1.2.93, for some reason i wasn't sure about that.
But yes, pedal marks would be great to implement, and probably not too difficult.
The only big problem might be avoiding collisions with other elements, since it crowds the score even more. So we might need to improve our positioning / collision detection system to avoid those.
rvilarl
@rvilarl
Where should I find the pedals within OpenSheetMusicDisplay class?
Simon
@sschmidTU
there are no pedals / pedal marks in OSMD yet
rvilarl
@rvilarl
So they are not even read from MusicXML files? It is not only a problem of rendering, right?
Simon
@sschmidTU
yes, we don't need to read them if we don't render them. but reading them would be very easy.
rvilarl
@rvilarl
Hi Simon, I am sure that it is easy, but a hint on a similar change would help me. I had been debuging MusicSheetReader and I got to the specific direction "pedal" but I do not have a clue where to place the information within OpenSheetMusicDisplay, and this is just reading.
phamconganh
@phamconganh
@sschmidTU how to getNoteHeadBeginX and getNoteHeadEndX and getBoundingBox or other position properties
as in vexflow, we can get all of them inside note, but osmd can't get them
phamconganh
@phamconganh
image.png
@sschmidTU can i get Size and Position of VerticalGraphicStaffEntryContainer and each of its childrent
Simon
@sschmidTU
@phamconganh you can get graphicalnote.PositionAndShape.AbsolutePosition.x and PositionAndShape.Size.
@rvilarl not enough information, not sure what you're doing or trying to do.
Simon
@sschmidTU
the xml reading code for pedals should probably be in InstrumentReader, similar to octave-shift maybe.
Simon
@sschmidTU
or similar to expressions (forte etc), though the expressions code is a bit complex