-
Notifications
You must be signed in to change notification settings - Fork 6
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
Documentation about spine operator *v #7
Comments
Yes, that is close. But the problem with this line:
is that it means to merge all spines into a single one. When you do this:
the right three are merged into the second spine below. The problem is that the original spines were not restored (2:2 goes to 1:3). Technically this allowed in Humdrum, although I avoid this since it is difficult to distinguish from a bug in the data. The current solution to this is to do each merge on a separate line:
Either merge can happen before the other, although collapsing the right-most subspine group first make the visual display of the data a little more complex:
I do not like this, and I would like to implement a new spine manipulator
But I have not yet implemented this system (and it would not be backward compatible with the original Humdrum Toolkit). This would improve readability and data processing in certain cases, but would also cause complications when adding/removing spines from a score (where the v/V states may need to change). In my parser, I could also disallow merging across original spines, then the original case would be as you expected:
Coming from above in the data, I keep track of which primary spine a token belongs two. If I see such a merger where two adjacent tokens are from a different primary spine (which I call a track to avoid confusion between spine/subspine terms), then I could implicitly segment the merges into two separate groups. However, this would make the data incompatible with the original Humdrum Toolkit tools, so I have avoided doing that. I changed the documentation example to include more complex spining:
And added a paragraph describing the complications:
You are writing the duration after pitch in So you can keep putting the rhythm after the pitch without any problems, but there is a "canonical ordering" for |
Hi, In this case there are two main spines that are splitted. VHV just works when all the spines join into one spine..
I was expecting the last row to have three spines instead the |
In the original Humdrum Toolkit, all adjacent **kern **kern **kern
* *^ *
1r 1A 1AA 1a
* * *^ *
2r 2A 2AA 2AA# 2a
*^ *^ *^ *^ *^
4r 4r 4A 4A 4AA 4AA 4AA# 4AA# 4a 4a
* * * * * * * * *v *v
* * *v *v *v *v *v *v *
*v *v * *
8r 8r 8r
*- *- *- And the following is probably legal with the original Humdrum Toolkit tools since the **kern **kern **kern
* *^ *
1r 1A 1AA 1a
* * *^ *
2r 2A 2AA 2AA# 2a
*^ *^ *^ *^ *^
4r 4r 4A 4A 4AA 4AA 4AA# 4AA# 4a 4a
* * *v *v *v *v *v *v * *
*v *v * *v *v
8r 8r 8r
*- *- *- This requirement is probably due to the original Humdrum Toolkit tools not having a centralized parser and thus a low complexity method of requiring separate merge lines. In Humdrum Extras and humlib, there is a single parser thanks to object oriented programming. 😉 I don't particularly like this and agree with your expectation. I have been thinking of implementing in humlib (which are used to create filters in VHV) what you expect: prevent subspines from merging with other subspines unless they have the same originating spine: **kern **kern **kern
* *^ *
1r 1A 1AA 1a
* * *^ *
2r 2A 2AA 2AA# 2a
*^ *^ *^ *^ *^
4r 4r 4A 4A 4AA 4AA 4AA# 4AA# 4a 4a
*v *v *v *v *v *v *v *v *v *v
8r 8r 8r
*- *- *- An alternate idea would be to create **kern **kern **kern
* *^ *
1r 1A 1AA 1a
* * *^ *
2r 2A 2AA 2AA# 2a
*^ *^ *^ *^ *^
4r 4r 4A 4A 4AA 4AA 4AA# 4AA# 4a 4a
*v *v *V *v *v *v *v *v *V *v
8r 8r 8r
*- *- *- where Both would be incompatible with the original Humdrum Tools, so I have not done it yet. But there could be a converter between the two (or three) systems (the first method is probably better than the I have a tool in Humdrum Extras to examine the spine pathes, called
Results with your example: **kern **kern **kern
* *^ *
1 (2)a (2)b 3
* * *^ *
1 (2)a ((2)b)a ((2)b)b 3
*^ *^ *^ *^ *^
(1)a (1)b ((2)a)a ((2)a)b (((2)b)a)a (((2)b)a)b (((2)b)b)a (((2)b)b)b (3)a (3)b
*v *v *v *v *v *v *v *v *v *v
3
*- (The Humdrum Extras parser gets confused with the mass merge and assigns the last token to originate from spine 3 (rather than 1 and 2 and 3). In **spine **spine **spine
* *^ *
1 (2)a (2)b 3
* * *^ *
1 (2)a ((2)b)a ((2)b)b 3
*^ *^ *^ *^ *^
(1)a (1)b ((2)a)a ((2)a)b (((2)b)a)a (((2)b)a)b (((2)b)b)a (((2)b)b)b (3)a (3)b
*v *v *v *v *v *v *v *v *v *v
1
*- Also in humlib, the last token would ideally have a spinetrace of Notice that I keep track of the originating spine, so parsing as *v *v *v *v *v *v *v *v *v *v
1 2 3 would be fairly easy to implement. |
In Partial voices/layers, when two spines are to be merged into one spine the
*v
operator is used on both spines:In Multiple staves, the top staff spines are merged into just one using the same method, while the bottom staff is maintained without being split or merged. This is perfect.
However, for getting the example below the encoding is a bit different.
Given the examples in the documentation, when two splines must be merged into one, the
*v
operator must be used at the end of both spines. Then, the expected encoding should be:However, VHV complains because the number of tokens in the last bar line record do not match.
To make it work, I've had to remove the left spine merge operator :
The text was updated successfully, but these errors were encountered: