You are on page 1of 9

Music SOFA

An architecture for semantically informed recomposition of Digital Music Objects

David De Roure Graham Klyne John Pybus


University of Oxford University of Oxford University of Oxford
Oxford, UK Oxford, UK Oxford, UK
david.deroure@oerc.ox.ac.uk graham.klyne@oerc.ox.ac.uk john.pybus@oerc.ox.ac.uk

David M. Weigl Kevin Page


University of Oxford University of Oxford
Oxford, UK Oxford, UK
david.weigl@oerc.ox.ac.uk kevin.page@oerc.ox.ac.uk

ABSTRACT fragments to help guide the process of assembly into a composition.


We describe the design and implementation of a semantic music This notion of Semantic Music differs from semantically described
system which illustrates the assembly of a music composition using metadata pertaining to a musical work, or semantic representations
semantically annotated music fragments. The system, which we at note or chord level. We are particularly interested in developing
call SOFA (SOFA Ontological Fragment Assembler), demonstrates this approach as a basis for Digital Music Objects (DMOs), i.e. rich
architectural design principles which may have more general appli- representations of music works which are semantically described
cability in the semantic music domain, notably the adoption of the and may carry information about process and provenance. In this
Linked Data Platform to realise service components of the end-to- section we describe the background to our work.
end pipeline so that data specialisation takes the place of service
specialisation. The prototype builds upon two existing tools devel- 1.1 Historical context and Numbers Into Notes
oped by the authors: Music Encoding and Linked Data (MELD), The research came about as a result of a historical thought experi-
which augments and extends MEI structures with semantic Web ment. In 2015 we were involved in organising an event to celebrate
Annotations capable of addressing musically meaningful score sec- the 200th Anniversary of the birth of Ada Lovelace, who wrote of
tions, and Numbers Into Notes, an algorithmic composition tool Charles Babbage’s proposed Analytical Engine: [15]
that acts as a ‘semantic signal generator’ to drive the tool chain. Supposing, for instance, that the fundamental rela-
The system demonstrates the concept of Digital Musical Objects tions of pitched sounds in the science of harmony and
(DMOs), and in particular DMO processing and recomposition. of musical composition were susceptible of such ex-
pression and adaptations, the engine might compose
CCS CONCEPTS elaborate and scientific pieces of music of any degree
• Information systems → Semantic web description languages; of complexity or extent.
• Applied computing → Sound and music computing; Using a simulator for Charles Babbage’s Analytical Engine, and
with input from mathematicians and musicologists, we generated
KEYWORDS fragments of music algorithmically. We then made a Web version
Semantic Music, Digital Music Object, Linked Data Platform of our software, called Numbers into Notes1 , which exports the frag-
ACM Reference Format:
ments in multiple representations, including MIDI, W3C PROV,
David De Roure, Graham Klyne, John Pybus, David M. Weigl, and Kevin Page. and a musical score. [22]. As well as a demonstration at the event,
2018. Music SOFA: An architecture for semantically informed recomposition generated fragments have subsequently been used to create com-
of Digital Music Objects. In Proceedings of ISWC Workshop on Semantic positions, for example a performance at Audio Mostly in London
Applications for Audio and Music (SAAM) (SAAM’2018). ACM, New York, in 2017.
NY, USA, Article 4, 9 pages. https://doi.org/10.475/123_4 The success of this experiment in combining semantically de-
scribed fragments to create a composition has led to the work we
1 BACKGROUND describe here, which we believe to be of general utility. In particular,
Our research explores the idea that music can be described as an the architecture we describe demonstrates some design principles
assembly of musical fragments, and uses semantic annotation of which should be applicable to a broader body of work in the seman-
tic music domain.
Permission to make digital or hard copies of part or all of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for profit or commercial advantage and that copies bear this notice and the full citation 1.2 Contextual Semantics for Music
on the first page. Copyrights for third-party components of this work must be honored. Our approach draws on music metadata and Linked Data patterns,
For all other uses, contact the owner/author(s).
SAAM’2018, October 2018, Monterey, California USA which we incorporate and extend to inform the design of our se-
© 2018 Copyright held by the owner/author(s). mantic music system.
ACM ISBN 123-4567-24-567/08/06.
1 http://numbersintonotes.net
DOI: 10.1145/3243907.3243912
SAAM’2018, October 2018, Monterey, California USA D. De Roure et al.

