Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::Step Class Reference

#include <step_sequencer.h>

Inheritance diagram for ARDOUR::Step:
[legend]

Classes

struct  Note
 
struct  ParameterValue
 

Public Types

enum  Mode { AbsolutePitch , RelativePitch }
 
typedef boost::rational< int > DurationRatio
 

Public Member Functions

 Step (StepSequence &, size_t n, Temporal::Beats const &beat, int notenum)
 
 ~Step ()
 
size_t index () const
 
void set_note (double note, double velocity=0.5, int n=0)
 
void set_chord (size_t note_cnt, double *notes)
 
void set_parameter (int number, double value, int n=0)
 
void adjust_velocity (int amt)
 
void adjust_pitch (int amt)
 
void adjust_duration (DurationRatio const &amt)
 
void adjust_octave (int amt)
 
void adjust_offset (double fraction)
 
Mode mode () const
 
void set_mode (Mode m)
 
double note (size_t n=0) const
 
double velocity (size_t n=0) const
 
void set_velocity (double, size_t n=0)
 
DurationRatio duration () const
 
void set_duration (DurationRatio const &)
 
void set_offset (Temporal::Beats const &, size_t n=0)
 
Temporal::Beats offset (size_t n=0) const
 
int parameter (size_t n=0) const
 
int parameter_value (size_t n=0) const
 
void set_enabled (bool)
 
bool enabled () const
 
void set_repeat (size_t r)
 
size_t repeat () const
 
void set_beat (Temporal::Beats const &beat)
 
Temporal::Beats beat () const
 
bool run (MidiBuffer &buf, bool running, samplepos_t, samplepos_t, MidiNoteTracker &)
 
bool skipped () const
 
void set_skipped (bool)
 
void reschedule (Temporal::Beats const &, Temporal::Beats const &)
 
int octave_shift () const
 
void set_octave_shift (int)
 
XMLNodeget_state () const
 
int set_state (XMLNode const &, int)
 
void dump (MusicTimeEvents &, Temporal::Beats const &) 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
 

Static Public Attributes

static const int _notes_per_step = 5
 
static const int _parameters_per_step = 5
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 

Private Member Functions

void check_note (size_t n, MidiBuffer &buf, bool, samplepos_t, samplepos_t, MidiNoteTracker &)
 
void check_parameter (size_t n, MidiBuffer &buf, bool, samplepos_t, samplepos_t)
 
void dump_note (MusicTimeEvents &, size_t n, Temporal::Beats const &) const
 
void dump_parameter (MusicTimeEvents &, size_t n, Temporal::Beats const &) const
 
StepSequencersequencer () const
 

Private Attributes

StepSequence_sequence
 
size_t _index
 
bool _enabled
 
Temporal::Beats _nominal_beat
 
Temporal::Beats _scheduled_beat
 
bool _skipped
 
Mode _mode
 
int _octave_shift
 
DurationRatio _duration
 
Note _notes [_notes_per_step]
 
ParameterValue _parameters [_parameters_per_step]
 
size_t _repeat
 

Friends

class StepSequence
 

Additional Inherited Members

- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- 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 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 59 of file step_sequencer.h.

Member Typedef Documentation

◆ DurationRatio

typedef boost::rational<int> ARDOUR::Step::DurationRatio

Definition at line 66 of file step_sequencer.h.

Member Enumeration Documentation

◆ Mode

Enumerator
AbsolutePitch 
RelativePitch 

Definition at line 61 of file step_sequencer.h.

Constructor & Destructor Documentation

◆ Step()

ARDOUR::Step::Step ( StepSequence ,
size_t  n,
Temporal::Beats const &  beat,
int  notenum 
)

◆ ~Step()

ARDOUR::Step::~Step ( )

Member Function Documentation

◆ adjust_duration()

void ARDOUR::Step::adjust_duration ( DurationRatio const &  amt)

◆ adjust_octave()

void ARDOUR::Step::adjust_octave ( int  amt)

◆ adjust_offset()

void ARDOUR::Step::adjust_offset ( double  fraction)

◆ adjust_pitch()

void ARDOUR::Step::adjust_pitch ( int  amt)

◆ adjust_velocity()

void ARDOUR::Step::adjust_velocity ( int  amt)

◆ beat()

Temporal::Beats ARDOUR::Step::beat ( ) const
inline

Definition at line 106 of file step_sequencer.h.

◆ check_note()

void ARDOUR::Step::check_note ( size_t  n,
MidiBuffer buf,
bool  ,
samplepos_t  ,
samplepos_t  ,
MidiNoteTracker  
)
private

◆ check_parameter()

void ARDOUR::Step::check_parameter ( size_t  n,
MidiBuffer buf,
bool  ,
samplepos_t  ,
samplepos_t   
)
private

◆ dump()

void ARDOUR::Step::dump ( MusicTimeEvents ,
Temporal::Beats const &   
) const

◆ dump_note()

void ARDOUR::Step::dump_note ( MusicTimeEvents ,
size_t  n,
Temporal::Beats const &   
) const
private

◆ dump_parameter()

void ARDOUR::Step::dump_parameter ( MusicTimeEvents ,
size_t  n,
Temporal::Beats const &   
) const
private

◆ duration()

DurationRatio ARDOUR::Step::duration ( ) const
inline

Definition at line 90 of file step_sequencer.h.

◆ enabled()

