Ejemplo n.º 1
0
    /// <summary>
    /// Check if the node has a parameter that references a GNBase
    /// </summary>
    /// <param name="gb">The GNBase to compare against.</param>
    /// <returns>True if the node contains a parameter referencing the node, else false.</returns>
    public bool HierarchyContains(LLDNBase gb, bool checkSelf = true)
    {
        if (checkSelf == true && this == gb)
        {
            return(true);
        }

        foreach (ParamBase pb in this.genParams)
        {
            if (pb.type != ParamBase.Type.PCMInput)
            {
                continue;
            }

            ParamConnection pc = pb as ParamConnection;
            if (pc.IsConnected() == false)
            {
                continue;
            }

            if (pc.Reference == gb)
            {
                return(true);
            }

            if (pc.Reference.HierarchyContains(gb) == true)
            {
                return(true);
            }
        }

        return(false);
    }
Ejemplo n.º 2
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal that will stuttered.";
        this.genParams.Add(this.input);

        this.stutterTime             = new ParamTimeLen("Window", 1.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.stutterTime.description = "The rate at which stutters happen";
        this.genParams.Add(this.stutterTime);

        this.stutterPercent             = new ParamFloat("Percent", "Percent", 0.5f, 0.0f, 1.0f);
        this.stutterPercent.description = "The percent of the window between playing the audio and stuttering with silence.";
        this.genParams.Add(this.stutterPercent);

        this.pass             = new ParamBool("Pass", "Stutter Behaviour", false);
        this.pass.trueString  = "Pass";
        this.pass.falseString = "Hold";
        this.pass.description = "If true, when the stutter is silent it will still pass the audio through instead of holding it - resulting in a gate effect.";
        this.genParams.Add(this.pass);

        this.start             = new ParamBool("Start", "Play on start?", false);
        this.start.trueString  = "Play";
        this.start.falseString = "Stut";
        this.start.description = "If true, the node starts by playing; if false, the node starts with silence.";
        this.genParams.Add(this.start);
    }
Ejemplo n.º 3
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to apply the integrated ASDR envelope to.";
        this.genParams.Add(this.input);

        this.paramOffset             = new ParamTimeLen("Offset", 0.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.paramOffset.description = "The duration of time before the input is passed and the envelope is started. Use a value of 0.0 to play instantly.";
        this.genParams.Add(this.paramOffset);

        this.paramAttackTime             = new ParamTimeLen("Attack", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.paramAttackTime.description = "The duration of time for the attack.\nDuring the attack, the audio sample gain is raised from 0.0 to 1.0.";
        this.genParams.Add(this.paramAttackTime);

        this.paramDecayTime             = new ParamTimeLen("Decay", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.paramDecayTime.description = "The duration of time for the decay.\nThe decay starts right after the attack. During the decay, the audio sample gain is lowered from 1.0 to the Sustain value.";
        this.genParams.Add(this.paramDecayTime);

        this.paramSustainVal             = new ParamFloat("Sustain", "Volume", 0.5f, 0.0f, 1.0f);
        this.paramSustainVal.description = "The gain of the sustain. After the attack and decay phase, this will be the gain until the keyboard note is released.";
        this.genParams.Add(this.paramSustainVal);

        this.paramRelease             = new ParamTimeLen("Release", 0.1f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.paramRelease.description = "The duration of time for the release enevelope. This happens after the keyboard note being played is released.";
        this.genParams.Add(this.paramRelease);
    }
Ejemplo n.º 4
0
    public bool ClearKnowledgeOfConnection(LLDNBase gnb)
    {
        bool any = false;

        foreach (ParamBase pb in this.genParams)
        {
            if (pb.type != ParamBase.Type.PCMInput)
            {
                continue;
            }

            ParamConnection pc = pb as ParamConnection;
            if (pc.IsConnected() == false)
            {
                continue;
            }

            if (pc.Reference == gnb)
            {
                pc.SetReference(null);
                any = true;
            }
        }
        return(any);
    }
Ejemplo n.º 5
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to process.";
        this.genParams.Add(this.input);

        this.outputType             = new ParamEnum("Mode", "range", outputEnum, enumFull);
        this.outputType.description = "The range of the output.";
        this.genParams.Add(this.outputType);
    }
Ejemplo n.º 6
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to view.";
        this.genParams.Add(this.input);

        this.zoom             = new ParamFloat("Zoom", "Magnification", 1.0f, -4.0f, 4.0f);
        this.zoom.description = "The amount to zoom into the start by.";
        this.genParams.Add(this.zoom);
    }
Ejemplo n.º 7
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to apply the release envelope to.";
        this.genParams.Add(this.input);

        this.release             = new ParamTimeLen("Release", 1.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.release.description = "The amount of time to release the note.";
        this.genParams.Add(this.release);
    }
Ejemplo n.º 8
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal that will be held.";
        this.genParams.Add(this.input);

        this.holdTime             = new ParamTimeLen("Hold", 1.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.holdTime.description = "The amount of time to hold the audio signal before letting it play.";
        this.genParams.Add(this.holdTime);
    }
Ejemplo n.º 9
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to multiply.";
        this.genParams.Add(this.input);

        this.gain             = new ParamFloat("Gain", "Multiple", 1.0f, 0.0f, 20.0f);
        this.gain.description = "The constant value to scale the audio signal by.";
        this.genParams.Add(this.gain);
    }
