From eaae38ba842c4acf079fbc6e405af433576ad16e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 25 Oct 2019 13:41:33 -0600 Subject: move evoral/src/* to evoral/ --- libs/evoral/Sequence.cc | 1422 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1422 insertions(+) create mode 100644 libs/evoral/Sequence.cc (limited to 'libs/evoral/Sequence.cc') diff --git a/libs/evoral/Sequence.cc b/libs/evoral/Sequence.cc new file mode 100644 index 0000000000..a1f166cd77 --- /dev/null +++ b/libs/evoral/Sequence.cc @@ -0,0 +1,1422 @@ +/* + * Copyright (C) 2008-2012 Hans Baier + * Copyright (C) 2008-2016 David Robillard + * Copyright (C) 2008-2017 Paul Davis + * Copyright (C) 2009-2011 Carl Hetherington + * Copyright (C) 2014-2019 Robin Gareus + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#if __clang__ +#include "evoral/Note.h" +#endif + +#include "pbd/compose.h" +#include "pbd/error.h" + +#include "temporal/beats.h" + +#include "evoral/Control.h" +#include "evoral/ControlList.h" +#include "evoral/ControlSet.h" +#include "evoral/EventSink.h" +#include "evoral/ParameterDescriptor.h" +#include "evoral/Sequence.h" +#include "evoral/TypeMap.h" +#include "evoral/midi_util.h" + +#include "pbd/i18n.h" + +using namespace std; +using namespace PBD; + +/** Minimum time between MIDI outputs from a single interpolated controller, + expressed in beats. This is to limit the rate at which MIDI messages + are generated. It is only applied to interpolated controllers. + + XXX: This is a hack. The time should probably be expressed in + seconds rather than beats, and should be configurable etc. etc. +*/ +static double const time_between_interpolated_controller_outputs = 1.0 / 256; + +namespace Evoral { + +// Read iterator (const_iterator) + +template +Sequence