ardour
|
#include <Sequence.hpp>
Classes | |
class | const_iterator |
struct | EarlierNoteComparator |
struct | EarlierPatchChangeComparator |
struct | EarlierSysExComparator |
struct | LaterNoteComparator |
struct | LaterNoteEndComparator |
struct | NoteNumberComparator |
struct | WriteLockImpl |
Public Member Functions | |
Sequence (const TypeMap &type_map) | |
Sequence (const Sequence< Time > &other) | |
virtual ReadLock | read_lock () const |
virtual WriteLock | write_lock () |
void | clear () |
bool | percussive () const |
void | set_percussive (bool p) |
void | start_write () |
bool | writing () const |
void | end_write (StuckNoteOption, Time when=Time()) |
void | append (const Event< Time > &ev, Evoral::event_id_t evid) |
const TypeMap & | type_map () const |
size_t | n_notes () const |
bool | empty () const |
Notes & | notes () |
const Notes & | notes () const |
void | get_notes (Notes &, NoteOperator, uint8_t val, int chan_mask=0) const |
void | remove_overlapping_notes () |
void | trim_overlapping_notes () |
void | remove_duplicate_notes () |
bool | overlapping_pitches_accepted () const |
void | overlapping_pitches_accepted (bool yn) |
OverlapPitchResolution | overlap_pitch_resolution () const |
void | set_overlap_pitch_resolution (OverlapPitchResolution opr) |
void | set_notes (const typename Sequence< Time >::Notes &n) |
SysExes & | sysexes () |
const SysExes & | sysexes () const |
PatchChanges & | patch_changes () |
const PatchChanges & | patch_changes () const |
void | dump (std::ostream &) const |
const_iterator | begin (Time t=Time(), bool force_discrete=false, const std::set< Evoral::Parameter > &f=std::set< Evoral::Parameter >(), const std::set< WeakNotePtr > *active_notes=NULL) const |
const const_iterator & | end () const |
Notes::const_iterator | note_lower_bound (Time t) const |
PatchChanges::const_iterator | patch_change_lower_bound (Time t) const |
SysExes::const_iterator | sysex_lower_bound (Time t) const |
Notes::iterator | note_lower_bound (Time t) |
PatchChanges::iterator | patch_change_lower_bound (Time t) |
SysExes::iterator | sysex_lower_bound (Time t) |
bool | control_to_midi_event (boost::shared_ptr< Event< Time > > &ev, const ControlIterator &iter) const |
bool | edited () const |
void | set_edited (bool yn) |
bool | overlaps (const NotePtr &ev, const NotePtr &ignore_this_note) const |
bool | contains (const NotePtr &ev) const |
bool | add_note_unlocked (const NotePtr note, void *arg=0) |
void | remove_note_unlocked (const constNotePtr note) |
void | add_patch_change_unlocked (const PatchChangePtr) |
void | remove_patch_change_unlocked (const constPatchChangePtr) |
void | add_sysex_unlocked (const SysExPtr) |
void | remove_sysex_unlocked (const SysExPtr) |
uint8_t | lowest_note () const |
uint8_t | highest_note () const |
Public Member Functions inherited from Evoral::ControlSet | |
ControlSet () | |
ControlSet (const ControlSet &) | |
virtual | ~ControlSet () |
virtual boost::shared_ptr < Evoral::Control > | control_factory (const Evoral::Parameter &id)=0 |
boost::shared_ptr< Control > | control (const Parameter &id, bool create_if_missing=false) |
boost::shared_ptr< const Control > | control (const Parameter &id) const |
Controls & | controls () |
const Controls & | controls () const |
virtual void | add_control (boost::shared_ptr< Control >) |
bool | find_next_event (double start, double end, ControlEvent &ev) const |
virtual bool | controls_empty () const |
virtual void | clear_controls () |
void | what_has_data (std::set< Parameter > &) const |
Glib::Threads::Mutex & | control_lock () const |
Static Public Member Functions | |
static bool | note_time_comparator (const boost::shared_ptr< const Note< Time > > &a, const boost::shared_ptr< const Note< Time > > &b) |
Protected Types | |
typedef std::multiset< NotePtr, NoteNumberComparator > | Pitches |
Protected Member Functions | |
virtual int | resolve_overlaps_unlocked (const NotePtr, void *=0) |
Pitches & | pitches (uint8_t chan) |
const Pitches & | pitches (uint8_t chan) const |
virtual void | control_list_marked_dirty () |
Protected Member Functions inherited from Evoral::ControlSet | |
virtual void | control_list_interpolation_changed (Parameter, ControlList::InterpolationStyle) |
Protected Attributes | |
bool | _edited |
bool | _overlapping_pitches_accepted |
OverlapPitchResolution | _overlap_pitch_resolution |
Glib::Threads::RWLock | _lock |
bool | _writing |
Protected Attributes inherited from Evoral::ControlSet | |
Glib::Threads::Mutex | _control_lock |
Controls | _controls |
PBD::ScopedConnectionList | _list_connections |
Private Types | |
typedef std::priority_queue < NotePtr, std::deque< NotePtr > , LaterNoteEndComparator > | ActiveNotes |
typedef std::multiset< NotePtr, EarlierNoteComparator > | WriteNotes |
Private Member Functions | |
bool | overlaps_unlocked (const NotePtr &ev, const NotePtr &ignore_this_note) const |
bool | contains_unlocked (const NotePtr &ev) const |
void | append_note_on_unlocked (const MIDIEvent< Time > &event, Evoral::event_id_t) |
void | append_note_off_unlocked (const MIDIEvent< Time > &event) |
void | append_control_unlocked (const Parameter ¶m, Time time, double value, Evoral::event_id_t) |
void | append_sysex_unlocked (const MIDIEvent< Time > &ev, Evoral::event_id_t) |
void | append_patch_change_unlocked (const PatchChange< Time > &, Evoral::event_id_t) |
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 |
Private Attributes | |
const TypeMap & | _type_map |
Notes | _notes |
Pitches | _pitches [16] |
SysExes | _sysexes |
PatchChanges | _patch_changes |
WriteNotes | _write_notes [16] |
int | _bank [16] |
const const_iterator | _end_iter |
bool | _percussive |
uint8_t | _lowest_note |
uint8_t | _highest_note |
Friends | |
class | const_iterator |
This is a higher level view of events, with separate representations for notes (instead of just unassociated note on/off events) and controller data. Controller data is represented as a list of time-stamped float values.
Definition at line 65 of file Sequence.hpp.
|
private |
Definition at line 217 of file Sequence.hpp.
typedef boost::shared_ptr<const Evoral::Note<Time> > Evoral::Sequence< Time >::constNotePtr |
Definition at line 87 of file Sequence.hpp.
typedef boost::shared_ptr<const PatchChange<Time> > Evoral::Sequence< Time >::constPatchChangePtr |
Definition at line 202 of file Sequence.hpp.
typedef boost::shared_ptr<const Event<Time> > Evoral::Sequence< Time >::constSysExPtr |
Definition at line 189 of file Sequence.hpp.
typedef boost::shared_ptr<Evoral::Note<Time> > Evoral::Sequence< Time >::NotePtr |
Definition at line 85 of file Sequence.hpp.
typedef std::multiset<NotePtr, EarlierNoteComparator> Evoral::Sequence< Time >::Notes |
Definition at line 153 of file Sequence.hpp.
typedef boost::shared_ptr<PatchChange<Time> > Evoral::Sequence< Time >::PatchChangePtr |
Definition at line 201 of file Sequence.hpp.
typedef std::multiset<PatchChangePtr, EarlierPatchChangeComparator> Evoral::Sequence< Time >::PatchChanges |
Definition at line 210 of file Sequence.hpp.
|
protected |
Definition at line 326 of file Sequence.hpp.
typedef boost::shared_ptr<Glib::Threads::RWLock::ReaderLock> Evoral::Sequence< Time >::ReadLock |
Definition at line 89 of file Sequence.hpp.
typedef std::multiset<SysExPtr, EarlierSysExComparator> Evoral::Sequence< Time >::SysExes |
Definition at line 197 of file Sequence.hpp.
typedef boost::shared_ptr< Event<Time> > Evoral::Sequence< Time >::SysExPtr |
Definition at line 188 of file Sequence.hpp.
typedef boost::weak_ptr<Evoral::Note<Time> > Evoral::Sequence< Time >::WeakNotePtr |
Definition at line 86 of file Sequence.hpp.
typedef boost::shared_ptr<WriteLockImpl> Evoral::Sequence< Time >::WriteLock |
Definition at line 90 of file Sequence.hpp.
|
private |
Definition at line 354 of file Sequence.hpp.
enum Evoral::Sequence::NoteOperator |
Enumerator | |
---|---|
PitchEqual | |
PitchLessThan | |
PitchLessThanOrEqual | |
PitchGreater | |
PitchGreaterThanOrEqual | |
VelocityEqual | |
VelocityLessThan | |
VelocityLessThanOrEqual | |
VelocityGreater | |
VelocityGreaterThanOrEqual |
Definition at line 157 of file Sequence.hpp.
enum Evoral::Sequence::OverlapPitchResolution |
Enumerator | |
---|---|
LastOnFirstOff | |
FirstOnFirstOff |
Definition at line 176 of file Sequence.hpp.
enum Evoral::Sequence::StuckNoteOption |
Enumerator | |
---|---|
Relax | |
DeleteStuckNotes | |
ResolveStuckNotes |
Definition at line 103 of file Sequence.hpp.
Sequence::Sequence | ( | const TypeMap & | type_map | ) |
Definition at line 459 of file Sequence.cpp.
Sequence::Sequence | ( | const Sequence< Time > & | other | ) |
Definition at line 480 of file Sequence.cpp.
bool Sequence::add_note_unlocked | ( | const NotePtr | note, |
void * | arg = 0 |
||
) |
Definition at line 679 of file Sequence.cpp.
void Sequence::add_patch_change_unlocked | ( | const PatchChangePtr | p | ) |
Definition at line 1081 of file Sequence.cpp.
void Sequence::add_sysex_unlocked | ( | const SysExPtr | s | ) |
Definition at line 1092 of file Sequence.cpp.
void Sequence::append | ( | const Event< Time > & | event, |
Evoral::event_id_t | evid | ||
) |
Append ev to model. NOT realtime safe.
The timestamp of event is expected to be relative to the start of this model (t=0) and MUST be monotonically increasing and MUST be >= the latest event currently in the model.
Definition at line 889 of file Sequence.cpp.
|
private |
Definition at line 1041 of file Sequence.cpp.
|
private |
Definition at line 985 of file Sequence.cpp.
|
private |
Definition at line 953 of file Sequence.cpp.
|
private |
Definition at line 1068 of file Sequence.cpp.
|
private |
Definition at line 1052 of file Sequence.cpp.
|
inline |
Definition at line 272 of file Sequence.hpp.
void Sequence::clear | ( | ) |
Clear all events from the model.
Definition at line 596 of file Sequence.cpp.
bool Sequence::contains | ( | const NotePtr & | ev | ) | const |
Definition at line 1103 of file Sequence.cpp.
|
private |
Definition at line 1111 of file Sequence.cpp.
|
protectedvirtual |
Reimplemented from Evoral::ControlSet.
Reimplemented in ARDOUR::MidiModel.
Definition at line 1375 of file Sequence.cpp.
bool Sequence::control_to_midi_event | ( | boost::shared_ptr< Event< Time > > & | ev, |
const ControlIterator & | iter | ||
) | const |
Write the controller event pointed to by iter to ev. The buffer of ev will be allocated or resized as necessary. The event_type of ev should be set to the expected output type.
Definition at line 523 of file Sequence.cpp.
void Sequence::dump | ( | std::ostream & | ) | const |
Definition at line 1382 of file Sequence.cpp.
|
inline |
Definition at line 295 of file Sequence.hpp.
|
inline |
Definition at line 116 of file Sequence.hpp.
|
inline |
Definition at line 280 of file Sequence.hpp.
void Sequence::end_write | ( | StuckNoteOption | option, |
Time | when = Time() |
||
) |
Finish a write of events to the model.
If delete_stuck is true and the current mode is Sustained, note on events that were never resolved with a corresonding note off will be deleted. Otherwise they will remain as notes with length 0.
Definition at line 631 of file Sequence.cpp.
void Sequence::get_notes | ( | Notes & | n, |
NoteOperator | op, | ||
uint8_t | val, | ||
int | chan_mask = 0 |
||
) | const |
Definition at line 1245 of file Sequence.cpp.
|
private |
Definition at line 1268 of file Sequence.cpp.
|
private |
Definition at line 1320 of file Sequence.cpp.
|
inline |
Definition at line 312 of file Sequence.hpp.
|
inline |
Definition at line 311 of file Sequence.hpp.
|
inline |
Definition at line 115 of file Sequence.hpp.
Sequence< Time >::Notes::const_iterator Sequence::note_lower_bound | ( | Time | t | ) | const |
Return the earliest note with time >= t
Definition at line 1178 of file Sequence.cpp.
Sequence< Time >::Notes::iterator Sequence::note_lower_bound | ( | Time | t | ) |
Return the earliest note with time >= t
Definition at line 1213 of file Sequence.cpp.
|
inlinestatic |
Definition at line 118 of file Sequence.hpp.
|
inline |
Definition at line 154 of file Sequence.hpp.
|
inline |
Definition at line 155 of file Sequence.hpp.
|
inline |
Definition at line 183 of file Sequence.hpp.
|
inline |
Definition at line 181 of file Sequence.hpp.
|
inline |
Definition at line 182 of file Sequence.hpp.
bool Sequence::overlaps | ( | const NotePtr & | ev, |
const NotePtr & | ignore_this_note | ||
) | const |
Definition at line 1129 of file Sequence.cpp.
|
private |
Definition at line 1137 of file Sequence.cpp.
Sequence< Time >::PatchChanges::const_iterator Sequence::patch_change_lower_bound | ( | Time | t | ) | const |
Return the earliest patch change with time >= t
Definition at line 1189 of file Sequence.cpp.
Sequence< Time >::PatchChanges::iterator Sequence::patch_change_lower_bound | ( | Time | t | ) |
Return the earliest patch change with time >= t
Definition at line 1224 of file Sequence.cpp.
|
inline |
Definition at line 211 of file Sequence.hpp.
|
inline |
Definition at line 212 of file Sequence.hpp.
|
inline |
Definition at line 97 of file Sequence.hpp.
|
inlineprotected |
Definition at line 327 of file Sequence.hpp.
|
inlineprotected |
Definition at line 328 of file Sequence.hpp.
|
inlinevirtual |
Definition at line 92 of file Sequence.hpp.
void Evoral::Sequence< Time >::remove_duplicate_notes | ( | ) |
void Sequence::remove_note_unlocked | ( | const constNotePtr | note | ) |
Definition at line 710 of file Sequence.cpp.
void Evoral::Sequence< Time >::remove_overlapping_notes | ( | ) |
void Sequence::remove_patch_change_unlocked | ( | const constPatchChangePtr | p | ) |
Definition at line 846 of file Sequence.cpp.
void Sequence::remove_sysex_unlocked | ( | const SysExPtr | sysex | ) |
Definition at line 865 of file Sequence.cpp.
|
inlineprotectedvirtual |
Reimplemented in ARDOUR::MidiModel.
Definition at line 322 of file Sequence.hpp.
|
inline |
Definition at line 296 of file Sequence.hpp.
Definition at line 1168 of file Sequence.cpp.
void Sequence::set_overlap_pitch_resolution | ( | OverlapPitchResolution | opr | ) |
Definition at line 1366 of file Sequence.cpp.
|
inline |
Definition at line 98 of file Sequence.hpp.
void Sequence::start_write | ( | ) |
Begin a write of events to the model.
If mode is Sustained, complete notes with length are constructed as note on/off events are received. Otherwise (Percussive), only note on events are stored; note off events are discarded entirely and all contained notes will have length 0.
Definition at line 613 of file Sequence.cpp.
Sequence< Time >::SysExes::const_iterator Sequence::sysex_lower_bound | ( | Time | t | ) | const |
Return the earliest sysex with time >= t
Definition at line 1200 of file Sequence.cpp.
Sequence< Time >::SysExes::iterator Sequence::sysex_lower_bound | ( | Time | t | ) |
Return the earliest sysex with time >= t
Definition at line 1235 of file Sequence.cpp.
|
inline |
Definition at line 198 of file Sequence.hpp.
|
inline |
Definition at line 199 of file Sequence.hpp.
void Evoral::Sequence< Time >::trim_overlapping_notes | ( | ) |
|
inline |
Definition at line 113 of file Sequence.hpp.
|
inlinevirtual |
Definition at line 93 of file Sequence.hpp.
|
inline |
Definition at line 101 of file Sequence.hpp.
|
friend |
Definition at line 333 of file Sequence.hpp.
|
private |
Current bank number on each channel so that we know what to put in PatchChange events when program changes are seen.
Definition at line 361 of file Sequence.hpp.
|
protected |
Definition at line 316 of file Sequence.hpp.
|
private |
Definition at line 363 of file Sequence.hpp.
|
private |
Definition at line 367 of file Sequence.hpp.
|
mutableprotected |
Definition at line 319 of file Sequence.hpp.
|
private |
Definition at line 366 of file Sequence.hpp.
|
private |
Definition at line 349 of file Sequence.hpp.
|
protected |
Definition at line 318 of file Sequence.hpp.
|
protected |
Definition at line 317 of file Sequence.hpp.
|
private |
Definition at line 352 of file Sequence.hpp.
|
private |
Definition at line 364 of file Sequence.hpp.
|
private |
Definition at line 350 of file Sequence.hpp.
|
private |
Definition at line 351 of file Sequence.hpp.
|
private |
Definition at line 347 of file Sequence.hpp.
|
private |
Definition at line 355 of file Sequence.hpp.
|
protected |
Definition at line 320 of file Sequence.hpp.