aubio
0.4.1
|
00001 /* 00002 Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org> 00003 00004 This file is part of aubio. 00005 00006 aubio is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 aubio is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with aubio. If not, see <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00021 /** \file 00022 00023 Transient / Steady-state Separation (TSS) 00024 00025 This file implement a Transient / Steady-state Separation (TSS) as described 00026 in: 00027 00028 Christopher Duxbury, Mike E. Davies, and Mark B. Sandler. Separation of 00029 transient information in musical audio using multiresolution analysis 00030 techniques. In Proceedings of the Digital Audio Effects Conference, DAFx-01, 00031 pages 1--5, Limerick, Ireland, 2001. 00032 00033 Available at http://www.csis.ul.ie/dafx01/proceedings/papers/duxbury.pdf 00034 00035 \example spectral/test-tss.c 00036 00037 */ 00038 00039 #ifndef _AUBIO_TSS_H 00040 #define _AUBIO_TSS_H 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /** Transient / Steady-state Separation object */ 00047 typedef struct _aubio_tss_t aubio_tss_t; 00048 00049 /** create tss object 00050 00051 \param buf_size buffer size 00052 \param hop_size step size 00053 00054 */ 00055 aubio_tss_t *new_aubio_tss (uint_t buf_size, uint_t hop_size); 00056 00057 /** delete tss object 00058 00059 \param o tss object as returned by new_aubio_tss() 00060 00061 */ 00062 void del_aubio_tss (aubio_tss_t * o); 00063 00064 /** split input into transient and steady states components 00065 00066 \param o tss object as returned by new_aubio_tss() 00067 \param input input spectral frame 00068 \param trans output transient components 00069 \param stead output steady state components 00070 00071 */ 00072 void aubio_tss_do (aubio_tss_t * o, cvec_t * input, cvec_t * trans, 00073 cvec_t * stead); 00074 00075 /** set transient / steady state separation threshold 00076 00077 \param o tss object as returned by new_aubio_tss() 00078 \param thrs new threshold value 00079 00080 */ 00081 uint_t aubio_tss_set_threshold (aubio_tss_t * o, smpl_t thrs); 00082 00083 /** set parameter a, defaults to 3 00084 00085 \param o tss object as returned by new_aubio_tss() 00086 \param alpha new value for alpha parameter 00087 00088 */ 00089 uint_t aubio_tss_set_alpha (aubio_tss_t * o, smpl_t alpha); 00090 00091 /** set parameter b, defaults to 3 00092 00093 \param o tss object as returned by new_aubio_tss() 00094 \param beta new value for beta parameter 00095 00096 */ 00097 uint_t aubio_tss_set_beta (aubio_tss_t * o, smpl_t beta); 00098 00099 #ifdef __cplusplus 00100 } 00101 #endif 00102 00103 #endif /* _AUBIO_TSS_H */