Skip to content

JSON export doesn't include dpcm mapping #104

@nstbayless

Description

@nstbayless

Edit: Pull Request

Here's an example from .instruments[0] in a json export from a simple 0cc file containing only a dpcm channel.

You'll notice that there's no way to tell what dpcm samples are mapped to what notes. In this 0cc file, C#3 is keyed to a dpcm sample, but there's no way to tell this looking at the JSON.

{
  "chip": "2A03",
  "dpcm_map": [
    {
      "delta": -1,
      "dpcm_index": 0,
      "loop": false,
      "pitch": 13
    },
    {
      "delta": -1,
      "dpcm_index": 0,
      "loop": true,
      "pitch": 15
    },
    {
      "delta": -1,
      "dpcm_index": 0,
      "loop": true,
      "pitch": 12
    },
    {
      "delta": -1,
      "dpcm_index": 0,
      "loop": true,
      "pitch": 12
    }
  ],
  "index": 0,
  "name": "New instrument",
  "sequence_flags": []
}

I've verified that this information isn't encoded anywhere else in the json output by editing the key mapping in two different ways and diffing the resulting files (identical).

To resolve this, either a new field must be added to the entries in .instruments[].dpcm_map[], or else .instruments[].dpcm_map must be changed from a list to an object keyed by note.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions