cannam@18: #ifndef _CLUSTER_SEGMENTER_H
cannam@18: #define _CLUSTER_SEGMENTER_H
cannam@18: 
cannam@18: /*
cannam@18:  *  cluster_segmenter.h
cannam@18:  *  soundbite
cannam@18:  *
cannam@18:  *  Created by Mark Levy on 06/04/2006.
Chris@84:  *  Copyright 2006 Centre for Digital Music, Queen Mary, University of London.
Chris@84: 
Chris@84:     This program is free software; you can redistribute it and/or
Chris@84:     modify it under the terms of the GNU General Public License as
Chris@84:     published by the Free Software Foundation; either version 2 of the
Chris@84:     License, or (at your option) any later version.  See the file
Chris@84:     COPYING included with this distribution for more information.
cannam@18:  *
cannam@18:  */
cannam@18: 
cannam@18: #include <stdio.h>
cannam@18: #include <stdlib.h>
cannam@18: #include <math.h>
cannam@18: #include <float.h>
cannam@18: 
cannam@18: #include "segment.h"
cannam@18: #include "cluster_melt.h"
cannam@20: #include "hmm/hmm.h"
cannam@20: #include "maths/pca/pca.h"
cannam@20: 
cannam@20: #ifdef __cplusplus
cannam@20: extern "C" {
cannam@20: #endif
cannam@18: 
cannam@18: /* applies MPEG-7 normalisation to constant-Q features, storing normalised envelope (norm) in last feature dimension */
cannam@18: void mpeg7_constq(double** features, int nframes, int ncoeff);
cannam@18: 
cannam@18: /* converts constant-Q features to normalised chroma */
cannam@18: void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma);
cannam@18: 
cannam@18: void create_histograms(int* x, int nx, int m, int hlen, double* h);
cannam@18: 
cannam@18: void cluster_segment(int* q, double** features, int frames_read, int feature_length, int nHMM_states, 
cannam@18: 					 int histogram_length, int nclusters, int neighbour_limit);
cannam@18: 
cannam@18: void constq_segment(int* q, double** features, int frames_read, int bins, int ncoeff, int feature_type, 
cannam@18: 			 int nHMM_states, int histogram_length, int nclusters, int neighbour_limit);
cannam@18: 
cannam@20: #ifdef __cplusplus
cannam@20: }
cannam@20: #endif
cannam@18: 
cannam@20: #endif