Skip to content

JSON_styling_elements_example

Adrian Holovaty edited this page Feb 14, 2023 · 2 revisions

Proposed JSON encoding of our Styling elements (basic) example document:

{
    "global": {
        "measures": [
            {
                "time": {"signature": "4/4"}
            }
        ],
        "styles": [
            {"selector": "note", "color": "#0080FF"}
        ]
    },
    "parts": {
        "p1": {
            "name": "Music",
            "measures": [
                {
                    "content": [
                        {"type": "clef", "sign": "G", "line": 2},
                        {
                            "type": "sequence",
                            "content": [
                                {
                                    "type": "event",
                                    "value": "/4",
                                    "notes": [
                                        {"pitch": "C5"}
                                    ]
                                },
                                {
                                    "type": "event",
                                    "value": "/4",
                                    "notes": [
                                        {"pitch": "E5"}
                                    ]
                                },
                                {
                                    "type": "event",
                                    "value": "/4",
                                    "notes": [
                                        {"pitch": "G5"}
                                    ]
                                },
                                {
                                    "type": "event",
                                    "value": "/4",
                                    "notes": [
                                        {"pitch": "C6"}
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}

Clone this wiki locally