public KemperDriver(IMidiDevice device) { Device = device; MidiTimeout = TimeSpan.FromMilliseconds(1500); CurrentRig = new KemperRig(); }
public void ReadFromDevice() { CurrentRig = new KemperRig(); var props = CurrentRig.GetModuleProperties(); foreach (var prop in props) { var module = (Module)prop.GetValue(this); ReadFromDevice(module); } }
private void WritePropertiesToRig() { var modDict = new Dictionary <byte, Module>(); Rig = new KemperRig(); foreach (var msg in Track.Messages.OfType <NrpnSysExMessage>()) { if (!modDict.TryGetValue(msg.Page, out var mod)) { mod = Rig.GetModuleByPageNo(msg.Page); modDict.Add(mod.NrpnPageNo, mod); } mod.SetValueFromSysExMessage(msg); } }