Skip to content

Instantly share code, notes, and snippets.

View raffazizzi's full-sized avatar
🌈

Raffaele Viglianti raffazizzi

🌈
View GitHub Profile
@raffazizzi
raffazizzi / grammar
Last active August 29, 2015 14:16
EMA selection grammar
start ::= "start"
startOrEnd ::= "start" | "end"
all ::= "all"
measure ::= integer
measureRange ::= {measure | startOrEnd | all / ","} | {measure | start, "-", measure | end / ","}
staff ::= integer
staffRange ::= {staff | startOrEnd | all / "+"} | {staff | start, "-", staff | end / "+"}
stavesToMeasure ::= {staffRange / ","}
beat ::= float
beatRange ::= {"@", beat | startOrEnd | all / "+"} | {"@", beat | start, "-", beat | end / "+"}
@raffazizzi
raffazizzi / VESA
Last active August 29, 2015 14:17
<div type="div2" xml:id="VESA">
<head>Encoding Textual Structures Across Verses</head>
<p>It is possible that certain textual structures may span multiple lines of verse, either by
incorporating more than one, or by crossing line hierarchy. This is common,
for example, when lines contain reported thought or speech (i.e. <gi>said</gi>),
or other forms of quotation (i.e. <gi>q</gi>). For these cases, it is recommended practice
to fragment and reconstruct the elements representing the textual structures.
</p>
<p>The following example from Margaret Cavendish's <title>Nature's Pictures</title> shows speech
encoded across two lines reconstructed by chaining elements with <att>prev</att> and
<elementSpec ident="ornament" module="MEI.cmnOrnaments">
<desc>An element indicating an ornament that is not a mordent, turn, or trill.
</desc>
<classes>
<memberOf key="att.common"/>
<memberOf key="att.facsimile"/>
<memberOf key="att.ornament.log"/>
<memberOf key="att.ornament.vis"/>
<memberOf key="att.ornament.ges"/>
<memberOf key="att.ornament.anl"/>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.music-encoding.org/schema/current/mei-CMN.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<mei xmlns="http://www.music-encoding.org/ns/mei">
<meiHead>
<fileDesc>
<titleStmt>
<title></title>
</titleStmt>
<pubStmt></pubStmt>
</fileDesc>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Addresses</title>
</titleStmt>
@raffazizzi
raffazizzi / crim.json
Last active June 13, 2017 17:24
Example CRIM data structure
{
"relationships": [{
"types": {
"rt-nm": {
"label": "New Material"
}
},
"scoreA": "c10",
"scoreB": "c24",
"scoreA_ema": "2-4/1,1,1/@3,@1-3,@1",
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
xmlns:tei="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="xs math"
version="2.0">
<xsl:output method="text"/>
@raffazizzi
raffazizzi / template.xml
Created February 20, 2018 21:41
TEI template
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/Vault/P5/current/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/Vault/P5/current/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Title</title>
</titleStmt>
<publicationStmt>
@raffazizzi
raffazizzi / mei.xml
Created March 10, 2018 21:17
A basic MEI template
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://raw.githubusercontent.com/music-encoding/music-encoding/develop/schemata/mei-CMN.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://raw.githubusercontent.com/music-encoding/music-encoding/develop/schemata/mei-CMN.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei">
<meiHead>
<fileDesc>
<titleStmt>
<title></title>
</titleStmt>
<pubStmt></pubStmt>
@raffazizzi
raffazizzi / hipsterTEI.xml
Last active August 17, 2021 22:11
Pagination with CETEIcean
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Hipster TEI (paginated)</title>
</titleStmt>