Example #1
0
 private void btnPatchEditCancel_Click(object sender, EventArgs e)
 {
     originalSongProgramIndex = -1;
     songProgramBeingEdited   = null;
     pnlSongEdit.Enabled      = true;
     pnlPatchEdit.Visible     = false;
 }
Example #2
0
        private void mbccShowSongPatches_Click(object sender, EventArgs e)
        {
            SongProgram songProgram = (SongProgram)(((Button)sender).Tag);

            if (songProgram != null && songProgram.mapping != null)
            {
                // NOTE: if patch is deleted from sound gen, the songProgram still exists, but has no mapping.  For now we do nothing,
                //  but perhaps it'd be better to notify user...  But, maybe best not to interrupt the performance...
                mapper.SetMapping(songProgram.mapping);
            }
        }
Example #3
0
        private void btnPatchDown_Click(object sender, EventArgs e)
        {
            int songPatchIndex = lbSongPatches.SelectedIndex;

            if (songPatchIndex >= 0 && songPatchIndex < songBeingEdited.programs.Count - 1)
            {
                SongProgram programBeingMoved = songBeingEdited.programs[songPatchIndex];
                songBeingEdited.programs.RemoveAt(songPatchIndex);
                songBeingEdited.programs.Insert(songPatchIndex + 1, programBeingMoved);
                refreshLbSongPatches();
                lbSongPatches.SelectedIndex = songPatchIndex + 1;
            }
        }
Example #4
0
        private void BtnPatchAdd_Click(object sender, EventArgs e)
        {
            originalSongProgramIndex = -1;
            songProgramBeingEdited   = new SongProgram();

            tbSongPatchPart.Text        = "";
            nudSongPatchBank.Value      = -1;
            nudSongPatchProgramNo.Value = -1;
            populateTreeViewWithSoundGeneratorsPatchesAndMappings(tvSongPatchPatches, "SG", true);
            creatingNewSongProgram = true;
            pnlPatchEdit.Visible   = true;
            pnlSongEdit.Enabled    = false;
        }
Example #5
0
        public static void createTrialConfiguration(Dictionary <String, Song> songDict, Setlist setList)
        {
            if (setList.name.Equals("Silas Knight Project"))
            {
                Song song = new Song();
                song.name      = "Josie";
                song.artist    = "Steely Dan";
                song.chartFile = "Josie 2.rtf";
                song.chartPage = 1;
                SongProgram.createTrialConfiguration(song);

                songDict.Add(song.name, song);
                setList.songTitles.Add(song.name);

                song           = new Song();
                song.name      = "Celebration";
                song.artist    = "Kool";
                song.chartFile = "Celebration.rtf";
                SongProgram.createTrialConfiguration(song);

                songDict.Add(song.name, song);
                setList.songTitles.Add(song.name);
            }
            else if (setList.name.Equals("Cave Mollies"))
            {
                Song song = new Song();
                song.name      = "Jealous";
                song.artist    = "Black Crowes";
                song.chartFile = "Jealous.rtf";
                SongProgram.createTrialConfiguration(song);

                songDict.Add(song.name, song);
                setList.songTitles.Add(song.name);

                song           = new Song();
                song.name      = "Loving Cup";
                song.artist    = "Stones";
                song.chartFile = "Loving Cup.rtf";
                SongProgram.createTrialConfiguration(song);

                songDict.Add(song.name, song);
                setList.songTitles.Add(song.name);
            }
            else
            {
                MessageBox.Show("Unknown setlist " + setList.name + " presented to Song.createTrialConfiguration");
            }
        }
