Printing Music with CSS Grid

https://cruncher.ch/blog/printing-music-with-css-grid/

Too often have I witnessed the improvising musician sweaty-handedly attempting to pinch-zoom an A4 pdf on a tiny mobile screen at the climax of a gig. We need fluid and responsive music rendering for the web!

Stephen Band 24 Apr 2024

Music notation should be as accessible and as fluid as text is, on the web; that it is not, yet, is something of an afront to my sensibilities. Let us fix this pressing problem.

The Scribe prototype

SVG rendered by Scribe 0.2

Some years ago I prototyped a music renderer I called Scribe that outputs SVG from JSON. The original goal was to produce a responsive music renderer. It was a good demo, but to progress I was going to have to write a complex multi-pass layout engine, and, well, other things got in the way.

Shortly after making that I was busy adopting Grid into our projects at Cruncher when something about it struck me as familiar, and I wondered if it might not be an answer to some of the layout problems I had been tackling in Scribe.

The class .stave

The musical staff is grid-like. Pitch is plotted up the vertical axis and time runs left to right along the horizontal axis. I am going to define these two axes in two seperate classes. The vertical axis, defining grid rows, will be called .stave. We'll get to the time axis in a bit.

A .stave has fixed-size grid rows named with standard pitch names, and a background image that draws the staff. So for a treble clef stave the row map might look like this:


    .stave {
        display: grid;
        row-gap: 0;
        grid-template-rows:
            [A5] 0.25em [G5] 0.25em [F5] 0.25em [E5] 0.25em
            [D5] 0.25em [C5] 0.25em [B4] 0.25em [A4] 0.25em
            [G4] 0.25em [F4] 0.25em [E4] 0.25em [D4] 0.25em
            [C4] 0.25em ;
        background-image:    url('/path/to/stave.svg');
        background-repeat:   no-repeat;
        background-size:     100% 2.25em;
        background-position: 0 50%;
    }
    

Which, applied to a <div> gives us:

Ok. Not much to see, but on inspecting it we do see that each line and each space on the stave now has its own pitch-named grid line to identify each row:

Named grid rows

Placing pitches up the stave

Any given row on a stave may contain any of several pitches. The pitches G♭, G and G♯ must all sit on the G stave line, for example.

To place DOM elements that represent those pitches in their correct rows I am going to put pitch names in data-pitch attributes and use CSS to map data-pitch values to stave rows.


    .stave > [data-pitch^="G"][data-pitch$="4"] { grid-row-start: G4; }
    

This rule captures pitches that start with 'G' and end with '4', so it assigns pitches 'G♭4', 'G4' and 'G♯4' (and double flat 'G𝄫4' and double sharp 'G𝄪4') to the G4 row. That does need to be done for every stave row:


    .stave > [data-pitch^="A"][data-pitch$="5"] { grid-row-start: A5; }
    .stave > [data-pitch^="G"][data-pitch$="5"] { grid-row-start: G5; }
    .stave > [data-pitch^="F"][data-pitch$="5"] { grid-row-start: F5; }
    .stave > [data-pitch^="E"][data-pitch$="5"] { grid-row-start: E5; }
    .stave > [data-pitch^="D"][data-pitch$="5"] { grid-row-start: D5; }
    ...
    .stave > [data-pitch^="D"][data-pitch$="4"] { grid-row-start: D4; }
    .stave > [data-pitch^="C"][data-pitch$="4"] { grid-row-start: C4; }
    

That should give us enough to begin placing symbols on a stave! I have a bunch of SVG symbols that were prepared for the Scribe prototype, so let's try placing a couple on a stave:


    <div class="stave">
        <svg data-pitch="G4" class="head">
            <use href="#head[2]"></use>
        </svg>
        <svg data-pitch="E5" class="head">
            <use href="#head[2]"></use>
        </svg>
    </div>
    

That looks promising. Next, time.

The class .bar and its beats

Rhythm is perhaps a little trickier to handle. There is not one immediately obvious smallest rhythmic division to adopt that will support all kinds of rhythms. A judgement call must be made about what minimum note lengths and what cross-rhythms to support inside a grid.

A 24-column-per-beat approach supports beat divisions to evenly lay out eighth notes (12 columns), sixteenth notes (6 columns) 32nd notes (3 columns) as well as triplet values of those notes. It's a good starting point.

Here is a 4 beat bar defined as 4 × 24 = 96 grid columns, plus a column at the beginning and one at the end:


    .bar {
        column-gap: 0.03125em;
        grid-template-columns:
            [bar-begin]
            max-content
            repeat(96, minmax(max-content, auto))
            max-content
            [bar-end];
    }
    

Add a couple of bar lines as ::before and ::after content, and put a clef symbol in there centred on the stave with data-pitch="B4", and we get:


    <div class="stave bar">
        <svg data-pitch="B4" class="treble-clef">
            <use href="#treble-clef"></use>
        </svg>
    </div>
    

Inspect that and we see that the clef has dropped into the first column, and there are 96 zero-width columns, 24 per beat, each seperated by a small column-gap:

Named grid rows

Placing symbols at beats

This time I am going to use data-beat attributes to assign elements a beat, and CSS rules to map beats to grid columns. The CSS map looks like this, with a rule for each 1/24th of a beat:


    .bar > [data-beat^="1"]    { grid-column-start: 2; }
    .bar > [data-beat^="1.04"] { grid-column-start: 3; }
    .bar > [data-beat^="1.08"] { grid-column-start: 4; }
    .bar > [data-beat^="1.12"] { grid-column-start: 5; }
    .bar > [data-beat^="1.16"] { grid-column-start: 6; }
    .bar > [data-beat^="1.20"] { grid-column-start: 7; }
    .bar > [data-beat^="1.25"] { grid-column-start: 8; }
    ...
    .bar > [data-beat^="4.95"] { grid-column-start: 97; }
    

The attribute ^= starts-with selector makes the rule error-tolerant. At some point, inevitably, unrounded or floating point numbers will be rendered into data-beat. Two of their decimal places is enough to identify a 1/24th-of-a-beat grid column.

