@@ -0,0 +1,1270 @@
+package framework.modifiers;%0A%0Aimport java.util.Random;%0A%0Aimport framework.Sound;%0Aimport framework.generators.Generator;%0Aimport framework.modifiers.Modifier;%0Aimport framework.parameters.Parameter;%0Aimport framework.parameters.DoubleParameter;%0A%0A/**%0A * Add noise to the Sound.%0A */%0Apublic class Noise extends Modifier %7B%0A    /**%0A     * Create a Noise object.%0A     */%0A    public Noise(Sound s) %7B%0A        super(s);%0A        amplitude = new DoubleParameter(this, %22Amplitude%22, 0.5, 0., 100.);%0A    %7D%0A%0A    public Double%5B%5D apply(Double%5B%5D data) %7B%0A        Random rand = new Random();%0A%0A        Double d = (Double) sound.getParameterByName(%22Duration%22).getValue();%0A        Double a = amplitude.getValue();%0A%0A        Double%5B%5D newData = new Double%5Bdata.length%5D;%0A%0A        for(int i = 0; i %3C (d.intValue() * Generator.SAMPLE_RATE); i++) %7B%0A            newData%5Bi%5D = data%5Bi%5D + a * rand.nextDouble();%0A            // Clip%0A            if (newData%5Bi%5D %3C -1.0) newData%5Bi%5D = -1.0;%0A            if (newData%5Bi%5D %3E +1.0) newData%5Bi%5D = +1.0;%0A        %7D%0A%0A        return newData;%0A    %7D%0A%0A    public Parameter%5B%5D getParameters() %7B%0A        return new Parameter%5B%5D%7Bamplitude%7D;%0A    %7D%0A%0A    public String toString() %7B%0A        return %22Noise%22;%0A    %7D%0A%0A    private Sound           sound;%0A    private DoubleParameter amplitude;%0A%7D

Create Noise modifier to add white noise to a Sound.