Scales are used for musical composition. There are several approaches such as: "top-down" from melody to harmony, or "bottom-up" from harmony to melody.

This page offers one example, "bottom-up", from harmony to melody. In this approach we will (i)choose a scale, (ii) a chord progression, and (iii) write a melody that fits these two.

Say for example, that we like the "Neapolitan Minor" scale (3417). We choose this scale in its A transposition.

A

The notes in this scale are:

Next, we map the degrees of the scale:

IIIIIIIVVVIVII
ABbCDEFG#

For the first degree (chords starting with A), we can see that Am, AmM7, Asus4 are in the scale.

For the second degree (chords starting in Bb), we can see that BbM, BbM7, Bb7, etc are in the scale.

Continuing this way, we can deduce all of the chords compatible with this scale, as shown in the table of Compatible Chords for the Neapolitan Minor scale (3417), reproduced here for convenience.

Degree Compatible Chords
I m, mM7, sus4
II M, M7, 7, 7-5, 9, M9, add9
III aug, 7+5
IV m, m7, m7+5, dim, m7-5, m9
V aug, 7+5, 7-5
VI M, M7, m, mM7, 6, m6, sus4
VII aug

The next step is to choose a chord progression for our composition.

Suppose we like the traditional I-IV-I-V-I progression. In A, the basic chords in this progression are: A-D-A-E-A.

Now, choosing from the compatible chords chart above, we can have the following alterations: Am-Dm-Am-E7-5-Am

The Fmaj7 chord of the VI degree may serve as a substitution for the tonic (Am).

These chords are all in the Neapolitan Minor scale, as shown below:

And finally, using this scale, and chord progression, we can compose a simple melody that fits these chords: