예제 #1
0
        /// <inheritdoc />
        public void CopyFrom(IPatchPart part)
        {
            if (part is Partial p)
            {
                Basic.CopyFrom(p.Basic);
                Assign.CopyFrom(p.Assign);
                Amplifier.CopyFrom(p.Amplifier);
                Output.CopyFrom(p.Output);
                Expression.CopyFrom(p.Expression);
                VelocityControl.CopyFrom(p.VelocityControl);

                for (var i = 0; i < p.Wmts.Length; i++)
                {
                    Wmts[i].CopyFrom(p.Wmts[i]);
                }

                Pitch.CopyFrom(p.Pitch);
                Tvf.CopyFrom(p.Tvf);
                Tva.CopyFrom(p.Tva);
                Other.CopyFrom(p.Other);
            }
            else
            {
                throw new NotSupportedException("Copying from that type is not supported");
            }
        }
예제 #2
0
        /// <inheritdoc />
        public void CopyFrom(IPatchPart part)
        {
            if (part is Wmt wmt)
            {
                On        = wmt.On;
                GroupType = wmt.GroupType;
                GroupId   = wmt.GroupId;
                LeftWave  = wmt.LeftWave;
                RightWave = wmt.RightWave;
                WaveGain  = wmt.WaveGain;

                Fxm      = wmt.Fxm;
                FxmColor = wmt.FxmColor;
                FxmDepth = wmt.FxmDepth;

                TempoSync  = wmt.TempoSync;
                CoarseTune = wmt.CoarseTune;
                FineTune   = wmt.FineTune;

                Panorama          = wmt.Panorama;
                RandomPanorama    = wmt.RandomPanorama;
                AlternatePanorama = wmt.AlternatePanorama;

                Level = wmt.Level;
                VelocityRangeLower     = wmt.VelocityRangeLower;
                VelocityRangeUpper     = wmt.VelocityRangeUpper;
                VelocityFadeWidthLower = wmt.VelocityFadeWidthLower;
                VelocityFadeWidthUpper = wmt.VelocityFadeWidthUpper;
            }
            else
            {
                throw new NotSupportedException("Copying from that type is not supported");
            }
        }
예제 #3
0
        /// <inheritdoc />
        public void CopyFrom(IPatchPart part)
        {
            if (part is Envelope env)
            {
                Depth                    = env.Depth;
                VelocityCurve            = env.VelocityCurve;
                VelocitySensitivity      = env.VelocitySensitivity;
                Time1VelocitySensitivity = env.Time1VelocitySensitivity;
                Time4VelocitySensitivity = env.Time4VelocitySensitivity;

                Time1 = env.Time1;
                Time2 = env.Time2;
                Time3 = env.Time3;
                Time4 = env.Time4;

                Level0 = env.Level0;
                Level1 = env.Level1;
                Level2 = env.Level2;
                Level3 = env.Level3;
                Level4 = env.Level4;
            }
            else
            {
                throw new NotSupportedException("Copying from that type is not supported");
            }
        }
예제 #4
0
        /// <inheritdoc />
        public void CopyFrom(IPatchPart part)
        {
            if (part is Common common)
            {
                Name               = common.Name;
                ToneLevel          = common.ToneLevel;
                Portamento         = common.Portamento;
                PortamentoTime     = common.PortamentoTime;
                Mono               = common.Mono;
                OctaveShift        = common.OctaveShift;
                PitchBendRangeUp   = common.PitchBendRangeUp;
                PitchBendRangeDown = common.PitchBendRangeDown;

                PartialOneSwitch   = common.PartialOneSwitch;
                PartialTwoSwitch   = common.PartialTwoSwitch;
                PartialThreeSwitch = common.PartialThreeSwitch;
                PartialOneSelect   = common.PartialOneSelect;
                PartialTwoSelect   = common.PartialTwoSelect;
                PartialThreeSelect = common.PartialThreeSelect;

                Ring           = common.Ring;
                Unison         = common.Unison;
                PortamentoMode = common.PortamentoMode;
                Legato         = common.Legato;
                AnalogFeel     = common.AnalogFeel;
                WaveShape      = common.WaveShape;
                ToneCategory   = common.ToneCategory;
                UnisonSize     = common.UnisonSize;
            }
            else
            {
                throw new NotSupportedException("Copying from that type is not supported");
            }
        }
 /// <inheritdoc />
 public void DumpCommon(IPatchPart common, int deviceId)
 {
     using (var output = new OutputDevice(deviceId))
     {
         _logger.DataDump("Dumping Patch.Common");
         output.Send(SysExUtils.GetMessage(_commonOffset, common.GetBytes()));
     }
 }
 /// <inheritdoc />
 public void DumpVocalEffects(IPatchPart vocalFx, int deviceId)
 {
     using (var output = new OutputDevice(deviceId))
     {
         _logger.DataDump("Dumping Patch.VocalEffect");
         output.Send(SysExUtils.GetMessage(_vfxEffectsOffset, vocalFx.GetBytes()));
     }
 }
