katana-dev / docs

Main compilation of documentation
Creative Commons Attribution Share Alike 4.0 International
100 stars 11 forks source link

Map out minimum required tsl parameters #5

Open Beanow opened 7 years ago

Beanow commented 7 years ago

It would be interesting to test what tsl parameters can be omitted for Boss Tone Studio to still function correctly. This could allow for significant size reduction of tsl files, or storage in a database.

Beanow commented 7 years ago

Should the BTS requirements for TSL files not be too complicated we might add it to the just added data. https://github.com/katana-dev/docs/blob/master/data/tsl-map-1.0.0.csv

Beanow commented 7 years ago

Great news, almost every single value in a TSL file is optional. The smallest possible (other than removing indentation) TSL file I could import was:

{
    "device": "GT",
    "liveSetData": {},
    "patchList": [
        {
            "name": "Hello Katana"
        }
    ]
}

This will result in every single missing parameter effectively defaulting to it's zero value or closest equivalent.

image

Beanow commented 7 years ago

I seriously wonder why they provisioned all these IDs and order numbers and whatnot.

{
    "device": "GT",
    "liveSetData": {},
    "patchList": [
        {"name": "Hello Katana"},
        {"name": "Is your order the"},
        {"name": "way I expect it"},
        {"name": "to be?"}
    ]
}

ss_21-12-19

Beanow commented 7 years ago

Similarly for KATANAFxFloorBoard the absolute minimum currently is:

{
    "device": "GT",
    "patchList": [
        {
            "params": {
                "fx_chain_position1": 17,
                "fx_chain_position2": 15,
                "fx_chain_position3": 5,
                "fx_chain_position5": 2,
                "fx_chain_position4": 6,
                "fx_chain_position7": 1,
                "fx_chain_position8": 13,
                "fx_chain_position6": 12,
                "fx_chain_position9": 7,
                "fx_chain_position10": 9,
                "fx_chain_position11": 18,
                "fx_chain_position12": 0,
                "fx_chain_position13": 3,
                "fx_chain_position14": 14,
                "fx_chain_position15": 8,
                "fx_chain_position16": 11,
                "fx_chain_position17": 4,
                "fx_chain_position18": 10,
                "fx_chain_position19": 19,
                "fx_chain_position20": 16,
            }
        }
    ]
}

Yes, the trailing comma makes this invalid JSON, but not including it will cause a segvfault.

Beanow commented 7 years ago

@gumtown though there's no rush for this. Might be worth looking into the segfaults. Since there's only 9? out of these 20 actually usable, it would be interesting to omit these values from minimized TSL files.

gumtown commented 7 years ago

If you want minimised files, why not look at conversion of .tsl to .syx (system exclusive), FxFloorBoard and the Katana use this format as native, one patch in FxFloorBoard = 2426bytes.

Beanow commented 7 years ago

@gumtown for use-cases that require the smallest possible files I will certainly look at binary formats. lib-katana already supports an encoding that takes 1040 bytes and some back of the envelope work on more aggressive encoding schemes suggest these could come down to as low as ~300 bytes.

The reason I'm still looking into TSL minification is because BTS only supports the TSL format. So for sharing patches with other people it's got the broadest support. A typical single-patch TSL file is around 25KB though. We can do much better than that.

Testing stuff out I noticed the hard crash if these values aren't present. So I thought I'd let you know.