Closed craigsapp closed 2 years ago
AIN reference records "Analytic INstrument list" have been added to the scores. This lists the instruments present in the score, and will be used with instrument searching on the browse page.
Below is the current instrumentations (which is quite dirty and will need to be manually proofread). The first number on the line is the number of scores that have that instrumentation, the rest of the numbers indicate how many parts of a given instrument are in the score. The instrumentation is given in alphabetic order to facilitate searching with regular expressions. "1 cello 1 viola 2 violn" is a string quartet, for example.
The instrument code list is now available through these urls from the POPC2 metdata spreadsheet:
https://script.google.com/macros/s/AKfycbwv9fNZ8GT9DS4QHTJT3o8KapDVt9pbG3aoOITNhVxztHvk1Nrlcg_zjf_pMi6pLUYVIA/exec?format=json https://script.google.com/macros/s/AKfycbwv9fNZ8GT9DS4QHTJT3o8KapDVt9pbG3aoOITNhVxztHvk1Nrlcg_zjf_pMi6pLUYVIA/exec?format=aton https://script.google.com/macros/s/AKfycbwv9fNZ8GT9DS4QHTJT3o8KapDVt9pbG3aoOITNhVxztHvk1Nrlcg_zjf_pMi6pLUYVIA/exec?format=tsv https://script.google.com/macros/s/AKfycbwv9fNZ8GT9DS4QHTJT3o8KapDVt9pbG3aoOITNhVxztHvk1Nrlcg_zjf_pMi6pLUYVIA/exec?format=humdrum
The count parameter indicates how many parts are present in the score database. This is useful for checking for errors in the instrument codes, for example.
Polish instruments are added to the Humdrum Instrument Code spreadsheet by @jacekiwaszko1 :
http://bit.ly/humdrum-instrument-codes https://script.google.com/macros/s/AKfycbxtpzIBumhXjNd30fsWuFdsBco2EqrezXMsUxQ2lrylvwls1AMyI7MuLrW3qRh6_HDp/exec?format=json https://script.google.com/macros/s/AKfycbxtpzIBumhXjNd30fsWuFdsBco2EqrezXMsUxQ2lrylvwls1AMyI7MuLrW3qRh6_HDp/exec?format=aton
These code-to-natural-language names are used as the basis of names for instruments on the popc2 website that comes from this URL (which will change when the score server moves):
https://data.nifc.humdrum.org/instrument-index.json
This list is overlayed with instrument codes found on the POPC2 Instrument code metadata spreadsheet:
https://script.google.com/macros/s/AKfycbwv9fNZ8GT9DS4QHTJT3o8KapDVt9pbG3aoOITNhVxztHvk1Nrlcg_zjf_pMi6pLUYVIA/exec?format=json https://script.google.com/macros/s/AKfycbwv9fNZ8GT9DS4QHTJT3o8KapDVt9pbG3aoOITNhVxztHvk1Nrlcg_zjf_pMi6pLUYVIA/exec?format=aton
Instrument names from this list will override those from the instrument names from the Humdrum Instrument Code spreadsheet (so the POPC2 metadata instrument list can be used to override the instrument names and/or be used to add a non-standard name/code to the final list).
The final list itself is generated by examining Humdrum scores in the database for AIN
reference records, which contain an alphabetically sorted list of instrument codes for instruments in the score (which is generated in preparation of scores in the POPC2 transcription repository.
If there is no AIN reference record (such as for POPC1 files), then instrument codes will be extracted directly from interpretations in the file, such as *Ioboe
for an oboe instrument code.
Blank instrument names in the final list will be ignored on the spreadsheet display of the instruments. There is an empty
code which means that no instrument has been assigned. Other empty instrument names will probably indicate a typo or non-standard instrument code in the scores (that will need to be checked occasionally and fixed in the scores).
Note that there are three more instrument codes given on the POPC2 metadata spreadsheet:
These will need correct Polish names (and also add correct Polish names to the Humdrum Instrument Code spreadsheet).
What a "clarino" is, is not totally clear to me. It seems to be a valveless trumpet (possibly a small valveless trumpet). I would suspect that it is a brass instrument which is straight and not curled up.
There will also be fixes needed to the instrument code assignments in the scores. Particularly anything which is for a recorder will be incorrect (since there are no automatic assignments of recorder instruments). There will also be problems between a contrabass instrument and a bass voice. (See the other issues about cleaning up the instrument codes in the data).
Here is the PERL script used to create the instrument index on the data server:
https://data.nifc.humdrum.org/instrument-index.json
The instrument code index is stored in the variable popc2.VARS.INSTRUMENT_INDEX
on the website:
The translations for instrument names are also dynamically stored in popc2.VARS.TRANSLATIONS
, and indexed by the Humdrum instrument code:
(Since they instrument code list is opening ended, it is dynamically generated from the digital scores, and is not given as a fixed list in the _includes/translations
directory). To add a new instrument name/translation it should be added to either (probably both) the Humdrum instrument code spreadsheet mentioned above, or the POPC2 instrument code list (which has priority over the Humdrum instrument code list). Then the list on the data server will be updated when adding a new batch of scores, or running this command on the data server:
make instrument-index
This make target will update the instrument index based on the PERL script given above.
Commit https://github.com/craigsapp/website-polish-scores/commit/73fada1a1c9553dae321249f2a2b6343dbc30544 adds initial instrument search on browse page:
Some things will need to be cleaned up
(1) when first creating the instrument filter on the browse page, the instrument translations are not available (or may not be available), and so the list will show instrument codes rather than names:
To fix, rebuild the instrument filter when the instrument index has been downloaded from the data server (or cheat and place instrument list in website files).
(2) The instrument codes need to be sorted by the language being used (currently they are sorted by instrument code rather than instrument name in given language):
(3) Currently only a single instrument can be selected. Allow in the future multiple instruments to be selectd. These would be anded
together (require both instruments to be present in matches. There could also be enhancements to select or
(instrument 1 or instrument 2 must be in the score) -- this is less important since separate searches can accomplish the equivalent of or search. And another one that might be more useful is an only
search (scores containing only instrument 1 and instrument 2, but no other instruments).
Commit https://github.com/craigsapp/website-polish-scores/commit/c00fe6457854c3988725122d8bc77787b4a1f679 enables alphabetic sorting of instrument names by active language:
Also note that I have adjusted the English instrument names on the POPC2 instrument name spreadsheet so that similar instruments are grouped together alphabetically, such as the three clarinets:
For the most part, the Polish names already do that, but you could adjust the names in the Instrument Codes tab on the POPC2 metadata spreadsheet to do a similar thing for all instruments (note that I also grouped all voice instrumentations together by labeling the soprano, for example, as voice (soprano)
.
Commit https://github.com/craigsapp/website-polish-scores/commit/81266e55dc29bb85e9a7c121fe2dd94850ae395a regenerates the instrument selection list when the translations have been downloaded. This allows the natural language names of the instrument to be displayed in the list when first viewing the browse page. In addition, a count of the number of scores that containing that instrument is listed after the instrument name.
Selection by instrument needs to be fixed.
Commit https://github.com/craigsapp/website-polish-scores/commit/b4827c7bc581dd1b9c5f2636e5df2a3d7f731f6f fixes selection of an instrument on the browse page. Here is a list of the works containing an ophecleide:
Using multiple
on a select menu is problemmatic since the select menu is no longer popup. So multiple instrument selection can be dealt with later. In some circumstances, the Genre field could be used, such as "SATB" genre to allow for works for 4-part chorale, or an "a capella" option for works only for voice, as well as orchestral for works that contain two violins (or more), viola, cello, and contrabass as well as at least one woodwind or brass instrument.
I added a tab to the POPC2 metadata spreadsheet for Instrument code and their translations into English and Polish. Add the Polish translations:
feme
andmale
will need to be adjusted in the scores. There aretenor
entries andmale
for instrument codes on separate lines, and preferably themale
would not be given in such cases (male
should be reserved for a generic male voice, and it should be inferred thattenor
is a male voice). I.e., there should be only one instrument code for any instrument, not two such as in these cases (or soprn and feme).There are current 45 instruments, which will generate entries in a select menu on the website (ideally a multi-selectable select menu, which is not a built-in feature in HTML):
But there will be more: the
empty
category is a case where an automatic instrument code could not be determined. Also, there will be cases where the instrument code in the scores are incorrect due to an ambiguity in instrument name, such as "Basso" for Bass voice or Contrabass string instrument.In particular, recorders are missing, (in either the
empty
group or incorrectly assigned automatically to theflt
orpicco
codes.