Extract from the Traité de l’harmonie 
In this extract Rameau argues that melody is derived from harmony.
CONTINUATION OF THE PRECEDING CHAPTER , IN WHICH IT APPEARS THAT MELODY ARISES FROM HARMONY
At first sight it would seem that harmony arises from melody, inasmuch as the melodies which the single voices produce become harmony when they are combined; it has, however, been necessary to determine in advance a path for each of these voices in order that they may agree together. No matter, then, what order of melody we may observe in the individual parts, taken together they will scarcely form a tolerable harmony (not to say that it is impossible that they should do so) unless this order has been dictated to them by the rules of harmony. Nevertheless, to make the whole theory of harmony more intelligible, we begin by teaching the method of constructing a melody, and supposing that we have made some progress with this, whatever ideas we may have formed concerning ti are set aside the moment it is a question of joining it to another part; we are no longer masters of the melody, and while we are occupied in seeking out the path which one part should follow in relation to another, we often lost sight of the one we proposed to ourselves, or are at least obliged to change it, lest the restraint this first part imposes on us prevent our always giving to the others a melody as perfect as we might wish. It is harmony then that guides us, not melody. A learned musician may indeed propose to himself a beautiful melody suitable for harmonization. But whence has he this happy faculty? Cannot nature have provided it? Assuredly. And if, on the other hand, nature has refused him this gift, how may he succeed? Only by means of the rules. But whence are we to derive these? That is what we must determine.
Strunk, Oliver, Source Readings in Music History, The Baroque Era. WW Norton & Company, New York and London, 1965. SBN 393-09682-3, p. 210.