annotate dsp/segmentation/Segmenter.cpp @ 251:c3600d3cfe5c

* Add timbral (MFCC) feature option to segmenter
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 10 Jan 2008 16:41:33 +0000
parents dc30e3864ceb
children 67899fda84f5
rev   line source
c@243 1 /*
c@243 2 * Segmenter.cpp
c@243 3 * soundbite
c@243 4 *
c@243 5 * Created by Mark Levy on 04/04/2006.
c@243 6 * Copyright 2006 Centre for Digital Music, Queen Mary, University of London. All rights reserved.
c@243 7 *
c@243 8 */
c@243 9
c@243 10 #include <iomanip>
c@243 11
c@243 12 #include "Segmenter.h"
c@243 13
c@243 14 ostream& operator<<(ostream& os, const Segmentation& s)
c@243 15 {
c@243 16 os << "structure_name : begin_time end_time\n";
c@243 17
c@243 18 for (int i = 0; i < s.segments.size(); i++)
c@243 19 {
c@243 20 Segment seg = s.segments[i];
c@243 21 os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate)
c@243 22 << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n";
c@243 23 }
c@243 24
c@243 25 return os;
c@243 26 }