Ejemplo n.º 1
0
        private static void PauseButton_Click(object sender, EventArgs e)
        {
            Form.PauseButton.Visible = false;
            Form.PlayButton.Visible  = true;

            SongPlayer.Pause();
        }
Ejemplo n.º 2
0
        private static void RestartButton_Click(object sender, EventArgs e)
        {
            SongPlayer.Stop();

            for (var x = 0; x < Panels.Length; x++)
            {
                var key    = x % 12;
                var octave = x / 12;

                switch (key)
                {
                case 0:
                case 2:
                case 3:
                case 5:
                case 7:
                case 8:
                case 10:
                    Panels[x].BackColor = Color.White;
                    break;

                case 1:
                case 4:
                case 6:
                case 9:
                case 11:
                    Panels[x].BackColor = Color.DarkGray;
                    break;
                }
            }

            Next = 0;

            SongPlayer.Play();
        }
Ejemplo n.º 3
0
        private static void Form_FormClosing(object sender, FormClosingEventArgs e)
        {
            SongPlayer.Stop();

            Timer.Change(-1, -1);
            Timer.Dispose();

            Form = null;

            Power.Reset();
        }
Ejemplo n.º 4
0
        private static void RestartButton_Click(object sender, EventArgs e)
        {
            SongPlayer.Stop();

            for (var x = 0; x < Guitar.Tuning.Length; x++)
            {
                for (var y = 0; y < 24; y++)
                {
                    Panels[x, y].BackColor = Frets[y];
                }
            }

            Next = 0;

            SongPlayer.Play();
        }
Ejemplo n.º 5
0
        private static void RestartButton_Click(object sender, EventArgs e)
        {
            SongPlayer.Stop();

            for (var x = 0; x < Panels.Length; x++)
            {
                Panels[x].BackColor = Color.Gray;
                Timers[x]           = 0.0;
            }

            HiHat = false;
            Rim   = false;
            Bell  = false;
            China = false;

            Next = 0;

            SongPlayer.Play();
        }
Ejemplo n.º 6
0
        private static void StartButton_Click(object sender, EventArgs e)
        {
            Midi.Device = Form.OutputListBox.SelectedIndex;

            if (Form.Speed50.Checked)
            {
                SongPlayer.Speed = 0.5;
            }
            else if (Form.Speed60.Checked)
            {
                SongPlayer.Speed = 0.6;
            }
            else if (Form.Speed70.Checked)
            {
                SongPlayer.Speed = 0.7;
            }
            else if (Form.Speed80.Checked)
            {
                SongPlayer.Speed = 0.8;
            }
            else if (Form.Speed90.Checked)
            {
                SongPlayer.Speed = 0.9;
            }
            else if (Form.Speed100.Checked)
            {
                SongPlayer.Speed = 1.0;
            }
            else if (Form.Speed125.Checked)
            {
                SongPlayer.Speed = 1.25;
            }
            else if (Form.Speed150.Checked)
            {
                SongPlayer.Speed = 1.5;
            }

            SongPlayer.Play();

            if (Form.GuitarButton.Checked)
            {
                Guitar.Tuning = new int[]
                {
                    64,
                    59,
                    55,
                    50,
                    45,
                    40
                };

                GuitarForm.Track   = Form.TrackListBox.SelectedIndex;
                GuitarForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                GuitarForm.Show();
            }
            else if (Form.SevenStringButton.Checked)
            {
                Guitar.Tuning = new int[]
                {
                    64,
                    59,
                    55,
                    50,
                    45,
                    40,
                    35,
                };

                GuitarForm.Track   = Form.TrackListBox.SelectedIndex;
                GuitarForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                GuitarForm.Show();
            }
            else if (Form.EightStringButton.Checked)
            {
                Guitar.Tuning = new int[]
                {
                    64,
                    59,
                    55,
                    50,
                    45,
                    40,
                    35,
                    30
                };

                GuitarForm.Track   = Form.TrackListBox.SelectedIndex;
                GuitarForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                GuitarForm.Show();
            }
            else if (Form.BassGuitarButton.Checked)
            {
                Guitar.Tuning = new int[]
                {
                    43,
                    38,
                    33,
                    28
                };

                GuitarForm.Track   = Form.TrackListBox.SelectedIndex;
                GuitarForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                GuitarForm.Show();
            }
            else if (Form.FiveStringButton.Checked)
            {
                Guitar.Tuning = new int[]
                {
                    43,
                    38,
                    33,
                    28,
                    23
                };

                GuitarForm.Track   = Form.TrackListBox.SelectedIndex;
                GuitarForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                GuitarForm.Show();
            }
            else if (Form.KeyboardButton.Checked)
            {
                KeyboardForm.Track   = Form.TrackListBox.SelectedIndex;
                KeyboardForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                KeyboardForm.Show();
            }
            else if (Form.DrumsButton.Checked)
            {
                DrumsForm.Track   = Form.TrackListBox.SelectedIndex;
                DrumsForm.Channel = (int)Form.ChannelsListBox.SelectedItem;
                DrumsForm.Show();
            }
        }