Esempio n. 1
0
 /* append tap to list in delay line */
 public static void AppendTapToDelayEffect(
     DelayEffectRec DelaySpec,
     DelayTapRec Tap)
 {
     Array.Resize(ref DelaySpec.List, DelaySpec.List.Length + 1);
     DelaySpec.List[DelaySpec.List.Length - 1] = Tap;
 }
Esempio n. 2
0
 /* add a delay effect to the spec list */
 public static void AddDelayToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     DelayEffectRec DelaySpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eDelayEffect, DelaySpec, EnabledFlag);
 }
Esempio n. 3
0
        /* create a new delay line specification */
        public static DelayEffectRec NewDelayLineSpec()
        {
            DelayEffectRec DelaySpec = new DelayEffectRec();

            DelaySpec.List = new DelayTapRec[0];
            //DelaySpec.MaxDelayTime = 0;

            return(DelaySpec);
        }
Esempio n. 4
0
        public static void GetDelayTapFilterCutoffAgg(
            DelayEffectRec DelaySpec,
            int Index,
            out ScalarParamEvalRec ParamsOut)
        {
            DelayTapRec Tap = DelaySpec.List[Index];

            InitScalarParamEval(
                Tap.FilterCutoff,
                ref Tap.FilterCutoffAccent,
                Tap.FilterCutoffFormula,
                out ParamsOut);
        }
Esempio n. 5
0
        public static void GetDelayTapScaleAgg(
            DelayEffectRec DelaySpec,
            int Index,
            out ScalarParamEvalRec ParamsOut)
        {
            DelayTapRec Tap = DelaySpec.List[Index];

            InitScalarParamEval(
                Tap.ScaleFactor,
                ref Tap.ScaleFactorAccent,
                Tap.ScaleFactorFormula,
                out ParamsOut);
        }
Esempio n. 6
0
        public static void GetDelayTapTargetTimeAgg(
            DelayEffectRec DelaySpec,
            int Index,
            out ScalarParamEvalRec ParamsOut)
        {
            DelayTapRec Tap = DelaySpec.List[Index];

            InitScalarParamEval(
                Tap.TargetTime,
                ref Tap.TargetTimeAccent,
                Tap.TargetTimeFormula,
                out ParamsOut);
        }
Esempio n. 7
0
 public static PcodeRec GetDelayMaxTimeFormula(DelayEffectRec DelaySpec)
 {
     return(DelaySpec.MaxDelayTimeFormula);
 }
Esempio n. 8
0
 public static bool GetDelayTapInterpolateFlag(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).Interpolate);
 }
Esempio n. 9
0
 public static LFOListSpecRec GetDelayTapCutoffLFO(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).CutoffLFO);
 }
Esempio n. 10
0
 public static LFOListSpecRec GetDelayTapScaleLFO(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).ScaleFactorLFO);
 }
Esempio n. 11
0
 public static LFOListSpecRec GetDelayTapTargetLFO(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).TargetTimeLFO);
 }
Esempio n. 12
0
 public static EnvelopeRec GetDelayTapCutoffEnvelope(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).CutoffEnvelope);
 }
Esempio n. 13
0
 public static EnvelopeRec GetDelayTapScaleEnvelope(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).ScaleFactorEnvelope);
 }
Esempio n. 14
0
 public static EnvelopeRec GetDelayTapTargetEnvelope(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).TargetTimeEnvelope);
 }
Esempio n. 15
0
 public static double GetDelayMaxTime(DelayEffectRec DelaySpec)
 {
     return(DelaySpec.MaxDelayTime);
 }
Esempio n. 16
0
 public static void SetDelayMaxTimeFormula(
     DelayEffectRec DelaySpec,
     PcodeRec MaxTimeFormula)
 {
     DelaySpec.MaxDelayTimeFormula = MaxTimeFormula;
 }
Esempio n. 17
0
 public static void SetDelayMaxTime(
     DelayEffectRec DelaySpec,
     double MaxTime)
 {
     DelaySpec.MaxDelayTime = MaxTime;
 }
Esempio n. 18
0
 public static DelayChannelType GetDelayTapTarget(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).TargetTap);
 }
Esempio n. 19
0
 public static DelayChannelType GetDelayTapSource(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).SourceTap);
 }
Esempio n. 20
0
 /* get a specified tap from the delay line */
 public static DelayTapRec GetTapFromDelayEffectSpec(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(DelaySpec.List[Index]);
 }
Esempio n. 21
0
 /* get the number of taps in the delay line */
 public static int GetDelayEffectSpecNumTaps(DelayEffectRec DelaySpec)
 {
     return(DelaySpec.List.Length);
 }
Esempio n. 22
0
 public static bool GetDelayTapFilterEnable(
     DelayEffectRec DelaySpec,
     int Index)
 {
     return(GetTapFromDelayEffectSpec(DelaySpec, Index).FilterEnable);
 }
        /* check delay effect */
        public static SynthErrorCodes CheckDelayEffectForUnreferencedSamples(
            DelayEffectRec DelayEffect,
            CheckUnrefParamRec Param)
        {
            int Limit = GetDelayEffectSpecNumTaps(DelayEffect);

            for (int Scan = 0; Scan < Limit; Scan += 1)
            {
                SynthErrorCodes Error;

                Error = CheckEnvelopeForUnreferencedSamples(
                    GetDelayTapSourceEnvelope(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckEnvelopeForUnreferencedSamples(
                    GetDelayTapTargetEnvelope(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckEnvelopeForUnreferencedSamples(
                    GetDelayTapScaleEnvelope(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckEnvelopeForUnreferencedSamples(
                    GetDelayTapCutoffEnvelope(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckLFOListForUnreferencedSamples(
                    GetDelayTapSourceLFO(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckLFOListForUnreferencedSamples(
                    GetDelayTapTargetLFO(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckLFOListForUnreferencedSamples(
                    GetDelayTapScaleLFO(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }

                Error = CheckLFOListForUnreferencedSamples(
                    GetDelayTapCutoffLFO(DelayEffect, Scan),
                    Param);
                if (Error != SynthErrorCodes.eSynthDone)
                {
                    return(Error);
                }
            }

            return(SynthErrorCodes.eSynthDone);
        }