private void buttonModulateAmplitude_Click(object sender, EventArgs e)
        {
            if (generatedSignal.Count == 0)
            {
                MessageBox.Show("Generate signal first!");
            }
            else
            {
                var inputValues = ProcessInput();
                modulationSignal = CreateProperSignal(comboBoxWave.SelectedIndex, inputValues.Item1, inputValues.Item2, inputValues.Item3);
                currentSignal.AM = modulationSignal;

                generatedSignal = currentSignal.GenerateSignal();
                var wavFileWriter = new WavFileWriter(new FileStream(PATH, FileMode.Create), sampleRate, 1000000, 1);
                wavFileWriter.WriteAll(generatedSignal, soundLength);
            }
        }
        private void buttonCreate_Click(object sender, EventArgs e)
        {
            if (!createPoly)
            {
                var inputValues = ProcessInput();
                currentSignal = CreateProperSignal(comboBoxWave.SelectedIndex, inputValues.Item1, inputValues.Item2, inputValues.Item3);

                generatedSignal = currentSignal.GenerateSignal();
            }
            else
            {
                generatedSignal = resultSignal[0].GenerateSignal();
                for (int i = 1; i < resultSignal.Count; i++)
                {
                    var getSignal = resultSignal[i].GenerateSignal();
                    for (int j = 0; j < getSignal.Count; j++)
                    {
                        generatedSignal[j] += getSignal[j];
                    }
                }

                /*
                 * generatedSignal = new List<double>(polyHarmonicsSignal[0]);
                 * for (int i = 1; i < polyHarmonicsSignal.Count; i++)
                 * {
                 *  for (int j = 0; j < generatedSignal.Count; j++)
                 *  {
                 *      generatedSignal[j] += polyHarmonicsSignal[i][j];
                 *  }
                 * }
                 */
                createPoly = false;
            }

            var wavFileWriter = new WavFileWriter(new FileStream(PATH, FileMode.Create), sampleRate, 1000000, 1);

            wavFileWriter.WriteAll(generatedSignal, 10);
        }