jmorag / lilypool

An implementation of a subset of lilypond music notation for use in the autofinger project (name still under review).
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Refactor chords and slurs #1

Open jmorag opened 6 years ago

jmorag commented 6 years ago

It's quite possible that we won't even implement slurs, since I doubt that they are super vital to fingerings, but the current type :+: constructor that they have in the overall Music type is not to my liking anyway.

We should instead augment the Prim type to have a doesTheBowChangeDirectionHere parameter (obviously with a less ridiculous name).

Also, chords need not have a special :=: constructor. This is good for HSoM's parallel composition, as they support arbitrary polyphony, but for our purposes, we want to collapse things into chords, which could be as simple as

type DoubleStop = (Primitive, Primitive)
type TripleStop = (Primitive, Primitive, Primitive)
-- etc...
jmorag commented 6 years ago

Work on this is somewhat underway

jmorag commented 6 years ago

This is (hopefully) the final time that I'm going to refactor chords, at least for a while. In order to disallow chords with different note lengths, we are going to catch this at the syntax level.

Note attributes should be divided into core pitch and auxiliary attributes. Chords will have 2, 3, or 4 tuples of pitch attributes, but just one auxiliary attribute, which captures length, articulation, grace note status and tempo. The fingering datatype should also allow for 1-4 tuples of fingers and strings.