info.json
The info.json
file is the entry point of any piece displayed into Dezrann
It can be provided by the API of the dez-ws
server, such as in /corpus/bwv847,
but can also be prepared by a third-party application (#905).
Here is a simplified version of that file:
{
"id": "bwv847",
"composer": "J.-S. Bach",
"title": "Fuga [#02](https://gitlab.com/algomus.fr/dezrann/issues/02) in C minor, BWV 847",
"title:fr": "Fugue n°02 en do mineur, BWV 847",
"time-signature": "4/4",
"time-signature-upbeat": 0.0,
"sources": {
"images": [
{
"image": "sources/images/bwv847/file",
"positions": "sources/images/bwv847/positions",
"type": "score",
"info": "Score generated by Lilypond, from a .krn file downloaded from KernScore http://kern.humdrum.org/"
}
],
"audios": [
{
"file": "sources/audios/bwv847/file",
"info": "Recording by Kimiko Ishizaka. See https://www.welltemperedclavier.org/",
"images": [
{
"image": "sources/audios/bwv847/images/bwv847-waves/file",
"positions": "sources/audios/bwv847/images/bwv847-waves/positions",
"type": "wave"
}
],
"onset-date": "sources/audios/bwv847/synchro"
}
]
},
"permissions": [
"read",
"update-analysis"
]
}
The sources
This lists show various ways to display the music. The user can switch between these sources in Dezrann.
images
.
An image is usally a score ("type": "score"
),
either computer generated or from autograph scores, as in /corpus/bwv847.
An image requires to have a graphical synchronisation file positions
containing a onset-x
list linking x
positions,
such as here sources/images/bwv847/positions.
The positions
file can also describe the x
position of barlines.
audios
.
An audio file can be a .ogg
, .mp3
, or any other playable file.
Such a file requires to have a musical synchronisation file onset-date
, linking audio time to musical onsets,
such as here sources/audios/bwv847/synchro.
An audio file can have one (or several) image file(s), usually with "type": "wave"
, again with a position
graphical synchronisation file.
Absolut, relative, and implicit URLs
Sources can be either absolute URLs or relative paths (YAGNI?, prévision #905).
When infos.json
is accessed from http://server/path/to/infos.json
, such relative paths are relative to `http://server/path/to/``.
There will perhaps be a way to access local files in the same way.
However, the current nominal case is when the info.json
is provided by a dez-ws
server.
It is the not necessary to specify positions
.
The data can indeed by retriven at:
http://dezws.lifl.fr/corpus/piecename/sources/images/imagename/positions
http://dezws.lifl.fr/corpus/piecename/sources/images/imagename/image
Si le champ positions
est renseigné, il n'est pas lu s'il s'agit d'un simple nom. Par contre, si c'est une url (chaine commençant par http[s]://) il faudra télécharger les données depuis celle-ci (idem pour pour le champ image
).
Physiquement, les fichiers de positions ont pour nom positions.json
et sont rangés dans une arbo de rep comme le désigne l'url de requête. Pour assurer la compatibilité, il reste possible de laisser ces fichiers aux même niveau que le fichier info.json
avec des noms différents (ex : nomimage-pos.json, position-nomimage.json, positions.json...)
Piece metadata
Currently the title
and the composer
attributes are displayed on Dezrann.
The time-signature
(by default 4/4
) and the time-signature-upbeat
(by default 0
)
are used to convert quarter note offsets into musical time.
The permissions
elements describes the permissions granted on the current user.
They are not part of the info.js
, but are generated from access.json
files.