URLs can include parameters that are passed to the VHV webpage. The parameters
are appended to the main URL address after the ?
character. Each parameter
is separated from the next parameter by &
and each parameter consists of a key
and value pair which are separated from each other by =
. Here is an example URL that
contains all of these features:
The pieces of the full URL are:
https://verovio.humdrum.org
- The main part of the URL.
?
- The start of the parameter list.
k=Ebey
- The first parameter, with
k
being the name of the parameter andEbey
being the value for thek
parameter. &
- Parameter separator character.
file=beethoven/sonatas/sonata01-1.krn
- The second parameter in the URL called
file
with a value ofbeethoven/sonatas/sonata01-1.krn
.
The parameter order does not matter, so k
can equivalently come after file
:
Also note that certain characters are not allowed within parameter
values, such as &
, obviously. Instead, such characters must be
escaped using percent
encoding. In addition to the list on that page, newlines must
be escaped as the characters %0A
, tabs as %09
and spaces
as %20
. Percent encoding is a hexadecimal value for the ASCII
(or generally UTF-8) byte codes of the character.
Setup parameters
k/keys
The k
parameter (long form keys
) can be used to emulate keyboard
shortcuts that are run immediately after VHV is loaded. The characters
in the following table are given in a string to the parameter.
Here is an example use to show minimal controls in VHV:
https://verovio.humdrum.org/?k=Ebey&file=beethoven/sonatas/sonata01-1.krn
The string Ebey
is equivalent to typing
alt-shift-E,
alt-b,
alt-e,
alt-y after VHV
has loaded. The order of the letters does not matter, so Ebey
and bEey
are equivalent.
Character | VHV shortcut | Meaning | |
---|---|---|---|
B |
alt-shift-B | Hide the toolbar. | |
b |
alt-b | Suppress the VHV logo at the top left of the VHV window. | |
d |
alt-d | Hide the menu in the VHV header. | |
E |
alt-shift-E | Hide both the menu and the toolbar areas. | |
e |
alt-e | “Erase”: Suppress the splash music when opening VHV (or any previous content from your last visit). | |
w |
alt-w | Widen the spacing of the notation. Multiple w characters can be used to increase the spacing more. |
|
W |
alt-shift-W | Narrow the spacing of the notation. Multiple W characters can be used to decrease the spacing more. |
|
y |
alt-y | Hide the text editor. |
Data parameters
The t
and f
parameters can be used to preload a digital score
from the URL.
t/text
The t
parameter (or long form text
) is used to load text from
the parameter value into the text editor as VHV is loaded. Two
forms of data can be loaded using this parameter: either raw text
or MIME-encoded text. This method is most useful for loading short
example scores into VHV. The total URL length including the t
parameter data should not exceed about 2000 characters, although
some web browsers allow longer URLs, with the actual maximum depending
on the specific web browser.
Raw text data for t parameter
For raw text, special characters for the URL must be escaped using
percent
encoding. Also, newlines need to be encoded as %0A
, tabs as
%09
and spaces as %20
. Type some text into the following box,
and a URL with the raw text encoded in the t
parameter will be
displayed underneath.
Here is a URL containing the above contents in the t
parameter (click to view in VHV):
MIME-encoded data for t parameter
Here is an example of MIME-encoded text:
https://verovio.humdrum.org/?t=KiprZXJuCjFjCj0KKi0
The string KiprZXJuCjFjCj0KKi0
is the following MIME-encoded text:
**kern
1c
=
*-
This will be decoded and inserted into the VHV text editor when the above link is clicked on.
You can add some text to the box below and a URL to VHV with the t
parameter filled in with the MIME-encoded text will be displayed below:
f/file
The f
parameter (or long form file
) is used to load a digital
score into the editor. The value can either be either a built-in
repertory score, or an arbitrary URL to a score available on the
web. If you load a score using http://
(unsecured HTTP), then
you should use the unsecured address of VHV
(http://verovio.humdrum.org); otherwise,
scores loaded with https://
can be loaded from either
http://verovio.humdrum.org or
https://verovio.humdrum.org.
Repertories
A repertory file can be loaded into the editor if
there is no https://
prefix in the file
parameter’s value. This
will also place repertory navigation buttons at the top left side
of the navigation bar in VHV. Here are examples of loading repertory
files. You can click on the repertory up-arrow to view an index
of other scores in the same repertory.
- Beethoven, Piano sonata no. 1 in F major, mvmt. 1:
- https://verovio.humdrum.org/?k=ey&file=beethoven/sonatas/sonata01-1.krn
- Mozart, Piano sonata no. 1 in C major, K 279/189d, mvmt. 1:
- https://verovio.humdrum.org/?k=ey&file=mozart/sonatas/sonata01-1.krn
- Scarlatti, Keyboard sonata in C major, L.1/K.514:
- https://verovio.humdrum.org/?k=ey&file=scarlatti/sonatas/L001K514.krn
- Chopin, Etude in C# minor, op. 10, no. 3 from the Fryderyk Chopin Institute:
- https://verovio.humdrum.org/?k=ey&file=chopin-first-editions/010_1-6-1b-KI-004.krn
- J.S. Bach, Chorale Aus meines Herzens Grunde, BWV 269:
- https://verovio.humdrum.org/?k=ey&file=chorales/chor001.krn
- Givaonnelli, Non è questa la mano, (1588) madrigal from the Tasso in Music Project
- https://verovio.humdrum.org/?k=ey&file=tasso/Trm/Trm0047m-Non_e_questa_la_mano--Giovannelli_1588.krn
Notice that when you load a repertory score, there are repertory navigation buttons in the top left corner of VHV that allow you to browse other files in the repertory or view an index of all of the scores in the repertory.
Repertory indexes
You can open VHV with the list of all works in the repertory by listing the repertory path without a filename:
Then you can choose a specific file in the repertory to view in VHV. You can also press the esc key to close the repertory index without choosing a score to load.
File URLs
VHV knows where built-in repertory files are located on the web, but if you need to load a file that it is unaware of, you can give the full URL address to the digital file.
For example, the repertory location of the Beethoven sonata movement example given above is:
This can be expanded into into a fully qualified URL giving the actual location of the file on the web:
which loads the score from this link:
Shortcuts
Several repertories and websites have shortcut methods to avoid specifying an entire filename or URL.
Github shortcuts
Github URLs can be long:
Such Github URLs can be condensed into this form for the file
parameter:
github:username/repository/path-to-file/filename
Notice that the directory name master
is skipped since it is the
real root directory of the repository files and not a directory
name within the repository. The Beethoven digital score full URL on Github can
be condensed into:
github:craigsapp/beethoven-piano-sonatas/kern/sonata01-1.krn
Resulting in the VHV direct link to that score being shortened to:
Repertory shortcuts
Several repertories have long names for the files that consist of a catalog number for computational processing, followed by the title of the work for human readability. VHV has a shortcut that allows loading the repertory score based on a catalog number rather than the full filename and path to the file in the repository.
For example the repertory link for the example Tasso in Music Project work:
Can have the full repertory path and name reduced from:
tasso/Trm/Trm0047m-Non_e_questa_la_mano--Giovannelli_1588.krn
to:
tasso:Trm0047m
in the VHV link to the score:
Josquin Research Project scores can also be loaded from a repertory shortcut. Full repertory names for these files can be condensed from:
jrp/Ock/Ock2002-Ave_Maria.krn
to:
jrp:Ock2002
resulting in a shorter VHV URL:
Search parameters
The three parameters p
, r
and i
can be used to search for pitches,
rhythms and/or intervals. These parameters will be loaded into the
search toolbar
when loading VHV, and the search tool will be activated and a search
done as soon as the score has been loaded.
p/pitch
Here is an example of searching for the opening theme in Beethoven piano sonata no. 1, mvmt. 1:
This searches for the diatonic pitch-class sequence C F A C F A G F E F
.
r/rhythm
Search for the rhythmic pattern 16 8 16 8 16
in Joplin’s The Entertainer:
i/interval
Search for the diatonic interval sequence 8 -2 2 -8
(up an octave, down a step, up a step, down an octave)
in Mozart Piano sonata no. 1, mvmt. 1:
F/filter
The filter
parameter can be used to process an incoming score
with one or more filters after
the score has been loaded into VHV. Note as with all parameter values,
some characters should be percent
encoded.
Single filter
Here is an example of transposing the Beethoven piano sonata movement from F minor to A minor:
The filter is transpose -ka
, which means transpose the score to
the key of A (minor in this case, since modality is preserved). The %20
characters is the percent encoding of a space character.
Multiple filters
Separate filters can be serialized in the filter parameter by separating them
with a pipe character (|
). The filters will be applied in the order they
are placed in the filter string. Here is an example of displaying a
Bach chorale in grand-staff format and then coloring the triadic
sonorities:
satb2gs|colortriads
The pipe character is %7C
in percent encoding.
Filtering and searching
The filter
parameter can be mixed with music searches. Here is an example of
extracting the top notes of chords before searching for the rhythm 16 8 16 8 16
in Jopin’s The Entertainer.
Compare to the same search without the filter:
tb/Toolbar
Set the visible toolbar.