Add metweight tool - #119
Conversation
# Conflicts: # min/humlib.cpp # min/humlib.h
Personally I don't mind the long name. But is this a good terminology? I am not a native speaker.
I could not get `metpos` running (I think it's AWK and not humextra). Click here to see bash stdout.Command:
stdout: !!!!SEGMENT: chor029.krn
!!!COM: Bach, Johann Sebastian
!!!CDT: 1685/02/21/-1750/07/28/
!!!OTL@@DE: Freu dich sehr, o meine Seele
!!!SCT: BWV 32/6
!!!PC#: 29
!!!AGN: chorale
**kern **kern **kern **kern **metpos
*ICvox *ICvox *ICvox *ICvox *
*Ibass *Itenor *Ialto *Isoprn *
*I"Bass *I"Tenor *I"Alto *I"Soprano *
*>[A,A,B] *>[A,A,B] *>[A,A,B] *>[A,A,B] *
*>norep[A,B] *>norep[A,B] *>norep[A,B] *>norep[A,B] *
*>A *>A *>A *>A *
*clefF4 *clefGv2 *clefG2 *clefG2 *
*k[f#] *k[f#] *k[f#] *k[f#] *
*G: *G: *G: *G: *
*M4/4 *M4/4 *M4/4 *M4/4 *M4/4
*M4/4 *M4/4 *M4/4 *M4/4 *M4/4
*M4/4 *M4/4 *M4/4 *M4/4 *M4/4
*M4/4 *M4/4 *M4/4 *M4/4 *M4/4
*met(c) *met(c) *met(c) *met(c) *
!!xywh-#24:169,0,2736,477
=1- =1- =1- =1- =1-
metpos: ERROR: Data record encountered prior to timebase definition at line 23.
This comes from the The output I actually need and would prefer looks like this:
You can already do this with
This is a nice idea I have implemented it in 48a9216. I have also implemented
I will have to think about this in a bit more detail. For now I think the logic I need is slightly different, but I need to check out this approach. Here is my kern file that I am using for debugging:**kern
*M4/2
=
8gL
8g
8g
8gJ
8gL
8g
8g
8gJ
8gL
8g
8g
8gJ
8gL
8g
8g
8gJ
=||
*M3/2
8gL
8g
8g
8gJ
8gL
8g
8g
8gJ
8gL
8g
8g
8gJ
=||
*M2/2
8gL
8g
8g
8gJ
8gL
8g
8g
8gJ
=||
*M6/4
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
=||
*M4/4
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
=||
*M3/4
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
=||
*M2/4
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
=||
*M5/4
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
16gL
16g
16g
16gJ
=||
*M12/8
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
=||
*M9/8
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
=||
*M6/8
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
16gLL
16gJ
16gL
16gJ
16gL
16gJJ
=||
*M3/8
32gL
32g
32g
32gJ
32gL
32g
32g
32gJ
32gL
32g
32g
32gJ
==
*- |



I added a
metweighttool that analyzes kern files withTool_meterand creates a new spine for each selected voice (-kor-s) that outputs the meter weight of every token.Generated data tokens are as follows:
"s""strong""1""hs""half-strong""2""w""weak""3""u""unclassified""4"These options are available:
Example usage:
Command:
Output: