private void GenerateNextIteration(int xIndex, int yIndex)
        {
            double     relativeModificationRange          = double.Parse(relativeModificationRangeTextBox.Text);
            List <int> modifiableFormantSettingsIndexList = new List <int>();

            for (int ii = 0; ii < modificationScopeDropDownButton.DropDownItems.Count; ii++)
            {
                ToolStripMenuItem item = (ToolStripMenuItem)modificationScopeDropDownButton.DropDownItems[ii];
                if (item.Checked)
                {
                    modifiableFormantSettingsIndexList.Add(ii);
                }
            }
            Boolean modifySinusoids                  = modifySinusoidsToolStripMenuItem.Checked;
            Boolean modifyVoicedFraction             = modifyVoicedFractionToolStripMenuItem.Checked;
            Boolean modifyDuration                   = modifyDurationToolStripMenuItem.Checked;
            Boolean modifyTransitionStart            = modifyTransitionStartToolStripMenuItem.Checked;
            Boolean modifyAmplitudeVariation         = modifyAmplitudeVariationToolStripMenuItem.Checked;
            Boolean modifyPitchVariation             = modifyPitchVariationToolStripMenuItem.Checked;
            FormantSpecification centerSpecification = formantSpecificationMatrix[xIndex][yIndex].Copy();

            formantSpecificationMatrix[1][1] = centerSpecification.Copy();
            for (int iX = 0; iX < formantSpecificationMatrix.Count; iX++)
            {
                for (int iY = 0; iY < formantSpecificationMatrix[0].Count; iY++)
                {
                    if (!((iX == 1) && (iY == 1)))
                    //  if ((iX != 1) || (iY != 1))
                    {
                        FormantSpecification modifiedSpecification = centerSpecification.Copy();
                        modifiedSpecification.Modify(randomNumberGenerator, modifiableFormantSettingsIndexList, relativeModificationRange,
                                                     modifySinusoids, modifyVoicedFraction, modifyDuration, modifyTransitionStart, modifyAmplitudeVariation, modifyPitchVariation);
                        formantSpecificationMatrix[iX][iY] = modifiedSpecification.Copy();
                    }
                }
            }
        }
 private void startButton_Click(object sender, EventArgs e)
 {
     //   soundVisualizer3x3.BackColor = Color.Transparent;
     randomNumberGenerator = new Random();
     modificationScopeDropDownButton.DropDownItems.Clear();
     for (int ii = 0; ii < editorFormantSpecification.FormantSettingsList.Count; ii++)
     {
         ToolStripMenuItem button = new ToolStripMenuItem();
         button.Width        = 120;
         button.DisplayStyle = ToolStripItemDisplayStyle.Text;
         button.Text         = "Formant settings " + ii.ToString();
         button.CheckOnClick = true;
         button.CheckState   = CheckState.Checked;
         modificationScopeDropDownButton.DropDownItems.Add(button);
     }
     soundVisualizer3x3.Initialize();
     soundVisualizer3x3.ItemClicked       -= new EventHandler <VisualizerIndexEventArgs>(HandleSoundVisualizer3x3ItemClicked); // For repeated runs
     soundVisualizer3x3.ItemClicked       += new EventHandler <VisualizerIndexEventArgs>(HandleSoundVisualizer3x3ItemClicked);
     soundVisualizer3x3.ItemDoubleClicked -= new EventHandler <VisualizerIndexEventArgs>(HandleSoundVisualizer3x3ItemDoubleClicked);
     soundVisualizer3x3.ItemDoubleClicked += new EventHandler <VisualizerIndexEventArgs>(HandleSoundVisualizer3x3ItemDoubleClicked);
     formantSpecificationMatrix            = new List <List <FormantSpecification> >();
     formantSpecificationMatrix.Add(new List <FormantSpecification>()
     {
         editorFormantSpecification.Copy(), editorFormantSpecification.Copy(), editorFormantSpecification.Copy()
     });
     formantSpecificationMatrix.Add(new List <FormantSpecification>()
     {
         editorFormantSpecification.Copy(), editorFormantSpecification.Copy(), editorFormantSpecification.Copy()
     });
     formantSpecificationMatrix.Add(new List <FormantSpecification>()
     {
         editorFormantSpecification.Copy(), editorFormantSpecification.Copy(), editorFormantSpecification.Copy()
     });
     EvaluateAll();
     assignCurrentSoundButton.Enabled = true;
 }