This example demonstrates the use of finite domain constraints to generate musical chords. Because I'm not a musician, I chose just a few very simple constraints from the Nzakara Harp music. In that music, there are only 5 valid notes (3 for each voice, with 1 overlap). The constraint is simply that each note must have a valid partner played after a configurale "gap" (so the harmony is in time).
You can generate a short "melody" with a configurable "gap". Traditional is, for example, 30 and 7 or 20 and 5, but the constraints work for anything.
The constraints are truly bi-directional, you can open a halo on a note and set length (either 8,16,32,64, or 128) or the note (must be one of "C5", "D5", "E5" for voice1 and "E5", "G5", "Bb5" for voice2) programmatically, and the system will adjust the rest of the melody to incorporate your choice (if possible). If the system cannot do it, you change is rejected.