Fix detection: fix problem when adding new note.
Each detected group should be independant.
Point free.
Line too long.
Add a structure for a measure.
Use repeats.