Broadly we draw on three approaches to music metadata, as 1.3 Music Encoding and Linked Data (MELD)
follows: Information systems typically describe music and other timed mul-
Content-derived feature data. Feature extractors operating over timedia information resources using timeline-based anchors ex-
music content generate mathematical approximations of human pressed as millisecond offsets from the start of an audio recording,
music perception: basic percepts (pitch, note onsets); models of or as MIDI clock ticks (e.g. [10, 20]). While such temporal offsets are
structure and form (e.g. key detection; meter estimation; structural widely used to link to positions within video or audio recordings,
segmentation); higher-level percepts such as instrument classifica- their usefulness is limited when targetting music in conceptual
tion. By augmenting content with derived feature data, music infor- terms, as when annotating musical score.
mation can be structured to provide for automated analysis, discov- By drawing on machine readable, addressable music encodings
ery, and retrieval at scale. To overcome the semantic gap between such as those offered by the MEI schema, Music Encoding and
human experience and mathematical approximation, provenance Linked Data (MELD)3 offers an alternative approach, anchoring
information regarding the precise mechanism of derivation—plugin semantic Web Annotations [4] within a meaningful representation
names, versions, and parameterisations–must be captured and asso- of musical structure (Fig. 1). The MELD semantic framework [25]
ciated with the feature data. An exemplar Linked Data publication combines and augments pertinent subsets of established ontologies,
describing a large community-contributed collection of live music including: the FRBR-aligned Music Ontology [21] to discriminate
recordings [1] adopts a ‘layered’ approach to digital library meta- compositional entities at different levels of abstraction (e.g. a mu-
data [13] that augments the audio recordings and semi-structured, sical work at conceptual level, its expression as musical score, and
user-provided descriptions of the source archive with additional its manifestation as a particular music encoding); and the Segment
layers of structured metadata describing content, computational Ontology [9] to describe musical segments comprising a segment
analysis, and associated provenance information [18]. This provides line, bridged to ontological structures expressing elements of mu-
for automated exploration, analysis, re-interpretation and re-use sical form appropriate to specific subdomains (e.g. verse, chorus;
without modification of the source archive. sonata, fugue). Collections of MEI fragments, manifestations of
musical segments embodied within a published score (MEI file),
Bibliographic context. From library catalogues, to media broad- anchor annotations associating and interlinking musical content
cast records, to musicological and music industry databases, web- and extra-musical information resources with elements of musical
accessable music datasets provide access to varied descriptions of structure.
musical works, composers, performers, performances, and myr- Each MELD Web Annotation is associated with a motivation
iad other kinds of related contextual information. In the absence formalising the annotation’s intended purpose. In a given MELD
of shared identifiers, these datasets remain isolated, restricting application, web clients interpret annotations according to these
combined access. Ambiguities, such as names shared between indi- motivations, effecting corresponding actions through domain- and
viduals, hinder automated reconciliation; while manual alignment use-case-specific rendering and interaction handlers. A library of
requires exponential effort with growing datasets. Computational ReactJS web client components4 is available, simplifying the cre-
assistance, generating match proposals while deferring to human ation of MELD applications for varied contexts and use-cases. Such
insight for confirmation, can address these challenges, providing apps have been developed to drive musical performances [11], sup-
unified access to complementary datasets, while supporting schol- port collaboration between musicians in jam session scenarios [25],
arly communication through match provenance (e.g. in cases of and support contextual interpretation of digital music notation for
contested attribution). Matches can be proposed according to string musicological scholarship [17]. Here, we apply MELD in the speci-
similarity [2], but more ambiguous matching requires rich semantic fication of DMOs representing the musical fragments generated by
context2 [24]. Numbers Into Notes, progressively augmented with additional meta-
data through an iterative annotation process. The resulting set of
Music encoding. Notated music precisely describes compositional
music flows and data structures supports the creative (re-)assembly
intent independently of any particular performance. Annotations
of such fragments into new compositions according to semantic
upon written music have long supported edition, analysis, rehearsal,
notions of musical compatibility.
and performance [26]. The Music Encoding Initiative’s XML schema
[5] (MEI) offers such affordances in digital form through a com-
prehensive machine-readable representation of musical structure.
1.4 Separation of Concerns using Linked Data
Elements at any level of abstraction, from a complete work to an ac- A goal of our design is to separate the semantic analysis and an-
centuation mark on a particular note, are identifiable with standard notation of music fragment compatibility from the use of this in-
XML element IDs, which become web-addressible when employed formation in fragment assembly, in order to facilitate the later
as fragment identifiers at the end of MEI file URIs. In turn, the re- adoption of new forms of semantic annotation. Linked data and
sulting element URIs can be incorporated as Linked Data providing web standards underpin the information flows between analytical
for annotation and other semantic associations while bypassing the and consumptive (assembly-related) elements: LDP [23] provides
need for formal ontological (RDF) descriptions of musical structure. a uniform interface (per REST architectural style [8]) for exchang-
ing information via web-accessible resources, Web Annotations
2 Where a composer is associated with a work that is included within a book of
music which is in turn attributed to an author, this provides contextual cues that the
3 http://github.com/oerc-music/meld
composer and the author may be the same individual, particularly when they share
4 http://github.com/oerc-music/meld-clients-core
other contextual similarities, e.g. in birth or death date, or place of birth.
Music SOFA SAAM’2018, October 2018, Monterey, California USA

2.1 Semantic Signal Generator (SSG)


