ardour
Public Member Functions | Private Attributes | List of all members
ARDOUR::BeatsFramesConverter Class Reference

#include <beats_frames_converter.h>

Inheritance diagram for ARDOUR::BeatsFramesConverter:
Evoral::TimeConverter< Evoral::Beats, framepos_t >

Public Member Functions

 BeatsFramesConverter (TempoMap &tempo_map, framepos_t origin)
 
framepos_t to (Evoral::Beats beats) const
 
Evoral::Beats from (framepos_t frames) const
 
- Public Member Functions inherited from Evoral::TimeConverter< Evoral::Beats, framepos_t >
 TimeConverter ()
 
 TimeConverter (framepos_tob)
 
virtual ~TimeConverter ()
 
framepos_t origin_b () const
 
void set_origin_b (framepos_to)
 

Private Attributes

TempoMap_tempo_map
 

Additional Inherited Members

- Protected Attributes inherited from Evoral::TimeConverter< Evoral::Beats, framepos_t >
framepos_t _origin_b
 

Detailed Description

Converter between beats and frames. Takes distances in beats or frames from some origin (supplied to the constructor in frames), and converts them to the opposite unit, taking tempo changes into account.

Definition at line 39 of file beats_frames_converter.h.

Constructor & Destructor Documentation

ARDOUR::BeatsFramesConverter::BeatsFramesConverter ( TempoMap tempo_map,
framepos_t  origin 
)
inline

Definition at line 42 of file beats_frames_converter.h.

Member Function Documentation

Evoral::Beats ARDOUR::BeatsFramesConverter::from ( framepos_t  frames) const
virtual

Takes a duration in frames and considers it as a distance from the origin supplied to the constructor. Returns the equivalent number of beats, taking tempo changes into account.

Implements Evoral::TimeConverter< Evoral::Beats, framepos_t >.

Definition at line 49 of file beats_frames_converter.cc.

framepos_t ARDOUR::BeatsFramesConverter::to ( Evoral::Beats  beats) const
virtual

Takes a positive duration in beats and considers it as a distance from the origin supplied to the constructor. Returns the equivalent number of frames, taking tempo changes into account.

Implements Evoral::TimeConverter< Evoral::Beats, framepos_t >.

Definition at line 34 of file beats_frames_converter.cc.

Member Data Documentation

TempoMap& ARDOUR::BeatsFramesConverter::_tempo_map
private

Definition at line 51 of file beats_frames_converter.h.


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