src/temporal: rename adesign/adsgn to a_weighting, idem for c_weighting
authorPaul Brossier <piem@piem.org>
Tue, 29 Sep 2009 05:58:03 +0000 (07:58 +0200)
committerPaul Brossier <piem@piem.org>
Tue, 29 Sep 2009 05:58:03 +0000 (07:58 +0200)
src/pitch/pitchdetection.c
src/temporal/a_weighting.c [moved from src/temporal/adesign.c with 97% similarity]
src/temporal/a_weighting.h [moved from src/temporal/adesign.h with 93% similarity]
src/temporal/c_weighting.c [moved from src/temporal/cdesign.c with 96% similarity]
src/temporal/c_weighting.h [moved from src/temporal/cdesign.h with 93% similarity]
src/temporal/filter.h
tests/src/temporal/test-aweighting.c
tests/src/temporal/test-cweighting.c
tests/src/test-filter.c

index 51e86a09e7ab157e0adbec0af25880a0e90f8e8d..3e9d245d4c3eff19fd06666e5a625bf197ada9e5 100644 (file)
@@ -23,7 +23,7 @@
 #include "spectral/phasevoc.h"
 #include "mathutils.h"
 #include "temporal/filter.h"
-#include "temporal/cdesign.h"
+#include "temporal/c_weighting.h"
 #include "pitch/pitchmcomb.h"
 #include "pitch/pitchyin.h"
 #include "pitch/pitchfcomb.h"
@@ -104,7 +104,7 @@ aubio_pitchdetection_t * new_aubio_pitchdetection(uint_t bufsize,
       p->pv       = new_aubio_pvoc(bufsize, hopsize, channels);
       p->fftgrain = new_cvec(bufsize, channels);
       p->mcomb    = new_aubio_pitchmcomb(bufsize,hopsize,channels,samplerate);
-      p->filter   = new_aubio_filter_cdsgn (samplerate, channels);
+      p->filter   = new_aubio_filter_c_weighting (samplerate, channels);
       p->callback = aubio_pitchdetection_mcomb;
       break;
     case aubio_pitch_fcomb:
similarity index 97%
rename from src/temporal/adesign.c
rename to src/temporal/a_weighting.c
index 800f2cd55404064cdfe470df3265b76d1a90f0ae..6465183ff931fef2f2fd01ba956e944629848727 100644 (file)
@@ -24,9 +24,9 @@
 #include "fvec.h"
 #include "lvec.h"
 #include "temporal/filter.h"
-#include "temporal/adesign.h"
+#include "temporal/a_weighting.h"
 
-void aubio_filter_set_adsgn (aubio_filter_t * f) {
+void aubio_filter_set_a_weighting (aubio_filter_t * f) {
 
   uint_t samplerate = aubio_filter_get_samplerate (f);
   lvec_t *bs = aubio_filter_get_feedforward (f);
@@ -152,9 +152,9 @@ void aubio_filter_set_adsgn (aubio_filter_t * f) {
 
 }
 
-aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels) {
+aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels) {
   aubio_filter_t * f = new_aubio_filter (samplerate, 7, channels);
-  aubio_filter_set_adsgn (f);
+  aubio_filter_set_a_weighting (f);
   return f;
 }
 
similarity index 93%
rename from src/temporal/adesign.h
rename to src/temporal/a_weighting.h
index 1f621cb4f96d764ac9f920e527af2ccf3f4d11f4..ed13a80cb3bfae7145a07d6e4ef981bd90668fec 100644 (file)
@@ -63,14 +63,14 @@ extern "C" {
   \return a new filter object
 
 */
-aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels);
+aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels);
 
 /** set feedback and feedforward coefficients of a A-weighting filter
 
   \param f filter object to get coefficients from
 
 */
-void aubio_filter_set_adsgn (aubio_filter_t *f);
+void aubio_filter_set_a_weighting (aubio_filter_t *f);
 
 #ifdef __cplusplus
 }
similarity index 96%
rename from src/temporal/cdesign.c
rename to src/temporal/c_weighting.c
index ee4c7a0df4f6a0794cd66db5cf26cf5669c312cb..68847638286ee8c8a216a0372594674a28b99a7e 100644 (file)
@@ -23,9 +23,9 @@
 #include "fvec.h"
 #include "lvec.h"
 #include "temporal/filter.h"
-#include "temporal/cdesign.h"
+#include "temporal/c_weighting.h"
 
