Ardour  9.0-pre0-582-g084a23a80d
midi_playlist.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2016 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
5  * Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
6  * Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #pragma once
24 
25 #include <vector>
26 #include <list>
27 
28 #include "evoral/Parameter.h"
29 
30 #include "ardour/ardour.h"
31 #include "ardour/midi_cursor.h"
32 #include "ardour/midi_model.h"
34 #include "ardour/playlist.h"
35 #include "evoral/Note.h"
36 #include "evoral/Parameter.h"
37 #include "ardour/rt_midibuffer.h"
38 
39 namespace Evoral {
40 template<typename Time> class EventSink;
41 class Beats;
42 }
43 
44 namespace ARDOUR
45 {
46 
47 class MidiChannelFilter;
48 class MidiRegion;
49 class Session;
50 class Source;
51 
52 template<typename T> class MidiRingBuffer;
53 
55 {
56 public:
57  MidiPlaylist (Session&, const XMLNode&, bool hidden = false);
58  MidiPlaylist (Session&, std::string name, bool hidden = false);
59  MidiPlaylist (std::shared_ptr<const MidiPlaylist> other, std::string name, bool hidden = false);
60 
62  MidiPlaylist (std::shared_ptr<const MidiPlaylist> other,
63  timepos_t const & start,
64  timepos_t const & cnt,
65  std::string name,
66  bool hidden = false);
67 
69 
72 
73  int set_state (const XMLNode&, int version);
74 
75  bool destroy_region (std::shared_ptr<Region>);
76 
77  void _split_region (std::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist);
78 
79  void set_note_mode (NoteMode m) { _note_mode = m; }
80 
81  std::set<Evoral::Parameter> contained_automation();
82 
83  std::shared_ptr<Region> combine (const RegionList&, std::shared_ptr<Track>);
84  void uncombine (std::shared_ptr<Region>);
85 
86  private:
87  void dump () const;
88 
90 
92 };
93 
94 } /* namespace ARDOUR */
95 
int set_state(const XMLNode &, int version)
void uncombine(std::shared_ptr< Region >)
MidiPlaylist(std::shared_ptr< const MidiPlaylist > other, timepos_t const &start, timepos_t const &cnt, std::string name, bool hidden=false)
MidiPlaylist(Session &, std::string name, bool hidden=false)
bool destroy_region(std::shared_ptr< Region >)
RTMidiBuffer * rendered()
RTMidiBuffer _rendered
Definition: midi_playlist.h:91
void render(MidiChannelFilter *)
MidiPlaylist(Session &, const XMLNode &, bool hidden=false)
void set_note_mode(NoteMode m)
Definition: midi_playlist.h:79
std::shared_ptr< Region > combine(const RegionList &, std::shared_ptr< Track >)
void _split_region(std::shared_ptr< Region >, timepos_t const &position, ThawList &thawlist)
MidiPlaylist(std::shared_ptr< const MidiPlaylist > other, std::string name, bool hidden=false)
std::set< Evoral::Parameter > contained_automation()
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
PBD::PropertyDescriptor< bool > hidden
PBD::PropertyDescriptor< timepos_t > start
std::list< std::shared_ptr< Region > > RegionList
Definition: editor.h:86
DebugBits Beats
DebugBits MidiRingBuffer