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

Alg_time_sigs is a dynamic array of time signatures. More...

#include <allegro.h>

Public Member Functions

 Alg_time_sigs ()
Alg_time_sigoperator[] (int i)
 ~Alg_time_sigs ()
void show ()
long length ()
int find_beat (double beat)
double get_bar_len (double beat)
 get the number of beats per measure starting at beat
void insert (double beat, double num, double den, bool force=false)
void cut (double start, double end, double dur)
 remove from start to end
void trim (double start, double end)
 retain just start to end
void paste (double start, Alg_seq *seq)
void insert_beats (double beat, double len)
double nearest_beat (double beat)
 find the nearest beat (see Alg_seq::nearest_beat) to beat

Private Member Functions

void expand ()
 make more space

Private Attributes

long maxlen
long len
Alg_time_sig_ptr time_sigs

Detailed Description

Alg_time_sigs is a dynamic array of time signatures.

The default (empty) time_sigs has 4/4 time at beat 0. Each time_sig object in time_sigs represents the beginning of a measure. If there is a beat missing, e.g. in the first measure, you can represent this by inserting another time_sig at the next measure beginning. Each time_sig implies an infinite sequence of full measures until the next time_sig. If you insert a time_sig and one already exist near the same beat, the old one is replaced, thus re-barring every measure until the next time_sig.

Constructor & Destructor Documentation

◆ Alg_time_sigs()

Alg_time_sigs::Alg_time_sigs ( )
inline

◆ ~Alg_time_sigs()

Alg_time_sigs::~Alg_time_sigs ( )
inline

Member Function Documentation

◆ cut()

void Alg_time_sigs::cut ( double start,
double end,
double dur )

remove from start to end

◆ expand()

void Alg_time_sigs::expand ( )
private

make more space

◆ find_beat()

int Alg_time_sigs::find_beat ( double beat)

◆ get_bar_len()

double Alg_time_sigs::get_bar_len ( double beat)

get the number of beats per measure starting at beat

◆ insert()

void Alg_time_sigs::insert ( double beat,
double num,
double den,
bool force = false )

◆ insert_beats()

void Alg_time_sigs::insert_beats ( double beat,
double len )

insert len beats at beat

◆ length()

long Alg_time_sigs::length ( )
inline

◆ nearest_beat()

double Alg_time_sigs::nearest_beat ( double beat)

find the nearest beat (see Alg_seq::nearest_beat) to beat

◆ operator[]()

Alg_time_sig & Alg_time_sigs::operator[] ( int i)
inline

< fetch a time signature

◆ paste()

void Alg_time_sigs::paste ( double start,
Alg_seq * seq )

◆ show()

void Alg_time_sigs::show ( )

◆ trim()

void Alg_time_sigs::trim ( double start,
double end )

retain just start to end

Member Data Documentation

◆ len

long Alg_time_sigs::len
private

◆ maxlen

long Alg_time_sigs::maxlen
private

◆ time_sigs

Alg_time_sig_ptr Alg_time_sigs::time_sigs
private

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