Nevertheless, trying to render that and similar examples in the Verovio Humdrum Viewer results in the following score, with 4 different staffs.
According to another Humdrum user, a similar example (but not the same) was rendered correctly in VHV at some point, however, we can't replicate it.
Are we missing something?
Best,
Néstor
You are not missing anything directly in this case. That example you cite from the documentation, I typeset by hand (before VHV was created). I do not remember that the original ms command in the Humdrum Toolkit merged data spines onto staves using the *staff interpretations.
When converting into MEI data for display in verovio, I treat each spine as a separate staff. At the moment the *staff# interpretations are ignored in VHV, but at some point I am thinking of creating a generalized tool that will compile *staff# instructions into a Humdrum file that follows those instructions, such as having two spines with the same staff number merging into the same staff in different layers.
For now, I have a specialized tool called satb2gs (SATB vocal score layout to Grand Staff layout) which is appropriate for this sort of case. Try adding the line:
!!!filter: satb2gs
anywhere in the file when editing it on VHV. Documentation page for the SATB filter:
https://doc.verovio.humdrum.org/filter/satb2gs
Your example could also use the autobeam filter:
!!!filter: autobeam
The output of this filter could be compiled into the data with the alt-c key shortcut in VHV. For satb2gs, it should not be compiled into the data. If you want to edit the beams to add cases that do not match the time signature, then there is graphic editing of beams that is pretty fast:
https://doc.verovio.humdrum.org/graphic/beams
(also using arrow keys to move between notes).
Note that the satb2gs filter is fragile, so it currently does not allow other spines of data such as text or harmonic analysis (I think). I need to allow non-kern spines to also be present in the data that is processed by satb2gs...
-=+Craig
Note that the satb2gs filter is fragile, so it currently does not allow other spines of data such as text or harmonic analysis (I think). I need to allow non-kern spines to also be present in the data that is processed by satb2gs...
--
--
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/13b83db6-b898-4ede-ab7a-5460f8f29227%40googlegroups.com.
recip -p input.krn | extractx -s 1,3 > temp1.fb
extractx -i kern input.krn | satb2gs > temp2.krn
partjoin temp2.krn temp1.fb | extractx -s 3,2,4 > output.krn
--
--
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/ca30e373-2ad2-4ab1-9187-1dc071f89422%40googlegroups.com.
Notice that the score is in SATB format, with the **harm data showing below the bass staff (The **harm spine is actually being attached to the system rather than the bass part, **fb data cannot yet be attached to the system and be converted for display in Verovio, but I will plan on adding that capability). The harmonic labels are colliding since verovio does not do collision avoidance for MEI <harm> data yet. This should not be much of a problem with figured bass since they are narrow, but the spacing of the music can be widened to fix the problem at the moment.
Now when you add the satb2gs filter to the data:
!!!filter: satb2gs
The score will correctly be converted to grand-staff orientation, even though the **harm data is also present:
For data that does not include beams, they can be added automatically with the autobeam filter, either by piping the data to/from satb2gs:
!!!filter: satb2gs | autobeam
or
!!!filter: autobeam | satb2gs
Or, the filters can be added as separate lines:
!!!filter: satb2gs
!!!filter: autobeam
or
!!!filter: autobeam
!!!filter: satb2gs
In this data file, there is a **root spine (second on the line). To make this spine visible as notation, use the filter:
!!!filter: satb2gs | autobeam | shed -e "s/root/kern/X"
The updated satb2gs filter can also be used with the Humdrum Notation Plugin:
You can try playing with the filter option in this online demo using HNP:
https://www.w3schools.com/code/tryit.asp?filename=GAJ2F23MWWAS
(or copy and paste the HTML text in the editor on the above page to try in a file on your local computer)
There is also a command-line version of the new satb2gs version. The new version is only available in humlib (https://github.com/craigsapp/humlib), so I am calling the humlib version "satb2gsx" to indicate that it is the extended version. Eventually the humlib programs will replace their twins in Humdrum Extras from which they originated (humlib has a different Humdrum file parser, which allows for integration with verovio while Humdrum Extras's organization does not). In VHV, you can use either "satb2gs" or "satb2gsx", with both of those filters pointing to the humlib version of the tool (Humdrum Extras and standard Humdrum Toolkit commands are not accessible from VHV since they cannot be compiled into javascript for running in a web browser).
For those who want to use the command-line version of the tool but do not have humlib yet, here are the basic installation commands:
git clone https://github.com/craigsapp/humlib
cd humlib
make
make install
then check if satb2gsx is in the command path:
which satb2gsx
To run from the command-line is equivalent to VHV filters:
cat input.krn | satb2gsx | autobeam > output.krn
An easy way to process all files in a directory in bash:
mkdir temp
for i in *.krn
do
cat $i | satb2gsx | autobeam > temp/$i
done
The directory "temp" will contains all of the data files with the grand-staff layout.
Here is the C++ source code of the new version of satb2gs:
https://github.com/craigsapp/humlib/blob/master/src/tool-satb2gs.cpp
-=+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/457984f2-a032-47e1-aa4d-a0d9cd168c94%40googlegroups.com.