Ejemplo n.º 10
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal that will be smeared.";
        this.genParams.Add(this.input);

        this.factor             = new ParamFloat("Factor", "Unknown", 0.5f, 0.0f, 1.0f);
        this.factor.description = "A setting that control how much to \"smear\" the audio, with a higher value adding more smear.";
        this.genParams.Add(this.factor);
    }
Ejemplo n.º 11
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to quantize.";
        this.genParams.Add(this.input);

        this.levels             = new ParamFloat("Levels", "Divisions", 4.0f, 1.0f, 50.0f);
        this.levels.description = "The number of quantum levels to divide the audio signal by.";
        this.genParams.Add(this.levels);
    }
Ejemplo n.º 12
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal that will be clamped.";
        this.genParams.Add(this.input);

        this.clampType             = new ParamEnum("Mode", "direction", clampEnum, enumFull);
        this.clampType.description = "How the audio signal will get clamped.";
        this.genParams.Add(this.clampType);
    }
Ejemplo n.º 13
0
    protected override void _Init()
    {
        this.connectionA             = new ParamConnection("A", null);
        this.connectionA.description = "The first audio signal.";

        this.connectionB             = new ParamConnection("B", null);
        this.connectionB.description = "The second audio signal.";

        this.genParams.Add(this.connectionA);
        this.genParams.Add(this.connectionB);
    }
Ejemplo n.º 14
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal that will be rerouted.";
        this.genParams.Add(this.input);

        this.buttonText             = new ParamText("Button", "Connect Out");
        this.buttonText.description = "The text on the button";
        this.buttonText.editable    = false;
        this.genParams.Add(this.buttonText);
    }
Ejemplo n.º 15
0
 public override bool VerifyConnectionUsed(ParamConnection connection)
 {
     if (this.gate.Value == true)
     {
         return(connection == this.inputA);
     }
     else
     {
         // We could probably just return true here instead of the extra check
         return(connection == this.inputB);
     }
 }
Ejemplo n.º 16
0
    public IEnumerable <ParamConnection> GetParamConnections()
    {
        foreach (ParamBase pb in this.genParams)
        {
            if (pb.type != ParamBase.Type.PCMInput)
            {
                continue;
            }

            ParamConnection pc = pb as ParamConnection;
            yield return(pc);
        }
    }
