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

scriabin-op66.krn: adding dynamics has caused rendering problems #62

Open
bel28kent opened this issue Sep 4, 2024 · 4 comments
Open
Labels
vhv-viz-bug This issue concerns a bug in VHV visualization of kern.

Comments

@bel28kent
Copy link
Owner

Since adding dynamics, the rendering of scriabin-op66.krn is off.

Before dynamics:

Screen Shot 2024-09-04 at 11 15 08 AM

After dynamics:

Screen Shot 2024-09-04 at 11 16 17 AM Screen Shot 2024-09-04 at 11 17 06 AM
@bel28kent bel28kent added the vhv-viz-bug This issue concerns a bug in VHV visualization of kern. label Sep 4, 2024
@craigsapp
Copy link
Contributor

craigsapp commented Sep 4, 2024

There seems to be a rhythmic or spine problem around measure 168 which I am looking for.

But otherwise, this strange notation typically indicates that the dynamic was placed in a **kern spine instead of a **dynam spine. If you remember which dynamic was added which started the problem, that is the dynamic that needs to be moved to the correct spine (I'll look for that after studying if there is a problem in or around measure 168.

@craigsapp
Copy link
Contributor

craigsapp commented Sep 4, 2024

The problem is that the p at the start of measure 168 is placed in the **kern spine one column to the right, and needs to be moved one column to the left (line 1875):

Uploading Screenshot 2024-09-04 at 11.41.35 AM.png…

Also on line 2652 there is a p in the **kern data:

.           [8.qGG#\    .           16qGG#XLL   p           .

Line 2941:

.           .           .           8cccnJ      pp    

fortes on lines 2371 and 2373:

2371 .           .           4A-X        f           .
2372 !           !           !           !LO:DY:b=3  !
2373 .           16%3BB-X    .           f           .

mf on line 3984:

3984 .           [16c-X      .           mf          .

I found these by extracting **kern data on the command-line and then searching for dynamics within it (tab-p and tab-f):

extractx -i kern input.krn > only-kern.krn

If you fix these dynamics (I don't know which staff they should go on, so you get to fix them) and the notation is still having funny gaps before the first beat, there is still likely something non-kern in a kern spine somewhere (I can look for it if you cannot find it because sometime it is tricky to locate).

@bel28kent
Copy link
Owner Author

bel28kent commented Sep 4, 2024

There was one more. Here is how I found it using hum-parser:

> ,require hum-parser.rkt
> (define 66-path "../../Desktop/Mysterium/op66/scriabin-op66.krn")
> (define 66-spines (spine-parser (path->hfile 66-path)))
> (define 66-kern (filter (λ (s) (string=? KERN (type-spine (global-spine-tokens s)))) 66-spines))
> (define (dynam-filter lot)
    (filter (λ (t) (regexp-match? #px"^[pmsfz<>\\[\\]\\(\\)]+$" (token-token t))) lot))
> (map (λ (s) (map dynam-filter (global-spine-tokens s))) 66-kern)

This outputs lists of tokens for each spine, with non-dynamic stuff filtered out. This leads to empty lists, except for this, which was in staff1:

(list (token ">" "SpineData" 1905))

@craigsapp
Copy link
Contributor

At some point I should ignore obvious non-kern spine data in **kern and instead print a warning about it in the console so that the funny spaces at the starts of measures that grow over time do not happen. The complication is that f is legitimate **kern data for F4 pitch, but if there are notes with rhythms but an f without, then that is a clue that the f is probably a **dynam.

Here is a legitimate use of only f in a **kern token:

Screenshot 2024-09-04 at 2 48 03 PM

[View in VHV]

When I convert to MEI to display in VHV, I make them quarter notes with no stems (for use in displaying chant notation):

<layer xml:id="layer-L1F1N1" n="1">
 <note xml:id="note-L2F1" dur="4" oct="4" pname="c" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L3F1" dur="4" oct="4" pname="d" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L4F1" dur="4" oct="4" pname="e" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L5F1" dur="4" oct="4" pname="f" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L6F1" dur="4" oct="4" pname="g" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L7F1" dur="4" oct="4" pname="a" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L8F1" dur="4" oct="4" pname="b" stem.visible="false" accid.ges="n" />
 <note xml:id="note-L9F1" dur="4" oct="5" pname="c" stem.visible="false" accid.ges="n" />
</layer>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vhv-viz-bug This issue concerns a bug in VHV visualization of kern.
Projects
None yet
Development

No branches or pull requests

2 participants