Put that together with our stave class and we are able to position symbols by beat and pitch by setting data-beat to a beat between 1 and 5, and data-pitch to a note name. As we do, the beat columns containing those symbols grow to accommodate them:


    <div class="stave bar">
        <svg class="clef" data-pitch="B4">…</svg>
        <svg class="flat" data-beat="1" data-pitch="Bb4">…</svg>
        <svg class="head" data-beat="1" data-pitch="Bb4">…</svg>
        <svg class="head" data-beat="2" data-pitch="D4">…</svg>
        <svg class="head" data-beat="3" data-pitch="G5">…</svg>
        <svg class="rest" data-beat="4" data-pitch="B4">…</svg>
    </div>
    

Ooo. Stems?

Yup. Tails?

Yup. The tail spacing can be improved (which should be achievable with margins) – but the positioning works.

Fluid and responsive notation

Stick a whole bunch of bars like these together in a flexbox container that wraps and we start to see responsive music:


    <figure class="flex">
        <div class="treble-stave stave bar">…</div>
        <div class="treble-stave stave bar">…</div>
        <div class="treble-stave stave bar">…</div>
        …
    </figure>
    

There are clearly a bunch of things missing from this, but this is a great base to start from. It already wraps more gracefully than I have yet seen an online music renderer do.

The space between the notes

Ignoring these beams for a moment, notice that note heads that occur closer in time to one another are rendered slightly closer together:

It's a subtle, deliberate effect created by the small column-gap, which serves as a sort of time 'ether' into which symbol elements slot. Columns themselves are zero width unless there is a note head in them, but there are more column-gaps – 24 per beat – between events that are further apart in beats, and so more distance.

Constant spacing can be controlled by adjusting margins on the symbols. To get a more constant spacing here we would reduce the column-gap while increasing the margin of note heads:

But ugh, that looks bad, because the head spacings give the reader no clue as to how rapid the rhythm is. The point is, CSS is giving us some nice control over the metrics. And the aim now is to tweak those metrics for readability.

Clefs and time signatures

You may be wondering why I employed seperate classes for vertical and horizontal spacing, why not just one? Seperating the axes means that one can be swapped out without the other. Take the melody:

0.5 B3 0.2 1.5 2 D4 0.2 1 3 F#4 0.2 1 4 E4 0.2 1 5 D4 0.2 1 6 B3 0.2 0.5 6.5 G3 0.2 0.5

To display this same melody on a bass clef, the stave class can be swapped out for a bass-stave class that maps the same data-pitch attributes to bass stave lines:


    <div class="bass-stave bar">...</div>
    
0.5 B3 0.2 1.5 2 D4 0.2 1 3 F#4 0.2 1 4 E4 0.2 1 5 D4 0.2 1 6 B3 0.2 0.5 6.5 G3 0.2 0.5

Or, with CSS that mapped data-duration="5" to 120 grid-template-columns on .bar, the same stave could be given a time signature of 5/4:


    <div class="bass-stave bar" data-duration="5">...</div>
    
0.5 B3 0.2 1.5 2 D4 0.2 1 3 F#4 0.2 1 4 E4 0.2 1 5 D4 0.2 1 6 B3 0.2 0.5 6.5 G3 0.2 0.5

Clearly I am glossing over a few details. Not everything is as simple as a class change, and a few stems and ledger lines need repositioned.

Here's a stave class that remaps pitches entirely. General MIDI places drum and percussion voices on a bunch of notes in the bottom octaves of a keyboard, but those notes are not related to where drums are printed on a stave. In CSS a drums-stave class can be defined that maps those pitches to their correct rows:


    <div class="drums-stave bar" data-duration="4">...</div>
    

    <div class="percussion-stave bar" data-duration="4">...</div>
    

That's some very readable drum notation. I'm pretty pleased with that.

Chords and lyrics

CSS Grid allows us to align other symbols inside the notation grid too. Chords and lyrics, dynamics and so on can be lined up with, and span, timed events:

4

4

In

Amaj

the

bleak

Amaj/G

mid-

win-

C79

ter,

F-7

A7sus

Frost-

Dmaj

y

wind

B/D

made

But what about those beams?

Beams, chords and some of the longer rests are made to span columns by mapping their data-duration attributes to grid-column-end span values:


    .stave > [data-duration="0.25"] { grid-column-end: span 6; }
    .stave > [data-duration="0.5"]  { grid-column-end: span 12; }
    .stave > [data-duration="0.75"] { grid-column-end: span 18; }
    .stave > [data-duration="1"]    { grid-column-end: span 24; }
    .stave > [data-duration="1.25"] { grid-column-end: span 30; }
    ...
    

Simple as, bru.

Sizing

Lastly, the whole system is sized in em, so to scale it we simply change the font-size:

0 meter 2 1 0 E4 1 0.5 1 B4 1 0.5 2 Bb4 1 2

Limits of Flex and Grid

Is it the perfect system? Honestly, I'm quietly gobsmacked that it works so well, but if we are looking for caveats… 1. CSS cannot automatically position a new clef/key signature at the beginning of each wrapped line, or 2. tie a head to a new head on a new line. And 3., angled beams are a whole story onto themselves; 1/16th and 1/32nd note beams are hard to align because we cannot know precisely where their stems are until after the Grid has laid them out:

So it's going to need a bit of tidy-up JavaScript to finish the job completely, but CSS shoulders the bulk of the layout work here, and that means far less layout work to do in JavaScript.

Let me know what you think

If you like this CSS system or this blog post, or if you can see how to make improvements, please do let me know. I'm on Bluesky @stephen.band, Mastodon @[email protected], and Twitter (still, just about) @stephband. Or join me in making this in the Scribe repo...

<scribe-music>

A custom element for rendering music

I have written an interpreter around this new CSS system and wrapped that up in the element <scribe-music>. It's nowhere near production-ready, but as it is already capable of rendering a responsive lead sheet and notating drums I think it's interesting and useful.

Whazzitdo?

The <scribe-music> element renders music notation from data found in it's content:


        <scribe-music type="sequence">
            0 chord D maj 4
            0 F#5 0.2 4
            0 A4  0.2 4
            0 D4  0.2 4
        </scribe-music>
    
0 chord Dmaj 4 0 F#5 0.2 4 0 A4 0.2 4 0 D4 0.2 4

