Static code analysis to measure the quality of musical scores
The document discusses using static code analysis to measure the quality of digital musical scores created with LilyPond. It developed a plugin for the SonarQube platform to analyze LilyPond scores and implemented rules to check for errors. Experts then evaluated scores in SonarQube and found it helped identify errors they also noticed manually. The work is limited but aims to expand metrics and support other score tools to improve quality analysis of digital musical works.
1 of 24
Download to read offline
More Related Content
Static code analysis to measure the quality of musical scores
1. Static code
analysis to
measure the
quality of
musical scores
Javier Merchán Sánchez-Jara
Tatiana Person
Almudena Mangas-Vega
Iván Ruiz-Rube
Juan Manuel Dodero
Jose Miguel Mota
ICCC 2018
2. TABLE OF CONTENTS
1. Context
2. Contribution
3. Evaluation
4. Conclusions and future work
4. Introduction1.1
▸ Humanities become digital since the moment in which
the search and retrieval of information in the current
scenario passes irremediably through the resources on
the Web. Musical edition and creation does not escape
this situation.
▸ The required skills to improve this creative cycle depend
on using new web resources, enriched with diverse
technological, communicative and problem solving
issues that form the basis of creative thinking abilities.
5. Digital creation of musical scores1.2
▸ All the agents that interrelate with a digital score (authors,
interpreters, researchers, librarians, repository managers, etc.) need to
use software to develop their work.
▸ In recent years, several tools have been developed to create, study
and share musical scores.
▸ Any failure in the quality of the digital documents (scores) can be
replicated and spreaded when sharing them on the Internet.
▸ It is necessary to apply quality controls to check musical artifacts and
find potential issues. However, this may be a time-consuming and
(probably) unsustainable task, especially, in large repositories.
6. LilyPond1.3
▸ LilyPond is a tool that
creates sheet music. It
takes care of the details of
layout programmatically.
▸ Allows composers,
transcribers and publishers
to focus on the music
instead of improving their
graphical output.
7. ▸ In Software Engineering, static analysis is one of common
techniques to ensure the quality of the programs.
▸ This is a white-box testing technique consisting on scanning
the source code (line by line) prior to release or sell the
software.
▸ The aim is to find common issues, such as duplicated
statements, code blocks with high complexity, security
vulnerabilities, potential bugs, etc.
▸ Luckily, there are tools for automating code analysis
Code static analysis1.4
8. ▸ SonarQube is a open source tool
for measuring the quality of
source code.
▸ Allows developers to analyze the
source code of more than 20
different programming
languages.
▸ SonarQube provides a visual
dashboard that includes the
result of several metrics
SonarQube1.5
10. ▸ Plugin for the SonarQube platform to analyse music scores
created with LilyPond
Our Contribution2.1
11. Implemented rules to check music
scores2.2
▸ Rule 1: Check that not use is made of consecutive silent beats.
▸ Rule 2: Check if a note is held in the previous beat for include a
precautionary alteration.
▸ Rule 3: Check that the tempo has been included at the beginning
of the music score.
▸ Rule 4: Check that the time change has been done correctly.
▸ Rule 5: Check that the music sheet title is included.
12. Implemented rules to check music
scores (2)2.2
▸ Rule 6: Check that the music sheet composer is included.
▸ Rule 7: Check that a page step cannot exist in a repeat volta
instruction.
▸ Rule 8: Check that the lines of code should not be too long.
13. SonarQube definitions2.3
▸ Error: Message displayed by SonarQube describing the
reason for the error.
▸ Severity: Severity level of the error. SonarQube categorizes
errors in "Minor" or "Major" severity, depending on the
relevance and correction time of the error.
▸ Time: The estimated time that the creator of the musical
score must spend to correct the error.
16. Evaluation process3.1
▸ A study of usability was conducted on a set of experts in
the music domain
▸ First, the respondents had to directly observe a given sheet
music in PDF. This music score was created using LilyPond
including some syntax errors.
▸ Afterwards, the experts had to access to the SonarQube
instance and then visualise the list of evidences
automatically found in the sheet
▸ Finally, the have to fill in a pre-test and a post-test
questionnaire
17. Music sheet PDF created with LilyPond3.2
https://goo.gl/CLc54N
18. Analysing music sheet in SonarQube3.3
http://vedilsanalytics.uca.es/sonarqube/dashboard/index/35
19. Analysing music sheet in SonarQube (2)3.3
http://vedilsanalytics.uca.es/sonarqube/dashboard/index/35
20. Usability attributes3.4
▸ Learnability: Have you been able to access to SonarQube and
visualise the errors and bad practices automatically found by the
tool for the sheet music created with LilyPond?
▸ Efficiency: Do you think that the errors and warnings issued by
SonarQube correspond to the ones you found when you
observed the sheet music in PDF?
▸ Satisfaction: Would you consider interesting the inclusion
of this type of tool to analyse the quality of music sheets?
▸ Utility: How useful would you consider this tool?
23. Conclusions and future work
4.1
▸ An extension to the static analysis code platform SonarQube to
measure the quality of musical scores created with LilyPond.
▸ The work is limited to the implementation of a very specific set of
metrics, aimed at experimentation and preliminary evaluation of its
usefulness by a panel of experts.
▸ As future work, we will expand the collection of metrics. In addition,
we'll improve the plugin to analyse scores created with other tools
besides LilyPond (v.g. MuseScore).
▸ Another domain that is interesting to consider is to detect and evaluate
the incorporation of additional contextual information to the score,
including bibliographic information, as well as descriptive or
interpretive information whose presence is not an essential
requirement but an added value regarding quality.