craigsapp / humlib

Humdrum data parsing library in C++
http://humlib.humdrum.org
BSD 2-Clause "Simplified" License
32 stars 8 forks source link

[fb] Control stack placeholders #60

Open WolfgangDrescher opened 1 year ago

WolfgangDrescher commented 1 year ago

It would be nice if there was an option to control the position of the numbers with stack placeholders.

http://verovio.humdrum.org/?file=bach-wtc-fugues/wtc2f24.krn

fb -c -a -3

Bildschirm­foto 2023-01-16 um 11 24 08

With this option the numbers in measure 97 should be vertical aligned to the bottom. Basically each track should get its own stack placeholder.

Of course you could simply use fb -c -a -3 -i instead:

Bildschirm­foto 2023-01-16 um 11 24 48

When introducing stack placeholders numbers could also pushed to the bottom when using --above:

fb -c -a -3 -r --above

Bildschirm­foto 2023-01-16 um 11 29 26

But this needs to work a bit differently since when using -n or -r the max number of displayed numbers per chord needs to get calculated. Without these option the max number of tracks can be used. Unfortunately we cannot do this per line as the kern encoding does not know about the dynamic line width when rendered with verovio. So we can only do this per file (or per measure).

WolfgangDrescher commented 1 year ago

It's actually not that easy as tracks can have chords:

http://verovio.humdrum.org/?file=beethoven/quartets/quartet02-2.krn

Bildschirm­foto 2023-01-16 um 11 44 46
craigsapp commented 1 year ago

What are the fb options used in the last example?

WolfgangDrescher commented 1 year ago

fb -c -a. Already fixed the missing 8 (1 for non compound: fb -a) in the viola.