Menu

Help with misplaced notes

Help
darren
2017-02-10
2017-02-10
  • darren

    darren - 2017-02-10

    Hello,

    I want to use the library in my Java Application. I tried running guidoviewer.java and it worked. There's something wrong with the rendering though. The beams are rendered correctly. But the rest of them are misplaced somehow.
    So far I tried looking inside paint and setGMN function, but I failed to isolate the problem. I assume something was wrong with conversion from .gmn file to screen, or maybe my library settings. How can I fix this problem?

    Here's what I'm using:
    1.GuidoJava-v.1.24
    2.guidolib-1.63-devkit-windows
    3.Running on 32-bit JDK,

    Darren

    image

     
    • Dominique Fober

      Dominique Fober - 2017-02-13

      Hi Darren,

      Sorry but I can’t reproduce the problem. I checked on Windows 10 using the jdk1.8.0_60.
      I’ve compiled the guidoviewer sample from the GuidoJava-v1.24 directory:

      javac guidoviewer.java
      and run :
      java guidoviewer
      Everything went fine.

      Can you send more information on your local context?
      Best

      Dominique

      Le 10 févr. 2017 à 09:48, darren zerogame@users.sf.net a écrit :

      Hello,

      I want to use the library in my Java Application. I tried running guidoviewer.java and it worked. There's something wrong with the rendering though. The beams are rendered correctly. But the rest of them are misplaced somehow.
      So far I tried looking inside paint and setGMN function, but I failed to isolate the problem. I assume something was wrong with conversion from .gmn file to screen, or maybe my library settings. How can I fix this problem?

      Here's what I'm using:
      1.GuidoJava-v.1.24
      2.guidolib-1.63-devkit-windows
      3.Running on 32-bit JDK,

      Darren

      Help with misplaced notes https://sourceforge.net/p/guidolib/discussion/233476/thread/b910bf84/?limit=25#8c8c
      Sent from sourceforge.net because fober@grame.fr is subscribed to https://sourceforge.net/p/guidolib/discussion/233476/ https://sourceforge.net/p/guidolib/discussion/233476/
      To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/guidolib/admin/discussion/forums. https://sourceforge.net/p/guidolib/admin/discussion/forums. Or, if this is a mailing list, you can unsubscribe from the mailing list.

       
  • darren

    darren - 2017-02-15

    Hi Dominique thanks for replying. I got really weird bug here.

    I'm using Windows 10 64-bit version. In the past few days , I tried running the sample on Intellij and command line,no avail. Tried using GuidoJava-v.1.25 you updated earlier - no luck either. I also have updated the java (now using java 1.8.0.121) ,but both 32 jre and 64 bit jdk version produces the same bug.

    Funny thing however, sometimes the rendering is right at random.
    So I still get this

    but this sometimes occur

    Different results from the same gmn file ! I get these results no matter what I'm using (whether it's cmd or intellij and even using both java's 32/64 bit version).What causes such erratic behaviour?

    EDIT
    The Map> Voice is correct though, although the rest are misplaced. The same goes for other functions below the Map menu item

     

    Last edit: darren 2017-02-15
    • Dominique Fober

      Dominique Fober - 2017-02-17

      Le 15 févr. 2017 à 13:25, darren zerogame@users.sf.net a écrit :

      Hi Dominique thanks for replying. I got really weird bug here.

      I'm using Windows 10 64-bit version. In the past few days , I tried running the sample on Intellij and command line,no avail. Tried using GuidoJava-v.1.25 you updated earlier - no luck either.

      actually, there is no change for windows with the latest version (1.25), it only corrects a library ref path on Mac OS
      I also have updated the java (now using java 1.8.0.121) ,but both 32 jre and 64 bit jdk version produces the same bug.

      Such erratic behavior could come from an uninitialized variable (and that takes random value).
      The problem is that I’ve not been able to reproduce up to now. I’ll try again.
      Can you confirm that you compiled the guidoviewer.java sample included in the package and that you get this behavior with the compiled viewer?
      In case not (or if you modified the code), can you send me the code to reproduce?

      Funny thing however, sometimes the rendering is right at random.
      So I still get this

      but this sometimes occur

      Different results from the same gmn file ! What causes such erratic behaviour?

      Help with misplaced notes https://sourceforge.net/p/guidolib/discussion/233476/thread/b910bf84/?limit=25#ab28
      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/guidolib/discussion/233476/ https://sourceforge.net/p/guidolib/discussion/233476/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions/

       
  • darren

    darren - 2017-02-21

    Nope, I've tried the 1.26 version above but still got the same inconsistencies here.

    Note: I tried linking dll and jar both with System.load( "D:\GuidoJava-v.1.26\GuidoJava-v.1.26\GUIDOEngine64.dll") etc. But still the same

     
  • darren

    darren - 2017-02-21

    Ah my bad, I'll remove the code that loads the GuidoEngine library from the java code.Thanks for the follow up Dominique.

    I've tried your suggestion. After downloading the GuidoJava-v.1.26, I built the java from cmd and then running examples in the example link. But I still got the misplacement. Here:


    And here's my cmd
    http://imgur.com/4we7vMj

    Did you run the same (only gone through javac once) guidoviewer.java multiple times? That's how I got the misplacement. The rendering is still right sometimes

     

    Last edit: darren 2017-02-21
    • Dominique Fober

      Dominique Fober - 2017-02-21

      Le 21 févr. 2017 à 17:05, darren zerogame@users.sf.net a écrit :

      Ah my bad, I'll remove the code that loads the GuidoEngine library from the java code.Thanks for the follow up Dominique.

      I've tried your suggestion. After downloading the GuidoJava-v.1.26, I built the java from cmd and then running examples in the example link. But I still got the misplacement. Here:

      And here's my cmd

      too small to read, and I can’t enlarge the picture.
      Anyway, it probably doesn’t matter...

      Did you run the same (only gone through javac once) guidoviewer.java multiple times? That's how I got the misplacement.

      yes I did, and the result is always correct

      Another hypothesis: check that you have the latest Guido2.ttf font installed. I don’t know how an old font could produce this kind of behavior. The fonts are always compatible and could only lack some symbols, but never know…

      Could you also tell me (or send me a picture) how the mappings are displayed (Map menu), in particular the voice and staff mappings. That should provide additional information on what happens internally.

      Help with misplaced notes https://sourceforge.net/p/guidolib/discussion/233476/thread/b910bf84/?limit=25#34d6
      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/guidolib/discussion/233476/ https://sourceforge.net/p/guidolib/discussion/233476/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions/

       
  • darren

    darren - 2017-02-22

    Yes, I've reinstalled the guido font. Now using the guido2.ttf but no success. I wonder why myself.

    The mapping, staff and system are fine. As a matter of fact, they have always been correct (I've already posted the mapping above). Here's the pics

    :
    :
    :

     

    Last edit: darren 2017-02-22
    • Dominique Fober

      Dominique Fober - 2017-02-22

      Le 22 févr. 2017 à 08:07, darren zerogame@users.sf.net a écrit :

      ok, thanks for the pictures, the problem is thus definitely not related to the engine but to the native graphic device.
      I’ve been able to reproduce (again) with a lot of patience… (it’s hard to get the pb on my side) and I’ve eventually found the reason:
      it comes from the font metrics that are collected at initialization time, and from time to time, the system gives 0 for these metrics. I don’t know why and I don’t know what I can do since that occurs at system level.

      You can get a new version of the GuidoEngine dlls here:
      https://www.dropbox.com/s/okmfr18goofd0s1/dlls.zip?dl=0

      The difference is that this version watch the metrics collection process and makes several attempts to get correct results.
      You’ll should get debug messages on the console and in particular a "collectMetrics failed” message in case of failure.
      Since I modified the code, I’ve not been able to reproduce the pb, even to get the "collectMetrics failed” message, but that doesn’t mean the problem is solved since it’s really hard to trigger here.
      Can you check on your side and keep me informed.

      Dominique

      Yes, I've reinstalled the guido font. Now using the guidofont2 but no success. I wonder why myself.

      The mapping, staff and system are fine. As a matter of fact, they have always been correct (I've already posted the mapping above). Here's the pics

      Help with misplaced notes https://sourceforge.net/p/guidolib/discussion/233476/thread/b910bf84/?limit=25#8572
      Sent from sourceforge.net because fober@grame.fr is subscribed to https://sourceforge.net/p/guidolib/discussion/233476/ https://sourceforge.net/p/guidolib/discussion/233476/
      To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/guidolib/admin/discussion/forums. https://sourceforge.net/p/guidolib/admin/discussion/forums. Or, if this is a mailing list, you can unsubscribe from the mailing list.

       
  • darren

    darren - 2017-02-22

    Dominique thanks for the follow up. Something works ! The misplacement occurs less frequently now. But it still occured, although the miss is less severe.

    Here's the cmd output when error occured.

    D:\ProgrammingFiles\GuidoJava-v.1.26\GuidoJava-v.1.26>java guidoviewer
    GUIDOEngine version 1.6.4 - JNI interface version 1.2.1 initialized.
    GFontWin32GDIPlus Guido2 200 0 => em/ascent/descent: 52136, 200, 200
    GFontWin32GDIPlus Times 75 0 => em/ascent/descent: 52160, 75, 75
    Guido Warning: Named Parameter has wrong type: id
    GFontWin32GDIPlus Guido2 80 0 => em/ascent/descent: 1024, 102.734, 96.5625

    I did not have the "collectMetrics failed” message though when it appeared. As a comparison, here's the cmd message when things are working just fine.

    D:\ProgrammingFiles\GuidoJava-v.1.26\GuidoJava-v.1.26>java guidoviewer
    GUIDOEngine version 1.6.4 - JNI interface version 1.2.1 initialized.
    GFontWin32GDIPlus Guido2 200 0 => em/ascent/descent: 1024, 256.836, 241.406
    GFontWin32GDIPlus Times 75 0 => em/ascent/descent: 2048, 66.8335, 16.2231
    Guido Warning: Named Parameter has wrong type: id
    GFontWin32GDIPlus Guido2 80 0 => em/ascent/descent: 1024, 102.734, 96.5625

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.