Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Thoughts on making the file format more diff-friendly? #70

Open
mtkennerly opened this issue Jul 3, 2019 · 1 comment
Open

Thoughts on making the file format more diff-friendly? #70

mtkennerly opened this issue Jul 3, 2019 · 1 comment

Comments

@mtkennerly
Copy link

I really like how Bosca Ceoil uses a plain-text format since it works better for version control, but it's a bit unwieldy for diffing since it's all on one line and not annotated, Would you be open to making the format more diff-friendly?

A minimally invasive option could be to allow line breaks and comments, so then the program could generate something like:

4,

// general
0,0,0,110,16,4,

// instruments - first the count, then each one on its own line
2,
0,0,0,0,0,100,
5,0,0,0,0,100,

// patterns
so on...

A much more invasive option could be to annotate everything with JSON so that it's more self-documenting:

{
    "version": 4,
    "general": {
        "swing": 0,
        "effect": 0,
        "effectValue": 0,
        "bpm": 110,
        "patternLength": 16,
        "barLength": 4
    },
    "instruments": [
        {
            "number": 0,
            "type": 0,
            "palette": 0,
            "cutoff": 0,
            "resonance": 0,
            "volume": 100
        }
    ],
    "patterns": [
        {
            "key": 0,
            "scale": 0,
            "instrument": 0,
            "palette": 0,
            "notes": [
                {
                    "index": 0,
                    "length": 1,
                    "offset": 0
                }
            ],
            "recordFilter": 0,
            "recordFilterData": [
                {
                    "volume": 1,
                    "cutoff": 1,
                    "resonance": 1
                }
            ]
        }
    ],
    "arrangements": [
        {
            "loopStart": 0,
            "loopEnd": 0,
            "patterns": [
                []
            ]
        }
    ]
}

Either way, it would be much easier to see in source control what parts of the song were changed. What do you think?

@TerryCavanagh
Copy link
Owner

Hi! I think this is a really good idea, and will implement your pull request the next time I look at this project! Thank you <3

(I'm currently finishing up a commercial game, so 100% of my focus is on that right now.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants