Hi Tina,

thanks also from me for this great script that does (almost) exactly what I need it to!

I took the liberty to modify the parallel checker to read:

#(define parallel-consonance-check
   (make-check
    (lambda (v1 v2)
      (let* ((p11 (car v1))
             (p21 (cadr v1))
             (p12 (car v2))
             (p22 (cadr v2))
             (delta1 (ly:pitch-diff p12 p11))
             (delta2 (ly:pitch-diff p22 p21))
             ;Addition Amelie
             (delta3 (ly:pitch-semitones(ly:pitch-diff p12 p22)))
             (delta4 (ly:pitch-semitones(ly:pitch-diff p11 p21)))
             ;End addition Amelie
(delta (if (ly:pitch<? p11 p12) (ly:pitch-diff p12 p11) (ly:pitch-diff p11 p12)))
             (steps (ly:pitch-steps delta)))
        (and (memq steps '(0 4))
             (equal? delta1 delta2)
             ;Addition Amelie
             (not(equal? delta3 0))
             (not(equal? delta4 0))
             ;End addition Amelie
(format #f "parallel ~a" (if (= steps 0) "octave" "fifth")))))))

so it would not catch two identical consecutive chords, which are allowed. Actually, either delta3 or delta4 should be enough, since, if the two voices are indeed parallel, delta3 must equal delta4, and it's enough to check if either is zero.

Cheers,

Amelie

Am 20.07.23 um 18:54 schrieb Valentin Petzel:
Hello Eef,

if you are going to do something like this I’d suggest a somewhat modular
design. In part writing there are many rules that apply to different voices, so
I suggest to do something that allows to do arbitrary checks in a nice and
extendable manner. I’ve sketched up a small proof of concept.

Cheers,
Valentin

Am Donnerstag, 20. Juli 2023, 08:57:11 CEST schrieb Eef Weenink:
thank you all  for these great suggestions!
However these solutions do more then my job for me ;-)
I need to learn to do this myself, not automate it.

The suggesions made me find this: https://lsr.di.unimi.it/LSR/Item?id=1100
about colouring intervals. I will try to combine that and the
partwriter.ly<http://partwriter.ly> in a tool. What should it do: - take
all chords apart and save the intervals in an array:
with 4 voices chords, this will be 6 intervals per chord:
SB (Soprano Basso)
SA (Soprano Alto)
ST (Soprano Tenor)
AT (Alto Tenor)
AB (Alto Basso)
TB  (Tenor Basso)
numbering intervals per half step: 1, 2, ..... 12

Compare the intervals of two consecutive chords
and search for issues:
examples:
- are there two voices with consecutive fifths (intervals are   both 8)
- are there two voices with consecutive octaves (ntervals are both 12)
etc.

If so, colour the noteheads

Applying this tool would help to check if I overlooked issues.

If a tool like that already exists? would be great :-)

Eef





Op 16 jul. 2023, om 10:33 heeft Vaughan McAlley
<[email protected]<mailto:[email protected]>> het volgende
geschreven:

I wrote a script in Lua to check MIDI files for consecutives. It assumes one
voice per track, so may not suit your needs for figured bass. I need to
make it more user-friendly, but would be happy to do so if anyone is
interested.

Congratulations to Thomas Tallis for having no consecutive fifths at all in
Spem in alium!

Vaughan


On Sat, 15 Jul 2023 at 07:13, Eef Weenink
<[email protected]<mailto:[email protected]>> wrote: Maybe
somebody already made a script for this:

In figured bass there are two fundamental rules: Avoid parallell octaves and
or fifhts. So it would be nice to have some scipts what checks for this. So
if two voices have a distance of a fifth or octave, the next chord is
checked if the same two voices have a fifth or octave too. If so, they are
parallel.

Any ideas, suggestions?

regards, Eef


--
Dr. Amelie Protscher ([email protected])
Pianist, Bassist, Guitarist, Composer, Friedrich-Ebert-Str. 25, 14548 Caputh, Germany
https://www.amelieprotscher.com/
https://www.facebook.com/amyprotscherjazz/
https://www.youtube.com/@amyprotscherjazz


Reply via email to