For the purposes of our research we need a supply of music frag-
ments, and for this we turn to our other semantic music tooling.
The Numbers into Notes software can be used to generate fragments
in multiple formats, and provides a rich supply of source content
which is parameterised by the settings of the application.
This is a novel deployment of the software as part of our tool
chain, and we describe it as a Semantic Signal Generator (SSG),
by analogy with the signal or function generator that an audio
engineer may use in testing audio signal processing. From a creative
viewpoint it also provides a particular approach to algorithmic
composition, but we can also work with other sources of music,
Figure 1: Overview of the Music Encoding and Linked Data
whether audio or symbolically encoded.
(MELD) framework. Traditional multimedia alignments em-
The original implementation of Numbers into Notes supported
ploying timeline anchors (red arrows) are augmented with
MIDI and Lilypond (music engraving) export formats, plus W3C
semantic relationships anchored in musical structure (green
PROV to provide a record of how a fragment was created (and
arrows).
could be recreated). We extended this to include MEI in order to
drive MELD. It is straightforward to add further formats, and we
anticipate future versions supporting MusicXML and interoperating
[4] are used to associate musical resources with semantic informa- with other semantic music tooling and ontologies.
tion, MEI [5] is used to represent fragments of music, and MELD
[25] provides a framework for referencing music fragments, their 2.2 The SOFA Ontological Fragment Assembler
arrangements, and associated semantic annotations.
(SOFA)
Using Web Annotations, MELD incorporates specialised seman-
tic information about fragments in a common access framework. The SOFA Ontological Fragment Assembler (SOFA) is an appli-
By materialising semantic information in LDP containers, we are cation which takes a set of musical fragments produced by the
able to use off-the-shelf LDP software for the service elements (we Semantic Signal Generator, along with annotations informed by
discuss later (section 3.3) how specialised LDP service software the semantic context, and provides a remixer interface offering a
might enable on-the-fly materialization of matches). We use sep- guided environment for the user to experiment with assembling
arate LDP containers to capture different types of inter-fragment the fragments to create a new musical composition.
compatibility (e.g. key, pitch range, length of fragment). The mem- The user starts by pointing the application to a URI representing
bers of each container are Web Annotations, arranged to enable a set of fragments exported from the Semantic Signal Generator; this
the discovery and enumeration of compatible fragments using a will form the group of fragments available for use in the assembly
follow-your-nose pattern [7]5 . interface. The remixer allows for multiple parts to be specified, and
Thus we represent compatibility semantics through specialised the user configures the number of parts, associating with each an
representations, while using existing LDP and related Web stan- instrument chosen from the instrument taxonomy described in 3.4.
dards for access and “query”. This approach of adding specialised The main interface takes the form of a grid where the user can
representations to existing standards has been put to good use in place fragments to assemble the piece. Each fragment is represented
other projects: Memento [6] uses a small number of specialised by an engraved score, and the ‘cursor’ where the current selection
HTTP header fields; ORE [16]defines vocabulary for representing is being made is highlighted. The selection being a modal ‘pop-up’
exchange of composite objects using HTTP; Web Annotations [4] which shows a list of available fragments rendered as engraved
defines an extensible vocabulary for use with LDP containers. score. Each fragment having a play button to allow the user to hear
a midi representation.
2 SEMANTIC MUSIC FLOWS To assist the user, fragments available for selection are filtered
according to annotations which identify various forms of compat-
Having related the contextual landscape available to semantic music ibility. The horizontal rows, associated with a particular musical
applications, we now consider how music fragments can be cre- instrument, are constrained to be within the playing range of that
ated and annotated by leveraging these approaches to contextual instrument, so the interface filters out any fragments which contain
metadata, and how ‘music flows’ of iterative semantic enrichment notes outside the range as represented in the instrument taxon-
can create contextual webs of information about and around the omy. In order that the fragments line up in the output piece, the
fragments, providing for their re-interpretation and consumption. system constrains all of those in the same column to be of the same
In section 3, we will detail the implementation of an ontological length. After one fragment has been selected in a column, the selec-
fragment assembler that practically applies these ideas within a tions for the other spaces are filtered to only show those fragments
semantic architecture accessible via a web interface. Finally, we annotated as being of the same length.
provide reflections and outline avenues for future work in section 4. In addition to the annotations informing the filtering by compat-
ible instrument and matching length, there may be other types of
5 http://patterns.dataincubator.org/book/follow-your-nose.html match annotation, identifying compatible fragments according to
SAAM’2018, October 2018, Monterey, California USA D. De Roure et al.

other schemes. One such we have implemented is compatible key the same or related key, playable on the same instrument). This
where fragments composed in the same key, or in a neighbouring generic music flow is represented in the top half of Figure 3.
key on the circle of fifths, are matched. The interface has no prior SOFA can only provide for remixing according to semantic con-
knowledge of these types of annotation, but adapts to the annota- texts in which annotation agents and matching agents have oper-
tion data it receives and offers a checkbox for the user to optionally ated, as its remixing rules rely on their output; a greater number
filter by this criteria. The options offered to the user depend on of annotated fragments offers the composer using SOFA a corre-
which semantic annotations have been added to the fragments. sponding higher degree of creative flexibility. Conversely fragments
not thus augmented with metadata cannot be utilised in SOFA ac-
cording to our chosen scenario (section 3). Just as the Semantic
Signal Generator can usefully add to the pool of available music
fragments at any time, so to can annotation agents make additional
indications. We see these interactions within the music flow not as
a series of tightly coupled service calls, but as dynamic, iterative,
additions to the Web of Linked Data of which the fragments form
just one part.
On the other hand, there is clearly a pipeline of increasingly
enriched fragments moving from the SSG to the SOFA remixer—a
music flow of fragments, gathering semantic context according to
the annotation and matching agents. At the point an agent interacts
with one, we conceptualise a fragment and its associated scoped
semantic context (drawn from the Web of Linked Data) as a DMO,
with a series of related and derivative DMOs the artefacts of the
music flow (illustrated in the lower half of Figure 3).
We can thus consider our architecture at a high level through
two lenses: as a music flow with fragments moving from agent to
agent towards a particular goal; and as a Web of DMOs which are
individually crystallised into existence when an agent requires a
semantically scoped fragment upon which to operate.
MUSIC FLOWS

