function [RMSE,out]=chordcodec(y)
c=size(y,2);
n=size(cos((1:2^(12))*2*pi*(y(1))/2^(13)));
sig=zeros(n);
for i=1:c;
    x=y(i);
    sig=sig+cos((1:2^(12))*2*pi*(x)/2^(13));
end
[RMSE,out]=windowcodec(sig);