Unformatted text preview:

MIT Student May 10, 2010 21M.380 – C. Ariza GA Sonic System Report Genetic Algorithms (GA’s) have been applied since the 1950’s to simulate the evolution of a population [1]. Soon enough, they became a widely known method to solve optimization problems in computer science [2] and several genetic algorithmic systems were developed, such as Evolver [3]. Genetic algorithms are not only suited for computer science; they may also be applied to artistic domains. For example, Ariza discusses an alternative application [4] of GA’s. Rather than moving towards a complex solution, Ariza’s genetic algorithm system pulls from a trajectory of rhythmic populations that moves towards a simple solution. My work with Genetic Algorithms also focuses on creating interesting trends from an evolutionary process that moves towards a simple solution. I show that my system can be applied to granular synthesis to make compelling gestures. For my sonic system, I employ many of the principals described in Magnus’s overview of genetic algorithms [5]. Solutions are mapped onto chromosomes, which contain many parameters encoded as genes (or alleles). Each chromosome can be rated with a fitness function by calculating the error from that chromosome to a target solution. Figure 1 shows a sample population with 3 chromosomes, each ofwhich has 3 alleles. Figure 1 Populations contains many chromosomes, each of which store multiple alleles. My GA system comes with several alleles and chromosomes. The single note allele contains a single midi value, and is used in single note chromosomes and multi-note chromosomes (chord chromosomes). The more interesting grain allele holds several important parameters for granular synthesis and is employed in the grain chromosome. My system also provides basic fitness functions that assign lower fitness to chromosomes that are farther from a target chromosome. A simulation is run, in which some chromosomes reproduce, and others die. While traditionally fitness probabilistically determines which chromosomes reproduce, as described by Magnus, in my system every chromosome has an equal chance of reproducing. However, in my system less fit chromosomes have a higher chance of being replaced by an offspring. The outcome is similar: less fit chromosomes produce less offspring because they are replaced sooner. During reproduction, offspring chromosomes have a probability that they will be mutated in several ways. Crossovers may occur between two parentchromosomes, such that the offspring inherits some traits from one parent and some traits from the other. Individual alleles may also undergo point mutation, in which a single allele is mutated. For example, a note allele may be shifted up or down a few half steps. Mutations combined with reproduction and dying pushes the population in a direction towards a target. At each step in the simulation, one or more chromosomes may be extracted. Extraction can be determined by fitness (most fit chromosome or least fit chromosome) or random. Extracted chromosomes are accumulated into an array. The simulation ends when the most fit chromosome fitness, or the average chromosome fitness reaches a certain threshold. Several simulations can be strung together, to produce multi-trend gestures. The simulation process is summarized in Figure 2. The corresponding code can be found in GA.py. Figure 2 the control logic of Simulation and Step.To demonstrate the capabilities of my GA system, I applied it to granular synthesis. In granular synthesis, small pieces of sound, or grains, are played in rapid succession to create larger events as described by Roads [6]. The interesting gestures of granular synthesis are made possible due to the collective trends applied to grains over time. The compelling trends that can be expressed with genetic algorithms are what motivated me apply genetic algorithms to granular synthesis. I chose to vary grains according to three parameters that Roads identifies as important: duration, frequency, and amplitude. For this reason, each grain allele encodes three values, one per parameter. Each grain chromosome stores it’s own grain allele. Grain chromosomes can also undergo crossover mutations, in which an offspring inherits one or more parameter from one parent and the rest from another parent. Grain chromosomes can also undergo point mutations, in which one or more parameters of the offspring’s allele are increased or decreased. The fitness of a grain is measured with respect to the distance between itself and a target grain. A larger distance produces a lesser fitness. I created three sound samples of genetic algorithms applied to granular synthesis to demonstrate different features of my system. In all three of my samples, output from the genetic algorithm was mapped to granular synthesis parameters in the csoundNative mode of athenaCL, using the LineGroove texture module to create SineUnitEnvelope grains (see Line_Groove.py). In sample1, random selection is used to generate a gesture where grains go from long duration, low volume, and low pitch, to short duration, high volume, and high pitch. This creates a linear transformation with a bit of up and down randomness. In sample2, Ishow how the selection and mutation rate affect the gesture, by applying a best selection and a high mutation rate to the same population. As seen, the solution converges much faster (~150 steps as opposed to ~750 steps), and the fitness of the recorded samples strictly increases. In sample3, I use multiple-selection to select the best-fit chromosome and the least fit chromosomes, and play them in parallel. In this sample, grains go from high pitch, low volume, and short duration to low pitch, low volume, and long duration. Sample1, sample2, and sample3 showcase the features of my system and it’s ability to be applied to specific domains, such as granular synthesis. Others have applied genetic algorithms to granular synthesis, such as Fijinaga [7]. My system differs in several ways. First, where Fijinaga’s GA deploys bit manipulation mutation, my system applies domain specific mutation. Second, my granular synthesis chromosome utilizes a fitness functions specific to its domain. For example, rather than making the fitness function be additive over the different granular parameters, I deploy a different fitness functions for each parameter and take the minimum of these functions to


View Full Document

MIT 21M 380 - Assignment

Download Assignment
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Assignment and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Assignment 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?