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

General issue: vhv does not render beams properly due to spine joining #40

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

Comments

@bel28kent
Copy link
Owner

Screen Shot 2024-04-05 at 11 55 14 AM
@bel28kent bel28kent added the vhv-viz-bug This issue concerns a bug in VHV visualization of kern. label Apr 5, 2024
@craigsapp
Copy link
Contributor

You seem to have flippered it since that screen image was taken.

I think the problem you are mentioning is due to the tied triplet eighths that you have in the current version, and when you tried to merge them into a triplet quarter notes, the notes in that measure disappeared in the top voice of the bottom staff. I was having that problem too, but it is a caused by a data error rather than conversion and display in verovio: If you did the same as me, notice that there was an unbalanced beam end J that followed the merted eight notes. When removing this J, the notation is as expected:

Screenshot 2024-04-05 at 7 21 36 PM

The problem is that the beam was trying to go back to the beginning of the measure, and this was crossing a tuplet boundary, which causes verovio to give up on display of that voice in the measure.

Click to view Humdrum data for above example
!!!COM: Scriabin, Alexander
!!!OTL@@FR: Prélude en si majeur
!!!OTL@@EN: Prelude in B Major
!!!OPR@@FR: 5 Préludes
!!!OPR@@EN: 5 Preludes
!!!OPS: 16
!!!ONM: 1
!!!ODT: 1895
!!!AGN: Prelude
**kern	**kern	**dynam
*staff2	*staff1	*staff1/2
*Ipiano	*Ipiano	*
*clefF4	*clefG2	*
*k[f#c#g#d#a#]	*k[f#c#g#d#a#]	*
*B:	*B:	*
!!LO:TX:omd:tempo:a:t=Andante\nM.M. [quarter]=40.
*M3/4	*M3/4	*
*MM40	*MM40	*
*Xtuplet	*Xtuplet	*
*^	*	*
8ryy	(>8FF#	8r	mf
=1	=1	=1	=1
4rcyy	12BBBL	2.r	.
.	12FF#	.	.
.	12C#J	.	.
6B~	12BL	.	.
.	12G#	.	.
6c#~	12c#J	.	.
.	12EL	.	.
12g#~)	12g#	.	.
12rcyy	(12FF#J	.	pp
=2	=2	=2	=2
4rcyy	12BBBL	2.r	.
.	12FF#	.	.
.	12C#J	.	.
6B	12BL	.	.
.	12G#	.	.
6c#	12c#J	.	.
.	12EL	.	.
12g#)	12g#	.	.
12rcyy	(12FF#J	.	.
!!LO:LB:g=original
=3	=3	=3	=3
!	!	!LO:TX:c:i:t=cantabile	!
4rcyy	12BBBL	(4gg#	.
.	12FF#	.	.
.	12C#J	.	.
6B	12BL	8ff#L	.
.	12G#	.	.
.	.	8eeJ	.
6c#	12c#J	.	.
.	12EL	12dd#L	.
12g#)	12g#	12cc#	.
12rcyy	(12FF#J	12dd#J	<
=4	=4	=4	=4
4rcyy	12BBBL	6ff#	[
.	.	.	>
.	12FF#	.	.
.	12C#J	12ee	]
6B	12BL	12dd#L	.
.	12G#	12cc#	.
6c#	12c#J	12dd#J	.
.	12EL	4g#	.
12g#)	12g#	.	.
12rcyy	(12FF#J	.	.
=5	=5	=5	=5
4rcyy	12BBBL	8cc#L	<
.	12FF#	.	.
.	.	8bJ	.
.	12C#J	.	.
6B	12BL	12g#L	.
.	12G#	12a#	.
6c#	12c#J	12bJ	.
.	12EL	8dd#L	.
12g#J)	12g#	.	.
.	.	8cc#J	.
12rcyy	(12FF#J	.	.
!!LO:LB:g=original
=6	=6	=6	=6
4rcyy	12BBBL	2g#	.
.	12FF#	.	.
.	12C#J	.	.
6G#	12G#L	.	.
.	12F#	.	.
6A#	12A#J	.	.
.	12EL	4f#)	.
12f#)	12f#	.	.
12rcyy	(12FF#J	.	.
=7	=7	=7	=7
4rcyy	12BBBL	(4ccc#	mf
.	12BB	.	.
.	12F#J	.	.
6e	12eL	8bbL	.
.	12c#	.	.
.	.	8aanJ	.
6f#	12f#J	.	.
.	12AnL	12gg#L	.
12cc#)	12cc#	12ff#	.
12rcyy	(12BBJ	12gg#J	.
!!LO:LB:g=original
=8	=8	=8	=8
4rcyy	12BBBL	6bb	.
.	12BB	.	.
.	12F#J	12gg#	.
6c#	12c#L	12ff#L	.
.	12B	12ee	.
6d#	12d#J	12ff#J	.
.	12AnL	4b	.
12b)	12b	.	.
12rcyy	(12BBJ	.	.
=9	=9	=9	=9
4rcyy	12CC#L	8eeL	>
.	12GG#	.	.
.	.	8dd#J	.
.	12EJ	.	.
6c#	12c#L	12g#L	.
.	12G#	12a#	.
6e	12eJ	12bJ	.
.	12A#XL	8dd#L	.
12g#)	12g#	.	.
.	.	8cc#J	.
12rcyy	(12GG#J	.	.
*v	*v	*	*
=10	=10	=10
12GGG#L	2.b)	p
12GG#	.	.
12D#J	.	.
12d#L	.	.
12B	.	.
12g#J	.	.
12d#L	.	.
12G#)	.	.
(12D#J	.	.
!!LO:LB:g=original
=11	=11	=11
*^	*^	*
4rcyy	12GG#L	4raayy	(12aa#~L	p
.	12D#	.	12gg#~	.
.	12BJ	.	12aa#~J	.
6g#	12g#L	4raayy	2dd#~>	.
.	12f#	.	.	.
6b	12bJ	.	.	.
!	!	!	!	!LO:DY:rj:a
.	12d#L	12aaa#L	.	pp
12dd#)	12dd#	12ggg#	.	.
12rcyy	(12BJ	12aaa#J	.	.
=12	=12	=12	=12	=12
2.ryy	12C#L	4ddd#	8rb	<
.	12B	.	.	.
.	.	.	8ff#	[
.	12c#J	.	.	.
.	12g#L	8ccc#L	8ee#XL	>
.	12G#	.	.	.
.	.	8bbJ	8dd#J	.
.	12e#XJ	.	.	.
.	16bLL	8aa#L	8cc#L	.
.	16c#	.	.	.
.	16B)	8gg#J	8gg#J	.
.	(>[>16C#JJ	.	.	]
=13	=13	=13	=13	=13
*ped	*	*	*	*
4rcyy	12FF#L 12C#]	4raayy	12gg#~L	.
.	12C#	.	12ff#~	.
.	12AnJ	.	12gg#~J	.
6f#	12f#L	4raayy	2cc#	.
.	12en	.	.	.
6an	12aJ	.	.	.
!	!	!	!	!LO:DY:a:rj
.	12cL	12ggg#L	.	pp
*Xped	*	*	*	*
12cc#)	12cc#	12fff#	.	.
12rcyy	(12AJ	12ggg#J	.	.
*v	*v	*	*	*
!!LO:LB:g=original
=14	=14	=14	=14
12BBL	4ccc#	8rb	.
12An	.	.	.
.	.	8ee	.
12BJ	.	.	.
12f#L	8bbL	8dd#L	.
12F#	.	.	.
.	8aanJ	8cc#J	.
12d#J	.	.	.
16anLL	8gg#L	8bL	.
16B	.	.	.
16A)	8ff#J	8ff#J	.
(16BBJJ	.	.	.
=15	=15	=15	=15
!	!	!	!LO:HP:t=%s accel.
12EEL	12gg#L	4b 4dd#	<
12BB	12ff##X	.	.
[>12BJ	12gg#J	.	.
12BL]	4b	4d#	.
12B	.	.	.
12BBJ	.	.	.
12EE#XL	4ggn	4b 4dd#	.
12D#	.	.	.
12BJ)	.	.	.
=16	=16	=16	=16
(12FF#L	12ff#L	4b 4dd#	.
12D#	12ee#X	.	.
[12BJ	12ff#J	.	.
12BL]	4b	4d#	.
12B	.	.	.
12BBJ	.	.	.
12GGnL	4dd#	4e#X 4b	.
12D#	.	.	.
12BJ)	.	.	.
!!LO:LB:g=original
=17	=17	=17	=17
!	!	!	!LO:DY:t=%s rubato
(12FF#L	4dd#	4f# 4b	f
12D#	.	.	.
12BJ	.	.	.
12A#L	4f#	4d#	.
12G#X	.	.	.
12F#J	.	.	.
12G#L	4b	4d#	>
12F#	.	.	.
12BBJ)	.	.	.
=18	=18	=18	=18
!	!	!LO:TX:b:i:t=rit.	!
(12FFF#L	4dd#	2e	.
12FF#	.	.	.
12C#J	.	.	.
12A#L	4cc#	.	.
12G#	.	.	.
12F#J	.	.	.
16BLL	4e	4rcyy	.
16G#	.	.	.
16C#)	.	.	.
(16FF#JJ	.	.	.
*	*v	*v	*
=19	=19	=19
*^	*	*
4rcyy	12BBBL	(4gg#)	pp
.	12FF#	.	.
.	12C#J	.	.
6B	12BL	8ff#L	.
.	12G#	.	.
.	.	8eeJ	.
6c#	12c#J	.	.
.	12EL	12dd#L	.
12g#)	12g#	12cc#	.
12rcyy	(>12FF#J	12dd#J	.
!!LO:LB:g=original
=20	=20	=20	=20
4rcyy	12BBBL	6ff#	.
.	12FF#	.	.
.	12C#J	12ee	.
6B	12BL	12dd#L	.
.	12G#	12cc#	.
6c#	12c#J	12dd#J	.
.	12EL	4g#	.
12g#)	12g#	.	.
12rcyy	(12FF#J	.	.
=21	=21	=21	=21
4rcyy	12BBBL	8cc#L	.
.	12FF#	.	.
.	.	8bJ	.
.	12C#J	.	.
6B	12BL	12g#L	.
.	12G#	12a#	.
6c#	12c#J	12bJ	.
.	12EL	6dd#	.
12g#)	12g#	.	.
12rcyy	(12FF#J	12cc#	.
=22	=22	=22	=22
4rcyy	12BBBL	2g#	.
.	12FF#	.	.
.	12C#J	.	.
6G#	12G#L	.	.
.	12F#	.	.
6A#	12A#J	.	.
.	12EL	4f#)	.
12f#)	12f#	.	.
12rcyy	(12FF#J	.	.
!!LO:LB:g=original
=23	=23	=23	=23
*	*	*	*^
!	!	!	!LO:DY:a=2	!
4rcyy	12BBBL	(4ccc#	pp	mf
*	*	*	*v	*v
.	12BB	.	.
.	12F#J	.	.
6c#	12c#L	8bbL	.
.	12B	.	.
.	.	8aanJ	.
6d#	12d#J	.	.
.	12AnL	12gg#L	.
12b)	12b	12ff#	.
*Xped	*	*	*
12rcyy	(12BBJ	12gg#J	.
=24	=24	=24	=24
4rcyy	12BBBL	6bb	.
.	12BB	.	.
.	12G#J	12gg#	.
6c#	12c#L	12ff#L	.
.	12B	12ee	.
6e	12eJ	12ff#J	.
.	12G#L	4b)	.
12b)	12b	.	.
12rcyy	(12BBJ	.	.
=25	=25	=25	=25
!	!	!	!LO:DY:a
4rcyy	12BBBL	(4cc#	pp
.	12BB	.	.
.	12F#J	.	.
6c#	12c#L	6b	.
.	12B	.	.
6d#	12d#J	12an	.
.	12AnL	12g#L	.
12b)	12b	12f#	.
12rcyy	(12BBJ	12g#J	.
!!LO:LB:g=original
=26	=26	=26	=26
4rcyy	12BBBL	6b	.
.	12BB	.	.
.	12G#J	12g#	.
6c#	12c#L	12f#L	.
.	12B	12e	.
6e	12eJ	12f#J	.
.	12G#L	4B)	.
12b)	12b	.	.
12rcyy	(12BBJ	.	.
=27	=27	=27	=27
4rcyy	12BBBL	(4f#	.
.	12FF#	.	.
.	12C#J	.	.
6B	12BL	4gg#	.
.	12G#	.	.
6c#	12c#J	.	.
.	12EL	4b	.
12g#)	12g#	.	.
12rcyy	(12FF#J	.	.
=28	=28	=28	=28
4rcyy	12BBBL	4a#	.
.	12FF#	.	.
.	12C#J	.	.<
6G#	12G#L	4ccc#	.
.	12F#	.	.
6A#	12A#J	.	.
.	12EL	4ee	.
12g#)	12g#	.	.
12rcyy	(12FF#J	.	.
!!LO:LB:g=original
=29	=29	=29	=29
4rcyy	12BBBL	4dd#	.
.	12FF#	.	.
.	12F#J	.	.
6c#	12c#L	4fff#	.
.	12B	.	.
6d#	12d#J	.	.
.	12AnL	4aan	.
12cc#)	12cc#	.	.
12rcyy	(12BBJ	.	.
=30	=30	=30	=30
4rcyy	12BBBL	4gg#	.
.	12BB	.	.
.	12G#J	.	.
6c#	12c#L	4bbb	.
.	12B	.	.
6e	12eJ	.	.
.	12G#L	4eee)	.
12b)	12b	.	.
12rcyy	(12BBJ	.	.
=31	=31	=31	=31
4rcyy	12BBBL	4ggn	f
.	12BB	.	.
.	12GnJ	.	.
6e	12eL	4cccc#	.
.	12c#	.	.
6f#	12f#J	.	.
.	12A#XL	4ff#	.
12gn)	12g	.	.
12rcyy	(12BBJ	.	.
!!LO:LB:g=original
=32	=32	=32	=32
4rcyy	12BBBL	4aaa#X	>
.	12BB	.	.
.	12GnJ	.	.
6e	12eL	4ee	.
.	12c#	.	.
6f#	12f#J	.	.
.	12A#L	4gggn	.
12gn)	12g	.	.
12rcyy	(12BBJ	.	.
=33	=33	=33	=33
4rcyy	12BBBL	4ggn	.
.	12BB	.	.
.	12GnJ	.	.
6e	12eL	4ccc#	.
.	12c#	.	.
6f#	12f#J	.	.
.	12A#L	4ff#	.
12gn)	12g	.	.
12rcyy	(12BBJ	.	.
!!LO:LB:g=original
=34	=34	=34	=34
4rcyy	12BBBL	4aa#	p
.	12BB	.	.
.	12GnJ	.	.
6e	12eL	4ee	.
.	12c#	.	>
6f#	12f#J	.	.
.	12A#L	4ggn	.
12gn)	12g	.	.
12rcyy	(12BBJ	.	.
*v	*v	*	*
=35	=35	=35
12BBBL	4r	.
12BB	.	.
12GnJ	.	.
12eL	4ccn 4ggn	.
12A#X	.	.
12cnJ	.	.
12A#L	4gn 4ee	.
12E	.	.
12CnJ	.	.
=36	=36	=36
12A#L	4e 4ccn	.
12E	.	.
12GGnJ	.	.
4BBB)	4cn 4gn	.
4r	4Gn 4e	.
!!LO:LB:g=original
=37	=37	=37
4r	4E 4cn	.
4BBB 4GGn 4Cn	4E 4Gn 4c	pp
4BBB 4GG 4C	4E 4G 4c	.
=38	=38	=38
4BBB 4GGn 4Cn	4E 4Gn 4cn	.
4BBB 4GG 4C	4E 4G 4c	.
4BBB 4GG 4C	4E 4G 4c	.
=39	=39	=39
2.BBB 2.FF# 2.BB	2.D# 2.F# 2.B 2.d#	ppp
=40	=40	=40
2.BBB 2.FF# 2.BB	[2.D# [2.F# [2.B [2.d#	.
=41	=41	=41
*8ba	*	*
[2.BBBB	2.D#] 2.F#] 2.B] 2.d#]	.
=42	=42	=42
2BBBB]	2.r	.
*X8ba	*	*
4r	.	.
==	==	==
*-	*-	*-
!!!system-decoration: {(*)}
!!!RDF**kern: > = above
!!!RDF**kern: < = below
!!!RDF**dynam: > = dim.
!!!ENC: Bryan Jacob Bell
!!!END: 2021/11-2022/04
!!!PED: Günter Philipp
!!!PTL: Ausgewählte Klavierwerke (Edition Peters)
!!!URL-pdf: https://vmirror.imslp.org/files/imglnks/usimg/b/b7/IMSLP78332-SIBLEY1802.1010.129d-39087012831824.pdf#page=5 First edition, Leipzig: M.P. Belaieff, 1897. Plate 1396.
!!!Xfilter: humbreak -m 3,6.8,11,14,17,20,23,26,29,32,34,37

In this case I adjusted to the first edition (notes were all the same, but I removed two cautionary accidentals and remove some clef changes in the bottom staff to match the first edition).

Interestingly on IMSLP, it says that the Peters edition might be put on soon (but I don't know how long that message has been there).

Things note:

(1) I added line breaks to match the original edition. This is useful for proof reading, as you can view system by system and avoid getting lost with the music is in a different layout (you can adjust the breaks for Peters). The Xfilter at the bottom of the file demonstrates a new VHV filter to add line breaks automatically:

!!!Xfilter: humbreak -m 3,6.8,11,14,17,20,23,26,29,32,34,37

The humbreak tool added line breaks before measure 3, 6, 8, 11, etc.

humbreak -r can be used to delete linebreaks (if the Peters edition uses different line breaks. There is a way to label line breaks for different editions:

!!LO:LB:g=first, peters

But this is not fully implemented in the conversion for notation display (but I could work on implementing it). Currently the group parameter g is ignored, and all line breaks from any group will be applied in the notation display.

(2) I added a tempo **MM40 after the time signature to get the tempo as indicated visually on the paper. Otherwise, the "Andante" will be detected and a predetermined tempo for Andante will be used when converting to MEI. Better is to always add **MM40 type tempos (in reference to the quarter note).

(3) I attach the Andante and M.M. to the time signature (where it traditionally goes) by adding the !!LO:TX: just before the time signature.

(4) I added the source edition with !!!URL-pdf giving the starting page as #page=5 at the end of the url, and then a space an the tooltip text in VHV for the PDF icon (at the top of the page on the left side of the toolbar on the left side of the browser window).

(5) There is one Ped mark, but no pedal release. I put one approximately where it should go, but ideally this would be made invisible (as an editorial pedal up). Or it could mean to pedal ad lib. from that point (it is not very clear why only one Ped mark).

(6) lines after dynamic are not implemented, but should be doable (maybe this summer I will implement them). I don't know how it should be encoded yet, something like !LO:DY:ldur=12 for a line with a duration of 12 quarter notes after the dynamic marking.

(7) Some of the dynamics are close to the top staff, but should be centered between the staves. This is a verovio bug related to the presence of a slur below the dynamic (they are currently pussing dynamics too high).

@bel28kent
Copy link
Owner Author

Did you use the kern on the main branch or on the 22-phase21-subspine-issue branch? The screenshot that I posted is from the latter, as this is the branch that I am working on for all edits as detailed in #22, specifically the file no_stems-scriabin-op16_no01. The approach that I am taking on the editing branch is quite different from that on the main branch; particularly, I am trying to remove all unnecessary tokens from the files. This means only splitting and joining spines where necessary to remove hidden rests. (This is also the source of the flipping. I have manually added !!!filter: flipper -a to the editing files.

Compare pick-up through m. 1 on main branch:

*^	*	*
8ryy	8FF#	8r	.
=1	=1	=1	=1
4rc	12BBBL	2.r	.
.	12FF#	.	.
.	12C#J	.	.
6B	12BL	.	.
.	12G#	.	.
[12c#	12c#J	.	.
12c#L]	12EL	.	.
12g#J	12g#	.	.
12rc	12FF#J	.	.

with the new version on editing branch:

8FF#	8r	.
=1	=1	=1
12BBBL	2.r	.
12FF#	.	.
12C#J	.	.
*^	*	*
12BL	6B	.	.
12G#	.	.	.
12c#J	6c#	.	.
12EL	.	.	.
12g#	12g#	.	.
*v	*v	*	*
12FF#J	.	.

@craigsapp
Copy link
Contributor

I was probably using the main branch, as I didn't look for other branches. I will use that branch for the other two issues for me to look at.

I myself tend to prefer spine splits/merges at barline boundaries, including a bit more invisible rests. But either style is acceptable. MEI does not allow the equivalent of splits/merges in the middle of measures, so when I convert to MEI, I automatically add the extra invisible rests to fill in the entire measure layer. MusicXML can have the equivalent of splits/merges in the middle of a measure, which maps to your final style.

@craigsapp
Copy link
Contributor

I think that !!!filter: flipper -a likely has a problem with more than two subspines (I will have to review that).

@bel28kent bel28kent changed the title op16_no01: vhv does not render beams properly due to spine joining General issue: vhv does not render beams properly due to spine joining Apr 10, 2024
@bel28kent
Copy link
Owner Author

@craigsapp
Copy link
Contributor

For scriabin-op48_no04.krn, mm. 2, there is a general problem that will require spacer rests to preserve the layer information for notation display:

Screenshot 2024-04-10 at 12 27 56 PM

[View in VHV]

The problem is that the 4ryy on line 25 is required. The conversion to notation does not look at spining and instead constructs "layers"/"voices" based on the subtoken positions. In this case the first column for the top staff is mapped to the first layer of the MEI data for that staff, and the second column for the second layer, etc. When you merge early in the first measure, the last two eight notes of the second layer are moved to the first layer based on their positions , and this will cause the problems you note (here and in other issues).

@bel28kent
Copy link
Owner Author

I'm curious if this is also the cause of the problem that I have had with clef changes not rendering properly around spine splits. Maybe the clef changes are not being mapped on to the MEI layers properly? I think it is perfectly reasonable to add hidden rests to solve the issue if that is the case.

@craigsapp
Copy link
Contributor

See #41 (comment)

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