experiments in sight, sound & story
Algorithmic Generation of Musical Motifs
Algorithmic Generation of Musical Motifs
All musical compositions can be reduced to three fundamental attributes:
1) A series of individual or combination of notes
2) The timing relationship among these notes
3) The actual audio frequencies of each note
2) The timing relationship among these notes
3) The actual audio frequencies of each note
Hence: the methodology of the Music Genie is embodied in three generic computational modules:
1) A Note Sequence Generator
2) A Note Timing Generator
3) A Note Tuning Generator
2) A Note Timing Generator
3) A Note Tuning Generator
The sets of data created in each of these modules facilitate the association of any Note Sequence, Timing Data, and/or Tuning Frequencies with any of the other two attributes. This enablesa composer to experiment, research and develop unique compositions.
The Note Sequence Generator
The Note Sequence Generator
The Timing Generator
A simple drum kit ride is depicted below, first in conventional music notation and then translated into a square wave where a rising edge denotes the striking of the drum kit element.
The Timing Generator
A simple drum kit ride is depicted below, first in conventional music notation and then translated into a square wave where a rising edge denotes the striking of the drum kit element.
Tuning Generation
Tuning Generation
Since the time of Bach, instruments have been tuned to an Equal Temperament series of note frequencies based on intervals calculated using the twelfth root of two to produce the 12-tone chromatic scale. However, the concept of musical harmony is firmly rooted in the small number ratio relationship of note frequencies, i.e., 3/2, 4/3, 5/4 etc.
Although adept fretless string instrument players have the ability to slightly alter a note through the use of vibrato and finger position to adjust the precise frequency of a note to approach “perfect” harmony, the ubiquitous use of the equal tempered scale has outweighed the aural precision of perfect tuning and enabled the modulation of a musical piece and the ability for an instrument such as the piano and guitar to play in any key. Additionally, for most people, the inaccuracies of the equal temperament tuning are inaudible.
With the advent of modern computer based digital instrument synthesis coupled with the capabilities of a Digital Audio Workstation, adjusting the frequency of a note during performance is possible. Similarly, any set of frequencies can be assigned to notes to create “Alternate Tunings.” Now in development, future revisons of The Music Genie will support the specification and generation of user-defined Alternate Tunings.
The table to the right contains the frequencies assigned to a 24 note per octave scale, where frequencies are calculated by iterating the interval ratio from 24/24 to 48/24 and multiplying the base frequency (Tonic) by the result. Notice that the ratios of a Perfect Temperament scale are produced, as named.
Consider the creation of a 2-dimensional “Tonality Space.”In the example to the right, we define the “X axis” as the series of notes in a Diatonic Ionian mode (1 1 ½ 1 1 1 ½) and the “Y axis” as the Whole Tone Scale which is a series of notes a whole step apart (1 1 1...). [Note: for mathemtical simplicity, a 1/2 step interval = 1 and a whole step = 2] This specification produces the Tonality Space shown; the resultant ”Z-Trace” is the Note Sequence of interest.
As shown, the sequence of notes produced by a diagonal (slope = 1/1 = 1) is: C E G# B D# G B D. Now, depending on the human composer’s aesthetic discretion, the note sequence can be a motif or melody or even a bass line. An alternate approach is to group the notes into Triads: (C E G#) (B D# G) ...
By varying the axis definitions, a composer can create a set of related note sequences from which to draw in the creation of a full-length composition.
S1
S2
S1 OR S2
S1 AND S2
S1 XOR S2
NOT S2
S1
S2
S1 OR S2
S1 AND S2
S1 XOR S2
NOT S2
Figure 1. Ionian x Whole Tone Tonality Plane
Figure 1. Ionian x Whole Tone Tonality Plane
Figure 2. Mapping a Drum Pattern to a Set of Square Waves
With rhythmic patterns now depicted as square waves, it is possible to combine waveforms using Boolean Logic (AND, OR, XOR, NOT) to produce new timing waveforms.
Figure 2. Mapping a Drum Pattern to a Set of Square Waves
With rhythmic patterns now depicted as square waves, it is possible to combine waveforms using Boolean Logic (AND, OR, XOR, NOT) to produce new timing waveforms.
Figure 3. Square Wave Combinatorial Logic Results Examples
Figure 3. Square Wave Combinatorial Logic Results Examples
Table 1. Alternate Tuning Example
Table 1. Alternate Tuning Example
Name Ratio Hz Note
Present and Future Work
Present and Future Work
After over three years of algorithm and code development, the prototype "Music Genie" application has reached a level of sophistication that enables me to venture forth on the creation of an orchestral work. The arduous search for a theoretical conceptual foundation recently culminated in what should have been obvious in light of my technical background – base musical motif variations on the camera-to-screen HDTV transmission digital technology chain!
Work has begun, there is much more to be done...
In 1843 Ada Lovelace speculated that Charles Babbage's Analytical Engine might "act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine. Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.”
Computer Music!?!?!
Computer Music!?!?!
Sign up to receive news, updates, access to audio and video, musings, and other perks that will not be dropped or posted on social media.
LISTEN on YouTube