示例#1
0
        public void AddButton(GuiDrumButton button,
                              NumericUpDown nupNoteNormal, NumericUpDown nupNoteAdv,
                              NumericUpDown nupButtonNoteVelocityAdv, ComboBox ddlSwitchStateAdv,
                              CheckBox chkNoteOnCheck)
        {
            m_NupNoteArray[NUM_PADS + (byte)button]    = nupNoteNormal;
            m_NupAdvNoteArray[NUM_PADS + (byte)button] = nupNoteAdv;

            m_NupAdvButtonVelArray[(byte)button]   = nupButtonNoteVelocityAdv;
            m_DdlAdvSwitchStateArray[(byte)button] = ddlSwitchStateAdv;

            m_ChkNoteOnCheck[(byte)button] = chkNoteOnCheck;

            InitControl((byte)button, GuiLinkerType.Button, nupNoteNormal);
            InitControl((byte)button, GuiLinkerType.ButtonVelocity, nupButtonNoteVelocityAdv);
            InitControl((byte)button, GuiLinkerType.Button, nupNoteAdv);
            InitControl((byte)button, GuiLinkerType.Button, ddlSwitchStateAdv);
            InitControl((byte)button, GuiLinkerType.Button, chkNoteOnCheck);

            InitNumericUpDown(nupNoteNormal);
            InitNumericUpDown(nupNoteAdv);
            InitNumericUpDown(nupButtonNoteVelocityAdv);

            InitDDLSwitchState(ddlSwitchStateAdv);
        }
示例#2
0
 private void DrumButtonPressed(GuiDrumButton b)
 {
     if (InvokeRequired)
     {
         Invoke(new ButtonDelegate(DrumButtonPressed), new object[] { b });
     }
     else
     {
         GuiLinker.CheckboxButton(b, true);
         MidiSender.SendNoteOn(GuiLinker.GetMidiNote(b), GuiLinker.GetButtonVelocity(b));
         if (GuiLinker.GetButtonSwitchType(b) != SwitchType.KeyboardLike)
         {
             MidiSender.SendNoteOff(GuiLinker.GetMidiNote(b));
         }
     }
 }
示例#3
0
 internal void SetMidiNote(GuiDrumButton b, byte note)
 {
     m_NupAdvNoteArray[NUM_PADS + (byte)b].Value = note;
     m_NupNoteArray[NUM_PADS + (byte)b].Value = note;
 }
示例#4
0
 internal void SetButtonVelocity(GuiDrumButton drumButton, byte vel)
 {
     m_NupAdvButtonVelArray[(byte)drumButton].Value = vel;
 }
示例#5
0
 internal void SetButtonSwitchType(GuiDrumButton b, SwitchType type)
 {
     SetSelectIndex(ref m_DdlAdvSwitchStateArray[(byte)b], type);
 }
示例#6
0
 internal byte GetMidiNote(GuiDrumButton b)
 {
     return (byte)m_NupAdvNoteArray[NUM_PADS + (byte)b].Value;
 }
示例#7
0
 internal byte GetButtonVelocity(GuiDrumButton drumButton)
 {
     return (byte)m_NupAdvButtonVelArray[(byte)drumButton].Value;
 }
示例#8
0
 internal SwitchType GetButtonSwitchType(GuiDrumButton drumButton)
 {
     return (SwitchType)m_DdlAdvSwitchStateArray[(byte)drumButton].SelectedItem;
 }
示例#9
0
 internal byte GetMidiNote(GuiDrumButton b)
 {
     return((byte)m_NupAdvNoteArray[NUM_PADS + (byte)b].Value);
 }
示例#10
0
 internal byte GetButtonVelocity(GuiDrumButton drumButton)
 {
     return((byte)m_NupAdvButtonVelArray[(byte)drumButton].Value);
 }
示例#11
0
 internal SwitchType GetButtonSwitchType(GuiDrumButton drumButton)
 {
     return((SwitchType)m_DdlAdvSwitchStateArray[(byte)drumButton].SelectedItem);
 }
示例#12
0
 internal void SetButtonSwitchType(GuiDrumButton b, SwitchType type)
 {
     SetSelectIndex(ref m_DdlAdvSwitchStateArray[(byte)b], type);
 }
示例#13
0
 internal void SetButtonVelocity(GuiDrumButton drumButton, byte vel)
 {
     m_NupAdvButtonVelArray[(byte)drumButton].Value = vel;
 }
示例#14
0
 internal void SetMidiNote(GuiDrumButton b, byte note)
 {
     m_NupAdvNoteArray[NUM_PADS + (byte)b].Value = note;
     m_NupNoteArray[NUM_PADS + (byte)b].Value    = note;
 }
示例#15
0
        public void AddButton(GuiDrumButton button,
                       NumericUpDown nupNoteNormal, NumericUpDown nupNoteAdv,
                       NumericUpDown nupButtonNoteVelocityAdv, ComboBox ddlSwitchStateAdv,
                       CheckBox chkNoteOnCheck)
        {
            m_NupNoteArray[NUM_PADS + (byte)button] = nupNoteNormal;
            m_NupAdvNoteArray[NUM_PADS + (byte)button] = nupNoteAdv;

            m_NupAdvButtonVelArray[(byte)button] = nupButtonNoteVelocityAdv;
            m_DdlAdvSwitchStateArray[(byte)button] = ddlSwitchStateAdv;

            m_ChkNoteOnCheck[(byte)button] = chkNoteOnCheck;

            InitControl((byte)button, GuiLinkerType.Button, nupNoteNormal);
            InitControl((byte)button, GuiLinkerType.ButtonVelocity, nupButtonNoteVelocityAdv);
            InitControl((byte)button, GuiLinkerType.Button, nupNoteAdv);
            InitControl((byte)button, GuiLinkerType.Button, ddlSwitchStateAdv);
            InitControl((byte)button, GuiLinkerType.Button, chkNoteOnCheck);

            InitNumericUpDown(nupNoteNormal);
            InitNumericUpDown(nupNoteAdv);
            InitNumericUpDown(nupButtonNoteVelocityAdv);

            InitDDLSwitchState(ddlSwitchStateAdv);
        }
示例#16
0
 internal void CheckboxButton(GuiDrumButton b, bool check)
 {
     m_ChkNoteOnCheck[(byte)b].Checked = check;
 }
示例#17
0
 private void DrumButtonReleased(GuiDrumButton b)
 {
     if (InvokeRequired)
     {
         Invoke(new ButtonDelegate(DrumButtonReleased), new object[] { b });
     }
     else
     {
         GuiLinker.CheckboxButton(b, false);
         if (GuiLinker.GetButtonSwitchType(b) == SwitchType.KeyboardLike)
             MidiSender.SendNoteOff(GuiLinker.GetMidiNote(b));
         else if (GuiLinker.GetButtonSwitchType(b) == SwitchType.OnOff)
         {
             MidiSender.SendNoteOn(GuiLinker.GetMidiNote(b), GuiLinker.GetButtonVelocity(b));
             MidiSender.SendNoteOff(GuiLinker.GetMidiNote(b));
         }
     }
 }
示例#18
0
 internal void CheckboxButton(GuiDrumButton b, bool check)
 {
     m_ChkNoteOnCheck[(byte)b].Checked = check;
 }