public Phrase[] recombine(Phrase[] population, double[] fitness,
                              double initialLength, int initialSize,
                              int beatsPerBar) {
        Phrase[] returnPop = population.length - ELITISM_CONSTANT >= 0
                ? new Phrase[population.length - ELITISM_CONSTANT]
                : new Phrase[0];
        if (returnPop.length > 1) {
            for (int i = 1; i < returnPop.length; i += 2) {
                int father = selectTournamentVictor(fitness, -1);
                int mother = selectTournamentVictor(fitness, father);
                int numOfFathersBars = (int) population[father].getEndTime()
                        / beatsPerBar;
                int numOfMothersBars = (int) population[mother].getEndTime()
                        / beatsPerBar;
                int numOfBars = numOfFathersBars > numOfMothersBars
                        ? numOfMothersBars
                        : numOfFathersBars;
                int crossoverBar = 0;
                while (crossoverBar < (int) (initialLength / beatsPerBar) + 1) {
                    crossoverBar = (int) (Math.random() * (double) numOfBars);
                }
                returnPop[i - 1] = crossover(crossoverBar, population[father],
                        population[mother], true,
                        beatsPerBar);
                returnPop[i] = crossover(crossoverBar, population[father],
                        population[mother], false,
                        beatsPerBar);
            }
        }
        if ((int) (returnPop.length / 2.0)
                != Math.round(returnPop.length / 2.0)) {
            int father = selectTournamentVictor(fitness, -1);
            int mother = selectTournamentVictor(fitness, father);
            int numOfFathersBars = (int) population[father].getEndTime()
                    / beatsPerBar;
            int numOfMothersBars = (int) population[mother].getEndTime()
                    / beatsPerBar;
            int numOfBars = numOfFathersBars > numOfMothersBars
                    ? numOfMothersBars
                    : numOfFathersBars;
            int crossoverBar = (int) (Math.random() * (double) numOfBars);
            returnPop[returnPop.length - 1] = crossover(crossoverBar,
                    population[father],
                    population[mother],
                    true, beatsPerBar);
        }
        return returnPop;
    }