예제 #7
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Pitch pitch)
     {
         Envelope.CopyFrom(pitch.Envelope);
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #8
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is VelocityControl vc)
     {
         Control = vc.Control;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #9
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Basic basic)
     {
         Name = basic.Name;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #10
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is BasicData data)
     {
         On    = data.On;
         Level = data.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #11
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Aftertouch aftertouch)
     {
         CutoffAftertouchSensitivity = aftertouch.CutoffAftertouchSensitivity;
         LevelAftertouchSensitivity  = aftertouch.LevelAftertouchSensitivity;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #12
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Common c)
     {
         Name  = c.Name;
         Level = c.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #13
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Other oth)
     {
         OneShotMode   = oth.OneShotMode;
         RelativeLevel = oth.RelativeLevel;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #14
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Assign assign)
     {
         AssignType = assign.AssignType;
         MuteGroup  = assign.MuteGroup;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #15
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Expression exp)
     {
         PitchBendRange    = exp.PitchBendRange;
         ReceiveExpression = exp.ReceiveExpression;
         ReceiveHold1      = exp.ReceiveHold1;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #16
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is VocalEffect ve)
     {
         Common.CopyFrom(ve.Common);
         AutoPitch.CopyFrom(ve.AutoPitch);
         Vocoder.CopyFrom(ve.Vocoder);
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #17
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Output output)
     {
         OutputLevel     = output.OutputLevel;
         DelaySendLevel  = output.DelaySendLevel;
         ReverbSendLevel = output.ReverbSendLevel;
         OutputAssign    = output.OutputAssign;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #18
0
 /// <inheritdoc />
 public override void CopyFrom(IPatchPart part)
 {
     if (part is BitCrusherParameters p)
     {
         Rate   = p.Rate;
         Bit    = p.Bit;
         Filter = p.Filter;
         Level  = p.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #19
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Amplifier amp)
     {
         Level = amp.Level;
         LevelVelSensitivity = amp.LevelVelSensitivity;
         Envelope.CopyFrom(amp.Envelope);
         Panorama = amp.Panorama;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #20
0
 /// <inheritdoc />
 public override void CopyFrom(IPatchPart part)
 {
     if (part is Parameters p)
     {
         Type   = p.Type;
         Time   = p.Time;
         HfDamp = p.HfDamp;
         Level  = p.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
 /// <inheritdoc />
 public override void CopyFrom(IPatchPart part)
 {
     if (part is RingModulationParameters p)
     {
         Frequency     = p.Frequency;
         Sensitivity   = p.Sensitivity;
         DryWetBalance = p.DryWetBalance;
         Level         = p.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #22
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is LfoModControl modControl)
     {
         PitchModControl  = modControl.PitchModControl;
         FilterModControl = modControl.FilterModControl;
         AmpModControl    = modControl.AmpModControl;
         RateModControl   = modControl.RateModControl;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #23
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is BasicData data)
     {
         Type            = data.Type;
         Level           = data.Level;
         DelaySendLevel  = data.DelaySendLevel;
         ReverbSendLevel = data.ReverbSendLevel;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #24
0
 /// <inheritdoc />
 public override void CopyFrom(IPatchPart part)
 {
     if (part is DistortionParameters p)
     {
         Type     = p.Type;
         Drive    = p.Drive;
         Presence = p.Presence;
         Level    = p.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #25
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Common c)
     {
         Level           = c.Level;
         Panorama        = c.Panorama;
         DelaySendLevel  = c.DelaySendLevel;
         ReverbSendLevel = c.ReverbSendLevel;
         OutputAssign    = c.OutputAssign;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #26
0
 /// <inheritdoc />
 public override void CopyFrom(IPatchPart part)
 {
     if (part is SlicerParameters p)
     {
         TimingPattern = p.TimingPattern;
         Note          = p.Note;
         Attack        = p.Attack;
         TriggerLevel  = p.TriggerLevel;
         Level         = p.Level;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #27
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Common common)
     {
         Portamento         = common.Portamento;
         Legato             = common.Legato;
         PortamentoTime     = common.PortamentoTime;
         OctaveShift        = common.OctaveShift;
         PitchBendRangeUp   = common.PitchBendRangeUp;
         PitchBendRangeDown = common.PitchBendRangeDown;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #28
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Modifiers mods)
     {
         AttackTimeIntervalSensitivity     = mods.AttackTimeIntervalSensitivity;
         ReleaseTimeIntervalSensitivity    = mods.ReleaseTimeIntervalSensitivity;
         PortamentoTimeIntervalSensitivity = mods.PortamentoTimeIntervalSensitivity;
         EnvelopeLoopMode     = mods.EnvelopeLoopMode;
         EnvelopeLoopSyncNote = mods.EnvelopeLoopSyncNote;
         ChromaticPortamento  = mods.ChromaticPortamento;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #29
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Other other)
     {
         WaveGain          = other.WaveGain;
         WaveNumber        = other.WaveNumber;
         HpfCutoff         = other.HpfCutoff;
         SuperSawDetune    = other.SuperSawDetune;
         ModLfoRateControl = other.ModLfoRateControl;
         AmpLevelKeyfollow = other.AmpLevelKeyfollow;
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }
예제 #30
0
 /// <inheritdoc />
 public void CopyFrom(IPatchPart part)
 {
     if (part is Partial partial)
     {
         Oscillator.CopyFrom(partial.Oscillator);
         Filter.CopyFrom(partial.Filter);
         Amplifier.CopyFrom(partial.Amplifier);
         Lfo.CopyFrom(partial.Lfo);
         ModLfo.CopyFrom(partial.ModLfo);
         Aftertouch.CopyFrom(partial.Aftertouch);
         Other.CopyFrom(partial.Other);
     }
     else
     {
         throw new NotSupportedException("Copying from that type is not supported");
     }
 }