/* This file is part of Evoral.
- * Copyright (C) 2008 Dave Robillard <http://drobilla.net>
+ * Copyright (C) 2008 David Robillard <http://drobilla.net>
* Copyright (C) 2000-2008 Paul Davis
*
* Evoral is free software; you can redistribute it and/or modify it under the
void start_write();
bool writing() const { return _writing; }
- void end_write(bool delete_stuck=false);
+
+ enum StuckNoteOption {
+ Relax,
+ DeleteStuckNotes,
+ ResolveStuckNotes
+ };
+
+ void end_write (StuckNoteOption, Time when = 0);
void append(const Event<Time>& ev, Evoral::event_id_t evid);
inline PatchChanges& patch_changes () { return _patch_changes; }
inline const PatchChanges& patch_changes () const { return _patch_changes; }
+ void dump (std::ostream&) const;
+
private:
typedef std::priority_queue<NotePtr, std::deque<NotePtr>, LaterNoteEndComparator> ActiveNotes;
public:
inline Pitches& pitches(uint8_t chan) { return _pitches[chan&0xf]; }
inline const Pitches& pitches(uint8_t chan) const { return _pitches[chan&0xf]; }
+ virtual void control_list_marked_dirty ();
+
private:
friend class const_iterator;
void get_notes_by_pitch (Notes&, NoteOperator, uint8_t val, int chan_mask = 0) const;
void get_notes_by_velocity (Notes&, NoteOperator, uint8_t val, int chan_mask = 0) const;
- void control_list_marked_dirty ();
-
const TypeMap& _type_map;
Notes _notes; // notes indexed by time
} // namespace Evoral
+// template<typename Time> std::ostream& operator<<(std::ostream& o, const Evoral::Sequence<Time>& s) { s.dump (o); return o; }
+
#endif // EVORAL_SEQUENCE_HPP