Two oscillations, one along the x-axis and the other along the y-axis, when added together produce a two dimensional figure. If the ratio of the frequencies of the two oscillations is some simple fraction, the figure is quite pretty.
The various tones of a musical scale are not selected at random, it was found very early by many different cultures that if two tones were played together, the combination would sound pleasant (consonant) if the ratio of their frequency (the interval) was given by a fraction of integer numbers.
Because of this, adding the oscillations of two tones from the musical scale will produce a pleasant lissajous curve.
The various tones on a scale are traditionally given letters and names; the ratio of their frequencies is given below for the major just scale.
DO RE MI FA SOL LA TI DO’
C D E F G A B C’
1 9/8 5/4 4/3 3/2 5/3 15/8 2
The intervals in the well tempered scale do not correspond to a simple ratio of integers, because of this the combination of some of the tones is not consonant and the lissajous curve is not as pretty.