In the field of music, good practice in the writing of harmony has been
encapsulated in an extensive set of formal rules. It is a difficult and
tedious mental task to check music for compliance. However, music so
harmonized almost always sounds pleasing. In the present invention, a
Harmonizer harmonizes a melody in accordance with the rules using an
iterative technique of chord selection, permutation and submission to the
rules until solutions are found. At difficulties, the Harmonizer can
compromise preferences, in order to produce an optimum solution. The
process is characterized by advances and retreats along the melody and is
therefore suited to subsequent performance and not to real-time
applications.