openlilylib / analysis

Graphical highlighting of musical analysis with GNU LilyPond
GNU General Public License v3.0
5 stars 3 forks source link

harmony module desiderata #13

Open uliska opened 4 years ago

uliska commented 4 years ago

I have now for the first time tried to integrate @mmeyn's functional analysis code in a project. I am surprised and greatly pleased to see how natural the input language works. After the first two or three symbols I could essentially guess how the input syntax works for the other symbols :-)

So I strongly suggest to integrate this code as a new harmony module. However, there are a few things we have to take care of and a few wishes I'd want in addition:

Generality

The main issue I have is that this approach is not really generic. There is support for functions and grades, separately implemented. I think we should try as hard as possible to provide a common infrastructure where additional analysis styles can be plugged in.

Contexts

I would strongly prefer having a new context instead of abusing Lyrics. Even a clone with a dedicated name would be better. However, ideally we'd have a Functions context where functions can directly be entered. also \addlyrics should be replaced by something like \addfunctions and \addgrades. However, as this may note be real functions but related to the actual input language parser, it may be very hard to achieve.

Functionality