Example #6
0
        private void lbSongPatches_DoubleClick(object sender, EventArgs e)
        {
            // Initiate editing of Song's patch

            int listIndex = lbSongPatches.SelectedIndex;

            if (listIndex >= 0 && listIndex < songBeingEdited.programs.Count)
            {
                originalSongProgramIndex = listIndex;
                songProgramBeingEdited   = new SongProgram(songBeingEdited.programs[listIndex]);

                tbSongPatchPart.Text        = songProgramBeingEdited.part;
                nudSongPatchBank.Value      = songProgramBeingEdited.myBankNumber;
                nudSongPatchProgramNo.Value = songProgramBeingEdited.myPatchNumber;
                populateTreeViewWithSoundGeneratorsPatchesAndMappings(tvSongPatchPatches, "SG", true);

                // Select song's patch in the song patches treeview
                foreach (TreeNode parent in tvSongPatchPatches.Nodes)
                {
                    if ((songProgramBeingEdited.bSingle == true && parent.Text.Equals(songProgramBeingEdited.SingleSoundGeneratorName) ||
                         songProgramBeingEdited.bSingle == false && parent.Tag == null))
                    {
                        foreach (TreeNode child in parent.Nodes)
                        {
                            if (child.Text.Equals(songProgramBeingEdited.name))
                            {
                                tvSongPatchPatches.SelectedNode = child;
                                break;
                            }
                        }
                        tvSongPatchPatches.Select();                 // HideSelection=false makes selection vis, but it's grey...  This doesn't seem to focus the control.
                        break;
                    }
                }

                creatingNewSongProgram = false;
                pnlSongEdit.Enabled    = false;
                pnlPatchEdit.Visible   = true;
            }
        }
Example #7
0
        public static void createTrialConfiguration(Song song)
        {
            if (song.name.Equals("Josie"))
            {
                song.programs.Clear();

                SongProgram songProgram = new SongProgram();
                songProgram.part                     = "Verse";
                songProgram.myBankNumber             = 0;
                songProgram.myPatchNumber            = 0;
                songProgram.bSingle                  = true;
                songProgram.SingleSoundGeneratorName = "Proteus VX";
                songProgram.SinglePatchName          = "EP-3";
                song.programs.Add(songProgram);

                songProgram               = new SongProgram();
                songProgram.part          = "";
                songProgram.myBankNumber  = 0;
                songProgram.myPatchNumber = 1;
                songProgram.bSingle       = false;
                songProgram.MappingName   = "Vintage Vince";
                song.programs.Add(songProgram);
            }
            else if (song.name.Equals("Celebration"))
            {
                song.programs.Clear();
                SongProgram songProgram = new SongProgram();
                songProgram.part                     = "";
                songProgram.myBankNumber             = 0;
                songProgram.myPatchNumber            = 0;
                songProgram.bSingle                  = true;
                songProgram.SingleSoundGeneratorName = "Proteus VX";
                songProgram.SinglePatchName          = "Dynamic Grand";
                song.programs.Add(songProgram);
            }
            else if (song.name.Equals("Loving Cup"))
            {
                song.programs.Clear();
                SongProgram songProgram = new SongProgram();
                songProgram.part                     = "";
                songProgram.myBankNumber             = 0;
                songProgram.myPatchNumber            = 0;
                songProgram.bSingle                  = true;
                songProgram.SingleSoundGeneratorName = "Proteus VX";
                songProgram.SinglePatchName          = "Dynamic Grand";
                song.programs.Add(songProgram);

                songProgram               = new SongProgram();
                songProgram.part          = "";
                songProgram.myBankNumber  = 0;
                songProgram.myPatchNumber = 1;
                songProgram.bSingle       = false;
                songProgram.MappingName   = "Rock Organ 1";
                song.programs.Add(songProgram);
            }
            else if (song.name.Equals("Jealous"))
            {
                song.programs.Clear();
                SongProgram songProgram = new SongProgram();
                songProgram.part                     = "";
                songProgram.myBankNumber             = 0;
                songProgram.myPatchNumber            = 0;
                songProgram.bSingle                  = true;
                songProgram.SingleSoundGeneratorName = "Proteus VX";
                songProgram.SinglePatchName          = "Dynamic Grand";
                song.programs.Add(songProgram);
            }
        }
Example #8
0
 public SongProgram(SongProgram orig) : base(orig)
 {
     part = orig.part;
 }