humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Add addic filter #844

Closed craigsapp closed 1 year ago

craigsapp commented 1 year ago

Add a filter called addic which adds instrument class lines given an instrument cod line.

Example:

**kern  **kern
*I"Tuba *I"Piccolo
*Ituba  *Ipicco
=1  =1
1CC 1ccc
=   =
*-  *-

Output:

**kern  **kern
*I"Tuba *I"Piccolo
*ICbras *ICww
*Ituba  *Ipicco
=1  =1
1CC 1ccc
=   =
*-  *-

If an instrument class line already exists, fill in any blank spots, and correct any inaccurate ones. Do not move the instrument code like in this case if it is not immediately above the instrument code line.