LMMS
Loading...
Searching...
No Matches
Alg_time_map Class Reference

#include <allegro.h>

Public Member Functions

 Alg_time_map ()
 Alg_time_map (Alg_time_map *map)
 copy constructor
long length ()
void show ()
long locate_time (double time)
long locate_beat (double beat)
double beat_to_time (double beat)
double time_to_beat (double time)
void insert_beat (double time, double beat)
 add a point to the map
bool insert_tempo (double tempo, double beat)
double get_tempo (double beat)
 get the tempo starting at beat
bool set_tempo (double tempo, double start_beat, double end_beat)
 set the tempo over a region
bool stretch_region (double b0, double b1, double dur)
void cut (double start, double len, bool units_are_seconds)
void trim (double start, double end, bool units_are_seconds)
void paste (double start, Alg_track *tr)
void insert_time (double start, double len)
void insert_beats (double start, double len)
void dereference ()
void reference ()

Public Attributes

Alg_beats beats
 array of Alg_beat
double last_tempo
bool last_tempo_flag

Private Attributes

int refcount

Constructor & Destructor Documentation

◆ Alg_time_map() [1/2]

Alg_time_map::Alg_time_map ( )
inline

< note: this value ignored until

< last_tempo_flag is set; nevertheless, the default tempo is 100.

◆ Alg_time_map() [2/2]

Alg_time_map::Alg_time_map ( Alg_time_map * map)

copy constructor

Member Function Documentation

◆ beat_to_time()

double Alg_time_map::beat_to_time ( double beat)

◆ cut()

void Alg_time_map::cut ( double start,
double len,
bool units_are_seconds )

◆ dereference()

void Alg_time_map::dereference ( )
inline

◆ get_tempo()

double Alg_time_map::get_tempo ( double beat)

get the tempo starting at beat

◆ insert_beat()

void Alg_time_map::insert_beat ( double time,
double beat )

add a point to the map

Time map manipulations: it is prefered to call the corresponding methods in Alg_seq. If you manipulate an Alg_time_map directly, you should take care to convert all tracks that use the time map to beats or seconds as appropriate: Normally if you insert a beat you want tracks to be in time units and if you insert a tempo change you want tracks to be in beat units.

◆ insert_beats()

void Alg_time_map::insert_beats ( double start,
double len )

insert a span of beats. If start is at a tempo change, the tempo change takes effect before the inserted beats

◆ insert_tempo()

bool Alg_time_map::insert_tempo ( double tempo,
double beat )

insert a tempo change

◆ insert_time()

void Alg_time_map::insert_time ( double start,
double len )

insert a span of time. If start is at a tempo change, then the span of time runs at the changed tempo

◆ length()

long Alg_time_map::length ( )
inline

◆ locate_beat()

long Alg_time_map::locate_beat ( double beat)

◆ locate_time()

long Alg_time_map::locate_time ( double time)

◆ paste()

void Alg_time_map::paste ( double start,
Alg_track * tr )

◆ reference()

void Alg_time_map::reference ( )
inline

◆ set_tempo()

bool Alg_time_map::set_tempo ( double tempo,
double start_beat,
double end_beat )

set the tempo over a region

◆ show()

void Alg_time_map::show ( )

◆ stretch_region()

bool Alg_time_map::stretch_region ( double b0,
double b1,
double dur )

◆ time_to_beat()

double Alg_time_map::time_to_beat ( double time)

◆ trim()

void Alg_time_map::trim ( double start,
double end,
bool units_are_seconds )

Member Data Documentation

◆ beats

Alg_beats Alg_time_map::beats

array of Alg_beat

◆ last_tempo

double Alg_time_map::last_tempo

◆ last_tempo_flag

bool Alg_time_map::last_tempo_flag

◆ refcount

int Alg_time_map::refcount
private

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