Counting intervals

Patrock's icon

Hi.
I would like to show the intervals within a chord in number boxes but when the chord changes, the program doesn't calculate it properly (it's strange because it needs 2 same chords in a change to calculate it well in the second time). Also I would like to calculate 4 notes, and it works well; but when there are 3/2 voices it becomes crazy again.
How could I solve this?
Thank you in advance.

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon
Source Audio's icon

This patch can't work.
Only way to make it work is to form a list with
notes in the chord, get list length, then pick pairs of list items
to make calculations.
It depends how you want to form a chord.
Simple way would be to really play a chord and use thresh
to form a list with held notes.

But If you want to be able to recalculate intervals list any time,
you would need a coll or something similar that holds current held notes,
and on every change output notes list, to be recalculated.
And maybe sort list, to start with lowest note ?

Roman Thilenius's icon


sort is the king