plugins/qm-dsp/dsp/segmentation/cluster_segmenter.c
/* converts constant-Q features to normalised chroma */
converts constant-Q features to normalised chroma
converts constant - Q features to normalised chroma
void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma)
{
    int noct = ncoeff / bins;       
    int t, b, oct, ix;
    for (t = 0; t < nframes; t++) {
        for (b = 0; b < bins; b++) {
            chroma[t][b] = 0;
        }
        for (oct = 0; oct < noct; oct++) {
            ix = oct * bins;
            for (b = 0; b < bins; b++) {
                chroma[t][b] += fabs(cq[t][ix+b]);
            }
        }
    }
}
void cq2chroma ( double * * cq , int nframes , int ncoeff , int bins , double * * chroma ) { int noct = ncoeff / bins ; int t , b , oct , ix ; for ( t = 0 ; t < nframes ; t ++ ) { for ( b = 0 ; b < bins ; b ++ ) { chroma [ t ] [ b ] = 0 ; } for ( oct = 0 ; oct < noct ; oct ++ ) { ix = oct * bins ; for ( b = 0 ; b < bins ; b ++ ) { chroma [ t ] [ b ] += fabs ( cq [ t ] [ ix + b ] ) ; } } } }
converts constant-Q features to normalised chroma
converts constant - Q features to normalised chroma
/* number of complete octaves in constant-Q */