Skip to content

Instantly share code, notes, and snippets.

@ryanbriones
Created August 3, 2013 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanbriones/6144388 to your computer and use it in GitHub Desktop.
Save ryanbriones/6144388 to your computer and use it in GitHub Desktop.
JSON musical notation
{
"key_signature": {
"name": "C major",
"sharps": [],
"flats": [],
},
"time_signature": {
"upper": 4,
"lower": 4
},
"notes": [
{"note": "C2", "length": 0.25},
{"note": "C2", "length": 0.25},
{"note": "G2", "length": 0.25},
{"note": "G2", "length": 0.25},
{"note": "A2", "length": 0.25},
{"note": "A2", "length": 0.25},
{"note": "G2", "length": 0.5},
]
}
@ryanbriones
Copy link
Author

Is this crazy? "Notes" probably needs a more generic name in order to support tempos and tempo changes.

Also, this doesn't show playing multiple notes at once, but I suppose that could just be represented as an array of "note objects" where normally a single "note object" exists.

I'm learning how much I don't know about the domain of musical notation...

@danmelnick
Copy link

Not totally crazy, but I'm wondering how you'd stack notes for chords.

You could nest a chord I guess:

"chord": {
  "length": 0.5
  "notes": []
}

You'd also need a type for rests, and some way to notate ties.

@ryanbriones
Copy link
Author

@danmelnick I was kind of a fan of the "implicit meaning" of an array of notes, but this is better. You could add a "name" property for displaying the chords above the staff notation for guitars or whatnot.

Is there a general name for the "atoms" of musical notation (notes, chords, rests, tempo changes, etc)?

@ryanbriones
Copy link
Author

http://www.lilypond.org/text-input.html

This is interesting... except for the LaTeX. Thanks to @trptcolin

@HughDevlin
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment