The principle
Deun Ex Pagina (DEP) is a robot that composes tunes based on chance, musical rules and the parameters that you may enter in the form explained below. DEP does not return you tunes that were recorded beforehand, but tunes that are created on the fly. Hence, every piece is unique and almost impossible to recreate. After having pushed the "submit" button, DEP chooses a chord progression using a transition probability matrix. This means that certain chord combinations are more likely than others. For example, the likelihood that a C chord follows a G7 is high, while the progression, Em -> C is improbable. Every measure is associated with a single chord. Once the progression has been determined, DEP creates a melody by chance using mostly the three notes of the triad that form the chord being played at that instant. The principle at the base of the melody creation is the random walk. The path taken by bacterium in an aqueous solution or a butterfly in the air are examples of random walks. They pursue for some time one direction, abruptly change direction, proceed a little further and change direction again etc. A remarkable property of random walks is that parameters are distributed 1/f (one over f, f being frequency). If one measures for example the duration between two direction changes of the butterfly, one finds that short intervals are less probable than long intervals. The parameters of a piece of music created by real musicians, such as the duration of notes, intervals between notes and the spectrum of the sound being emitted during the execution of the piece also follow a 1/f relation (also called pink noise).
raspberry The creation of the tune and its transmission are carried out in two steps by a Raspberry pi4 web server. First it creates a wav file. Then, in order for the transmission between the server and your computer not to take to much bandwidth, the Lame program (GNU licence) transforms the wav to an mp3 of medium quality.

DEP Help

 

 

 

 

      


The manual

The tune consists of a theme and a refrain. With "Number of bars per theme", the length of the theme in bars can be chosen. With "Number of bars per refrain" one chooses the length of the refrain. Very often one plays the theme several times before playing the refrain. This parameter is set with "Number of themes before refrain". The tune stops after a certain number of theme-refrain cycles. This parameter is to be set with "End after refrain".
With the drop-down list "Scale" one selects the scale of the tune.
The measures of the melody can be in 3/4, 4/4 or 5/4 time.
The tempo of the melody (in measures per minute) is defined by the option "Tempo".
DEP organises the sequence of measures in groups. If the melody is in 3/4 time, every group contains 3 measures. This is 4 for 4/4 time and 5 measures for 5/4 time. The maximum number of notes per measure can be separately chosen for the first, second and following measures of each group using the edit boxes "note rates/min" for the theme and the refrain. The melody may become somewhat more interesting if at the end of the measure one already starts to play a note or to that belong to the chord of the measure to follow (anticipation). The same for playing notes at the start of the measure that belong to the preceding chord (suspension). On the contrary, checking both options at the same time may not give very interesting results. To give structure to the tune, one can impose "transpose melody" or "repeat chords". With "transpose melody" DEP tries to play the same notes in the second group of measures as in the first one, transposing the notes is the chords in the first and the second group are different (which is usually the case). The same for the third and fourth groups if they exist. With "repeat chords" DEP uses partially the same chords for the second group as for the first. The same holds for the third and fourth groups.
Several instruments together play the tune. One chooses the instruments using the drop down lists under "Instrument". One instrument plays the chords, an other one the melody and still an other one the accompaniment. A second "melody 2" instrument alternates with the first one to play a variation on the theme. Two instruments can be used for percussion (Rhythm 1 & 2). Use the check boxes to indicate at what time in the measure the instrument should sound. To accentuate the rhythm, the notes at certain times of the measure can be played louder than the others. Use "Theme accents" and "Refrain accents" to indicate this.