Coder Social home page Coder Social logo

Parser reports wrong duration about abcjs HOT 3 CLOSED

paulrosen avatar paulrosen commented on August 21, 2024
Parser reports wrong duration

from abcjs.

Comments (3)

paulrosen avatar paulrosen commented on August 21, 2024

That is actually an interesting quirk of standard music notation. See http://musicnotation.org/wp-content/uploads/2013/03/Standard_music_notation_practice.pdf, page 12, paragraph (c).

A whole rest represents one bar of music. It is different from a whole note in that way.

from abcjs.

bwl21 avatar bwl21 commented on August 21, 2024

That "quirk" says indeed that the whole rest fills the entire measure. But IMHO this leads to an ambiguity in ABC. In the case above, we have 4/2 measure; Consequently the whole note duration is z8. On the other z4 cannot be denoted in this case and should be flagged as error.

EASYABC solved the problem as shown in this screen shot. The z8 is placed in the center of the measure (with another symbol). The z4 is rendered as if it were a note ( not in the center of the measure).

screenshot_95

abcjs version 1.10 behaves similar. It flags the z8 as undefined duration but the parser delivers a duration of 2.

screenshot_96

To sum up: IMHO we should distinguish between the interpretation of ABC and the representation as in the notes. With respect of interpretation of ABC, we should look for best possible compatibility among tools.

Maybe a solution could be to implement "Z1" as a "whole" note with the duration of the measure. See http://abcnotation.com/wiki/abc:standard:v2.1#rests.

It appears to me that "Z" ist not interpreted correctly by abcjs either. It seems that Z1 is handled as z4. But in this case it should be handled similar to "z8" because of M:4/2 and L:1/4. ABCJS draws a whole rest in the center of the measure.

from abcjs.

paulrosen avatar paulrosen commented on August 21, 2024

I think a solution would be to use the special interpretation of a whole rest only when it is the only thing in a bar. That is, restrict the special case to:

|z4|

from abcjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.