bool ARDOUR::Step::enabled ( ) const
inline

Definition at line 100 of file step_sequencer.h.

◆ get_state()

XMLNode& ARDOUR::Step::get_state ( ) const
virtual

Implements PBD::Stateful.

◆ index()

size_t ARDOUR::Step::index ( ) const
inline

Definition at line 71 of file step_sequencer.h.

◆ mode()

Mode ARDOUR::Step::mode ( ) const
inline

Definition at line 83 of file step_sequencer.h.

◆ note()

double ARDOUR::Step::note ( size_t  n = 0) const
inline

Definition at line 86 of file step_sequencer.h.

◆ octave_shift()

int ARDOUR::Step::octave_shift ( ) const
inline

Definition at line 115 of file step_sequencer.h.

◆ offset()

Temporal::Beats ARDOUR::Step::offset ( size_t  n = 0) const
inline

Definition at line 94 of file step_sequencer.h.

◆ parameter()

int ARDOUR::Step::parameter ( size_t  n = 0) const
inline

Definition at line 96 of file step_sequencer.h.

◆ parameter_value()

int ARDOUR::Step::parameter_value ( size_t  n = 0) const
inline

Definition at line 97 of file step_sequencer.h.

◆ repeat()

size_t ARDOUR::Step::repeat ( ) const
inline

Definition at line 103 of file step_sequencer.h.

◆ reschedule()

void ARDOUR::Step::reschedule ( Temporal::Beats const &  ,
Temporal::Beats const &   
)

◆ run()

bool ARDOUR::Step::run ( MidiBuffer buf,
bool  running,
samplepos_t  ,
samplepos_t  ,
MidiNoteTracker  
)

◆ sequencer()

StepSequencer& ARDOUR::Step::sequencer ( ) const
private

◆ set_beat()

void ARDOUR::Step::set_beat ( Temporal::Beats const &  beat)

◆ set_chord()

void ARDOUR::Step::set_chord ( size_t  note_cnt,
double *  notes 
)

◆ set_duration()

void ARDOUR::Step::set_duration ( DurationRatio const &  )

◆ set_enabled()

void ARDOUR::Step::set_enabled ( bool  )

◆ set_mode()

void ARDOUR::Step::set_mode ( Mode  m)

◆ set_note()

void ARDOUR::Step::set_note ( double  note,
double  velocity = 0.5,
int  n = 0 
)

◆ set_octave_shift()

void ARDOUR::Step::set_octave_shift ( int  )

◆ set_offset()

void ARDOUR::Step::set_offset ( Temporal::Beats const &  ,
size_t  n = 0 
)

◆ set_parameter()

void ARDOUR::Step::set_parameter ( int  number,
double  value,
int  n = 0 
)

◆ set_repeat()

void ARDOUR::Step::set_repeat ( size_t  r)

◆ set_skipped()

void ARDOUR::Step::set_skipped ( bool  )

◆ set_state()

int ARDOUR::Step::set_state ( XMLNode const &  ,
int   
)
virtual

Implements PBD::Stateful.

◆ set_velocity()

void ARDOUR::Step::set_velocity ( double  ,
size_t  n = 0 
)

◆ skipped()

bool ARDOUR::Step::skipped ( ) const
inline

Definition at line 110 of file step_sequencer.h.

◆ velocity()

double ARDOUR::Step::velocity ( size_t  n = 0) const
inline

Definition at line 87 of file step_sequencer.h.

Friends And Related Function Documentation

◆ StepSequence

friend class StepSequence
friend

Definition at line 127 of file step_sequencer.h.

Member Data Documentation

◆ _duration

DurationRatio ARDOUR::Step::_duration
private

Definition at line 137 of file step_sequencer.h.

◆ _enabled

bool ARDOUR::Step::_enabled
private

Definition at line 131 of file step_sequencer.h.

◆ _index

size_t ARDOUR::Step::_index
private

Definition at line 130 of file step_sequencer.h.

◆ _mode

Mode ARDOUR::Step::_mode
private

Definition at line 135 of file step_sequencer.h.

◆ _nominal_beat

Temporal::Beats ARDOUR::Step::_nominal_beat
private

Definition at line 132 of file step_sequencer.h.

◆ _notes

Note ARDOUR::Step::_notes[_notes_per_step]
private

Definition at line 157 of file step_sequencer.h.

◆ _notes_per_step

const int ARDOUR::Step::_notes_per_step = 5
static

Definition at line 123 of file step_sequencer.h.

◆ _octave_shift

int ARDOUR::Step::_octave_shift
private

Definition at line 136 of file step_sequencer.h.

◆ _parameters

ParameterValue ARDOUR::Step::_parameters[_parameters_per_step]
private

Definition at line 158 of file step_sequencer.h.

◆ _parameters_per_step

const int ARDOUR::Step::_parameters_per_step = 5
static

Definition at line 124 of file step_sequencer.h.

◆ _repeat

size_t ARDOUR::Step::_repeat
private

Definition at line 159 of file step_sequencer.h.

◆ _scheduled_beat

Temporal::Beats ARDOUR::Step::_scheduled_beat
private

Definition at line 133 of file step_sequencer.h.

◆ _sequence

StepSequence& ARDOUR::Step::_sequence
private

Definition at line 129 of file step_sequencer.h.

◆ _skipped

bool ARDOUR::Step::_skipped
private

Definition at line 134 of file step_sequencer.h.


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