/// <inheritdoc /> public override void CopyFrom(byte[] data) { if (data.Length != DumpLength) { throw new InvalidDumpSizeException(DumpLength, data.Length); } Basic.CopyFrom(data.Take(4).ToArray()); Parameters.CopyFrom(data.Skip(4).ToArray()); }
/// <inheritdoc /> public void CopyFrom(IPatch patch) { if (patch is EffectPatch ep) { Basic.CopyFrom(ep.Basic); Parameters.CopyFrom(ep.Parameters); } else { throw new NotSupportedException("Copying from that type is not supported"); } }
/// <inheritdoc /> public override void CopyFrom(byte[] data) { if (data.Length != DumpLength) { throw new InvalidDumpSizeException(DumpLength, data.Length); } Basic.CopyFrom(data.Take(5).ToArray()); // Basic.PropertyChanges takes care of switching between parameters, so we don't // need to do anything more than that and we're just passing data to the method // that copies data from sysex dump Parameters.CopyFrom(data.Skip(17).Take(128).ToArray()); }