Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tablature not rendering when tune range exceeds highest note #34

Open
miesvanderrobot opened this issue Jul 31, 2023 · 3 comments
Open

Comments

@miesvanderrobot
Copy link

The expected behavior, according to the ABCjs site: "If a note is out of range a question mark will be printed instead."

What actually happens: Tune is rendered, but all of the tablature is not.

{
  "tablature": [{
    "instrument": "mandolin", 
    "label": "Tenor Guitar (%T)", 
    "tuning": ["C,", "G,", "D", "A"],
    "highestNote": "B"
  }]
}
---
X:1
T: Cooley's
M: 4/4
L: 1/8
R: reel
K: G
|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|
@alensiljak
Copy link
Collaborator

Hi! Thanks for the report. Is there any way you could test this functionality in a simple HTML page and confirm whether the issue is with the abcjs library?
There is really not much the plugin itself is doing in terms of rendering the music sheets. I assume that issues like this are with the abcjs itself and, if so, are better addressed if reported to the appropriate repository.

@miesvanderrobot
Copy link
Author

miesvanderrobot commented Aug 9, 2023

Looks like the absence of the question marks for out of range notes is an abcjs issue, but as this HTML page correctly renders the tablature otherwise, it looks like the issue with tablature not appearing may be related to your specific implementation.

<html>
<head>
    <style>
        
    </style>
    <script src="/scripts/snippet-javascript-console.min.js?v=1"></script>
</head>
<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/abcjs/6.2.2/abcjs-basic-min.js" integrity="sha512-KXKtG2UKjAKEEwwKKNioYwVHGm/gH0ZmME+ePGFwbjs4Banx6+xJVtDpC2A2QM9nGtamOP4tqEYfxloLjq3XcA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<div id="music">
{
    "tablature": [{
        "instrument": "mandolin", 
        "label": "Tenor Guitar (%T)", 
        "tuning": ["C,", "G,", "D", "A"],
        "highestNote": "B"
    }]
}
---
X:1
T: Cooley's
M: 4/4
L: 1/8
R: reel
K: G
|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|
</div>
    <script type="text/javascript">
        ABCJS.renderAbc("music", $("#music").text(), {
        "tablature": [{
        "instrument": "mandolin", 
        "label": "Tenor Guitar (%T)", 
        "tuning": ["C,", "G,", "D", "A"],
        "highestNote": "B"
    }]
});
    </script>
</body>
</html>```

@alensiljak
Copy link
Collaborator

There is no "specific implementation". It is just abcjs inside Obsidian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants