Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Clarify the role of part vs. score vs single part score #12

Closed
hanshoglund opened this issue Mar 29, 2013 · 1 comment
Closed

Clarify the role of part vs. score vs single part score #12

hanshoglund opened this issue Mar 29, 2013 · 1 comment
Labels

Comments

@hanshoglund
Copy link
Member

We often use single-part scores in the implementation. That is scores which have an informal guarantee to have no overlapping events.

  • We usually want to manipulate things which have both offset and duration (i.e. scores and voices). Often we need to work on single voices.
  • Voice is great because it enforces no overlaps in its type
  • However it is inconvenient not to have the offsets around, forcing us to do accumulation over time.
  • Maybe add a newtype wrapper for score with the static guarantee, that is, a hidden implementation and safe constructors Part (Maybe a) -> SingleVoiceScore a, SingleVoiceScore a -> Voice (Maybe a).
@hanshoglund
Copy link
Member Author

Single-voice scores should be factored out. We should not think about the implementation of scores, i.e.

  • "It is great to use Score, because then we have the absolute onsets around"

Instead, think semantically:

  • Score a is a sequence of possibly overlapping notes
  • Voice a is a sequence of non-overlapping notes
  • Voice (Maybe a) is a sequence of non-overlapping notes or rests, and is isomorphic to [Either Duration (Voice a)]

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

No branches or pull requests

1 participant