Exemplo n.º 1
0
 public string GetProgramName(int channel)
 {
     if (bank != null)
     {
         Patch inst = bank.GetPatch(channel == MidiHelper.DrumChannel ? PatchBank.DrumBank : bankSelect[channel], programs[channel]);
         if (inst != null)
         {
             return(inst.Name);
         }
     }
     return("Null");
 }
Exemplo n.º 2
0
 public string GetProgramName(int channel)
 {
     if (bank != null)
     {
         SynthParameters sChannel = synthChannels[channel];
         Patch           inst     = bank.GetPatch(sChannel.bankSelect, sChannel.program);
         if (inst != null)
         {
             return(inst.Name);
         }
     }
     return("Null");
 }
Exemplo n.º 3
0
        private void updatePatchList()
        {
            checkedListBox1.Items.Clear();
            int bNum = int.Parse(comboBox1.SelectedItem.ToString());

            for (int x = 0; x < PatchBank.BankSize; x++)
            {
                Patch p = bank.GetPatch(bNum, x);
                if (p == null)
                {
                    checkedListBox1.Items.Add(x + " : Null");
                }
                else
                {
                    checkedListBox1.Items.Add(x + " : " + p.Name);
                }
            }
        }