padding incomplete measures?

6 views
Skip to first unread message

Malcolm Sailor

unread,
Aug 7, 2022, 11:12:14 AM8/7/22
to starstarhug
Hi Craig et al.,

I'm wondering if there is a way to pad out incomplete measures in kern files.

For example, the TAVERN dataset contains at least one (possibly more) example like the following:

=364    =364
*^    *
(4B-    [4F    (8.gL
.    .    32aLL
.    .    32gJJJ
8A)    8F]    8f)
8r    8r    8r
4r    4r    4r
*v    *v    *
=||    =||
*M2/4    *M2/4
8r    8c
=365    =365
8r    (8f
(8A    4c)
8GL    .
.    32gq
.    32fq
.    32eq
8FJ)    (8f


Note that there is an incomplete (and unnumbered) measure between m. 364 and m. 365 of only an 8th note duration. Here's the relevant bit of the score to illustrate why:

Screen Shot 2022-08-07 at 11.11.41 AM.png

It would be nice to be able to pad this measure out somehow so it agrees with the notated time signature. Is there a way of doing that automatically? Or failing that, is there a way of locating measures whose length doesn't agree with their notated length, so that I can manually edit them?

Thanks,

Malcolm

Craig Sapp

unread,
Aug 7, 2022, 2:58:13 PM8/7/22
to stars...@googlegroups.com
Hi Malcolm,

If you are analyzing via a MIDI conversion then there will not be a problem, since the metric cycle is not interrupted by the barline between the variations.

For metric analysis in Humdrum, I use the Humdrum Extras program "beat"

The default behavior is to analyze the metric position of lines of data (in units of quarter notes) in a new spine called **beat.

Here is an example:

Screen Shot 2022-08-07 at 8.32.22 PM.png

The -p option prepends the analysis to the input data:

$ beat -p file.krn

**beat **kern

*M2/4 *M2/4

!! theme

2.5 8c

=1 =1

1 4d

2 4f

=2 =2

1 4e

2 4g

=3 =3

1 4.f

!! variation 1

=|| =||

2.5 8c

=4 =4

1 8dL

1.5 8eJ

2 4f

=5 =5

1 8eL

1.5 8fJ

2 4g

=6 =6

1 4.f

== ==

*- *-


Notice that the pickup beat in the theme and variation 1 are on beat 2.5.  This is offset starting at 1; by adding the -z option, the downbeat can start at 0 rather than 1:

$ beat -pz file.krn


**beat **kern

*M2/4 *M2/4

!! theme

1.5 8c

=1 =1

0 4d

1 4f

=2 =2

0 4e

1 4g

=3 =3

0 4.f

!! variation 1

=|| =||

1.5 8c

=4 =4

0 8dL

0.5 8eJ

1 4f

=5 =5

0 8eL

0.5 8fJ

1 4g

=6 =6

0 4.f

== ==

*- *-




For checking the durations between barlines throughout a score, I use "beat -s", where the -s option means to sum the durations within the barline:

$ beat -s file.krn 


**beatsum

*M2/4

!! theme

0.5

=1

2

=2

2

=3

1.5

!! variation 1

=||

0.5

=4

2

=5

2

=6

1.5

==

*-


The 0th measure has an 8th-note duration, then the first and second measures have a duration of 2 quarter notes, followed by 1.5 quarter notes in measure 3 and then 0.5 in the unnumbered measure, and so on.

When I am doing rhythm proofreading for data entry, I will use this command:

$ beat -s file.krn  | ridx -H | uniq -c


which produces the following data from the example score:

   1 0.5

   2 2

   1 1.5

   1 0.5

   2 2

   1 1.5


The first number on a line is the count of the measure durations on the right.   So there is one measure of 0.5 quarter notes followed by two measures with two quarter notes, then 1 measure with 1.5 quarter notes, and so on.    This is the fastest way to identify that there is some complication with barline splitting.

I am not aware of an automatic way of inserting the padding rests, but it is possible to do in a manner similar to how the beat program Identifies the metric patterns: if there are two measure that sum to the same duration as the surrounding measures, then there is an extra barline splitting a metric cycle (so the beat program does not reset the metric cycle at such barlines).   There will be complications in the general case, so for careful manual verifying is the safest method.

Probably the first and/or second endings have to be expanded first before checking the barlines.

-=+Craig









--
--
This is a message is from the **HUG newgroup.
To post to this group, send email to stars...@googlegroups.com
To unsubscribe from this group, send email to
starstarhug...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/starstarhug?hl=en
---
You received this message because you are subscribed to the Google Groups "starstarhug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to starstarhug...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/starstarhug/6f792e30-f25b-4c06-a395-20a087fe9913n%40googlegroups.com.

Malcolm Sailor

unread,
Aug 7, 2022, 3:29:51 PM8/7/22
to stars...@googlegroups.com
Hi Craig,

Thanks for your response!

I didn't look too closely at the score I sent. If I had I might have realized that the last measure of 3/4 is missing an 8th note so that, as you say "the metric cycle is not interrupted". Instead I was looking at the humdrum file (see my first message) and a midi conversion of it. And you'll notice that the last item of the last measure of 3/4 is a *quarter* rest, rather than an eighth as it should be. So this was the source of the error---the previous measure was the wrong number of beats long due to this typo. Thank you for helping me locate that, and for familiarizing me with some useful humdrum commands.

Best

Malcolm

===
Malcolm Sailor
www.malcolmsailor.com


You received this message because you are subscribed to a topic in the Google Groups "starstarhug" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/starstarhug/mZIkYbSb1A8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to starstarhug...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/starstarhug/CAPcjuFd5m_qJyYKzpoxt5e0hoNB_x74YqvqPvBqa05X3yMX1tg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages