Exemple #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);
        }
Exemple #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));
         }
     }
 }
 internal void SetMidiNote(GuiDrumButton b, byte note)
 {
     m_NupAdvNoteArray[NUM_PADS + (byte)b].Value = note;
     m_NupNoteArray[NUM_PADS + (byte)b].Value = note;
 }
 internal void SetButtonVelocity(GuiDrumButton drumButton, byte vel)
 {
     m_NupAdvButtonVelArray[(byte)drumButton].Value = vel;
 }
 internal void SetButtonSwitchType(GuiDrumButton b, SwitchType type)
 {
     SetSelectIndex(ref m_DdlAdvSwitchStateArray[(byte)b], type);
 }
 internal byte GetMidiNote(GuiDrumButton b)
 {
     return (byte)m_NupAdvNoteArray[NUM_PADS + (byte)b].Value;
 }
 internal byte GetButtonVelocity(GuiDrumButton drumButton)
 {
     return (byte)m_NupAdvButtonVelArray[(byte)drumButton].Value;
 }
 internal SwitchType GetButtonSwitchType(GuiDrumButton drumButton)
 {
     return (SwitchType)m_DdlAdvSwitchStateArray[(byte)drumButton].SelectedItem;
 }
Exemple #9
0
 internal byte GetMidiNote(GuiDrumButton b)
 {
     return((byte)m_NupAdvNoteArray[NUM_PADS + (byte)b].Value);
 }
Exemple #10
0
 internal byte GetButtonVelocity(GuiDrumButton drumButton)
 {
     return((byte)m_NupAdvButtonVelArray[(byte)drumButton].Value);
 }
Exemple #11
0
 internal SwitchType GetButtonSwitchType(GuiDrumButton drumButton)
 {
     return((SwitchType)m_DdlAdvSwitchStateArray[(byte)drumButton].SelectedItem);
 }
Exemple #12
0
 internal void SetButtonSwitchType(GuiDrumButton b, SwitchType type)
 {
     SetSelectIndex(ref m_DdlAdvSwitchStateArray[(byte)b], type);
 }
Exemple #13
0
 internal void SetButtonVelocity(GuiDrumButton drumButton, byte vel)
 {
     m_NupAdvButtonVelArray[(byte)drumButton].Value = vel;
 }
Exemple #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;
 }
Exemple #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);
        }
Exemple #16
0
 internal void CheckboxButton(GuiDrumButton b, bool check)
 {
     m_ChkNoteOnCheck[(byte)b].Checked = check;
 }
Exemple #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));
         }
     }
 }
Exemple #18
0
 internal void CheckboxButton(GuiDrumButton b, bool check)
 {
     m_ChkNoteOnCheck[(byte)b].Checked = check;
 }