public void AddDrum(GuiDrumPad pad, NumericUpDown nupNoteNormal, NumericUpDown nupNoteAdv, CheckBox chkBoostOn, CheckBox chkBoostOnAdv, ComboBox ddlBoostValue, ComboBox ddlAdvBoostValue) { m_NupNoteArray[(byte)pad] = nupNoteNormal; m_NupAdvNoteArray[(byte)pad] = nupNoteAdv; m_ChkDrumBoostOn[(byte)pad] = chkBoostOn; m_ChkAdvDrumBoostOn[(byte)pad] = chkBoostOnAdv; m_DdlBoostValue[(byte)pad] = ddlBoostValue; m_DdlAdvBoostValue[(byte)pad] = ddlAdvBoostValue; InitControl((byte)pad, GuiLinkerType.DrumPad, nupNoteNormal); InitControl((byte)pad, GuiLinkerType.DrumPad, nupNoteAdv); InitControl((byte)pad, GuiLinkerType.DrumPad, chkBoostOn); InitControl((byte)pad, GuiLinkerType.DrumPad, chkBoostOnAdv); InitControl((byte)pad, GuiLinkerType.DrumPad, ddlBoostValue); InitControl((byte)pad, GuiLinkerType.DrumPad, ddlAdvBoostValue); InitNumericUpDown(nupNoteNormal); InitNumericUpDown(nupNoteAdv); InitDDLBoost(ddlBoostValue); InitDDLBoost(ddlAdvBoostValue); InitBoostCheckBox(chkBoostOn); InitBoostCheckBox(chkBoostOnAdv); }
private byte Boost(byte rawpad, byte velocity) { GuiDrumPad pad = m_RawToGuiConverter.TranslatePad(rawpad); if (m_Main.GuiLinker.GetBoostEnabled(pad)) { velocity = (byte)Math.Min((byte)255, velocity + m_Main.GuiLinker.GetBoost(pad)); } return(velocity); }
public bool Morph(GuiDrumPad pad, ref byte velocity, ref byte note) { bool changed = false; foreach (MultiNote mn in m_lb.Items) { changed = mn.Morph(pad, ref velocity, ref note); } return(changed); }
internal bool GetBoostEnabled(GuiDrumPad pad) { if (m_Main.InvokeRequired) { return((bool)m_Main.Invoke(new Bool_DrumPadDelegate(GetBoostEnabled), new object[] { pad })); } else { return(m_ChkAdvDrumBoostOn[(byte)pad].Checked); } }
internal byte GetBoost(GuiDrumPad pad) { if (m_Main.InvokeRequired) { return((byte)m_Main.Invoke(new Byte_DrumPadDelegate(GetBoost), new object[] { pad })); } else { return((byte)m_DdlAdvBoostValue[(byte)pad].SelectedItem); } }
public MultiNote(MultNoteCheckType checkType, byte velocity, GuiDrumPad pad, byte noteTo, float velMult, byte velAdd) { CheckType = checkType; Velocity = velocity; Pad = pad; NoteTo = noteTo; VelocityMult = velMult; VelocityAdd = velAdd; }
public void UpdateVelocityPb(GuiDrumPad pad, byte hitVelocity) { if (InvokeRequired) { Invoke(new Void_DrumPadByteDelegate(UpdateVelocityPb), new object[] { pad, hitVelocity }); } else { referenceVelocity[(int)pad].Value = hitVelocity; } }
public bool Morph(GuiDrumPad pad, ref byte velocity, ref byte note) { if (Pad == pad && VelocityCheck(velocity)) { note = NoteTo; velocity = (byte)Math.Max(0, Math.Min(127, velocity * VelocityMult + VelocityAdd)); return(true); } else { return(false); } }
public bool Morph(GuiDrumPad pad, ref byte velocity, ref byte note) { if (Pad == pad && VelocityCheck(velocity)) { note = NoteTo; velocity = (byte)Math.Max(0, Math.Min(127, velocity * VelocityMult + VelocityAdd)); return true; } else { return false; } }
public void TriggerNote(byte rawpad, byte velocity) { velocity = Boost(rawpad, velocity); if (m_HitVelocities[rawpad] == null) // No note recently triggered { GuiDrumPad pad = m_RawToGuiConverter.TranslatePad(rawpad); m_Main.MidiSender.TriggerNote(pad, velocity); m_HitVelocities[(int)rawpad] = velocity; m_Timers[rawpad].Start(); } // Otherwise, the note is ignored. }
public void TriggerNote(GuiDrumPad pad, byte hitVelocity) { // Maximum value is 127 hitVelocity = (byte)(hitVelocity / 2); System.Diagnostics.Debug.Assert(hitVelocity <= 127); byte note = m_Main.GuiLinker.GetMidiNote(pad); m_Main.MultiNoteGui.Morph(pad, ref hitVelocity, ref note); SendNoteOn(note, hitVelocity); m_Main.UpdateVelocityPb(pad, hitVelocity); SendNoteOff(note); }
public MultiNote(MultNoteCheckType checkType, byte velocity, GuiDrumPad pad, byte noteTo, float velMult, byte velAdd) { Velocity = velocity; CheckType = checkType; Pad = pad; NoteTo = noteTo; VelocityMult = velMult; VelocityAdd = velAdd; }
public void TriggerNote(GuiDrumPad pad, byte hitVelocity) { // Maximum value is 127 hitVelocity = (byte)(hitVelocity / 2); System.Diagnostics.Debug.Assert(hitVelocity <= 127); byte note = m_Main.GuiLinker.GetMidiNote(pad); m_Main.MultiNoteGui.Morph(pad, ref hitVelocity, ref note); SendNoteOn(note, hitVelocity); m_Main.UpdateVelocityPb(pad, hitVelocity); SendNoteOff(note); }
internal byte GetBoost(GuiDrumPad pad) { if (m_Main.InvokeRequired) { return (byte)m_Main.Invoke(new Byte_DrumPadDelegate(GetBoost), new object[] { pad }); } else { return (byte)m_DdlAdvBoostValue[(byte)pad].SelectedItem; } }
public bool Morph(GuiDrumPad pad, ref byte velocity, ref byte note) { bool changed = false; foreach (MultiNote mn in m_lb.Items) { changed = mn.Morph(pad, ref velocity, ref note); } return changed; }
internal void SetMidiNote(GuiDrumPad pad, byte note) { m_NupAdvNoteArray[(byte)pad].Value = note; m_NupNoteArray[(byte)pad].Value = note; }
internal void SetBoostValue(GuiDrumPad pad, byte value) { SetSelectIndex(ref m_DdlAdvBoostValue[(byte)pad], value); SetSelectIndex(ref m_DdlBoostValue[(byte)pad], value); }
internal void SetBoostEnabled(GuiDrumPad pad, bool enabled) { m_ChkDrumBoostOn[(byte)pad].Checked = enabled; m_ChkAdvDrumBoostOn[(byte)pad].Checked = enabled; }
internal byte GetMidiNote(GuiDrumPad pad) { return (byte)m_NupAdvNoteArray[(byte)pad].Value; }
public void UpdateVelocityPb(GuiDrumPad pad, byte hitVelocity) { if (InvokeRequired) { Invoke(new Void_DrumPadByteDelegate(UpdateVelocityPb), new object[] { pad, hitVelocity }); } else { referenceVelocity[(int)pad].Value = hitVelocity; } }
public void AddDrum(GuiDrumPad pad, NumericUpDown nupNoteNormal, NumericUpDown nupNoteAdv, CheckBox chkBoostOn, CheckBox chkBoostOnAdv, ComboBox ddlBoostValue, ComboBox ddlAdvBoostValue) { m_NupNoteArray[(byte)pad] = nupNoteNormal; m_NupAdvNoteArray[(byte)pad] = nupNoteAdv; m_ChkDrumBoostOn[(byte)pad] = chkBoostOn; m_ChkAdvDrumBoostOn[(byte)pad] = chkBoostOnAdv; m_DdlBoostValue[(byte)pad] = ddlBoostValue; m_DdlAdvBoostValue[(byte)pad] = ddlAdvBoostValue; InitControl((byte)pad, GuiLinkerType.DrumPad, nupNoteNormal); InitControl((byte)pad, GuiLinkerType.DrumPad, nupNoteAdv); InitControl((byte)pad, GuiLinkerType.DrumPad, chkBoostOn); InitControl((byte)pad, GuiLinkerType.DrumPad, chkBoostOnAdv); InitControl((byte)pad, GuiLinkerType.DrumPad, ddlBoostValue); InitControl((byte)pad, GuiLinkerType.DrumPad, ddlAdvBoostValue); InitNumericUpDown(nupNoteNormal); InitNumericUpDown(nupNoteAdv); InitDDLBoost(ddlBoostValue); InitDDLBoost(ddlAdvBoostValue); InitBoostCheckBox(chkBoostOn); InitBoostCheckBox(chkBoostOnAdv); }
internal byte GetMidiNote(GuiDrumPad pad) { return((byte)m_NupAdvNoteArray[(byte)pad].Value); }
internal void SetMidiNote(GuiDrumPad pad, byte note) { m_NupAdvNoteArray[(byte)pad].Value = note; m_NupNoteArray[(byte)pad].Value = note; }
internal void SetBoostValue(GuiDrumPad pad, byte value) { SetSelectIndex(ref m_DdlAdvBoostValue[(byte)pad], value); SetSelectIndex(ref m_DdlBoostValue[(byte)pad], value); }
internal bool GetBoostEnabled(GuiDrumPad pad) { if (m_Main.InvokeRequired) { return (bool)m_Main.Invoke(new Bool_DrumPadDelegate(GetBoostEnabled), new object[] { pad }); } else { return m_ChkAdvDrumBoostOn[(byte)pad].Checked; } }
internal void SetBoostEnabled(GuiDrumPad pad, bool enabled) { m_ChkDrumBoostOn[(byte)pad].Checked = enabled; m_ChkAdvDrumBoostOn[(byte)pad].Checked = enabled; }