Just wondering if fretless stringed instruments like a violin or oud, by fretless does it imply that they are used mainly for melody? In contrast to an instrument like a guitar, that has frets, does it make it more suitable for harmony than the fretless ones?
It is more difficult to play chords on fretless stringed instruments, largely because it is difficult to get accurate intonation when fingering more than two pitches on a fretless fingerboard. Bassists, violinists, and other strings players usually restrict their chordal offerings to double-stops.
But just because single note lines are easier to play than chords on fretless instruments does not mean that these instruments are used "mainly for melody." There is a whole world full of bass players in the rhythm section who are not playing melodies, but outlining harmonic backdrops for the melodies played by other instruments. And there is similarly a whole world of string section players providing harmonic backdrops for other instruments that carry the melody.
It is not an inflexible rule; for instance, the instruments viol family, which has frets, were used mainly for melody, while Bach wrote some (notoriously challenging to tune) pieces for solo violin with a lot of harmony. However, this correlation is worthy of note. The lack of frets on the violin and oud cries out for a melodic style with expressive microtonal embellishments (vibrato, etc.) The frets on the guitar, by contrast, limit melodic possibilities but ensure that chords are in tune even in awkward finger positions.
Just because they play one note at a time does not imply they cannot give harmonic structure to a passage.
In Pachelbel's canon in D you have a string quartet were you have the viola, first and second violins, taking turns to play the melody and the cellos providing the harmony. This coming from an ensemble with only fret-less stringed instruments.
The common feature of fretless stringed instruments is that the player controls the intonation. It is possible to "bend" a note without bending a string--very expressive for melody, or play in a non-Western tuning. For example, ouds often play in the 17-note-per-octave Arabic tuning. However, fretless instruments differ from one another in other important ways.
Viola-family instruments have a curved bridge. This means a single instrument can play double-stops (intervals) but cannot easily play chords. But a section of violins or string quartet can certainly play chords. So it is difficult to generalize across fretless instruments--each has different capabilities.
Some fretless stringed instruments and playing techniques (e.g., the Japamese shamisen) are quite percussive. Harmony is the major organizing principle of Western classical music, but is little-used in Japanese traditional music.
Questions about "harmony" and "melody" are vague without more context: * Vertical harmony or sequential harmony? * Culture? * Tradition/Style? * Period? * Role (solo, self-accompaniment for voice, small ensemble, large ensemble)
The Western/European musical tradition tends to relegate rhythm to secondary importance, but this is by no means the case elsewhere. A "melody instrument" can also play a base line, an ostanado or a "riff")--and may be used that way in another culture.