Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::MidiModel::NoteDiffCommand Class Reference

#include <midi_model.h>

Inheritance diagram for ARDOUR::MidiModel::NoteDiffCommand:
[legend]

Classes

struct  NoteChange
 

Public Types

enum  Property {
  NoteNumber , Velocity , StartTime , Length ,
  Channel
}
 
typedef std::list< NoteChangeChangeList
 
typedef std::list< std::shared_ptr< Evoral::Note< TimeType > > > NoteList
 

Public Member Functions

 NoteDiffCommand (std::shared_ptr< MidiModel > m, const std::string &name)
 
 NoteDiffCommand (std::shared_ptr< MidiModel > m, const XMLNode &node)
 
void operator() ()
 
void undo ()
 
int set_state (const XMLNode &, int version)
 
XMLNodeget_state () const
 
void add (const NotePtr note)
 
void remove (const NotePtr note)
 
void side_effect_remove (const NotePtr note)
 
void change (const NotePtr note, Property prop, uint8_t new_value)
 
void change (const NotePtr note, Property prop, TimeType new_time)
 
void change (const NotePtr note, Property prop, const Variant &new_value)
 
bool adds_or_removes () const
 
NoteDiffCommandoperator+= (const NoteDiffCommand &other)
 
const ChangeListchanges () const
 
const NoteListadded_notes () const
 
const NoteListremoved_notes () const
 
- Public Member Functions inherited from ARDOUR::MidiModel::DiffCommand
 DiffCommand (std::shared_ptr< MidiModel > m, const std::string &name)
 
const std::string & name () const
 
std::shared_ptr< MidiModelmodel () const
 
- Public Member Functions inherited from PBD::Command
virtual ~Command ()
 
void set_name (const std::string &str)
 
const std::string & name () const
 
virtual void redo ()
 
