Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that beat notes are always provided as a collection #20

Open
slurmulon opened this issue Oct 1, 2019 · 0 comments
Open

Ensure that beat notes are always provided as a collection #20

slurmulon opened this issue Oct 1, 2019 · 0 comments
Assignees

Comments

@slurmulon
Copy link
Owner

Right now if you have a pair that only contains a single element:

2 -> Chord('Fm')

When you compile the track into Bach.JSON (via back.track/compile-track) you will receive the following:

{
  "duration": 2,
  "notes": {
    "atom": {
      "init": {
        "arguments": [
          "Fm"
        ]
      },
      "keyword": "Chord"
    }
  }
}

This makes high-level parsing more complicated because you have to determine whether or not notes is a collection before you can interpret it.

Instead, we should always receive a collection regardless of how many notes/elements are in a beat pair:

{
  "duration": 2,
  "notes": [
    {
      "atom": {
        "init": {
          "arguments": [
            "Fm"
          ]
        },
        "keyword": "Chord"
      }
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant