function [l1, h, s]= fram3_down_hm(l,IND,pd)
%one step of 3-channel frame decomposition of a signal or an array  of row signals 'l'

% IND-- index of frame from the lists given in the codes
% 'list_frame3.m' and 'list_frame4.m'
%IND(1)-- number of channels in filter bank (3 or 4) 
%IND(2)-- spline order; 
%IND(3)=0--tight frame, otherwise -- semi-tight frame
%if pd==-1 -- swap synthesis and analysis band-pass filters

%l1, h, s --the low-, high- and band-pass transform coefficients



Par=IND(2);
TS=IND(3);
 sq=sqrt(2);
[lv lh]=size(l);
N=lh/2;

[e o]=evod(l);
fe=fft(e,[],2);
fo=fft(o,[],2);
[F,W,~,~]= FW3_P(lv,N, Par,TS);
if pd==-1
[~,~,F,W]= FW3_P(lv,N, Par,TS);    
end
% %%%%%%%%%%%%%%%%%%%%
 fl1=(fe+fo.*F)/sq;
   l1=real(ifft(fl1,[],2));
    fh=(fe-fo.*F)/sq;
   h=real(ifft(fh,[],2));
    fs=fo.*W/sq;
    s=real(ifft(fs,[],2));
% Copyright (c) 2012. Valery A. Zheludev