virtual bool empty () const
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_change (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (PBD::Command *) const
 
virtual void rdiff (std::vector< PBD::Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
virtual ~Destructible ()
 
virtual void drop_references ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Static Public Member Functions

static Variant get_value (const NotePtr note, Property prop)
 
static Variant::Type value_type (Property prop)
 

Private Member Functions

XMLNodemarshal_change (const NoteChange &) const
 
NoteChange unmarshal_change (XMLNode *xml_note)
 
XMLNodemarshal_note (const NotePtr note) const
 
NotePtr unmarshal_note (XMLNode *xml_note)
 

Private Attributes

ChangeList _changes
 
NoteList _added_notes
 
NoteList _removed_notes
 
std::set< NotePtrside_effect_removals
 

Additional Inherited Members

- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal< void()> Destroyed
 
PBD::Signal< void()> DropReferences
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 
- Protected Member Functions inherited from PBD::Command
 Command ()
 
 Command (const std::string &name)
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &) const
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
bool regenerate_xml_or_string_ids () const
 
- Protected Attributes inherited from ARDOUR::MidiModel::DiffCommand
std::shared_ptr< MidiModel_model
 
const std::string _name
 
- Protected Attributes inherited from PBD::Command
std::string _name
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 

Detailed Description

Definition at line 90 of file midi_model.h.

Member Typedef Documentation

◆ ChangeList

Definition at line 142 of file midi_model.h.

◆ NoteList

typedef std::list< std::shared_ptr< Evoral::Note<TimeType> > > ARDOUR::MidiModel::NoteDiffCommand::NoteList

Definition at line 143 of file midi_model.h.

Member Enumeration Documentation

◆ Property

Enumerator
NoteNumber 
Velocity 
StartTime 
Length 
Channel 

Definition at line 96 of file midi_model.h.

Constructor & Destructor Documentation

◆ NoteDiffCommand() [1/2]

ARDOUR::MidiModel::NoteDiffCommand::NoteDiffCommand ( std::shared_ptr< MidiModel m,
const std::string &  name 
)
inline

Definition at line 93 of file midi_model.h.

◆ NoteDiffCommand() [2/2]

ARDOUR::MidiModel::NoteDiffCommand::NoteDiffCommand ( std::shared_ptr< MidiModel m,
const XMLNode node 
)

Member Function Documentation

◆ add()

void ARDOUR::MidiModel::NoteDiffCommand::add ( const NotePtr  note)

◆ added_notes()

const NoteList& ARDOUR::MidiModel::NoteDiffCommand::added_notes ( ) const
inline

Definition at line 146 of file midi_model.h.

◆ adds_or_removes()

bool ARDOUR::MidiModel::NoteDiffCommand::adds_or_removes ( ) const
inline

Definition at line 124 of file midi_model.h.

◆ change() [1/3]

void ARDOUR::MidiModel::NoteDiffCommand::change ( const NotePtr  note,
Property  prop,
const Variant new_value 
)

◆ change() [2/3]

void ARDOUR::MidiModel::NoteDiffCommand::change ( const NotePtr  note,
Property  prop,
TimeType  new_time 
)
inline

Definition at line 118 of file midi_model.h.

◆ change() [3/3]

void ARDOUR::MidiModel::NoteDiffCommand::change ( const NotePtr  note,
Property  prop,
uint8_t  new_value 
)
inline

Definition at line 114 of file midi_model.h.

◆ changes()

const ChangeList& ARDOUR::MidiModel::NoteDiffCommand::changes ( ) const
inline

Definition at line 145 of file midi_model.h.

◆ get_state()

XMLNode& ARDOUR::MidiModel::NoteDiffCommand::get_state ( ) const
virtual

◆ get_value()

static Variant ARDOUR::MidiModel::NoteDiffCommand::get_value ( const NotePtr  note,
Property  prop 
)
static

◆ marshal_change()

XMLNode& ARDOUR::MidiModel::NoteDiffCommand::marshal_change ( const NoteChange ) const
private

◆ marshal_note()

XMLNode& ARDOUR::MidiModel::NoteDiffCommand::marshal_note ( const NotePtr  note) const
private

◆ operator()()

void ARDOUR::MidiModel::NoteDiffCommand::operator() ( )
virtual

◆ operator+=()

NoteDiffCommand& ARDOUR::MidiModel::NoteDiffCommand::operator+= ( const NoteDiffCommand other)

◆ remove()

void ARDOUR::MidiModel::NoteDiffCommand::remove ( const NotePtr  note)

◆ removed_notes()

const NoteList& ARDOUR::MidiModel::NoteDiffCommand::removed_notes ( ) const
inline

Definition at line 147 of file midi_model.h.

◆ set_state()

int ARDOUR::MidiModel::NoteDiffCommand::set_state ( const XMLNode ,
int  version 
)
virtual

◆ side_effect_remove()

void ARDOUR::MidiModel::NoteDiffCommand::side_effect_remove ( const NotePtr  note)

◆ undo()

void ARDOUR::MidiModel::NoteDiffCommand::undo ( )
virtual

◆ unmarshal_change()

NoteChange ARDOUR::MidiModel::NoteDiffCommand::unmarshal_change ( XMLNode xml_note)
private

◆ unmarshal_note()

NotePtr ARDOUR::MidiModel::NoteDiffCommand::unmarshal_note ( XMLNode xml_note)
private

◆ value_type()

static Variant::Type ARDOUR::MidiModel::NoteDiffCommand::value_type ( Property  prop)
static

Member Data Documentation

◆ _added_notes

NoteList ARDOUR::MidiModel::NoteDiffCommand::_added_notes
private

Definition at line 151 of file midi_model.h.

◆ _changes

ChangeList ARDOUR::MidiModel::NoteDiffCommand::_changes
private

Definition at line 150 of file midi_model.h.

◆ _removed_notes

NoteList ARDOUR::MidiModel::NoteDiffCommand::_removed_notes
private

Definition at line 152 of file midi_model.h.

◆ side_effect_removals

std::set<NotePtr> ARDOUR::MidiModel::NoteDiffCommand::side_effect_removals
private

Definition at line 154 of file midi_model.h.


The documentation for this class was generated from the following file: