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

[v2.0.0-SNAPSHOT] Useful semantic headers and refactored track normalization #22

Merged
merged 52 commits into from
Oct 3, 2020

Conversation

slurmulon
Copy link
Owner

@slurmulon slurmulon commented Oct 3, 2020

Summary

Major improvements and fixes to bach.track.

Introduces several new headers (such as total-ms-per-pulse-beat, beat-unit and more) to ease high-level interpretation and to reinforce domain semantics.

Also optimizes the format of bach.track/normalize-measures to allow high-level interpretation to be more pragmatic and generic.

The grammar/syntax was also updated to enable bach to be applied to any rhythm-based problem, instead of locking into concrete constructs such as Note, Chord, etc. More specifically, this allows headers and beat elements to use any name binding containing non-special chars.

This syntax update does not subtract from semantics, as Note, Chord, Scale and the like are still reserved for their original use cases. This change simply allows users to be more free and to establish their own constructs and semantics to sync with rhythms.

Using a SNAPSHOT version because the software is still considered pre-alpha and not production ready, however I need to be able to track breaking versions between various integration modules.

Changes

  • 🎨 Added various new semantic headers to ease parsing (breaking change)
  • ♻️ Renamed lowest-beat to pulse-beat throughout (breaking change)
  • ♻️ Renamed notes to items in resulting bach.track/normalize-measures beat elements (breaking change)
  • ♻️ Ensured that items (previously notes) are always returned as a collection (breaking change)
  • ♻️ Removed redundant surrounding atom object in resulting items (breaking change)
  • ♻️ Renamed bach.track/compile-track to bach.track/provision and added bach.track/compose, a smart wrapper around provision (breaking change)
  • 📜 Updated syntax to allow headers and keywords to be arbitrary strings of text containing non-special characters; only - and _ are "special" chars allowed in name bindings. (breaking change)
  • 📜 Renamed @Time header to @Meter (breaking change)
  • 📜 Updated documentation verbiage, examples, descriptions, etc.
  • 🔬 Wrote tons of tests (now over 100)
  • 🐛 Fixed lots of little issues with parsing, validation, normalization, and more.

Future

  • :shipit: Release to Clojars after merge
  • 📜 Document all of the headers thoroughly and add "Interpretation" section that describes how to integrate them
  • 🔧 Allow durations resulting from bach.track/normalize-measures to be normalized to either beat-unit, beat, or pulse-unit(currently locked intopulse-unit`, since it's optimized for iteration)
  • 🐛 Prevent lists and pairs from being nested at any level

Tickets

… bach.track-test. Temporarily disabled bach.track-test/compilation for quick deploy smoke test.
… Also renamed bach.track/compile-track to bach.track/compose.
…o various bach.track funcs to elegantly handle divide by 0 situations (e.g. empty tracks). Allowed total-beat-units and total-pulse-beats headers to be provisioned (which fixed several tests).
… to coerce hiccup formatted notes (in bach.track/normalize-measures) as a vector
…malize-measures to ensure that resulting 'notes' are always a vector, preventing need for conditional type checks in integrators (breaking change)
…malize-measures are always a collection (vector). Also removed redundant wrapper 'atom' property from resulting notes (breaking change).
…on test for nested lists (should be disallowed for simplicity)
…ude semantic headers and normalize notes as a vector
…ions, and generally updated content to match new interface
…ures to more generic beat.items, in order to increase flexibility and applicability of bach (breaking change)
…binding nomenclature in bach.track/normalize-measures
…lexibility by making headers and elements generic, removing the previous limitation to Note, Scale, Chord, Meter, etc.
…admap and bumped version to 2.0.0-SNAPSHOT in code snippets
…r-measure to provisioned bach.track headers. Also fixed header parsing regression, ensuring label and kind are always strings.
…hat prevented single-character name bindings from being used
…h.track/ms-per-beat (adds consistency with other aliases to reinforce domain semantics)
@slurmulon slurmulon self-assigned this Oct 3, 2020
@slurmulon slurmulon changed the title [v2.0.0-SNAPSHOT] useful semantic headers [v2.0.0-SNAPSHOT] Useful semantic headers and refactored track normalization Oct 3, 2020
@slurmulon slurmulon merged commit 01287ff into master Oct 3, 2020
@slurmulon slurmulon deleted the feat/2.0.0-useful-semantic-headers branch October 3, 2020 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant