GeneticComposer

compose

## Class GeneticComposer

- java.lang.Object
- - compose.Composer
  - - compose.GeneticComposer

- All Implemented Interfaces:
    java.lang.Runnable

      public class GeneticComposer
      extends Composer
      implements java.lang.Runnable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static double` | `HOLD_THRESHOLD`
    `private static int` | `LOWEST_NOTE`
    `private static double` | `MOTIF_MIX_PROPABILITY`
    `private jm.music.data.Phrase[]` | `motifs`
    `private static double` | `MUTATION_PROPABILITY`
    `private static int` | `NUMBER_BARS`
    `private static int` | `NUMBER_ITERATIONS`
    `private static int` | `PITCH_RANGE`
    `private static int` | `POPULATION_SIZE`
    `private ComposeProgress` | `progress`
    `private static double` | `SHORTEST_RHYTHM_VALUE`
    `private int` | `tempo`
    `private static int` | `TOUR_SIZE`

    - ### Fields inherited from class compose.Composer

      `parent, score`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeneticComposer(ComposingDialog parent, java.util.ArrayList<IPhrase> iPhrases, int tempo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `compose()`
    `jm.music.data.Phrase[]` | `initializePopulationMotifs()`
    `jm.music.data.Phrase[]` | `initializePopulationRandom()`
    `void` | `run()`

    - ### Methods inherited from class compose.Composer

      `createAnswerPhrase, createCounterPhrase, createDrumPhrase, getIScore, muteAnswerPhrase, muteCounterPhrase, muteDrumPhrase, setAnswerInstrument, setCounterInstrument, setDrumInstrument, setPhraseInstrument, setTempo`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### tempo

          private int tempo

    - #### motifs

          private jm.music.data.Phrase[] motifs

    - #### progress

          private ComposeProgress progress

    - #### POPULATION_SIZE

          private static int POPULATION_SIZE

    - #### NUMBER_BARS

          private static int NUMBER_BARS

    - #### PITCH_RANGE

          private static int PITCH_RANGE

    - #### SHORTEST_RHYTHM_VALUE

          private static double SHORTEST_RHYTHM_VALUE

    - #### LOWEST_NOTE

          private static int LOWEST_NOTE

    - #### HOLD_THRESHOLD

          private static double HOLD_THRESHOLD

    - #### TOUR_SIZE

          private static int TOUR_SIZE

    - #### MUTATION_PROPABILITY

          private static double MUTATION_PROPABILITY

    - #### MOTIF_MIX_PROPABILITY

          private static double MOTIF_MIX_PROPABILITY

    - #### NUMBER_ITERATIONS

          private static int NUMBER_ITERATIONS

  - ### Constructor Detail

    - #### GeneticComposer

          public GeneticComposer(ComposingDialog parent,
                         java.util.ArrayList<IPhrase> iPhrases,
                         int tempo)

  - ### Method Detail

    - #### initializePopulationMotifs

          public jm.music.data.Phrase[] initializePopulationMotifs()

    - #### initializePopulationRandom

          public jm.music.data.Phrase[] initializePopulationRandom()

    - #### compose

          public void compose()

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`