But wait, does your analysis not check for the presence of a syllable? If the syllable had not been in the marked place, it would have been correct.
As I understand it, there may be several layers of correctness:
1. Intonation: concerns only small fragments of melody, melisms: how typical are they? This is more suitable for analytical writing.
2. Formulas (what is called a thesis): is such a musical formula used in classical books, taking into account the arrangement of syllables and accents?
3. Composition: the rules of alternating cadences in the whole troparion, and how they relate to the meaning of the text. For example, in the Doxastarion, you can see that cadences often alternate in a certain way, forming another layer of rhythm.
It seems to me that your algorithm is close to the first layer. I'm checking the second layer by searching the formula database. Well, to implement the third layer, especially in comparison with the meaning of the text, you probably need a neural network.
Perhaps the question of correctness boils down to this: on what principle did Petros Peloponnesios choose the formulas?
Have you tried your algorithm on anything in this book: ΧΟΥΡΜΟΥΖΙΟΥ-ΕΥΤΕΡΠΗ (1830).pdf (You can find it
here)?
Well we have so far involved a number of parameters, we have to address their implications and combine together:
0) "the correct intervals themselves are not a very important point."
1) Use of small fragments
2) Use of longer formulae
3) Alternating cadences
0) Intervals:
As shown last week, if we consider the fine qualitative analysis, different for each chanter AND even for each moment he sings,
making Hertz-curves plus teeth of say up to 6 moria, well then, we can (in practice) forget about exact intervals and we are unofficially easily transposing or changing music scales, eg. from diatonic Byzantine to European, to soft chromatic, to enharmonic.
1) Smaller fragments:
It has been said that a small sequence of notes differentiates the melody and characterises a hymn or song.
However from 0) above we can see that there are alternative versions of these fragments.
The are equally correct. They exist because of alternative variations of the translations from the old method and other personal versions.
The AverDiff index continuously calculates the "deviation" of the previous 6 notes, starting counting from the beginning and restarting after a pause or breath. In a way it is similar to the statistical "Moving Average".
The average deviation index is a complex function of many criteria (now in beta and developing).
You can appreciate AverDiff if, for a moment, you think of Byz.Music as a language e.g. like Greek, Russian, Bulgarian, etc.
Think of every Note as Word in a language:
You may master the language and say anything correctly in different ways, or
you may hesitate and prefer το stick to fixed/standard sentences only, but you might then be monotonous and boring...
A small text of say 6 words has a meaning (B.M.= modesty) and a basic syntax.
There are synonymous/alternative words (B.M.= notes) which express the same meaning and they avoid monotony.
In a similar way the AveDiff index checks the modesty of a 6-note group.
The advantage of standard musical phrases is "strict"/identical and guaranteed correctness.
The disadvantage is the monotony and causes the need for using other music scales.
The legendary teacher Panagiotopoulos wrote in 1947 (Theory and Praxis, pp.311-313):
"The work (of composition) is producing from the start an original(!) and new(!) melody, or simply processing and improving(!) an existing melody"
Note, he does not urge us to copy existing musical phrases. And he continues:
"Byzantine music...is always subject to improvement and perfection"
How can this be done if we are forced to use existing parts of scores, even identical to each one of the notes?
And on p.313 he adds:
"There should be no excess in using a change of tone (mode). Because, as Chrysanthos says 'frequent fthorai show the inability of the composer who cannot find much material in one tone and that is why he uses many (tones)...' "
Thus, there are many good phrases in a given tone, but some/many composers cannot think of them and only resort to another tone!
This is exactly the purpose of the AverDiff: to identify/appraise a new (or forgotten) musical phrase as a building block of a whole cadence.
2) Longer formulae
Long formulae are outside the purpose of the AverDiff.
3) Alternating cadences
ditto