source: src/temporal/adesign.c @ 4123f16

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 4123f16 was 4f4d892, checked in by Paul Brossier <piem@piem.org>, 17 years ago

src/temporal: split aubio_adsgn_filter and aubio_cdsgn_filter to separate files

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2   Copyright (C) 2003-2007 Paul Brossier
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18*/
19
20
21#include "aubio_priv.h"
22#include "types.h"
23#include "fvec.h"
24#include "temporal/filter.h"
25#include "temporal/filter_priv.h"
26#include "temporal/adesign.h"
27
28aubio_filter_t * new_aubio_adsgn_filter(uint_t samplerate) {
29  aubio_filter_t * f = new_aubio_filter(samplerate, 7);
30  lsmp_t * a = f->a;
31  lsmp_t * b = f->b;
32  /* uint_t l; */
33  /* for now, 44100, adsgn */
34  a[0] =  1.00000000000000000000000000000000000000000000000000000; 
35  a[1] = -4.01957618111583236952810693765059113502502441406250000; 
36  a[2] =  6.18940644292069386267485242569819092750549316406250000; 
37  a[3] = -4.45319890354411640487342083360999822616577148437500000; 
38  a[4] =  1.42084294962187751565352300531230866909027099609375000; 
39  a[5] = -0.14182547383030480458998567883099894970655441284179688; 
40  a[6] =  0.00435117723349511334451911181986361043527722358703613; 
41  b[0] =  0.25574112520425740235907596797915175557136535644531250;
42  b[1] = -0.51148225040851391653973223583307117223739624023437500;
43  b[2] = -0.25574112520426162120656954357400536537170410156250000;
44  b[3] =  1.02296450081703405032840237254276871681213378906250000;
45  b[4] = -0.25574112520426051098354491841746494174003601074218750;
46  b[5] = -0.51148225040851369449512731080176308751106262207031250;
47  b[6] =  0.25574112520425729133677350546349771320819854736328125;
48  /* DBG: filter coeffs at creation time */
49  /*
50  for (l=0; l<f->order; l++){
51    AUBIO_DBG("a[%d]=\t%1.16f\tb[%d]=\t%1.16f\n",l,a[l],l,b[l]);
52  }
53  */
54  f->a = a;
55  f->b = b;
56  return f;
57}
58
Note: See TracBrowser for help on using the repository browser.