function output = cosinee(input,gain,mix)
numrows = size(input);

if numrows(:,2) == 2
    inputL = input(:,1);
    inputR = input(:,2);

    %Left Processing
    aL = inputL*gain;
    bL = cos(aL);
    outputL = bL*mix + inputL*(1-mix);
    cL = max(abs(outputL));
    outputL = outputL/cL;

    %Right Processing
    aR = inputR*gain;
    bR = cos(aR);
    outputR = bR*mix + inputR*(1-mix);
    cR = max(abs(outputR));
    outputR = outputR/cR;
    
    %Summing
    output = [outputL,outputR];
    
elseif numrows(:,2) == 1
    a = input*gain;
    b = cos(a);
    output = b*mix + input*(1-mix);
    c = max(abs(output));
    output = output/c;
end

