~ubuntu-branches/ubuntu/utopic/ardour3/utopic

« back to all changes in this revision

Viewing changes to libs/ardour/ardour/midi_playlist.h

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler
  • Date: 2013-09-21 19:05:02 UTC
  • Revision ID: package-import@ubuntu.com-20130921190502-8gsftrku6jnzhd7v
Tags: upstream-3.4~dfsg
ImportĀ upstreamĀ versionĀ 3.4~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2006 Paul Davis
 
3
    Author: David Robillard
 
4
 
 
5
    This program is free software; you can redistribute it and/or modify
 
6
    it under the terms of the GNU General Public License as published by
 
7
    the Free Software Foundation; either version 2 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program; if not, write to the Free Software
 
17
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
*/
 
19
 
 
20
#ifndef __ardour_midi_playlist_h__
 
21
#define __ardour_midi_playlist_h__
 
22
 
 
23
#include <vector>
 
24
#include <list>
 
25
 
 
26
#include "ardour/ardour.h"
 
27
#include "ardour/playlist.h"
 
28
#include "ardour/midi_state_tracker.h"
 
29
#include "evoral/Parameter.hpp"
 
30
 
 
31
namespace ARDOUR
 
32
{
 
33
 
 
34
class Session;
 
35
class Region;
 
36
class MidiRegion;
 
37
class Source;
 
38
template<typename T> class MidiRingBuffer;
 
39
 
 
40
class MidiPlaylist : public ARDOUR::Playlist
 
41
{
 
42
public:
 
43
        MidiPlaylist (Session&, const XMLNode&, bool hidden = false);
 
44
        MidiPlaylist (Session&, std::string name, bool hidden = false);
 
45
        MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, std::string name, bool hidden = false);
 
46
        MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, framepos_t start, framecnt_t cnt,
 
47
                      std::string name, bool hidden = false);
 
48
 
 
49
        ~MidiPlaylist ();
 
50
 
 
51
        framecnt_t read (Evoral::EventSink<framepos_t>& buf,
 
52
                         framepos_t start, framecnt_t cnt, uint32_t chan_n = 0);
 
53
 
 
54
        int set_state (const XMLNode&, int version);
 
55
 
 
56
        bool destroy_region (boost::shared_ptr<Region>);
 
57
 
 
58
        void set_note_mode (NoteMode m) { _note_mode = m; }
 
59
 
 
60
        std::set<Evoral::Parameter> contained_automation();
 
61
 
 
62
        void clear_note_trackers ();
 
63
 
 
64
protected:
 
65
 
 
66
        void remove_dependents (boost::shared_ptr<Region> region);
 
67
 
 
68
private:
 
69
        void dump () const;
 
70
 
 
71
        bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
 
72
 
 
73
        NoteMode _note_mode;
 
74
 
 
75
        typedef std::map<Region*,MidiStateTracker*> NoteTrackers;
 
76
        NoteTrackers _note_trackers;
 
77
 
 
78
};
 
79
 
 
80
} /* namespace ARDOUR */
 
81
 
 
82
#endif  /* __ardour_midi_playlist_h__ */
 
83
 
 
84