List of time-tagged values.
Functions | |
event_t * | sequence_get_first (sequence_t *sequence) |
Get first event of a sequence. | |
event_t * | sequence_get_last (sequence_t *sequence) |
Get last event of a sequence. | |
int | sequence_get_size (sequence_t *sequence) |
Get size (number of events) of a sequence. | |
double | sequence_get_last_time (sequence_t *sequence) |
Get timetag of last event in a sequence. | |
FTS_API double | sequence_get_total_duration (sequence_t *sequence) |
Get duration of a sequence taking into account the duration of the events. | |
FTS_API void | sequence_add_event (sequence_t *sequence, double time, event_t *event) |
Add an event to a sequence at a given time. | |
FTS_API void | sequence_add_event_after (sequence_t *sequence, double time, event_t *event, event_t *after) |
Add an event to a sequence at a given time after a given event. | |
FTS_API void | sequence_add_event_before (sequence_t *sequence, double time, event_t *event, event_t *before) |
Add an event to a sequence at a given time before a given event. | |
FTS_API void | sequence_append_event (sequence_t *sequence, double time, event_t *event) |
Append an event to a sequence. | |
FTS_API void | sequence_move_event (sequence_t *sequence, event_t *event, double time) |
Move an event within a sequence. | |
FTS_API void | sequence_remove_event (sequence_t *sequence, event_t *event) |
Remove an event from a sequence. | |
FTS_API void | sequence_copy (sequence_t *org, sequence_t *copy) |
Copy the events of a sequence to another. | |
FTS_API void | sequence_copy_locked (sequence_t *from, sequence_t *to) |
Copy the events of a sequence to another with locks on both. | |
FTS_API void | sequence_merge (sequence_t *sequence, sequence_t *merge) |
Merge the events of another sequence into a sequence. | |
FTS_API void | sequence_merge_clear (sequence_t *sequence, sequence_t *merge) |
Merge and and clear the events of another sequence into a sequence. | |
FTS_API void | sequence_clear (sequence_t *sequence) |
Remove all events from a sequence. | |
FTS_API event_t * | sequence_get_event_by_time (sequence_t *sequence, double time) |
Get the first event at or after a given time of a sequence. | |
FTS_API event_t * | sequence_get_event_by_index (sequence_t *sequence, int index) |
Get the event at a given index of a sequence. | |
FTS_API event_t * | sequence_get_next_by_time (sequence_t *sequence, double time) |
Get the next event after given time of a sequence. | |
FTS_API event_t * | sequence_get_next_by_time_after (sequence_t *sequence, double time, event_t *here) |
Get the next event after given time (starting from a given event). | |
FTS_API event_t * | sequence_get_left_by_time_from (sequence_t *sequence, double time, event_t *here) |
Get event before or at given time (starting from a given event). | |
FTS_API void | sequence_segment_get (sequence_t *sequence, double begin, double end, event_t **first, event_t **after) |
Get segment by time (begin and end). | |
FTS_API void | sequence_segment_shift (sequence_t *sequence, event_t *first, event_t *after, double begin, double end, double shift) |
Move all events in a given segment of a sequence. | |
FTS_API void | sequence_segment_stretch (sequence_t *sequence, double begin, double end, double stretch) |
Time-stretch all events in a given segment of a sequence. | |
FTS_API void | sequence_segment_quantize (sequence_t *sequence, double begin, double end, double quantize) |
Quantize time and duration of all events in a given segment of a sequence. | |
Variables | |
FTS_API fts_class_t * | sequence_class |
The sequence class identifier (pointer to class instance). |
FTS_API void sequence_add_event | ( | sequence_t * | sequence, | |
double | time, | |||
event_t * | event | |||
) |
Add an event to a sequence at a given time.
sequence | the sequence | |
time | timetag for event | |
event | to be added event |
FTS_API void sequence_add_event_after | ( | sequence_t * | sequence, | |
double | time, | |||
event_t * | event, | |||
event_t * | after | |||
) |
Add an event to a sequence at a given time after a given event.
sequence | the sequence | |
time | timetag for event | |
event | to be added event | |
after | add new event after this one ... |
FTS_API void sequence_add_event_before | ( | sequence_t * | sequence, | |
double | time, | |||
event_t * | event, | |||
event_t * | before | |||
) |
Add an event to a sequence at a given time before a given event.
sequence | the sequence | |
time | timetag for event | |
event | to be added event | |
before | add new event before this one ... |
FTS_API void sequence_append_event | ( | sequence_t * | sequence, | |
double | time, | |||
event_t * | event | |||
) |
Append an event to a sequence.
sequence | the sequence | |
time | timetag for event | |
event | to be added event |
FTS_API void sequence_clear | ( | sequence_t * | sequence | ) |
Remove all events from a sequence.
sequence | the sequence |
FTS_API void sequence_copy | ( | sequence_t * | org, | |
sequence_t * | copy | |||
) |
Copy the events of a sequence to another.
org | the original sequence | |
copy | copy sequence |
FTS_API void sequence_copy_locked | ( | sequence_t * | from, | |
sequence_t * | to | |||
) |
Copy the events of a sequence to another with locks on both.
org | the original sequence | |
copy | copy sequence |
FTS_API event_t* sequence_get_event_by_index | ( | sequence_t * | sequence, | |
int | index | |||
) |
Get the event at a given index of a sequence.
sequence | the sequence | |
index | the index |
FTS_API event_t* sequence_get_event_by_time | ( | sequence_t * | sequence, | |
double | time | |||
) |
Get the first event at or after a given time of a sequence.
sequence | the sequence | |
time | the time |
event_t* sequence_get_first | ( | sequence_t * | sequence | ) |
Get first event of a sequence.
sequence | the sequence |
event_t* sequence_get_last | ( | sequence_t * | sequence | ) |
Get last event of a sequence.
sequence | the sequence |
double sequence_get_last_time | ( | sequence_t * | sequence | ) |
Get timetag of last event in a sequence.
Also known as sequence_get_duration().
sequence | the sequence |
FTS_API event_t* sequence_get_left_by_time_from | ( | sequence_t * | sequence, | |
double | time, | |||
event_t * | here | |||
) |
Get event before or at given time (starting from a given event).
sequence | the sequence | |
time | the time | |
here | search starts from this event |
FTS_API event_t* sequence_get_next_by_time | ( | sequence_t * | sequence, | |
double | time | |||
) |
Get the next event after given time of a sequence.
sequence | the sequence | |
time | the time |
FTS_API event_t* sequence_get_next_by_time_after | ( | sequence_t * | sequence, | |
double | time, | |||
event_t * | here | |||
) |
Get the next event after given time (starting from a given event).
sequence | the sequence | |
time | the time | |
here | search start from this event |
int sequence_get_size | ( | sequence_t * | sequence | ) |
Get size (number of events) of a sequence.
sequence | the sequence |
FTS_API double sequence_get_total_duration | ( | sequence_t * | sequence | ) |
Get duration of a sequence taking into account the duration of the events.
sequence | the sequence |
FTS_API void sequence_merge | ( | sequence_t * | sequence, | |
sequence_t * | merge | |||
) |
Merge the events of another sequence into a sequence.
sequence | the sequence | |
merge | another sequence of which the elements are merged into the first sequence. |
FTS_API void sequence_merge_clear | ( | sequence_t * | sequence, | |
sequence_t * | merge | |||
) |
Merge and and clear the events of another sequence into a sequence.
The sequence given as second argument is empty after calling this function.
sequence | first sequence | |
merge | merge in sequence and clear it |
FTS_API void sequence_move_event | ( | sequence_t * | sequence, | |
event_t * | event, | |||
double | time | |||
) |
Move an event within a sequence.
sequence | the sequence | |
event | to be added event | |
time | new timetag for event |
FTS_API void sequence_remove_event | ( | sequence_t * | sequence, | |
event_t * | event | |||
) |
Remove an event from a sequence.
sequence | the sequence | |
event | to be removed event |
FTS_API void sequence_segment_get | ( | sequence_t * | sequence, | |
double | begin, | |||
double | end, | |||
event_t ** | first, | |||
event_t ** | after | |||
) |
Get segment by time (begin and end).
The function returns the event at the beginning of the segment and the next event after the end of the segment (or NULL if the segment end with the last event of the sequence).
sequence | the sequence | |
begin | starting time | |
end | end time | |
first | start search from this event | |
after | next event after the segment |
FTS_API void sequence_segment_quantize | ( | sequence_t * | sequence, | |
double | begin, | |||
double | end, | |||
double | quantize | |||
) |
Quantize time and duration of all events in a given segment of a sequence.
The function multiplies all event times and durations (if any).
sequence | the sequence | |
begin | starting time | |
end | end time | |
quantize | quantization period |
FTS_API void sequence_segment_shift | ( | sequence_t * | sequence, | |
event_t * | first, | |||
event_t * | after, | |||
double | begin, | |||
double | end, | |||
double | shift | |||
) |
Move all events in a given segment of a sequence.
sequence | the sequence | |
first | start search from this event | |
after | next event after the segment | |
begin | starting time | |
end | end time | |
shift | shift in milliseconds |
FTS_API void sequence_segment_stretch | ( | sequence_t * | sequence, | |
double | begin, | |||
double | end, | |||
double | stretch | |||
) |
Time-stretch all events in a given segment of a sequence.
The function multiplies all event times and durations (if any). The events after the given segment will be simply sgifted.
sequence | the sequence | |
begin | starting time | |
end | end time | |
stretch | stretch factor |