changeset 378:f5b5f64835b9

Some docs; remove FiltFiltConfig as it's the same as FilterConfig
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 21 Oct 2013 11:59:57 +0100
parents 59b151f13b3e
children 9d425cdf0fd6
files dsp/keydetection/GetKeyMode.cpp dsp/keydetection/GetKeyMode.h dsp/signalconditioning/DFProcess.h dsp/signalconditioning/FiltFilt.cpp dsp/signalconditioning/FiltFilt.h dsp/signalconditioning/Filter.h
diffstat 6 files changed, 36 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/dsp/keydetection/GetKeyMode.cpp	Mon Oct 21 11:50:09 2013 +0100
+++ b/dsp/keydetection/GetKeyMode.cpp	Mon Oct 21 11:59:57 2013 +0100
@@ -1,5 +1,14 @@
 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+/*
+    Copyright (c) 2005 Centre for Digital Music ( C4DM )
+                       Queen Mary Univesrity of London
 
+    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.  See the file
+    COPYING included with this distribution for more information.
+*/
 // GetKeyMode.cpp: implementation of the CGetKeyMode class.
 //
 //////////////////////////////////////////////////////////////////////
--- a/dsp/keydetection/GetKeyMode.h	Mon Oct 21 11:50:09 2013 +0100
+++ b/dsp/keydetection/GetKeyMode.h	Mon Oct 21 11:59:57 2013 +0100
@@ -1,17 +1,12 @@
 /*
- * Author: c.landone 
- * Description:
- *
- * Syntax: C++
- *
- * Copyright (c) 2005 Centre for Digital Music ( C4DM )
- *                    Queen Mary Univesrity of London
- *
- *
- * This program is not free software; you cannot redistribute it 
- * without the explicit authorization from the centre for digital music,
- * queen mary university of london 
- *
+    Copyright (c) 2005 Centre for Digital Music ( C4DM )
+                       Queen Mary Univesrity of London
+
+    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.  See the file
+    COPYING included with this distribution for more information.
  */
 
 #ifndef GETKEYMODE_H
--- a/dsp/signalconditioning/DFProcess.h	Mon Oct 21 11:50:09 2013 +0100
+++ b/dsp/signalconditioning/DFProcess.h	Mon Oct 21 11:59:57 2013 +0100
@@ -68,7 +68,7 @@
     double* m_filtScratchIn;
     double* m_filtScratchOut;
 
-    FiltFiltConfig m_FilterConfigParams;
+    FilterConfig m_FilterConfigParams;
 
     FiltFilt* m_FiltFilt;
 
--- a/dsp/signalconditioning/FiltFilt.cpp	Mon Oct 21 11:50:09 2013 +0100
+++ b/dsp/signalconditioning/FiltFilt.cpp	Mon Oct 21 11:59:57 2013 +0100
@@ -19,7 +19,7 @@
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-FiltFilt::FiltFilt( FiltFiltConfig Config )
+FiltFilt::FiltFilt( FilterConfig Config )
 {
     m_filtScratchIn = NULL;
     m_filtScratchOut = NULL;
@@ -33,7 +33,7 @@
     deInitialise();
 }
 
-void FiltFilt::initialise( FiltFiltConfig Config )
+void FiltFilt::initialise( FilterConfig Config )
 {
     m_ord = Config.ord;
     m_filterConfig.ord = Config.ord;
--- a/dsp/signalconditioning/FiltFilt.h	Mon Oct 21 11:50:09 2013 +0100
+++ b/dsp/signalconditioning/FiltFilt.h	Mon Oct 21 11:59:57 2013 +0100
@@ -18,23 +18,22 @@
 
 #include "Filter.h"
 
-struct FiltFiltConfig{
-    unsigned int ord;
-    double* ACoeffs;
-    double* BCoeffs;
-};
-
+/**
+ * Zero-phase digital filter, implemented by processing the data
+ * through a filter specified by the given FilterConfig structure (see
+ * Filter) and then processing it again in reverse.
+ */
 class FiltFilt  
 {
 public:
-    FiltFilt( FiltFiltConfig Config );
+    FiltFilt( FilterConfig Config );
     virtual ~FiltFilt();
 
     void reset();
     void process( double* src, double* dst, unsigned int length );
 
 private:
-    void initialise( FiltFiltConfig Config );
+    void initialise( FilterConfig Config );
     void deInitialise();
 
     unsigned int m_ord;
--- a/dsp/signalconditioning/Filter.h	Mon Oct 21 11:50:09 2013 +0100
+++ b/dsp/signalconditioning/Filter.h	Mon Oct 21 11:59:57 2013 +0100
@@ -20,12 +20,21 @@
 #define NULL 0
 #endif
 
+/**
+ * Filter specification. For a filter of order ord, the ACoeffs and
+ * BCoeffs arrays must point to ord+1 values each. ACoeffs provides
+ * the denominator and BCoeffs the numerator coefficients of the
+ * filter.
+ */
 struct FilterConfig{
     unsigned int ord;
     double* ACoeffs;
     double* BCoeffs;
 };
 
+/**
+ * Digital filter specified through FilterConfig structure.
+ */
 class Filter  
 {
 public:
@@ -35,7 +44,6 @@
     void reset();
 
     void process( double *src, double *dst, unsigned int length );
-	
 
 private:
     void initialise( FilterConfig Config );