Futures Quantification Software Download: Population Optimization Algorithm Chord Search (HS)

1 Overview

Music creation is made up of several components—rhythm, melody, and chords. While rhythm and melody form the singular whole of a musical composition, chords are its adornment. A play or song without chords is like a colorless picture in a children's book—it is drawn, but without color, without brightness, without expressiveness. Properly selected chords can soothe the ears and make the sound noble, allowing Hertz Quantitative Trading Software to fully enjoy the wonderful sound of the piano, guitar or any other musical instrument. Melody can be sung, but chords can only be played. A musical chord is a set of strings without which any song or any piece of music is immature and incomplete.

Chords occur exactly at the moment when Hertz quantization connects two voices—flowing one by one or simultaneously. A broader synonym is "composition". After one sound is connected to another, we get a composition where the hierarchy has tried to arrange itself. In music schools and academies there is a special subject — chords, where students learn all chords that exist in music theory, learn to apply them in practice, and even solve chord problems.

In musical improvisation, musicians try to adjust the pitch of an instrument so that pleasing chords (optimal conditions) are reached. In nature, chords are determined by special relationships between several sound waves of different frequencies. The quality of the chord improvisation is determined by aesthetic evaluation. In order to improve their aesthetic appreciation and find the best chords, musicians have gone through practice again and again. There are parallels between improvisation and optimization.

The chord search (HS) method is an emerging meta-heuristic optimization algorithm that has been used to solve many complex problems in the past decade. The chord search algorithm (HS) was first proposed by ZW Geem in 2001. The HS method is inspired by the fundamental principles of musical improvisation and the search for musical chords. In multidimensional optimization problems, perfect chord combinations of sounds are matched to global extrema, while musical improvisation processes are matched to extremum search.

During improvisation, each musician reproduces a sound at any scale of a piece of music (within the capabilities of his instrument) so that the voices of all the musicians of the orchestra form a carrier of chords at that scale. The combinations of sounds that form "beautiful" chords are remembered by each musician and available to them to use to form better chords in subsequent scales of a musical composition.

Typically, during improvisation, musicians fulfill one of three requirements: form absolutely random sounds from the range of sounds available; play any sound from a chord memory; play adjacent chord vectors from the same memory. The main feature of the HS algorithm is that it can be used to solve both continuous and discrete optimization problems.

The salient features of HS are the simplicity of the algorithm and the efficiency of the search. Because of this, the algorithm has attracted a great deal of attention from researchers, and it is advancing rapidly both in theory and in practice. HS is a metaheuristic technique that provides extreme stability between the exploration and development phases of the search process. HS is inspired by human creativity, the way in which finding the perfect solution to a given problem is similar to how a musician tries to find pleasing chords. The way to get the value of the fitness function is similar to using each instrument to get the pitch reference.

2. Algorithms

The working of HS logic is similar to that of a musician in creating perfect chords. Musicians experiment with varying keys until they find the perfect chord. Afterwards, the set of found chords is stored in memory. In an optimization problem, chords go through various changes; if the result of the change is favorable, then the memory is updated, new chords are added, and unwanted elements are removed... All this may sound confusing. So what is a chord? What is pitch? We try to understand algorithms in our own terms.

What is a piece of music? Of course, I'm not a musician (which is a pity), but a programmer. But for algorithmic detection, it is enough to apply the concept of "notes". A piece of music is made up of musical notes (strings). Fig. 1 schematically shows the "mechanism" of constructing a piece of music. The choice of notes corresponds to a piece of music and is easily judged even by an ear that has no musical or vocal education. Those willing to speculate may leave a comment below.

Optimizing the HS algorithm involves moving the green bars with musical notes onto the blue bars of the piece itself. The range of the green bar is an octave, made up of individual notes. Works (blue bars) correspond to one of the optimized solutions. The notes on the green bars are the corresponding optimized parameters for the problem. Multiple versions of the work (several variations of the blue bars) are stored in the musician's memory, this is the algorithm population.

HSachord

Fig.1. Selecting notes in a piece of music (finding chords). The blue bar is one. The green bar is a group of musical notes

The example in Fig. 1 corresponds to the solution of a discrete problem with eight scales in its parameters. This example is provided to facilitate understanding of the operation of the algorithm. However, in any task, there can be any scale with optimized parameters, and there are also transitional notes — chromatic scales. The correct parameters to solve the problem correspond to the correct notes in the composition.

Thus, the process of creating a piece of music begins with a random set of sounds from an instrument that fall within the repeatable frequency range of the instrument. It is necessary to create multiple variations of a piece in order to be able to combine parts of the notes of the variations. The next step is to change the notes in these variations. Hertz quantization can do this in three possible ways:

1. Randomly change one note within the range of instruments in the song.
2. We can intercept notes with corresponding serial numbers from other versions of the work. 3. We can take another version of the piece and change it slightly, making it higher or lower in pitch.

Thus, having obtained a new set of variants of a musical composition, we evaluate each variant in terms of sound chords and store the variant in its original location in memory, provided the new version is better than the previous one. The algorithm is unique in that there is no need to sort the population, in our case the portfolio. Each new best option replaces an old poorer option in the same position. This process is a bit like the operation of a genetic algorithm, simulating the survival of the fittest in the evolutionary process. In addition, similarities in the combination of genes in chromosomes were also observed.

Based on the foregoing, Hertz quantization can initially synthesize the pseudocode of the HS algorithm:

1. Generate random chords.
2. Measuring chord quality (computation of fitness function).
3. Using randomly selected chords, synthesize a string playing with probability Eh.
3.1 If the string is chosen from some chord with probability Ep, change the string according to the equation.
    3.1.1 Keep the selected string unchanged.
  3.2 The new string obeys the equation.
4. Measuring chord quality (computation of fitness function).
5. Repeat from step 3 until the stopping criterion is met.

 

おすすめ

転載: blog.csdn.net/herzqthz/article/details/131985116