-void aubio_filter_set_cdsgn (aubio_filter_t * f) {
+void aubio_filter_set_c_weighting (aubio_filter_t * f) {
 
   uint_t samplerate = aubio_filter_get_samplerate (f);
   lvec_t * bs = aubio_filter_get_feedforward (f);
@@ -128,9 +128,9 @@ void aubio_filter_set_cdsgn (aubio_filter_t * f) {
 
 }
 
-aubio_filter_t * new_aubio_filter_cdsgn (uint_t samplerate, uint_t channels) {
+aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels) {
   aubio_filter_t * f = new_aubio_filter(samplerate, 5, channels);
-  aubio_filter_set_cdsgn (f);
+  aubio_filter_set_c_weighting (f);
   return f;
 }
 
similarity index 93%
rename from src/temporal/cdesign.h
rename to src/temporal/c_weighting.h
index 49dfeceb4bc95eac360ec44b09b2c940bf29b2a3..6fa5a0a609a14518bf7182911d27999a5a900300 100644 (file)
@@ -63,14 +63,14 @@ extern "C" {
   \return a new filter object
 
 */
-aubio_filter_t * new_aubio_filter_cdsgn (uint_t samplerate, uint_t channels);
+aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels);
 
 /** set feedback and feedforward coefficients of a C-weighting filter
 
   \param f filter object to get coefficients from
 
 */
-void aubio_filter_set_cdsgn (aubio_filter_t *f);
+void aubio_filter_set_c_weighting (aubio_filter_t *f);
 
 #ifdef __cplusplus
 }
index 0b86befee8a0f65354d6996db2f74c371ecf8ef1..2cdbd5ea66bee89b158be20781eb33b3e3adc00a 100644 (file)
@@ -52,8 +52,8 @@
   operation.
 
   Some convenience functions are provided: 
-    - new_aubio_filter_adsgn() and aubio_filter_set_adsgn(),
-    - new_aubio_filter_cdsgn() and aubio_filter_set_cdsgn().
+    - new_aubio_filter_a_weighting() and aubio_filter_set_a_weighting(),
+    - new_aubio_filter_c_weighting() and aubio_filter_set_c_weighting().
  
 */
 
index 8694035db05fabdc135479deae3d7260e44c9d37..ab23323b4c96cb4637a25e2448b74b71cdb31814 100644 (file)
@@ -10,26 +10,26 @@ int main(){
   uint_t channels = 2;
 
   for ( samplerate = rates[i]; i < nrates ; i++ ) {
-    f = new_aubio_filter_adsgn (samplerate, channels);
+    f = new_aubio_filter_a_weighting (samplerate, channels);
     del_aubio_filter (f);
 
     f = new_aubio_filter (samplerate, 7, channels*2);
-    aubio_filter_set_adsgn (f);
+    aubio_filter_set_a_weighting (f);
     del_aubio_filter (f);
   }
 
   // samplerate unknown
-  f = new_aubio_filter_adsgn (12089, channels);
+  f = new_aubio_filter_a_weighting (12089, channels);
   del_aubio_filter (f);
 
   // order to small
   f = new_aubio_filter (samplerate, 2, channels*2);
-  aubio_filter_set_adsgn (f);
+  aubio_filter_set_a_weighting (f);
   del_aubio_filter (f);
 
   // order to big
   f = new_aubio_filter (samplerate, 12, channels*2);
-  aubio_filter_set_adsgn (f);
+  aubio_filter_set_a_weighting (f);
   del_aubio_filter (f);
 
   return 0;
index bcf952f81fe5f140e4d44b5c6c4018df3b40a0a6..718e61869ea36f5225e3f3b2e7df7435d4f58acd 100644 (file)
@@ -10,26 +10,26 @@ int main(){
   uint_t channels = 2;
 
   for ( samplerate = rates[i]; i < nrates ; i++ ) {
-    f = new_aubio_filter_cdsgn (samplerate, channels);
+    f = new_aubio_filter_c_weighting (samplerate, channels);
     del_aubio_filter (f);
 
     f = new_aubio_filter (samplerate, 5, channels*2);
-    aubio_filter_set_cdsgn (f);
+    aubio_filter_set_c_weighting (f);
     del_aubio_filter (f);
   }
 
   // samplerate unknown
-  f = new_aubio_filter_cdsgn (12089, channels);
+  f = new_aubio_filter_c_weighting (12089, channels);
   del_aubio_filter (f);
 
   // order to small
   f = new_aubio_filter (samplerate, 2, channels*2);
-  aubio_filter_set_cdsgn (f);
+  aubio_filter_set_c_weighting (f);
   del_aubio_filter (f);
 
   // order to big
   f = new_aubio_filter (samplerate, 12, channels*2);
-  aubio_filter_set_cdsgn (f);
+  aubio_filter_set_c_weighting (f);
   del_aubio_filter (f);
 
   return 0;
index 45e67ca7308f79e3efb8ba122cbdcbeaaab67b8c..c2847b5207b94ec53ed39643033f2b213cf770c2 100644 (file)
@@ -8,7 +8,7 @@ int main(){
         fvec_t * out      = new_fvec (win_s, channels);     /* input buffer */
   
         /* allocate fft and other memory space */
-        aubio_filter_t * o = new_aubio_filter_cdsgn (44100, channels);
+        aubio_filter_t * o = new_aubio_filter_c_weighting (44100, channels);
 
         aubio_filter_do(o,in);
         aubio_filter_do_outplace(o,in,out);