The reflection of each musical piece in the program codes is its “model” - this is created by analyzing the initial recording of the track composition. The aim was to select a minimum set of properties that can be used to construct a composition retrospectively - based on compositional rules only, which is as close as possible to the default song.
Each individual song (written by a particular composer in a given style period) uses a limited number of musical (harmonic, rhythmic and melodic) schemes that are repeated, changed, and combined.
The abstract description (picture) of the composition is called a musical model and the individual basic schemes used are motives. Each motive is a sequence of certain musical elements.
The results of the analyzes are HarmonicModel, RhythmicModel, MelodicModel, OrchestraModel and TectonicModel. For composition harmonic model is sufficient and only necessary.
We put the music block enriched with our models in a separate class MusicalBlockWrap.
The concept of musical models is connected with the determination of musical changes and motives in the composition. It preceded a similar - now used - concept in which elementary states of individual elements of the composition are recorded. The original concept is currently used only in song analysis and is based on classes derived from AbstractChange.
These are simple changes: OctaveChange, InstrumentChange, LoudnessChange, TempoChange, StaffChange, changes associated with the beginning (and end) of motives HarmonicChange, RhythmicChange, MelodicChange and additional more general changes TonalityChange and EnergyChange.
The HarmonicMotive, RhythmicMotive and MelodicMotive classes were created to store motives. Harmonic motive consist of bars filled with harmonies, rhythmic motive of bars with specified rhythms. (The harmonic motive itself also has a rhythm, but usually this is simplified - only a few basic patterns appears.)