public BitHoven()
        {
            InitializeComponent();
            m_midiControl = new MidiControl();
            selIndex      = MidiSelection.SOURCE;
            Harmonizer h = new Harmonizer();

            System.Console.WriteLine(h.testAngle());
        }
        protected void onStartClick()
        {
            prgProcessing.Visible = true;
            setProcessingState();

            // Analysis Stage

            makeProgress(5);
            Analyzer a = new Analyzer();

            makeProgress(5);
            a.initialize(m_midiControl.getMidiData(MidiSelection.SOURCE));

            lblAvgVel.Text = a.getAverageVelocity().ToString();
            lblTempo.Text  = a.getTempo().ToString();

            makeProgress(5);
            picKeySig.ImageLocation = "KeySig\\" + (a.getKey().ToString()) + ".png";


            timeSignNum.ImageLocation  = a.getTimeSignatureNumerator().ToString() + ".png";
            timeSigDenom.ImageLocation = ((int)Math.Pow(a.getTimeSignatureDenominator(), 2)).ToString() + ".png";

            // Transposition

            makeProgress(5);
            int key = a.getKey();

            int interval = getTranspositionForKey(key);

            System.Console.WriteLine(key);
            MidiEventCollection t = Transposer.transpose(m_midiControl.getMidiData(selIndex), interval);

            makeProgress(20);

            // Harmonization
            Harmonizer          h      = new Harmonizer(t);
            MidiEventCollection result = h.process(0, 0, 0, 0, 0);

            makeProgress(40);

            // Inverse Transposition
            MidiEventCollection tRet = Transposer.transpose(result, -1 * interval);

            makeProgress(10);

            m_midiControl.setMidiData(tRet, MidiSelection.RESULT);
            m_midiControl.setMidiData(tRet, MidiSelection.HARMONY_ONLY);

            makeProgress(10);

            setProcessedState();
        }