/**
         * Copies parameters from another instance
         * @param	params	Instance to copy parameters from
         */
        public void CopyFrom(SfxrParams param, bool makeDirty = false)
        {
            _waveType            = param.WaveType;
            _attackTime          = param.AttackTime;
            _sustainTime         = param.SustainTime;
            _sustainPunch        = param.SustainPunch;
            _decayTime           = param.DecayTime;
            _startFrequency      = param.StartFrequency;
            _minFrequency        = param.MinFrequency;
            _slide               = param.Slide;
            _deltaSlide          = param.DeltaSlide;
            _vibratoDepth        = param.VibratoDepth;
            _vibratoSpeed        = param.VibratoSpeed;
            _changeAmount        = param.ChangeAmount;
            _changeSpeed         = param.ChangeSpeed;
            _squareDuty          = param.SquareDuty;
            _dutySweep           = param.DutySweep;
            _repeatSpeed         = param.RepeatSpeed;
            _phaserOffset        = param.PhaserOffset;
            _phaserSweep         = param.PhaserSweep;
            _lpFilterCutoff      = param.LpFilterCutoff;
            _lpFilterCutoffSweep = param.LpFilterCutoffSweep;
            _lpFilterResonance   = param.LpFilterResonance;
            _hpFilterCutoff      = param.HpFilterCutoff;
            _hpFilterCutoffSweep = param.HpFilterCutoffSweep;
            _masterVolume        = param.MasterVolume;

            if (makeDirty)
            {
                ParamsDirty = true;
            }
        }
        //--------------------------------------------------------------------------
        //
        //  Copying Methods
        //
        //--------------------------------------------------------------------------

        /**
         * Returns a copy of this SfxrParams with all settings duplicated
         * @return	A copy of this SfxrParams
         */
        public SfxrParams Clone()
        {
            var res = new SfxrParams();

            res.CopyFrom(this);

            return(res);
        }
 public SfxrSynth()
 {
     _random = new Random();
     Param   = new SfxrParams();
 }