A Constraint-based Logic Program for Generating Polyphonies