annotate dsp/segmentation/Segmenter.cpp @ 321:f1e6be2de9a5

A threshold (delta) is added in the peak picking parameters structure (PPickParams). It is used as an offset when computing the smoothed detection function. A constructor for the structure PPickParams is also added to set the parameters to 0 when a structure instance is created. Hence programmes using the peak picking parameter structure and which do not set the delta parameter (e.g. QM Vamp note onset detector) won't be affected by the modifications. Functions modified: - dsp/onsets/PeakPicking.cpp - dsp/onsets/PeakPicking.h - dsp/signalconditioning/DFProcess.cpp - dsp/signalconditioning/DFProcess.h
author mathieub <mathieu.barthet@eecs.qmul.ac.uk>
date Mon, 20 Jun 2011 19:01:48 +0100
parents d5014ab8b0e5
children e4a57215ddee
rev   line source
c@243 1 /*
c@243 2 * Segmenter.cpp
c@243 3 *
c@243 4 * Created by Mark Levy on 04/04/2006.
c@309 5 * Copyright 2006 Centre for Digital Music, Queen Mary, University of London.
c@309 6
c@309 7 This program is free software; you can redistribute it and/or
c@309 8 modify it under the terms of the GNU General Public License as
c@309 9 published by the Free Software Foundation; either version 2 of the
c@309 10 License, or (at your option) any later version. See the file
c@309 11 COPYING included with this distribution for more information.
c@243 12 *
c@243 13 */
c@243 14
c@243 15 #include <iomanip>
c@243 16
c@243 17 #include "Segmenter.h"
c@243 18
c@243 19 ostream& operator<<(ostream& os, const Segmentation& s)
c@243 20 {
c@243 21 os << "structure_name : begin_time end_time\n";
c@243 22
c@243 23 for (int i = 0; i < s.segments.size(); i++)
c@243 24 {
c@243 25 Segment seg = s.segments[i];
c@243 26 os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate)
c@243 27 << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n";
c@243 28 }
c@243 29
c@243 30 return os;
c@243 31 }