Semantic
Annotation Matching SOFA
Signal
agents agents remixer
Figure 2: The SOFA remixer interface showing the fragment Generator

assembly grid and the fragment selection list


WEB OF DMOs

Music Fragment Materialized Output


2.3 Music Flows using Digital Music Objects fragment
DMOs
compatibility
DMOs
match
DMOs
composition
DMO

(DMOs)
The previous two subsections have introduced first the Semantic
Signal Generator as a source of music fragments, and secondly the Figure 3: Music Flows and Digital Music Objects (DMOs)
SOFA remixer as a user application taking advantage of Linked
Data to creatively assemble fragments. These two components de-
fine the start and end of a music flow; at mid-points in the flow
3 SOFA IMPLEMENTATION
each fragment is associated with additional semantic context, re-
alised through annotations, which encode the properties by which In this section we describe the achitecture of the SOFA Ontological
remixing in the SOFA can proceed. Fragment Assembler and its implementation to provide a proof of
For the SOFA scenario introduced above, annotations must be concept system.
added within a music flow to indicate a fragment’s key, length, and
the instruments for which the fragment is within performable range. 3.1 Architectural Overview
We can imagine further annotations marking the scale mapping, Figure 4 shows the overall system of which the SOFA remixer is a
start and end notes, time signatures, and provenance information part, consisting of:
such the user who created the fragment, and the algorithmic map- Semantic Signal Generator (SSG) - in our example, this is Num-
ping used in the Semantic Signal Generator. bers Into Notes, but could be any application that generates anno-
Annotation agents analyse the fragments within these specific tated music fragments.
semantic contexts (e.g. key, instrumentation) and indicate compati- Annotated music fragments - musical fragments and accom-
bility through addition of annotations. At a later stage in the flow, panying metadata that can be recognised and analyzed by the
matching agents use the semantic annotations to indicate groups compatibility analysis agents. The Annotated music fragments are
of compatible fragments which are candidates for remixing (e.g. of grouped into Working sets for subsequent processing.
Music SOFA SAAM’2018, October 2018, Monterey, California USA

Compatibility analysis agents - these are non-interactive pro- container representing a working set, thus becoming available to
cesses that analyze the annotated music fragments in a working set subsequent stages of the music flow. This fragment reference ab-
and generate fragment compatibility annotations, and save these for straction is used to allow fragments to be incorporated within
subsequent access using the Match retrieval service. Many agents multiple different working sets.
may be applied to a working set, with each typically handling Upon inclusion within a working set, annotation agents employ-
a single analysis (e.g. key compatibility, pitch range constraints, ing feature extraction heuristics annotate the music fragment DMO
fragment length matching, etc.). with semantic descriptors characterising aspects of the composi-
Fragment compatibility annotations - web annotations that tion. In the current implementation, these derived features include:
record pairwise compatibility between fragments, possibly with length as a simple count of notes and rests, which are isochronous
additional metadata than can be used by the remixer software to in the musical universe of our SSG; key by minimising semi-tone
refine the matches presented for selection. deviations between canonical key profiles and the musical content
Match retrieval service - a web service providing a uniform of a composition; and pitch range according to the lowest and high-
interface for accessing fragment compatibility annotations. The est pitches within the composition, exposed both in scientific pitch
basic design allows for finding all fragments in a working set that notation and as corresponding MIDI values. We implemented these
are compatible according to a selected criterion with a specified feature extraction heuristics as they straightforwardly inform the
fragment. Variations on this allow for fragments that are compatible fragment assembly task at the later stages of our music flow: length,
with some other criterion; e.g. using a pitch range that is playable to synchronise the durations of fragments associated with different
by a given instrument. voices; key and mode, to provide creative control of harmony and
Materialised matches - sets of web annotations that represent discord within the assembly; and pitch range, to inform appropriate
a particular compatibility query (e.g. all fragments that are key- instrumentation choices for each fragment6 .
compatible with a given fragment, or that are playable by a specified The derived features are associated with Web Annotations tar-
instrument. getting (oa:hasTarget) the DMO of the fragment, motivated by
SOFA remixer - an interactive application that assembles a com- (oa:motivatedBy) feature type (e.g. “key”), with bodies (oa:hasBody)
position using these musical fragments from a working set, offering encoding the feature extraction outcome (e.g. “D minor”).
guidance to the user regarding compatible fragments. The guidance
is based on semantic annotations provided via the match retrieval 3.3 Compatibility Service
service, and does not require the remixer itself to have inbuilt The annotated fragment DMOs within the working set are analyzed
knowledge of the compatibility criteria. by compatibility analysis agents which generate further Web Anno-
Output composition - an assembly of music fragments that can tations establishing the compatibility of fragment pairs according
be presented and performed as a completed work. to a given match type criterion. Compatibility analysis is driven by
the semantic annotations associated with the fragment DMOs in
prior parts of the music flow; no further domain-specific (musically
informed) heuristics are applied at this stage, and matching is done
MUSIC FLOW

Semantic
Signal
Compatibility
analysis
Match
retrieval
SOFA according to a generic process through a unified HTTP interface
Generator agent service
remixer
using LDP.
Figure 5 shows the compatibility service presenting as an LDP
container, which contains further LDP containers:
DMO LIFECYCLE

Annotated Fragment Materialized


music compatibility matches
Output
composition
A Working set index, also referenced by the compatibility ser-
vice container using link sofa:working_sets, which contains Web
fragment annotation (by match type)

annotations that target working set containers and whose bodies


link to Working set service containers.
Figure 4: SOFA design overview Working set service containers, one for each working set, con-
tain annotations that connect a Match type description with a Match
service.
Match service containers, one for each combination of working
3.2 SSG and Fragment DMOs
set and match type identifier, containing annotations that target
The SSG generates and publishes music fragment DMOs compris- selected a fragment, or some other entity, and whose bodies link to
ing web-accessible MEI encodings of the fragment composition (in a musical fragment that is compatible with the target according to
which each note and measure is made addressable by association the criterion represented by the match service.
with XML identifiers); as well as semantic descriptions of the frag- The targets of the contained annotations are one of the following:
ment as mo:Score (Music Ontology) mo:published_as the MEI A Working set is an LDP containter of references to musical
file—corresponding to an expression–manifestation relationship in fragments over which compatibility information is provided, and
FRBR terms. Light-weight provenance information regarding the from which the resulting SOFA output will be composed.
fragment’s creator and its title, as well as MELD references to its
first and last note, are also included within the initially generated 6 Due to the open world assumption implicit in Linked Data, additional annotation
fragment DMO. Upon generation, a fragment reference pointing agents can be easily incorporated applying additional feature heuristics resulting in
at the newly created DMO may be added (HTTP POST) to an LDP the addition of further RDF triples associated with each annotated music fragment.
SAAM’2018, October 2018, Monterey, California USA D. De Roure et al.

ldp:BasicContainer
Initial deployment
Compatibility creates these two
service containers
ldp:BasicContainer
ldp:contains Working set
sofa:working_sets index
oa:Annotation sofa:WorkingSet
ldp:contains Working set oa:hasTarget Working set
ldp:contains entry
ldp:BasicContainer

Match service oa:hasBody


index oa:Annotation sofa:MatchType
ldp:contains Match type oa:hasTarget Match type
ldp:contains
entry description
ldp:BasicContainer
oa:hasBody
Match service
oa:Annotation sofa:FragmentRef
ldp:contains Fragment
oa:hasTarget Selected
match
fragment
sofa:FragmentRef annotation
Candidate oa:hasBody
match
fragment

Figure 5: Compatibility service data model

A Match type description is essentially an identifier that de- Find MS annotations targeting the selected fragment - the
notes a particular kind of musical fragment compatibilitty (e.g. resulting annotations refer to fragments in the designated work-
compatible key, or same length, or containing a range of notes ing set that are compatible with the selected fragment under the
playable by a specified instrument). designated match type.
Selected fragment or other Compatibility target: when look- What we show here is a common interaction pattern that ap-
ing for compatible music fragments, this references a given musi- plies to a range of possible compatibility criteria, whose details are
cal fragment, or some other target (e.g. an instrument for which represented in the annotation data rather than being reflected in
playable fragments are required, based on the range of notes used). the interaction interface. This uniform interface allows us to build
In general there will be multiple annotations for any given target, the compatibility service using an off-the-shelf LDP container, and
each corresponding to a different compatible fragment. also allows additional compatibility criteria to be added without
Figure 6 shows how these nested LDP containers may be used to changing the SOFA remixer application. This approach isolates de-
find music fragments that meet some compatibility criteria, starting tailed knowledge of the compatibility criteria to the compatibility
with the URI (CS_URI) of the compatibility service: analysis agents (Figure 4) that create the match service containers.
GET CS_URI - retrieve a representation of the compatibility ser-
vice container as an RDF graph. Initial construction of the compat- 3.3.1 Nested match service containers. Consider the example of
ibility service container includes a link to the working set index looking for fragments that are compatible with the musical key of
that is extracted in the next step. another fragment. As described previously, this will require search-
Find Working set index URI - look for a triple in the CS container ing through all possible pairs of compatible fragment annotations
representation: to find those that could apply. We have extended the match service
design to allow nested service containers, avoiding the need to
CS_URI sofa:working_sets WSI_URI
examine every possible matching fragment pair.
and extract the value found for WSI_URI. This extended design allows compatible fragments to be grouped,
The next steps all use a common function: Find [service] anno- for example, by musical key, with each annotation in the main match
tations targeting [some resource]. A simple implementation in the service container linking to a subsidiary container containing only
client would be to iterate through the service container contents, fragments that are compatible with the selected target fragment.
returning all annotations whose target is the given resource. Other Implementation of this extended design for matching fragment
possible implementations are discussed later. retrieval is contained entirely within the Find [service] annotations
Find WSI annotation targeting the required working set - the targeting [some resource] function. It uses a special motivation value
resulting annotation refers to a Match Service Index (MSI) for the attached to the matching annotation, which tells the client to look
designated working set. at contents in a referenced container. Note that this is not a func-
Find MSI annotation targeting the required match type - the tional change to the match retrieval service, but an optimization.
resulting annotation refers to a Match Service (MS) for the desig- As before, details of optimised container construction are isolated
nated match type and working set. to the compatibility analysis agents that create them.
Music SOFA SAAM’2018, October 2018, Monterey, California USA

Fragment
Compatibility Working Set Match Service Match Service
Match
service (CS) Index (WSI) Index (MSI) (MS)
Annotations

Retrieve Fragment Match


annotations
GET
200 + content
Extract from content:
CS-URI sofa:working_sets WSI_URI
(Find annotation that targets required working set)
(annotation)
Extract MSI-URI from annotation
(Find annotation that targets required match type)
(annotation)
Extract MS-URI from annotation
(Find annotations that target identified fragment)
(get match annotations)
(Fragment match annotations)

Figure 6: Compatibility service interactions (example)

3.3.2 Annotation retrieval optimizations. As described above, we use generated URIs embedding musicXMLid values contained
finding compatible fragments has a client function for the Find in the Musescore data. Playable note ranges are represented using
[service] annotations targeting [some resource] function retrieve all MIDI note numbers obtained from Musescore data, and also as
annotations in a match service container. notes symbols and frequency values obtained by mapping based
An alternative implementation would have a specialised LDP on the Scientific Pitch Notation table in Wikipedia11 .
server, or some web service middleware, implement this iterate-
and-filter functionality, avoiding the need for the client to retrieve 3.5 User Interface
un-needed annotations. It is not clear at this stage how much of this The user interface to the SOFA remixer application is implemented
could be handled using the existing LDP API and a specialised server as a Javascript web browser application, fitting within the MELD
(e.g. by on-the-fly creation of response containers for a submitted client architecture described in section 1.3 and making use of addi-
match query). tional, newly created ReactJS components.
3.3.3 Distributed compatibility service. Our particular imple- The web application retrieves the set of fragments under con-
mentation has all of the compatibility service containers hosted sideration in the current session by dereferencing the Working
by a single LDP server. But the design does not require this, and Set LDP container which contains references to fragments output
the compatibility service agents are free to create match service by the Semantic Signal Generator. These Fragment References are
containers on any LDP server, so the choice to use an alternative retrieved as Turtle formatted RDF and parsed and queried using the
match service container implementation (see previous sections) can rdflib.js library12 . Fragments of score are rendered to SVG engrav-
be made by a compatibility service agent with knowledge of the de- ings for display using the Verovio toolkit[19], this is also used to
tails of a particular compatibility criterion, and of likely associated create MIDI data which, using a Javascript MIDI player, allows the
performance bottlenecks. user to listen to fragments as they are interacting with the system.
Candidate fragments for selection are filtered using the com-
3.4 Instrument characteristics patibility service (section 3.3) to display just those fragments that
are likely be be useful in the context of that selection. Annotations
The compatibility analysis for playability of a fragment by a desig- identifying the Match services available for the current Working
nated instrument requires access to information about instruments Set are retrieved and the options for compatibility type shown to
and their playable pitch-ranges. As no Linked Data publication of the user are generated from the match type identifiers used. In this
this information was available, we used data for about 500 instru- particular application, an instrument playability match service and
ments defined for Musescore7,8 and Annalist [12] to create Linked a length match service are required for the built in functionality of
Data 9 that can be accessed programmatically as JSON-LD or Turtle. the remixer application, and any other match service types, such as
The intent is for the various instruments to be represented by the the key compatibility match service, are used to generate an option
Library of Congress Medium of Performance Thesaurus for Music in the UI so the user may further constrain the fragment selection.
instrument type identifiers 10 following reconciliation. Currently, Figure 6 illustrates the pattern of LDP container interactions
7 https://musescore.org/
used to identify and locate compatible fragments. The client inter-
8 https://raw.githubusercontent.com/musescore/MuseScore/master/share/ face locates the Working Set Index from a reference at the base
instruments/instruments.xml
9 http://fast-project.annalist.net/annalist/c/FAST_musical_instruments_catalogue/ 11 https://en.wikipedia.org/wiki/Scientific_pitch_notation
10 http://id.loc.gov/authorities/performanceMediums.html 12 https://github.com/linkeddata/rdflib.js/
SAAM’2018, October 2018, Monterey, California USA D. De Roure et al.

Compatibility Service URI and then retrieves annotations from this note the Semantic Signal Generator has proven effective in testing
location. It checks these annotations for one targeting the Working these aspects.
Set under consideration and in the body of this annotation finds
the Match Service Index corresponding to this Working Set. The EPILOGUE
same pattern of annotations within an LDP container is used to Our semantic music system plays out the original thought experi-
find the compatibility services supported. If, for example, there is ment. In Numbers into Notes, the role of the human is to make the
an annotation with oa:hasTarget sofa:keyCompatibility then selection of numbers and the mapping to notes and an instrument
the interface knows that key compatibility filtering data is available. (of compatible range), always remaining faithful to the algorithmic
It looks for an rdfs:label at sofa:keyCompatibility in order output. With the remixer, the computer is assisting in the assem-
to generate a selection option in the UI and it uses the URI in the bly process, using notions of compatibility that could have been
body of the annotation to find the container of annotations actually adopted in 1843.
identifying compatibility between the fragments. It is these which We wonder what Lovelace might have made of our design—of
are used to filter the fragments offered within the interface. the ability to define a music machine, and of the ability of that
music machine to reconfigure itself: a data-defined, self-assembling
music machine.
4 DISCUSSION AND FUTURE WORK
We have presented the design and implementation of SOFA, a se- ACKNOWLEDGMENTS
mantic music system which illustrates a number of ideas which we We are grateful to Emily Howard, Pip Willcox, and Alan Cham-
hope might contribute to this emerging field: berlain for their essential contributions to the Numbers into Notes
Music composition as assembly of semantically described concept and software, and contributing to its development and
fragments. This contrasts with other work that describes the over- creative applications. This research was supported by Fusing Au-
all piece of music. As well as providing a more pervasive semantic dio and Semantic Technologies for Intelligent Music Production and
description of the music content, our approach also describes the Consumption funded by the UK Engineering and Physical Sciences
assembly (composition) of the fragments, and furthermore it assists Research Council (EPSRC) under grant number EP/L019981/1, a col-
that assembly process. This in turn provides a demonstration to laboration between Queen Mary University of London, University
the Semantic Web community of music as a semantically described of Nottingham and University of Oxford.
content type.
A new approach to Digital Music Objects. Building on our REFERENCES
previous MELD work, SOFA demonstrates use of Digital Musical [1] Sean Bechhofer, Kevin Page, David M. Weigl, György Fazekas, and Thomas
Objects (DMOs) as associations of semantically described fragments Wilmering. 2017. Linked Data Publication of Live Music Archives and Analyses.
In The Semantic Web – ISWC 2017, Claudia d’Amato, Miriam Fernandez, Valentina
that are drawn together as required from a sea of linked data. These Tamma, Freddy Lecue, Philippe Cudré-Mauroux, Juan Sequeda, Christoph Lange,
DMOs describe both musical content and options for its processing. and Jeff Heflin (Eds.). Springer International Publishing, Cham, 29–37.
[2] David Bretherton, Daniel Alexander Smith, Joe Lambert, and M. C. Schraefel.
MELD as an architecture for music processing and recom- 2011. MusicNet: Aligning Musicology’s Metadata. In Music Linked Data Workshop.
position. This new application of MELD further validates it as a http://eprints.soton.ac.uk/272408/
common semantic framework for diverse music applications. [3] Sarven Capadisli and Amy Guy. 2017. Linked Data Notifications. W3C Recom-
mendation. W3C. https://www.w3.org/TR/ldn/.
The notion of a semantic signal generator as part of the se- [4] Paolo Ciccarese, Benjamin Young, and Robert Sanderson. 2017. Web Annotation
mantic music workbench (which might be considered to have a Data Model. W3C Recommendation. W3C. https://www.w3.org/TR/2017/REC-
role analogous to “publishers’ latin” in document composition). annotation-model-20170223/.
[5] Tim Crawford and Richard Lewis. 2016. Review: Music Encod-
This methodology helps with implementing and testing the SOFA ing Initiative. Journal of the American Musicological Society 69, 1
architecture. Numbers into Notes could be used in this way by other (Spring 2016), 273–285. https://doi.org/10.1525/jams.2016.69.1.273
arXiv:http://jams.ucpress.edu/content/69/1/273.full.pdf
projects. [6] Herbert Van de Sompel, Michael Nelson, and Robert Sanderson. 2013. HTTP
A "disappearing infrastructure" architecture that pushes se- Framework for Time-Based Access to Resource States – Memento. Technical Report
mantics from services into data, something that is particularly well- 7089. https://doi.org/10.17487/RFC7089
[7] Leigh Dodds and Ian Davis. 2012. Linked Data Patterns. Online book. http:
supported by linked data standards. Rather than creating a new //patterns.dataincubator.org/book/
service for each aspect of our distributed application, we have been [8] Roy Thomas Fielding. 2000. Architectural Styles and the Design of Network-based
able to use common off-the-shelf LDP server software and move Software Architectures. Ph.D. Dissertation.
[9] Ben Fields, Kevin Page, David De Roure, and Tim Crawford. 2011. The segment
the corresponding semantics into the data. There are parallels here ontology: Bridging music-generic and domain-specific. In Multimedia and Expo
with the use of combinators in functional programming, where (ICME), 2011 IEEE International Conference on. IEEE, 1–6.
[10] Martin Gasser, Andreas Arzt, Thassilo Gadermaier, Maarten Grachten, and Ger-
common access and traversal patterns can be implemented just hard Widmer. 2015. Classical Music on the Web–User Interfaces and Data Rep-
once and used with a semantically diverse range of data types. resentations. In Proc. 16th International Society for Music Information Retrieval
There are many directions of future work. We will work with Conference.
[11] Maria Kallionpää, Chris Greenhalgh, Adrian Hazzard, David M Weigl, Kevin R
other forms of semantically described music content, and bring Page, and Steve Benford. 2017. Composing and realising a game-like performance
other semantic music tools into the toolchain. In terms of technical for disklavier and electronics. In New Interfaces for Musical Expression (NIME
approaches, we see the potential of Linked Data Notifications [3], 2017) Proceedings.
[12] Graham Klyne, Cerys Willoughby, and Kevin Page. 2016. Annalist: A practical
and the architecture should support SoLiD [14] integration. There tool for creating, managing and sharing evolving linked data. Proceedings of the
is further work to be done on scalability and performance, and we Workshop on Linked Data on the Web (LDOW). http://ceur-ws.org/Vol-1593/
#article-10
Music SOFA SAAM’2018, October 2018, Monterey, California USA

[13] Clifford Lynch. 2002. Digital Collections, Digital Libraries and the Digitization
of Cultural Heritage Information. First Monday 7, 5 (2002). https://doi.org/10.
5210/fm.v7i5.949
[14] Essam Mansour, Andrei Vlad Sambra, Sandro Hawke, Maged Zereba, Sarven
Capadisli, Abdurrahman Ghanem, Ashraf Aboulnaga, and Tim Berners-Lee. 2016.
A Demonstration of the Solid Platform for Social Web Applications. In Proceedings
of the 25th International Conference Companion on World Wide Web (WWW ’16
Companion). International World Wide Web Conferences Steering Committee,
Republic and Canton of Geneva, Switzerland, 223–226. https://doi.org/10.1145/
2872518.2890529
[15] Luigi Federico Menabrea and Ada Augusta Countess of Lovelace. 1843. Sketch of
the Analytical Engine invented by Charles Babbage, Esq. In Scientific Memoirs,
Selected from the Transactions of Foreign Academies of Science and Learned Societies,
and from Foreign Journals (vol. 3), Richard Taylor (Ed.). Richard and John E. Taylor,
London, UK, 666–731.
[16] Open Archives Initiative. 2008. ORE Specification — Abstract Data Model. Techni-
cal Report. http://www.openarchives.org/ore/1.0/datamodel
[17] Kevin Page, David Lewis, and David Weigl. 2017. Contextual interpretation of
digital music notation. Digital Humanities (DH2017), Montréal, Canada (2017).
[18] Kevin R Page, Sean Bechhofer, Gyorgy Fazekas, David M Weigl, and Thomas
Wilmering. 2017. Realising a layered digital library: exploration and analysis
of the live music archive through linked data. In Digital Libraries (JCDL), 2017
ACM/IEEE Joint Conference on. IEEE, 1–10.
[19] Laurent Pugin, Rodolfo Zitellini, and Perry Roland. 2014. Verovio: A library for
Engraving MEI Music Notation into SVG. In Proc. 15th International Society for
Music Information Retrieval Conference. 107–112.
[20] Fazilatur Rahman and Jawed Siddiqi. 2012. Semantic annotation of digital music.
J. Comput. System Sci. 78, 4 (2012), 1219 – 1231.
[21] Yves Raimond, Samer A Abdallah, Mark B Sandler, and Frederick Giasson. 2007.
The Music Ontology. In Proc. 8th International Conference on Music Information
Retrieval. 417–422.
[22] D. De Roure and P. Willcox. 2017. Experimental Humanities: An Adventure
with Lovelace and Babbage. In 13th International Conference on e-Science. IEEE,
194–201. https://doi.org/10.1109/eScience.2017.32
[23] Steve Speicher, John Arwe, and Ashok Malhotra. 2015. Linked Data Platform 1.0.
W3C Recommendation. W3C. http://www.w3.org/TR/2015/REC-ldp-20150226/.
[24] David M Weigl, David Lewis, Tim Crawford, Ian Knopke, and Kevin R Page. 2017.
On providing semantic alignment and unified access to music library metadata.
International Journal on Digital Libraries (2017), 1–23.
[25] David M Weigl and Kevin R Page. 2017. A Framework for Distributed Semantic
Annotation of Musical Score: “Take It to the Bridge!”. In Proceedings of the 17th
International Society for Music Information Retrieval Conference.
[26] Megan A Winget. 2008. Annotations on musical scores by performing musicians:
Collaborative models, interactive methods, and music digital library tool devel-
opment. Journal of the Association for Information Science and Technology 59, 12
(2008), 1878–1897.

You might also like