About SMuFL-Browser
SMuFL-Browser is a small web service build upon the Standard Music Font Layout specification (SMuFL) and the Text Encoding Initiative (TEI) which can – hopefully – serve multiple purposes.
- As a browser and search interface for SMuFL glyphs
- As a reference for the declaration of musical symbols in a TEI encoded text
The first point was made more or less obsolete by the development of the browsing facility on the original SMuFL website. Still, this site offers some basic search and autocompletion features you might find useful.
SMuFL and TEI
If you want to use SMuFL for encoding musical symbols in your TEI documents, you could simply use the appropriate Unicode Codepoints from the SMuFL specification (i.e. entering 
for a ♯ in the running text).
Since the very most of the SMuFL codepoints are from the Private Use Area, this is really an idiosyncratic solution and not the right approach for data interchange.
The preferred approach would be to use the <g>
element in the text and link to detailed character declarations in the TEI header (cf. chapter 5 of the TEI Guidelines:
Characters, Glyphs, and Writing Modes).
So, while you're probably not interested in that declaring stuff but simply want to add that muscial symbol to your text, this is where SMuFL-Browser comes in with providing those declarations for you.
It creates a nice <charDecl>
with according <char>
definitions from the SMuFL metadata (which comes in JSON format) and makes those available online.
All you need to do, is find the right character with the SMuFL-Browser and copy the "TEI code for embedding" into your TEI text.
Webservice specification
SMuFL-Browser was developed with both the encoder as well as the developer in mind. For the developer, this web service provides the information concerning each character in several formats, at a stable URL, via both glyphname and codepoint (NB: the glyphnames are case sensitive while the codepoints are not):
- TEI-XML
- The webservice will send TEI-XML when queried for the suffix
.tei
or.xml
. Alternatively you can omit the file extension and provide the Content-Type request headersapplication/xml
orapplication/tei+xml
. - JSON
- The webservice will send a JSON serialization of the TEI data when queried for the suffix
.json
(NB: This is not the original SMuFL JSON metadata). Alternatively you can omit the file extension and provide the Content-Type request headerapplication/json
. - JSONP
- The webservice will send the above JSON serialization of the TEI data wrapped in a javascript function call when queried for the suffix
.js
or.jsonp
. Alternatively you can omit the file extension and provide the Content-Type request headerapplication/javascript
. You can provide yor own wrapper function name with thecallback
URL parameter. Otherwise, the default iscallback=callback
. - PNG
- The webservice will send an image file of the glyph shape when queried for the suffix
.png
. Alternatively you can omit the file extension and provide the Content-Type request headersimage/png
,application/png
orapplication/x-png
. The default resolution is 120x120 pixels; with the URL parameterres=low
you'll get 40x40 pixels. - SVG
- The webservice will send an SVG file of the glyph shape when queried for the suffix
.svg
. Alternatively you can omit the file extension and provide the Content-Type request headerimage/svg+xml
. - Multiple characters
- If you want to receive a list of several character definitions, you can query
https://smufl-browser.edirom.de/index
with the suffixes.tei
or.xml
(or the respective request headers, see above). JSON and JSONP are not supported at present. Following GET-parameters are supported:- range
- class
- glyphname
Examples
- https://smufl-browser.edirom.de/index.tei – this will give you the complete SMuFL specification as TEI file
- https://smufl-browser.edirom.de/index.xml?range=Rests
- https://smufl-browser.edirom.de/index.tei?class=noteheadSetRoundLarge&class=noteheadSetCircled
Source Code
The source code for creating the TEI character declarations from the SMuFL JSON metadata files as well as the source code for this web service is hosted on GitHub .
License
SMuFL-Browser is available under dual license: BSD 2-Clause and Creative Commons Attribution 4.0 International License (CC BY 4.0).
Credits
First and foremost big thanks to Daniel Spreadbury for his great work on SMuFL and for making it publicly available under an open license.
Second, SMuFL-Browser was inspired to a great deal by the ENRICH Gaiji Bank which builds upon the Medieval Unicode Font Initiative (MUFI) standard.
Last not least thanks to Alexander Erhard for pull requests, testing and various feedback.