bel28kent / hum-parser

Racket expressions for parsing humdrum files
0 stars 0 forks source link

`autowedge` should allow for angle and square bracket in one token #15

Open bel28kent opened 1 week ago

bel28kent commented 1 week ago

autowedge should allow for the case in which hairpins are contiguous:

!!!COM: Scriabin, Alexander
!!!OTL@@FR: Sonate no 7
!!!OTL@@EN: Sonata No. 7
!!!OPS: 64
!!!ODT: 1911–1912
!!!AGN: Sonata
**kern  **kern  **dynam **kern  **dynam **kern  **dynam
*staff4 *staff3 *staff3/4   *staff2 *staff2/3   *staff1 *staff1/2
*clefG2 *clefF4 *   *clefF4 *   *clefG2 *
*k[]    *k[]    *   *k[]    *   *k[]    *
*M6/8   *M6/8   *   *M6/8   *   *M6/8   *
=261    =261    =261    =261    =261    =261    =261
*   *   *   *   *   *   *^
2.r 2.r .   8FF#X 8E 8A#X   .   4d#X    .   >
.   .   .   8r  .   .   .   .
.   .   .   8r  .   32eLLL  <   ] <
.   .   .   .   .   32g .   .
.   .   .   .   .   32a#X   .   .
.   .   .   .   .   32b#XJJJ    .   [
.   .   .   4r  .   4dd#X   .   >
.   .   .   16r .   32eLLL  .   ] <
.   .   .   .   .   32g .   .
!   !   !   !   !   !   !LO:DY:b=2  !
.   .   .   16BB#X  .   32a#    mp  .
.   .   .   .   .   32b#JJJ .   [
*   *   *   *   *   *   *v  *v
=   =   =   =   =   =   =
*-  *-  *-  *-  *-  *-  *-
!!!system-decoration: {(*)}
!!!filter: flipper -a
!!!RDF**kern: > = above
!!!RDF**kern: N = linked
!!!RDF**dynam: > = dim.
!!!ENC: Bryan Jacob Bell
!!!END: November 2021 to April 2022
!!!PED: Günter Philipp
!!!PTL: Ausgewählte Klavierwerke (Edition Peters)
bel28kent commented 1 week ago

There are (at least) two cases: < [ and ] <. The first should be treated as though the angle is unpaired because there are no intervening null data tokens, so no substitutions can be made. For the second, it should be true, that the > angle before it is paired and that it is an angle, which may or may not be paired.