The goal of this work is to derive four-voice music pieces from given musical plans, which describe the harmonic flow and the intentions of a desired composition. We developed the experimentation platform COMPOzE for intention-based composition. COMPOzE is based on constraint programming over finite domains of integers. We argue that constraint programming provides a suitable technology for this task and that the libraries and tools available for the constraint programming system Oz effectively support the implementation of COMPOzE. This work links the research areas of automatic music composition on one hand and finite domain constraint programming on the other, and contributes the tool COMPOzE, which practically demonstrates the potential of constraint programming to open up new areas of application for automatic music composition.