For our purposes, a scale is defined by a tonic and then the pattern that it uses to ascend up to the next tonic and then descend back to the original tonic. The tonic is described with a NoteFamily because it is not specific to any one octave. The ascending/descending pattern is provided by the Pattern nested class.
This class comes with a collection of predefined patterns, such as