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