music-suite / music-pitch

This repo has been merged into: https://github.com/music-suite/music-suite
http://music-suite.github.io
BSD 3-Clause "New" or "Revised" License
9 stars 9 forks source link

Context-dependent spelling #10

Closed hanshoglund closed 10 years ago

hanshoglund commented 10 years ago

The current definition of spelling is simply

type Spelling = Semitones -> Number

This is fine for simple cases such as "all sharps", "all flats" etc, but not adequate for how notes are typically spelled in scores and parts.

For this we need to formalize rules such as:

I am not sure how to model "note context". Maybe something similar to the Ctxt functor:

type Spelling = ([Semitones], Semitones, [Semitones]) -> Number

this can be used for both vertical and horizontal context.

Promlems:

hanshoglund commented 10 years ago

Postponed indefinately.