Composition is the putting together of words to make a poem or a piece of prose, of notes to make a piece of music, or of details to make a picture. In music the "putting together" consists chiefly in (a) combining successive notes to make a melody; (b) combining simultaneous notes to make harmony; (c) combining melodies to make counterpoint; (d) combining phrases to make sentences and sentences to make long passages; (e) combining themes and their treatment to make pieces or movements of pieces; combining movements to make the cyclic forms (sonata, symphony, etc). The combination of timbres in orchestration may also be held to constitute a part of composition. The object of the composer is both to express their sense of emotions and satisfy their sense of craftsmanship and design.
There are, in a sense, no rules of composition. What have been formulated as such by theorists in textbooks are an attempt at a codification of the processes of successful composers of the past and may be disregarded by any composer of the present who feels that they can gain the effect they desire without accepting such control.