ardour
|
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include "smf.h"
#include "smf_private.h"
Go to the source code of this file.
Tempo map related part.
Definition in file smf_tempo.c.
|
static |
Definition at line 95 of file smf_tempo.c.
|
static |
Definition at line 107 of file smf_tempo.c.
|
static |
Returns ->time_pulses of last event on the given track, or 0, if track is empty.
Definition at line 380 of file smf_tempo.c.
void maybe_add_to_tempo_map | ( | smf_event_t * | event | ) |
Definition at line 125 of file smf_tempo.c.
|
static |
If there is tempo starting at "pulses" already, return it. Otherwise, allocate new one, fill it with values from previous one (or default ones, if there is no previous one) and attach it to "smf".
Definition at line 50 of file smf_tempo.c.
|
static |
Definition at line 213 of file smf_tempo.c.
void remove_last_tempo_with_pulses | ( | smf_t * | smf, |
size_t | pulses | ||
) |
Definition at line 173 of file smf_tempo.c.
|
static |
Definition at line 197 of file smf_tempo.c.
void smf_create_tempo_map_and_compute_seconds | ( | smf_t * | smf | ) |
Definition at line 235 of file smf_tempo.c.
void smf_fini_tempo | ( | smf_t * | smf | ) |
Definition at line 339 of file smf_tempo.c.
smf_tempo_t* smf_get_last_tempo | ( | const smf_t * | smf | ) |
Return last tempo.
Definition at line 322 of file smf_tempo.c.
smf_tempo_t* smf_get_tempo_by_number | ( | const smf_t * | smf, |
size_t | number | ||
) |
Definition at line 257 of file smf_tempo.c.
smf_tempo_t* smf_get_tempo_by_pulses | ( | const smf_t * | smf, |
size_t | pulses | ||
) |
Return last tempo (i.e. tempo with greatest time_pulses) that happens before "pulses".
Definition at line 269 of file smf_tempo.c.
smf_tempo_t* smf_get_tempo_by_seconds | ( | const smf_t * | smf, |
double | seconds | ||
) |
Return last tempo (i.e. tempo with greatest time_seconds) that happens before "seconds".
Definition at line 294 of file smf_tempo.c.
void smf_init_tempo | ( | smf_t * | smf | ) |
Definition at line 364 of file smf_tempo.c.
void smf_track_add_event_delta_pulses | ( | smf_track_t * | track, |
smf_event_t * | event, | ||
uint32_t | delta | ||
) |
Adds event to the track at the time "pulses" clocks from the previous event in this track. The remaining two time fields will be computed automatically based on the third argument and current tempo map. Note that ->delta_pulses is computed by smf.c:smf_track_add_event, not here.
Definition at line 400 of file smf_tempo.c.
void smf_track_add_event_pulses | ( | smf_track_t * | track, |
smf_event_t * | event, | ||
size_t | pulses | ||
) |
Adds event to the track at the time "pulses" clocks from the start of song. The remaining two time fields will be computed automatically based on the third argument and current tempo map.
Definition at line 418 of file smf_tempo.c.
void smf_track_add_event_seconds | ( | smf_track_t * | track, |
smf_event_t * | event, | ||
double | seconds | ||
) |
Adds event to the track at the time "seconds" seconds from the start of song. The remaining two time fields will be computed automatically based on the third argument and current tempo map.
Definition at line 434 of file smf_tempo.c.