diff hs.h @ 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 5f3c32dc6e17
children
line wrap: on
line diff
--- a/hs.h	Thu Jul 28 10:36:57 2011 +0100
+++ b/hs.h	Wed Aug 10 12:33:35 2011 +0100
@@ -1,3 +1,15 @@
+/*
+    Harmonic sinusoidal modelling and tools
+
+    C++ code package for harmonic sinusoidal modelling and relevant signal processing.
+    Centre for Digital Music, Queen Mary, University of London.
+    This file copyright 2011 Wen Xue.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.
+*/
 #ifndef hsH
 #define hsH
 
@@ -13,7 +25,12 @@
 #include "align8.h"
 #include "fft.h"
 #include "quickspec.h"
+
+#ifndef __BORLANDC__
 #include "tstream.h"
+#else
+#include <Classes.hpp>
+#endif
 
 #define ATOM_LOCALANCHOR 1
 #define HS_CONSTF 1
@@ -127,7 +144,6 @@
   THS is the data structure hosting a harmonic sinusoid representation. Its key members include the number
   of partials, number of frames, and all its atoms (sinusoid parameters of all partials at measurement points).
 */
-
 class THS
 {
 public:
@@ -239,6 +255,7 @@
 void InitializeR(TPolygon* R, int apind, double af, double ef, double maxB);
 
 //--internal structure conversion routines-----------------------------------
+void AtomsToPartials(int k, atom* part, int& M, int& Fr, atom**& partials, int offst);
 int NMResultToAtoms(int M, atom* HP, int t, int wid, NMResults results);
 int NMResultToPartials(int M, int fr, atom** Partials, int t, int wid, NMResults results);
 
@@ -263,6 +280,7 @@
 
 //--harmonic sinusoid synthesis routines-------------------------------------
 double* SynthesisHS(int pm, int pfr, atom** partials, int& dst, int& den, bool* terminatetag=0);
+double* SynthesisHS(THS* HS, int& dst, int& den, bool* terminatetag=0);
 double* SynthesisHS2(int M, int Fr, atom** partials, int& dst, int& den, bool* terminatetag=0);
 double* SynthesisHSp(int pm, int pfr, atom** partials, int& dst, int& den, double** startamp=0, int st_start=0, int st_offst=0, int st_count=0);
 double* SynthesisHSp(THS* HS, int& dst, int& den);