コード例 #1
0
 public async Task SetToggleAsync(bool toggleValue, byte controlNumber, IAmpProfile profile, IMidiOutputDevice device, byte channel)
 => await MidiDeviceLocator.SelectForOutput(device.DeviceId)
 .ComposeControlChange()
 .WithChannel(channel)
 .WithControlNumber(controlNumber)
 .WithValue(this.GetToggleValue(toggleValue, profile))
 .SendAsync();
コード例 #2
0
 private byte GetToggleValue(bool toggleValue, IAmpProfile profile)
 => toggleValue ? profile.ToggleOnValue : profile.ToggleOffValue;