Playing Melodies, Solo, & Rhythm

A melody is the sound of guitar notes together in a sequence, as in a tune, a riff, or a lick.
Notes of a melody are often composed of notes of a guitar scale selected by harmonic chops
to lay it on you thin or heavy for a tone or phrasing to express a desired mood or feeling.
The root notes of the chord progression, or rhythm of the song
is often based on the notes of the melody, or the notes of
the melody can be from the notes of the chords, if you're writing one.

Of course the melody has a progression, or
sequence of notes. It's often repeated in
the bridge of the song, or in variations
in the sections of the songs.
Melodies can be composed of shorter groups of tones
or phrases to emphasize a
section of the rhythm or vocals or draw a contrast to.

The harmonic function of the tones of this melody
is the way certain ratios of frequency of the notes
sound similar and have a similar effect on the mood
of the listening audience. Harmonic function of
notes are labeled by the interval names
of the european classical major scale and
discussed at length in many forums in a meaningless thirst
for the subjective taste in music to be subject to
arcane technicalities of particular
dark age ordinals.

Harmonic function of a melody is also affected by
context of the composition and genre.
In the case of the major 5th interval mentioned previously,
this major 5th interval could sound different to
the audience in another key, in a different sequence of notes,
or with different chords or accompaniment.
Harmonic function in a melody or progression is the way the notes sound
in sequence & how it affects the mood of the listener.

The distances between different notes on the
chromatic scale usually have a similar change in
effect on mood by amount of increase in the pitch.
Going from a note to a tone 7 notes higher
than the previous tone is a major 5th interval
increase, and often has a similar effect regardless
of the initial note,
that's the harmonic function
of a major 5th interval, for example.