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

Adjust rhythms of passages filtered with yank #781

Open
WolfgangDrescher opened this issue Dec 5, 2022 · 3 comments
Open

Adjust rhythms of passages filtered with yank #781

WolfgangDrescher opened this issue Dec 5, 2022 · 3 comments

Comments

@WolfgangDrescher
Copy link
Contributor

This is related to #779.

I'm filtering passages marked manually as cadences (!! cadence start/end) with the yank command.

Is it possible to fix the output by yank so the result becomes a valid kern score? At the beginning there are beats missing when a voice begins with a null token. At the end there are beats missing when a voice has a longer note duration than the other voices (note duration is longer than the duration of the last line/slice when comparing with beat -p -d -n -u 1).

I just posted a similar issue for the myank filter: #780. Would it be a better solution not to fix the yank command but implement this feature into the myank filter and support not only measure range selection but also allow to pass line ranges (e.g. myank -l 181-187)?

Examples

Source file: https://verovio.humdrum.org/?file=https://raw.githubusercontent.com/WolfgangDrescher/lassus-geistliche-psalmen/master/kern/01-beatus-vir.krn (comments with the cadences are not yet commited)

Missing durations at end of yanked passage

yank -l -r 181-187

VHV

**kern	**text	**kern	**text	**kern	**text
*staff3	*staff3	*staff2	*staff2	*staff1	*staff1
*Ivox	*	*Ivox	*	*Ivox	*
*I"Bassus	*	*I"Tenor	*	*I"Cantus	*
*I'B	*	*I'T	*	*I'C	*
*clefC3	*	*clefC2	*	*clefG2	*
*k[]	*	*k[]	*	*k[]	*
*C:ion	*	*C:ion	*	*C:ion	*
*M2/1	*	*M2/1	*	*M2/1	*
*met(C|)	*	*met(C|)	*	*met(C|)	*
*MM180	*	*MM180	*	*MM180	*
*	*	*	*	*	*ij
*	*	*	*	*	*Xij
*	*	*	*ij	*	*
1r	.	2f	weiß	4a	.
.	.	.	.	4b	.
.	.	2e	zu	1cc	.
1G	zu	1d	spot-	.	.
.	.	.	.	2b	zu
=27	=27	=27	=27	=27	=27
2.A	spot-	2c	ten/	2.cc	spot-
*-	*-	*-	*-	*-	*-

Expected output

VHV

**kern	**text	**kern	**text	**kern	**text
*staff3	*staff3	*staff2	*staff2	*staff1	*staff1
*Ivox	*	*Ivox	*	*Ivox	*
*I"Bassus	*	*I"Tenor	*	*I"Cantus	*
*I'B	*	*I'T	*	*I'C	*
*clefC3	*	*clefC2	*	*clefG2	*
*k[]	*	*k[]	*	*k[]	*
*C:ion	*	*C:ion	*	*C:ion	*
*M2/1	*	*M2/1	*	*M2/1	*
*met(C|)	*	*met(C|)	*	*met(C|)	*
*MM180	*	*MM180	*	*MM180	*
*	*	*	*	*	*ij
*	*	*	*	*	*Xij
*	*	*	*ij	*	*
1r	.	2f	weiß	4a	.
.	.	.	.	4b	.
.	.	2e	zu	1cc	.
1G	zu	1d	spot-	.	.
.	.	.	.	2b	zu
=27	=27	=27	=27	=27	=27
2.A	spot-	2c	ten/	2.cc	spot-
.	.	4s	.	.	.
*-	*-	*-	*-	*-	*-

Missing durations at beginning (and end) of yanked passage

yank -l -r 49-55

VHV

**kern	**text	**kern	**text	**kern	**text
*staff3	*staff3	*staff2	*staff2	*staff1	*staff1
*Ivox	*	*Ivox	*	*Ivox	*
*I"Bassus	*	*I"Tenor	*	*I"Cantus	*
*I'B	*	*I'T	*	*I'C	*
*clefC3	*	*clefC2	*	*clefG2	*
*k[]	*	*k[]	*	*k[]	*
*C:ion	*	*C:ion	*	*C:ion	*
*M2/1	*	*M2/1	*	*M2/1	*
*met(C|)	*	*met(C|)	*	*met(C|)	*
*MM180	*	*MM180	*	*MM180	*
*	*	*	*	*	*ij
2c	.	.	.	4g	der
.	.	.	.	4a	.
=6	=6	=6	=6	=6	=6
1G	mann/	1d	der	4b	.
.	.	.	.	4cc	.
.	.	.	.	2b	.
2r	.	1c	mann/	2cc	mann/
*-	*-	*-	*-	*-	*-

Expected output

VHV

**kern	**text	**kern	**text	**kern	**text
*staff3	*staff3	*staff2	*staff2	*staff1	*staff1
*Ivox	*	*Ivox	*	*Ivox	*
*I"Bassus	*	*I"Tenor	*	*I"Cantus	*
*I'B	*	*I'T	*	*I'C	*
*clefC3	*	*clefC2	*	*clefG2	*
*k[]	*	*k[]	*	*k[]	*
*C:ion	*	*C:ion	*	*C:ion	*
*M2/1	*	*M2/1	*	*M2/1	*
*met(C|)	*	*met(C|)	*	*met(C|)	*
*MM180	*	*MM180	*	*MM180	*
*	*	*	*	*	*ij
2c	.	2e]	.	4g	der
.	.	.	.	4a	.
=6	=6	=6	=6	=6	=6
1G	mann/	1d	der	4b	.
.	.	.	.	4cc	.
.	.	.	.	2b	.
2r	.	1c	mann/	2cc	mann/
2s	.	.	.	2s	.
*-	*-	*-	*-	*-	*-
@WolfgangDrescher
Copy link
Contributor Author

Interestingly, it is possible to render the invalid kern file with verovio, even when the VHV has no output:

Bildschirm­foto 2022-12-06 um 11 12 18

Bildschirm­foto 2022-12-06 um 11 10 31

The problems described in #780 also occur here.

@craigsapp
Copy link
Member

I just posted a similar issue for the myank filter: #780. Would it be a better solution not to fix the yank command but implement this feature into the myank filter and support not only measure range selection but also allow to pass line ranges (e.g. myank -l 181-187)?

Yes, yank is written in AWK which I can read but not write (so it is difficult for me to enhance awk scripts).

@WolfgangDrescher
Copy link
Contributor Author

I startet a PR as a draft to add line range selection to myank in craigsapp/humlib#55. Probably not the best solution, but it's a start. Any feedback welcome.

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