comparison sinsyn.cpp @ 11:977f541d6683

GPL and cosmetic changes
author Wen X <xue.wen@elec.qmul.ac.uk>
date Wed, 10 Aug 2011 12:33:35 +0100
parents 9b1c0825cc77
children
comparison
equal deleted inserted replaced
10:c6528c38b23c 11:977f541d6683
1 /*
2 Harmonic sinusoidal modelling and tools
3
4 C++ code package for harmonic sinusoidal modelling and relevant signal processing.
5 Centre for Digital Music, Queen Mary, University of London.
6 This file copyright 2011 Wen Xue.
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
12 */
1 //--------------------------------------------------------------------------- 13 //---------------------------------------------------------------------------
2 14
3 #include "align8.h" 15 #include "align8.h"
4 #include "sinsyn.h" 16 #include "sinsyn.h"
5 #include "splines.h" 17 #include "splines.h"
786 { 798 {
787 phs[fr]=ph; 799 phs[fr]=ph;
788 ALIGN8(Sinusoid(&xrec[(int)xs[fr]-dst], 0, xs[fr+1]-xs[fr], a3[fr], a2[fr], a1[fr], a0[fr], f3[fr], f2[fr], f1[fr], f0[fr], ph, add);) 800 ALIGN8(Sinusoid(&xrec[(int)xs[fr]-dst], 0, xs[fr+1]-xs[fr], a3[fr], a2[fr], a1[fr], a0[fr], f3[fr], f2[fr], f1[fr], f0[fr], ph, add);)
789 if (terminatetag && *terminatetag) {delete[] f3; return 0;} 801 if (terminatetag && *terminatetag) {delete[] f3; return 0;}
790 } 802 }
791 phs[Fr-1]=ph; 803 phs[Fr-1]=ph; ph=phs[Fr-2];
792 ALIGN8(Sinusoid(&xrec[(int)xs[Fr-2]-dst], xs[Fr-1]-xs[Fr-2], den-xs[Fr-2], a3[Fr-2], a2[Fr-2], a1[Fr-2], a0[Fr-2], f3[Fr-2], f2[Fr-2], f1[Fr-2], f0[Fr-2], ph, add); 804 ALIGN8(Sinusoid(&xrec[(int)xs[Fr-2]-dst], xs[Fr-1]-xs[Fr-2], den-xs[Fr-2], a3[Fr-2], a2[Fr-2], a1[Fr-2], a0[Fr-2], f3[Fr-2], f2[Fr-2], f1[Fr-2], f0[Fr-2], ph, add);
793 Sinusoid(&xrec[(int)xs[0]-dst], dst-xs[0], 0, a3[0], a2[0], a1[0], a0[0], f3[0], f2[0], f1[0], f0[0], phs[0], add);) 805 Sinusoid(&xrec[(int)xs[0]-dst], dst-xs[0], 0, a3[0], a2[0], a1[0], a0[0], f3[0], f2[0], f1[0], f0[0], phs[0], add);)
794 delete[] f3; 806 delete[] f3;
795 return xrec; 807 return xrec;
796 }//SynthesizeSinusoid 808 }//SynthesizeSinusoid