Ejemplo n.º 17
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to process.";
        this.genParams.Add(this.input);

        this.mul             = new ParamFloat("Mul", "Multiple", 0.5f, -2.0f, 2.0f);
        this.mul.description = "The constant value to scale the audio signal by.";
        this.genParams.Add(this.mul);

        this.add             = new ParamFloat("Add", "Addition", 0.5f, -2.0f, 2.0f);
        this.add.description = "The constant value to add to the audio signal.";
        this.genParams.Add(this.add);
    }
Ejemplo n.º 18
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The input audio signal to apply the attack envelope to.";
        this.genParams.Add(this.input);

        this.offset             = new ParamTimeLen("Offset", 0.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.offset.description = "The duration to wait before starting the attack.\n During that time, the audio signal will be silent.";
        this.genParams.Add(this.offset);

        this.attack             = new ParamTimeLen("Attack", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.attack.description = "The duration of the envelope.\nDuring the amount of time, the gain of the input audio signal will be raised from 0.0 to 1.0.";
        this.genParams.Add(this.attack);

        //this.offset = new ParamTimeLen("Offset", 0.0f, ParamTimeLen.TimeLenType.Seconds);
        //this.genParams.Add(this.offset);
    }
Ejemplo n.º 19
0
    /// <summary>
    /// Clear all PCM connection parameters in the node.
    /// </summary>
    public void ClearAllConnections()
    {
        foreach (ParamBase pb in this.genParams)
        {
            if (pb.type != ParamBase.Type.PCMInput)
            {
                continue;
            }

            ParamConnection pc = pb as ParamConnection;
            if (pc.IsConnected() == false)
            {
                continue;
            }

            pc.SetReference(null);
        }
    }
Ejemplo n.º 20
0
    public bool SetConnection(ParamConnection ownedConParam, LLDNBase newConnection)
    {
        if (ownedConParam.IsConnected() == true)
        {
            if (ownedConParam.Reference == newConnection)
            {
                return(true);
            }

            if (newConnection.HierarchyContains(this) == true)
            {
                return(false);
            }
        }

        ownedConParam.SetReference(newConnection);
        return(true);
    }
Ejemplo n.º 21
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to apply the delay filter to.";
        this.genParams.Add(this.input);

        this.offset             = new ParamTimeLen("Offset", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.offset.description = "The duration of time between duplicated voices.";
        this.genParams.Add(this.offset);

        this.dampen             = new ParamFloat("Dampen", "Attenuation", 1.0f, 0.0f, 1.0f);
        this.dampen.description = "A compounding frequency multiplier applied to the frequency of each voice generated.";
        this.genParams.Add(this.dampen);

        this.voiceCt             = new ParamInt("Voices", "Voices", 2, 2, 8);
        this.voiceCt.description = "The number of copies to create.";
        this.genParams.Add(this.voiceCt);
    }
Ejemplo n.º 22
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to record and playback.";
        this.genParams.Add(this.input);

        this.offset             = new ParamTimeLen("Offset", 0.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.offset.description = "The amount of time to pass before recording. What kind of behaviour to perform during this time is controlled by the Offset Ty parameter.";
        this.genParams.Add(this.offset);

        this.offsetType             = new ParamEnum("Offset Ty", "Offset Type", offsetEnum, 0);
        this.offsetType.description = "How to process the audio signal while offsetting.";
        this.genParams.Add(this.offsetType);

        this.recordAmt             = new ParamTimeLen("Amount", 1.0f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.recordAmt.description = "The amount of time to record.";
        this.genParams.Add(this.recordAmt);
    }
Ejemplo n.º 23
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to apply the decay envelope to.";
        this.genParams.Add(this.input);

        this.offset             = new ParamTimeLen("Offset", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.offset.description = "The duration of time the decay envelope will be active.\nWhen the envelope starts, the input gain will be 1.0.\nWhen the envelope is finished, the input signal will be the value of Sustain.";
        this.genParams.Add(this.offset);

        this.duration             = new ParamTimeLen("Decay", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime);
        this.duration.description = "The amount of time the note will play before the envelope is started.";
        this.genParams.Add(this.duration);

        this.sustain             = new ParamFloat("Sustain", "Volume", 0.5f, 0.0f, 1.0f);
        this.sustain.description = "The gain of the input signal after the envlope is finished.";
        this.genParams.Add(this.sustain);
    }
Ejemplo n.º 24
0
    protected override void _Init()
    {
        this.inputA             = new ParamConnection("A", null);
        this.inputA.description = "The audio signal to pass if the Gate is set to 'A'.";
        this.genParams.Add(this.inputA);

        this.inputB             = new ParamConnection("B", null);
        this.inputB.description = "The audio signal to pass if the Gate is set to 'B'.";
        this.genParams.Add(this.inputB);

        this.gate             = new ParamBool("Gate", "Channel", true);
        this.gate.description = "The switch to specify which audio signal to pass.";
        this.gate.SetLabels("A", "B");
        this.genParams.Add(this.gate);

        this.nickname             = new ParamNickname("Name", "NoNm");
        this.nickname.description = "A short readable name to uniquely identify the gate. The name doesn't affect the gate's function, just for labeling.";
        this.genParams.Add(this.nickname);
    }
Ejemplo n.º 25
0
    protected override void _Init()
    {
        this.input             = new ParamConnection("Input", null);
        this.input.description = "The audio signal to apply a chorus effect to.";
        //
        this.phonicCt             = new ParamInt("Voices", "Voices", 2, 2, 8);
        this.phonicCt.description = "The number of copies to create.";
        //
        this.dampen             = new ParamFloat("Dampen", "Attenuation", 1.0f, 0.0f, 1.0f);
        this.dampen.description = "A compounding loudness multiplication factor for each voice generated.";
        //
        this.freqOff             = new ParamFloat("Freq Offset", "Offset", -0.2f, -1.0f, 1.0f);
        this.freqOff.description = "A compounding frequency multiplier applied to the frequency of each voice generated.";

        this.genParams.Add(this.input);
        this.genParams.Add(this.phonicCt);
        this.genParams.Add(this.dampen);
        this.genParams.Add(this.freqOff);
    }
Ejemplo n.º 26
0
    protected override void _Init()
    {
        this.connectionA             = new ParamConnection("A", null);
        this.connectionA.description = "The audio signal at Factor value 0.0.";

        this.connectionB             = new ParamConnection("B", null);
        this.connectionB.description = "The audio signal at Factor value 1.0.";

        this.connectionFactor             = new ParamConnection("Factor", null);
        this.connectionFactor.description =
            "The blending factor between the A and B audio signal.\n" +
            "A sample value of 0.0 will only play parameter A.\n" +
            "A sample value of 1.0 will only play parameter B.\n" +
            "A value between will interpolate between A and B.\n" +
            "A value below 0.0 or above 1.0 will extrapolate.";

        this.genParams.Add(this.connectionA);
        this.genParams.Add(this.connectionB);
        this.genParams.Add(this.connectionFactor);
    }
Ejemplo n.º 27
0
    public ParamConnection GetConnectionParam(string name)
    {
        foreach (ParamBase pb in this.genParams)
        {
            if (pb.type != ParamBase.Type.PCMInput)
            {
                continue;
            }

            if (string.Equals(pb.name, name, System.StringComparison.OrdinalIgnoreCase) == false)
            {
                continue;
            }

            ParamConnection pc = pb as ParamConnection;
            return(pc);
        }

        return(null);
    }
Ejemplo n.º 28
0
 protected override void _Init()
 {
     conInput             = new ParamConnection("Input", null);
     conInput.description = "The final output output audio signal.";
     this.genParams.Add(conInput);
 }
Ejemplo n.º 29
0
 protected override void _Init()
 {
     this.input             = new ParamConnection("Input", null);
     this.input.description = "The audio signal to process.";
     this.genParams.Add(this.input);
 }
Ejemplo n.º 30
0
 public virtual bool VerifyConnectionUsed(ParamConnection connection) => true;