Or from a file fetched by its src attribute, such as this JSON:


        <scribe-music
            clef="drums"
            type="application/json"
            src="/static/blog/printing-music/data/caravan.json">
        </scribe-music>
    

Or from a JS object set on the element's .data property.

There's some basic documentation about all that in the README.

Try it out

You can try the current development build by importing these files in a web page:


        <link rel="stylesheet" href="https://stephen.band/scribe/scribe-music/module.css" />
        <script type="module" src="https://stephen.band/scribe/scribe-music/module.js"></script>
    

As I said, it's in development. Asides from some immediate improvements I can make to Scribe 0.3, like tuning the autospeller, fixing the 1/16th-note beams and detecting and displaying tuplets, some longer-term features I would like to investigate are:

  • Support for SMuFL fonts – changing the font used for notation symbols. So far I have not been able to display their extended character sets reliably cross-browser.
  • Support for nested sequences – enabling multi-part tunes.
  • Split-stave rendering – placing multiple parts on one stave. The mechanics for this are already half in place – the drums stave and piano stave currently auto-split by pitch.
  • Multi-stave rendering – placing multiple parts on multiple, aligned, staves.

I leave you with a transposable lead sheet for Dolphin Dance, rendered by <scribe-music>:

Dolphin Dance

[ [0, "chord", "C", "∆", 4], [4, "chord", "G", "-", 4], [8, "chord", "C", "∆", 4], [12, "chord", "B", "ø", 2], [14, "chord", "E", "7alt", 2], [16, "chord", "A", "-", 4], [20, "chord", "F", "∆(♯11)", 2], [22, "chord", "E", "7alt", 2], [24, "chord", "A", "-", 4], [28, "chord", "F♯", "-7", 2], [30, "chord", "B", "7", 2], [32, "chord", "E", "∆", 4], [36, "chord", "F", "-7", 4], [40, "chord", "D", "-7", 6], [46, "chord", "E", "7alt", 2], [48, "chord", "A", "-7", 8], [56, "chord", "F♯", "-7", 4], [60, "chord", "B", "7", 4], [64, "chord", "E", "∆", 4], [68, "chord", "E", "7sus", 4], [72, "chord", "E", "∆♯11", 4], [76, "chord", "E", "7sus", 4], [80, "chord", "D", "7sus", 4], [84, "chord", "D", "∆♯11", 4], [88, "chord", "D", "7sus", 4], [92, "chord", "C♯", "-7", 2], [94, "chord", "F♯", "7", 2], [96, "chord", "C", "7♯11", 4], [100, "chord", "F♯", "-7", 2], [102, "chord", "B", "7", 2], [104, "chord", "G♯", "-7", 2], [108, "chord", "C♯", "7", 2], [110, "chord", "B", "-7", 2], [112, "chord", "B♭", "-7", 4], [116, "chord", "E♭", "7", 4], [120, "chord", "C♯", "-7", 4], [124, "chord", "C♯", "-♭6", 4], [128, "chord", "C♯", "-7", 4], [132, "chord", "C♯", "-♭6", 4], [136, "chord", "C", "7sus", 4], [140, "chord", "C", "∆♭6", 4], [144, "chord", "C", "7sus♭9", 4], [148, "chord", "E", "7alt", 4], [2, "note", 76, 0.25, 0.5], [2.5, "note", 77, 0.25, 0.5], [3, "note", 79, 0.25, 0.5], [3.5, "note", 74, 0.25, 3.5], [10, "note", 76, 0.25, 0.5], [10.5, "note", 77, 0.25, 0.5], [11, "note", 79, 0.25, 0.5], [11.5, "note", 74, 0.25, 3.5], [18, "note", 72, 0.25, 0.5], [18.5, "note", 74, 0.25, 1], [19.5, "note", 76, 0.25, 0.5], [20, "note", 71, 0.25, 1], [21, "note", 71, 0.25, 2], [26, "note", 72, 0.25, 0.5], [26.5, "note", 74, 0.25, 0.5], [27, "note", 76, 0.25, 0.5], [27.5, "note", 71, 0.25, 3.5], [31, "note", 69, 0.25, 1], [32, "note", 68, 0.25, 1.5], [33.5, "note", 75, 0.25, 2.5], [36, "note", 75, 0.25, 1.5], [37.5, "note", 75, 0.25, 0.5], [38, "note", 77, 0.25, 0.5], [38.5, "note", 75, 0.25, 0.5], [39, "note", 77, 0.25, 0.5], [39.5, "note", 79, 0.25, 4.5], [48, "note", 76, 0.25, 1.5], [49.5, "note", 79, 0.25, 2.5], [52, "note", 79, 0.25, 1], [53, "note", 79, 0.25, 0.5], [53.5, "note", 79, 0.25, 0.5], [54, "note", 81, 0.25, 0.5], [54.5, "note", 79, 0.25, 0.5], [55, "note", 81, 0.25, 0.5], [55.5, "note", 83, 0.25, 4.5], [66, "note", 80, 0.25, 0.5], [66.5, "note", 81, 0.25, 0.5], [67, "note", 83, 0.25, 0.5], [67.5, "note", 78, 0.25, 3.5], [74, "note", 76, 0.25, 0.5], [74.5, "note", 78, 0.25, 0.5], [75, "note", 80, 0.25, 0.5], [75.5, "note", 74, 0.25, 3.5], [82, "note", 72, 0.25, 0.5], [82.5, "note", 74, 0.25, 1], [83.5, "note", 76, 0.25, 0.5], [84, "note", 71, 0.25, 1], [85, "note", 71, 0.25, 2], [90, "note", 72, 0.25, 0.5], [90.5, "note", 74, 0.25, 1], [91, "note", 76, 0.25, 0.5], [91.5, "note", 78, 0.25, 4.5], [96, "note", 78, 0.25, 0.5], [96.5, "note", 79, 0.25, 0.5], [97.5, "note", 78, 0.25, 0.25], [97.75, "note", 77, 0.25, 0.25], [98, "note", 78, 0.25, 1], [99, "note", 78, 0.25, 0.5], [99.5, "note", 83, 0.25, 0.5], [100.5, "note", 80, 0.25, 3.5], [104, "note", 80, 0.25, 0.5], [104.5, "note", 82, 0.25, 0.5], [105.5, "note", 80, 0.25, 0.25], [105.75, "note", 78, 0.25, 0.25], [106, "note", 80, 0.25, 1], [107, "note", 80, 0.25, 0.5], [107.5, "note", 85, 0.25, 2.5], [110, "note", 86, 0.25, 2], [112, "note", 87, 0.25, 1.5], [113.5, "note", 85, 0.25, 1], [114.5, "note", 80, 0.25, 1], [115.5, "note", 77, 0.25, 0.5], [116, "note", 84, 0.25, 3], [119, "note", 75, 0.25, 0.5], [119.5, "note", 80, 0.25, 8.5], [138, "note", 81, 0.25, 0.5], [138.5, "note", 82, 0.25, 0.5], [139, "note", 84, 0.25, 0.5], [139.5, "note", 79, 0.25, 3.5], [146, "note", 76, 0.25, 0.5], [146.5, "note", 77, 0.25, 0.5], [147, "note", 79, 0.25, 0.5], [147.5, "note", 74, 0.25, 3.5] ]
{
"by": "speckx",
"descendants": 85,
"id": 40216057,
"kids": [
40218749,
40217078,
40216547,
40217727,
40216333,
40216988,
40217254,
40220840,
40217482,
40221014,
40220608,
40220217,
40234369,
40217631,
40216519,
40216189,
40220705,
40217719,
40223135,
40217252,
40219833,
40216813,
40228351,
40217696,
40216798,
40219459,
40217571,
40217556
],
"score": 996,
"time": 1714509599,
"title": "Printing Music with CSS Grid",
"type": "story",
"url": "https://cruncher.ch/blog/printing-music-with-css-grid/"
}
{
"author": "Cruncher",
"date": null,
"description": "Music notation should be as accessible and as fluid as text is on the web. CSS Grid helps us get there.",
"image": "https://cruncher.ch/static/cruncher/images/logo_centred_512x512.png",
"logo": "https://logo.clearbit.com/cruncher.ch",
"publisher": "Cruncher",
"title": "Printing music with CSS grid",
"url": "https://cruncher.ch/blog/printing-music-with-css-grid/"
}
{
"url": "https://cruncher.ch/blog/printing-music-with-css-grid/",
"title": "Printing music with CSS grid",
"description": "Too often have I witnessed the improvising musician sweaty-handedly attempting to pinch-zoom an A4 pdf on a tiny mobile screen at the climax of a gig. We need fluid and responsive music rendering for the...",
"links": [
"https://cruncher.ch/blog/printing-music-with-css-grid/"
],
"image": "https://cruncher.ch/static/cruncher/images/logo_centred_512x512.png",
"content": "<div>\n <p>Too often have I witnessed the improvising musician sweaty-handedly attempting to pinch-zoom an A4 pdf on a tiny mobile screen at the climax of a gig. We need fluid and responsive music rendering for the web!</p>\n <p>\n <span>Stephen Band</span>\n 24 Apr 2024\n </p>\n<svg width=\"0\" height=\"0\">\n</svg>\n<section>\n <p>Music notation should be as accessible and as fluid as text is, on the\n web; that it is not, yet, is something of an afront to my sensibilities.\n Let us fix this pressing problem.</p>\n <h2>The Scribe prototype</h2>\n <figure>\n <img src=\"https://cruncher.ch/static/blog/printing-music/images/scribe-020-dolphin-dance.png\" />\n <figcaption>SVG rendered by Scribe 0.2</figcaption>\n </figure>\n <p>Some years ago I prototyped a music renderer I called Scribe that outputs\n SVG from JSON. The original goal was to produce a responsive music renderer.\n It was a good demo, but to progress I was going to have to write a complex\n multi-pass layout engine, and, well, other things got in the way.</p>\n <p>Shortly after making that I was busy adopting Grid into our projects at\n Cruncher when something about it struck me as familiar, and I wondered if\n it might not be an answer to some of the layout problems I had been tackling\n in Scribe.</p>\n <h2>The class <code>.stave</code></h2>\n <p>The musical staff is grid-like. Pitch is plotted up the vertical axis and\n time runs left to right along the horizontal axis. I am going to define\n these two axes in two seperate classes. The vertical axis, defining grid rows,\n will be called <code>.stave</code>. We'll get to the time axis in a bit.</p>\n <p>A <code>.stave</code> has fixed-size grid rows named with standard pitch\n names, and a background image that draws the staff. So for a treble clef\n stave the row map might look like this:</p>\n <pre><code>\n .stave {\n display: grid;\n row-gap: 0;\n grid-template-rows:\n [A5] 0.25em [G5] 0.25em [F5] 0.25em [E5] 0.25em\n [D5] 0.25em [C5] 0.25em [B4] 0.25em [A4] 0.25em\n [G4] 0.25em [F4] 0.25em [E4] 0.25em [D4] 0.25em\n [C4] 0.25em ;\n background-image: url('/path/to/stave.svg');\n background-repeat: no-repeat;\n background-size: 100% 2.25em;\n background-position: 0 50%;\n }\n </code></pre>\n <p>Which, applied to a <code>&lt;div&gt;</code> gives us:</p>\n <p>Ok. Not much to see, but on inspecting it we do see that each line and\n each space on the stave now has its own pitch-named grid line to identify each row:</p>\n <img src=\"https://cruncher.ch/static/blog/printing-music/images/template-rows.png\" alt=\"Named grid rows\" />\n <h3>Placing pitches up the stave</h3>\n <p>Any given row on a stave may contain any of several pitches. The\n pitches <strong>G♭</strong>, <strong>G</strong> and <strong>G♯</strong> must\n all sit on the <strong>G</strong> stave line, for example.</p>\n <p>To place DOM elements that represent those pitches in their correct rows I\n am going to put pitch names in <code>data-pitch</code> attributes and use CSS\n to map <code>data-pitch</code> values to stave rows.</p>\n <pre><code>\n .stave &gt; [data-pitch^=\"G\"][data-pitch$=\"4\"] { grid-row-start: G4; }\n </code></pre>\n <p>This rule captures pitches that start with <code>'G'</code> and end with\n <code>'4'</code>, so it assigns pitches <code>'G♭4'</code>, <code>'G4'</code>\n and <code>'G♯4'</code> (and double flat <code>'G𝄫4'</code> and double sharp\n <code>'G𝄪4'</code>) to the <code>G4</code> row. That does need to be done for\n every stave row:</p>\n <pre><code>\n .stave &gt; [data-pitch^=\"A\"][data-pitch$=\"5\"] { grid-row-start: A5; }\n .stave &gt; [data-pitch^=\"G\"][data-pitch$=\"5\"] { grid-row-start: G5; }\n .stave &gt; [data-pitch^=\"F\"][data-pitch$=\"5\"] { grid-row-start: F5; }\n .stave &gt; [data-pitch^=\"E\"][data-pitch$=\"5\"] { grid-row-start: E5; }\n .stave &gt; [data-pitch^=\"D\"][data-pitch$=\"5\"] { grid-row-start: D5; }\n ...\n .stave &gt; [data-pitch^=\"D\"][data-pitch$=\"4\"] { grid-row-start: D4; }\n .stave &gt; [data-pitch^=\"C\"][data-pitch$=\"4\"] { grid-row-start: C4; }\n </code></pre>\n <p>That should give us enough to begin placing symbols on a stave! I have a\n bunch of SVG symbols that were prepared for the Scribe prototype, so let's\n try placing a couple on a stave:</p>\n <pre><code>\n &lt;div class=\"stave\"&gt;\n &lt;svg data-pitch=\"G4\" class=\"head\"&gt;\n &lt;use href=\"#head[2]\"&gt;&lt;/use&gt;\n &lt;/svg&gt;\n &lt;svg data-pitch=\"E5\" class=\"head\"&gt;\n &lt;use href=\"#head[2]\"&gt;&lt;/use&gt;\n &lt;/svg&gt;\n &lt;/div&gt;\n </code></pre>\n <p>That looks promising. Next, time.</p>\n <h2>The class <code>.bar</code> and its beats</h2>\n <p>Rhythm is perhaps a little trickier to handle. There is not one\n immediately obvious smallest rhythmic division to adopt that will support all kinds\n of rhythms. A judgement call must be made about what minimum note lengths\n and what cross-rhythms to support inside a grid.</p>\n <p>A 24-column-per-beat approach supports beat divisions to evenly lay out\n eighth notes (12 columns), sixteenth notes (6 columns) 32nd notes (3 columns)\n as well as triplet values of those notes. It's a good starting point.</p>\n <p>Here is a 4 beat bar defined as 4 × 24 = 96 grid columns, plus a column at\n the beginning and one at the end:</p>\n <pre><code>\n .bar {\n column-gap: 0.03125em;\n grid-template-columns:\n [bar-begin]\n max-content\n repeat(96, minmax(max-content, auto))\n max-content\n [bar-end];\n }\n </code></pre>\n <p>Add a couple of bar lines as <code>::before</code> and <code>::after</code>\n content, and put a clef symbol in there centred on the stave with <code>data-pitch=\"B4\"</code>,\n and we get:</p>\n <pre><code>\n &lt;div class=\"stave bar\"&gt;\n &lt;svg data-pitch=\"B4\" class=\"treble-clef\"&gt;\n &lt;use href=\"#treble-clef\"&gt;&lt;/use&gt;\n &lt;/svg&gt;\n &lt;/div&gt;\n </code></pre>\n <p>Inspect that and we see that the clef has dropped into the first column,\n and there are 96 zero-width columns, 24 per beat, each seperated by a small <code>column-gap</code>:</p>\n <img src=\"https://cruncher.ch/static/blog/printing-music/images/template-columns.png\" alt=\"Named grid rows\" />\n <h3>Placing symbols at beats</h3>\n <p>This time I am going to use <code>data-beat</code> attributes to assign\n elements a beat, and CSS rules to map beats to grid columns. The CSS map\n looks like this, with a rule for each 1/24th of a beat:</p>\n <pre><code>\n .bar &gt; [data-beat^=\"1\"] { grid-column-start: 2; }\n .bar &gt; [data-beat^=\"1.04\"] { grid-column-start: 3; }\n .bar &gt; [data-beat^=\"1.08\"] { grid-column-start: 4; }\n .bar &gt; [data-beat^=\"1.12\"] { grid-column-start: 5; }\n .bar &gt; [data-beat^=\"1.16\"] { grid-column-start: 6; }\n .bar &gt; [data-beat^=\"1.20\"] { grid-column-start: 7; }\n .bar &gt; [data-beat^=\"1.25\"] { grid-column-start: 8; }\n ...\n .bar &gt; [data-beat^=\"4.95\"] { grid-column-start: 97; }\n </code></pre>\n <p>The attribute <code>^=</code> starts-with selector\n makes the rule error-tolerant. At some point, inevitably, unrounded or\n floating point numbers will be rendered into <span><code>data-beat</code>.</span>\n Two of their decimal places is enough to identify a <span>1/24th-of-a-beat</span>\n grid column.</p>\n <p>Put that together with our <code>stave</code> class and we are able to position symbols\n by beat and pitch by setting <code>data-beat</code> to a beat between\n <code>1</code> and <code>5</code>, and <code>data-pitch</code> to a note name. As we do,\n the beat columns containing those symbols grow to accommodate them:</p>\n <pre><code>\n &lt;div class=\"stave bar\"&gt;\n &lt;svg class=\"clef\" data-pitch=\"B4\"&gt;…&lt;/svg&gt;\n &lt;svg class=\"flat\" data-beat=\"1\" data-pitch=\"Bb4\"&gt;…&lt;/svg&gt;\n &lt;svg class=\"head\" data-beat=\"1\" data-pitch=\"Bb4\"&gt;…&lt;/svg&gt;\n &lt;svg class=\"head\" data-beat=\"2\" data-pitch=\"D4\"&gt;…&lt;/svg&gt;\n &lt;svg class=\"head\" data-beat=\"3\" data-pitch=\"G5\"&gt;…&lt;/svg&gt;\n &lt;svg class=\"rest\" data-beat=\"4\" data-pitch=\"B4\"&gt;…&lt;/svg&gt;\n &lt;/div&gt;\n </code></pre>\n <p>Ooo. Stems?</p>\n <p>Yup. Tails?</p>\n <p>Yup. The tail spacing can be improved (which should be achievable with margins) – but the positioning works.</p>\n <h2>Fluid and responsive notation</h2>\n <p>Stick a whole bunch of bars like these together in a flexbox container\n that wraps and we start to see responsive music:</p>\n <pre><code>\n &lt;figure class=\"flex\"&gt;\n &lt;div class=\"treble-stave stave bar\"&gt;…&lt;/div&gt;\n &lt;div class=\"treble-stave stave bar\"&gt;…&lt;/div&gt;\n &lt;div class=\"treble-stave stave bar\"&gt;…&lt;/div&gt;\n\n &lt;/figure&gt;\n </code></pre>\n <p>There are clearly a bunch of things missing from this, but this is a\n great base to start from. It already wraps more gracefully than I have yet\n seen an online music renderer do.</p>\n <h2>The space between the notes</h2>\n <p>Ignoring these beams for a moment, notice that note heads that occur closer\n in time to one another are rendered slightly closer together:</p>\n <p>It's a subtle, deliberate effect created by the small <code>column-gap</code>,\n which serves as a sort of time 'ether' into which symbol elements slot. Columns\n themselves are zero width unless there is a note head in them, but there are\n more column-gaps – 24 per beat – between events that are further apart in\n beats, and so more distance.</p>\n <p>Constant spacing can be controlled by adjusting margins on the symbols.\n To get a more constant spacing here we would reduce the <code>column-gap</code>\n while increasing the margin of note heads:</p>\n <p>But ugh, that looks bad, because the head spacings give the reader no clue\n as to how rapid the rhythm is. The point is, CSS is giving us some nice control\n over the metrics. And the aim now is to tweak those metrics for readability.</p>\n <h3>Clefs and time signatures</h3>\n <p>You may be wondering why I employed seperate classes for vertical and\n horizontal spacing, why not just one? Seperating the axes means that\n one can be swapped out without the other. Take the melody:</p>\n 0.5 B3 0.2 1.5\n 2 D4 0.2 1\n 3 F#4 0.2 1\n 4 E4 0.2 1\n 5 D4 0.2 1\n 6 B3 0.2 0.5\n 6.5 G3 0.2 0.5\n <p>To display this same melody on a bass clef, the <code>stave</code> class can be\n swapped out for a <code>bass-stave</code> class that maps the same <code>data-pitch</code>\n attributes to bass stave lines:</p>\n <pre><code>\n &lt;div class=\"bass-stave bar\"&gt;...&lt;/div&gt;\n </code></pre>\n 0.5 B3 0.2 1.5\n 2 D4 0.2 1\n 3 F#4 0.2 1\n 4 E4 0.2 1\n 5 D4 0.2 1\n 6 B3 0.2 0.5\n 6.5 G3 0.2 0.5\n <p>Or, with CSS that mapped <code>data-duration=\"5\"</code> to 120\n <code>grid-template-columns</code> on <code>.bar</code>, the same stave\n could be given a time signature of 5/4:</p>\n <pre><code>\n &lt;div class=\"bass-stave bar\" data-duration=\"5\"&gt;...&lt;/div&gt;\n </code></pre>\n 0.5 B3 0.2 1.5\n 2 D4 0.2 1\n 3 F#4 0.2 1\n 4 E4 0.2 1\n 5 D4 0.2 1\n 6 B3 0.2 0.5\n 6.5 G3 0.2 0.5\n <p>Clearly I am glossing over a few details. Not everything is as simple as\n a class change, and a few stems and ledger lines need repositioned.</p>\n <p>Here's a stave class that remaps pitches entirely. General MIDI\n places drum and percussion voices on a bunch of notes in the bottom octaves\n of a keyboard, but those notes are not related to where drums are printed\n on a stave. In CSS a <code>drums-stave</code> class can be defined that maps\n those pitches to their correct rows:</p>\n <pre><code>\n &lt;div class=\"drums-stave bar\" data-duration=\"4\"&gt;...&lt;/div&gt;\n </code></pre>\n <pre><code>\n &lt;div class=\"percussion-stave bar\" data-duration=\"4\"&gt;...&lt;/div&gt;\n </code></pre>\n <p>That's some very readable drum notation. I'm pretty pleased with that.</p>\n <h3>Chords and lyrics</h3>\n <p>CSS Grid allows us to align other symbols inside the notation grid too.\n Chords and lyrics, dynamics and so on can be lined up with, and span, timed\n events:</p>\n <div>\n <div>\n <svg></svg>\n <p>4</p>\n <p>4</p>\n <p>In</p>\n <p>A<span>♭</span><sub>maj</sub></p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>the</p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>bleak</p>\n <p>A<span>♭</span><sub>maj</sub>/G</p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>mid-</p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n </div>\n <div>\n <p>win-</p>\n <p>C<sup>7</sup><span>♭</span><sup>9</sup></p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>ter,</p>\n <p>F-<sup>7</sup></p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>A<span>♭</span><sup>7</sup><sub>sus</sub></p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n </div>\n <div>\n <p>Frost-</p>\n <p>D<span>♭</span><sub>maj</sub></p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>y</p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>wind</p>\n <p>B<span>♭</span>/D</p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <p>made</p>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n <svg></svg>\n </div>\n </div>\n <h3>But what about those beams?</h3>\n <p>Beams, chords and some of the longer rests are made to span columns by\n mapping their <code>data-duration</code> attributes to <code>grid-column-end</code>\n span values:</p>\n <pre><code>\n .stave &gt; [data-duration=\"0.25\"] { grid-column-end: span 6; }\n .stave &gt; [data-duration=\"0.5\"] { grid-column-end: span 12; }\n .stave &gt; [data-duration=\"0.75\"] { grid-column-end: span 18; }\n .stave &gt; [data-duration=\"1\"] { grid-column-end: span 24; }\n .stave &gt; [data-duration=\"1.25\"] { grid-column-end: span 30; }\n ...\n </code></pre>\n <p>Simple as, bru.</p>\n <h3>Sizing</h3>\n <p>Lastly, the whole system is sized in <code>em</code>, so to scale it we\n simply change the <code>font-size</code>:</p>\n 0 meter 2 1\n 0 E4 1 0.5\n 1 B4 1 0.5\n 2 Bb4 1 2\n <h3>Limits of Flex and Grid</h3>\n <p>Is it the perfect system? Honestly, I'm quietly gobsmacked that it works\n so well, but if we are looking for caveats… <strong>1.</strong> CSS cannot\n automatically position a new clef/key signature at the beginning of each\n wrapped line, or <strong>2.</strong> tie a head to a new head on a new line.\n And <strong>3.</strong>, angled beams are a whole story onto themselves;\n 1/16th and 1/32nd note beams are hard to align because we cannot know precisely\n where their stems are until after the Grid has laid them out:</p>\n <p>So it's going to need a bit of tidy-up JavaScript to finish\n the job completely, but CSS shoulders the bulk of the layout work here, and\n that means far less layout work to do in JavaScript.</p>\n <h2>Let me know what you think</h2>\n <p>If you like this CSS system or this blog post, or if you can see how to make\n improvements, please do let me know. I'm on Bluesky\n <a target=\"_blank\" href=\"https://bsky.app/profile/stephen.band\">@stephen.band</a>,\n Mastodon\n <a target=\"_blank\" href=\"https://front-end.social/@stephband\">@[email protected]</a>,\n and Twitter (still, just about)\n <a target=\"_blank\" href=\"https://twitter.com/stephband\">@stephband</a>.\n Or join me in making this in the Scribe repo...</p>\n</section>\n<section>\n <h2><code>&lt;scribe-music&gt;</code></h2>\n <p>A custom element for rendering music</p>\n <p>I have written an interpreter around this new CSS system and wrapped that up\n in the element <code>&lt;scribe-music&gt;</code>. It's nowhere near production-ready,\n but as it is already capable of rendering a <a target=\"_blank\" href=\"https://stephen.band/scribe/dolphin-dance.html\">responsive lead sheet</a>\n and notating drums I think it's interesting and useful.</p>\n <h3>Whazzitdo?</h3>\n <p>The <code>&lt;scribe-music&gt;</code> element renders music notation\n from data found in it's content:</p>\n <pre><code>\n &lt;scribe-music type=\"sequence\"&gt;\n 0 chord D maj 4\n 0 F#5 0.2 4\n 0 A4 0.2 4\n 0 D4 0.2 4\n &lt;/scribe-music&gt;\n </code></pre>\n 0 chord Dmaj 4\n 0 F#5 0.2 4\n 0 A4 0.2 4\n 0 D4 0.2 4\n <p>Or from a file fetched by its <code>src</code> attribute, such as this JSON:</p>\n <pre><code>\n &lt;scribe-music\n clef=\"drums\"\n type=\"application/json\"\n src=\"/static/blog/printing-music/data/caravan.json\"&gt;\n &lt;/scribe-music&gt;\n </code></pre>\n <p>Or from a JS object set on the element's <code>.data</code> property.</p>\n <p>There's some basic documentation about all that in the <a target=\"_blank\" href=\"https://github.com/stephband/scribe/\">README</a>.</p>\n <h3>Try it out</h3>\n <p>You can try the current development build by importing these files in a web page:</p>\n <pre><code>\n &lt;link rel=\"stylesheet\" href=\"https://stephen.band/scribe/scribe-music/module.css\" /&gt;\n &lt;script type=\"module\" src=\"https://stephen.band/scribe/scribe-music/module.js\"&gt;&lt;/script&gt;\n </code></pre>\n <p>As I said, it's in development. Asides from some immediate improvements I\n can make to Scribe 0.3, like tuning the autospeller, fixing the 1/16th-note\n beams and detecting and displaying tuplets, some longer-term features I would\n like to investigate are:</p>\n <ul>\n <li><strong>Support for <a target=\"_blank\" href=\"https://www.smufl.org/fonts/\">SMuFL fonts</a></strong> –\n changing the font used for notation symbols. So far I have not been able to display their\n extended character sets reliably cross-browser.</li>\n <li><strong>Support for nested sequences</strong> – enabling multi-part tunes.</li>\n <li><strong>Split-stave rendering</strong> – placing multiple parts on one stave. The mechanics for this are already half in place – the drums stave and piano stave currently auto-split by pitch.</li>\n <li><strong>Multi-stave rendering</strong> – placing multiple parts on multiple, aligned, staves.</li>\n </ul>\n <p>I leave you with a transposable lead sheet for Dolphin Dance, rendered by <code>&lt;scribe-music&gt;</code>:</p>\n</section>\n<section>\n <h2>Dolphin Dance</h2>\n <label>Transpose:</label>\n [\n [0, \"chord\", \"C\", \"\", 4],\n [4, \"chord\", \"G\", \"-\", 4],\n [8, \"chord\", \"C\", \"\", 4],\n [12, \"chord\", \"B\", \"ø\", 2],\n [14, \"chord\", \"E\", \"7alt\", 2],\n [16, \"chord\", \"A\", \"-\", 4],\n [20, \"chord\", \"F\", \"∆(♯11)\", 2],\n [22, \"chord\", \"E\", \"7alt\", 2],\n [24, \"chord\", \"A\", \"-\", 4],\n [28, \"chord\", \"F♯\", \"-7\", 2],\n [30, \"chord\", \"B\", \"7\", 2],\n [32, \"chord\", \"E\", \"\", 4],\n [36, \"chord\", \"F\", \"-7\", 4],\n [40, \"chord\", \"D\", \"-7\", 6],\n [46, \"chord\", \"E\", \"7alt\", 2],\n [48, \"chord\", \"A\", \"-7\", 8],\n [56, \"chord\", \"F♯\", \"-7\", 4],\n [60, \"chord\", \"B\", \"7\", 4],\n [64, \"chord\", \"E\", \"\", 4],\n [68, \"chord\", \"E\", \"7sus\", 4],\n [72, \"chord\", \"E\", \"∆♯11\", 4],\n [76, \"chord\", \"E\", \"7sus\", 4],\n [80, \"chord\", \"D\", \"7sus\", 4],\n [84, \"chord\", \"D\", \"∆♯11\", 4],\n [88, \"chord\", \"D\", \"7sus\", 4],\n [92, \"chord\", \"C♯\", \"-7\", 2],\n [94, \"chord\", \"F♯\", \"7\", 2],\n [96, \"chord\", \"C\", \"7♯11\", 4],\n [100, \"chord\", \"F♯\", \"-7\", 2],\n [102, \"chord\", \"B\", \"7\", 2],\n [104, \"chord\", \"G♯\", \"-7\", 2],\n [108, \"chord\", \"C♯\", \"7\", 2],\n [110, \"chord\", \"B\", \"-7\", 2],\n [112, \"chord\", \"B♭\", \"-7\", 4],\n [116, \"chord\", \"E♭\", \"7\", 4],\n [120, \"chord\", \"C♯\", \"-7\", 4],\n [124, \"chord\", \"C♯\", \"-♭6\", 4],\n [128, \"chord\", \"C♯\", \"-7\", 4],\n [132, \"chord\", \"C♯\", \"-♭6\", 4],\n [136, \"chord\", \"C\", \"7sus\", 4],\n [140, \"chord\", \"C\", \"∆♭6\", 4],\n [144, \"chord\", \"C\", \"7sus♭9\", 4],\n [148, \"chord\", \"E\", \"7alt\", 4],\n [2, \"note\", 76, 0.25, 0.5],\n [2.5, \"note\", 77, 0.25, 0.5],\n [3, \"note\", 79, 0.25, 0.5],\n [3.5, \"note\", 74, 0.25, 3.5],\n [10, \"note\", 76, 0.25, 0.5],\n [10.5, \"note\", 77, 0.25, 0.5],\n [11, \"note\", 79, 0.25, 0.5],\n [11.5, \"note\", 74, 0.25, 3.5],\n [18, \"note\", 72, 0.25, 0.5],\n [18.5, \"note\", 74, 0.25, 1],\n [19.5, \"note\", 76, 0.25, 0.5],\n [20, \"note\", 71, 0.25, 1],\n [21, \"note\", 71, 0.25, 2],\n [26, \"note\", 72, 0.25, 0.5],\n [26.5, \"note\", 74, 0.25, 0.5],\n [27, \"note\", 76, 0.25, 0.5],\n [27.5, \"note\", 71, 0.25, 3.5],\n [31, \"note\", 69, 0.25, 1],\n [32, \"note\", 68, 0.25, 1.5],\n [33.5, \"note\", 75, 0.25, 2.5],\n [36, \"note\", 75, 0.25, 1.5],\n [37.5, \"note\", 75, 0.25, 0.5],\n [38, \"note\", 77, 0.25, 0.5],\n [38.5, \"note\", 75, 0.25, 0.5],\n [39, \"note\", 77, 0.25, 0.5],\n [39.5, \"note\", 79, 0.25, 4.5],\n [48, \"note\", 76, 0.25, 1.5],\n [49.5, \"note\", 79, 0.25, 2.5],\n [52, \"note\", 79, 0.25, 1],\n [53, \"note\", 79, 0.25, 0.5],\n [53.5, \"note\", 79, 0.25, 0.5],\n [54, \"note\", 81, 0.25, 0.5],\n [54.5, \"note\", 79, 0.25, 0.5],\n [55, \"note\", 81, 0.25, 0.5],\n [55.5, \"note\", 83, 0.25, 4.5],\n [66, \"note\", 80, 0.25, 0.5],\n [66.5, \"note\", 81, 0.25, 0.5],\n [67, \"note\", 83, 0.25, 0.5],\n [67.5, \"note\", 78, 0.25, 3.5],\n [74, \"note\", 76, 0.25, 0.5],\n [74.5, \"note\", 78, 0.25, 0.5],\n [75, \"note\", 80, 0.25, 0.5],\n [75.5, \"note\", 74, 0.25, 3.5],\n [82, \"note\", 72, 0.25, 0.5],\n [82.5, \"note\", 74, 0.25, 1],\n [83.5, \"note\", 76, 0.25, 0.5],\n [84, \"note\", 71, 0.25, 1],\n [85, \"note\", 71, 0.25, 2],\n [90, \"note\", 72, 0.25, 0.5],\n [90.5, \"note\", 74, 0.25, 1],\n [91, \"note\", 76, 0.25, 0.5],\n [91.5, \"note\", 78, 0.25, 4.5],\n [96, \"note\", 78, 0.25, 0.5],\n [96.5, \"note\", 79, 0.25, 0.5],\n [97.5, \"note\", 78, 0.25, 0.25],\n [97.75, \"note\", 77, 0.25, 0.25],\n [98, \"note\", 78, 0.25, 1],\n [99, \"note\", 78, 0.25, 0.5],\n [99.5, \"note\", 83, 0.25, 0.5],\n [100.5, \"note\", 80, 0.25, 3.5],\n [104, \"note\", 80, 0.25, 0.5],\n [104.5, \"note\", 82, 0.25, 0.5],\n [105.5, \"note\", 80, 0.25, 0.25],\n [105.75, \"note\", 78, 0.25, 0.25],\n [106, \"note\", 80, 0.25, 1],\n [107, \"note\", 80, 0.25, 0.5],\n [107.5, \"note\", 85, 0.25, 2.5],\n [110, \"note\", 86, 0.25, 2],\n [112, \"note\", 87, 0.25, 1.5],\n [113.5, \"note\", 85, 0.25, 1],\n [114.5, \"note\", 80, 0.25, 1],\n [115.5, \"note\", 77, 0.25, 0.5],\n [116, \"note\", 84, 0.25, 3],\n [119, \"note\", 75, 0.25, 0.5],\n [119.5, \"note\", 80, 0.25, 8.5],\n [138, \"note\", 81, 0.25, 0.5],\n [138.5, \"note\", 82, 0.25, 0.5],\n [139, \"note\", 84, 0.25, 0.5],\n [139.5, \"note\", 79, 0.25, 3.5],\n [146, \"note\", 76, 0.25, 0.5],\n [146.5, \"note\", 77, 0.25, 0.5],\n [147, \"note\", 79, 0.25, 0.5],\n [147.5, \"note\", 74, 0.25, 3.5]\n ]\n</section>\n</div>",
"author": "@cruncher",
"favicon": "https://cruncher.ch/static/images/favicon.png",
"source": "cruncher.ch",
"published": "",
"ttr": 555,
"type": "organization"
}