Mercurial > hg > ape
view aux/MS2LR.m @ 15:24be5e9ce25b tip
Update README
author | Brecht De Man <brecht.deman@bcu.ac.uk> |
---|---|
date | Thu, 20 Sep 2018 12:23:20 +0200 |
parents | 4fd284285159 |
children |
line wrap: on
line source
function y = MS2LR(x) % LR2MS Converts stereo audio signal to MS (mid side). % % by Brecht De Man at Centre for Digital Music, 4 June 2013 if size(x,2) ~= 2 error('Function MS2LR needs a stereo audio input file.'); end y = zeros(size(x)); % L = (M + S)/2, R = (M-S)/2 y(:,1) = (x(:,1)+x(:,2))/2; % left channel y(:,2) = (x(:,1)-x(:,2))/2; % right channel end