Represents a single MIDI event or metaevent. More...
#include <smf.h>
Data Fields | |
smf_track_t * | track |
Pointer to the track, or NULL if event is not attached. | |
int | event_number |
Number of this event in the track. | |
int | delta_time_pulses |
Note that the time fields are invalid, if event is not attached to a track. | |
int | time_pulses |
Time, in pulses, since the start of the song. | |
double | time_seconds |
Time, in seconds, since the start of the song. | |
int | track_number |
Tracks are numbered consecutively, starting from 1. | |
unsigned char * | midi_buffer |
Pointer to the buffer containing MIDI message. | |
int | midi_buffer_length |
Length of the MIDI message in the buffer, in bytes. | |
void * | user_pointer |
API consumer is free to use this for whatever purpose. |
Represents a single MIDI event or metaevent.
Definition at line 301 of file smf.h.
Note that the time fields are invalid, if event is not attached to a track.
Time, in pulses, since the previous event on this track.
Definition at line 310 of file smf.h.
Referenced by smf_event_remove_from_track(), and smf_track_add_event().
Number of this event in the track.
Events are numbered consecutively, starting from one.
Definition at line 306 of file smf.h.
Referenced by smf_event_remove_from_track(), smf_seek_to_event(), and smf_track_add_event().
unsigned char* smf_event_struct::midi_buffer |
Pointer to the buffer containing MIDI message.
This is freed by smf_event_delete.
Definition at line 322 of file smf.h.
Referenced by maybe_add_to_tempo_map(), smf_event_decode(), smf_event_delete(), smf_event_extract_text(), smf_event_is_eot(), smf_event_is_metadata(), smf_event_is_sysex(), smf_event_is_system_common(), smf_event_is_system_realtime(), smf_event_is_tempo_change_or_time_signature(), smf_event_is_textual(), smf_event_is_valid(), smf_event_length_is_valid(), smf_event_new_from_bytes(), smf_event_new_from_pointer(), and smf_event_new_textual().
Length of the MIDI message in the buffer, in bytes.
Definition at line 325 of file smf.h.
Referenced by maybe_add_to_tempo_map(), smf_event_delete(), smf_event_extract_text(), smf_event_is_eot(), smf_event_is_metadata(), smf_event_is_sysex(), smf_event_is_system_common(), smf_event_is_system_realtime(), smf_event_is_tempo_change_or_time_signature(), smf_event_is_textual(), smf_event_is_valid(), smf_event_length_is_valid(), smf_event_new_from_bytes(), smf_event_new_from_pointer(), and smf_event_new_textual().
Time, in pulses, since the start of the song.
Definition at line 313 of file smf.h.
Referenced by maybe_add_to_tempo_map(), smf_create_tempo_map_and_compute_seconds(), smf_event_is_last(), smf_event_remove_from_track(), smf_get_length_pulses(), smf_seek_to_pulses(), smf_track_add_eot_pulses(), smf_track_add_event(), smf_track_add_event_delta_pulses(), smf_track_add_event_pulses(), smf_track_add_event_seconds(), and smf_track_get_next_event().
Time, in seconds, since the start of the song.
Definition at line 316 of file smf.h.
Referenced by smf_get_length_seconds(), smf_seek_to_seconds(), smf_track_add_eot_seconds(), smf_track_add_event(), smf_track_add_event_delta_pulses(), smf_track_add_event_pulses(), and smf_track_add_event_seconds().
Pointer to the track, or NULL if event is not attached.
Definition at line 303 of file smf.h.
Referenced by maybe_add_to_tempo_map(), smf_event_delete(), smf_event_is_last(), smf_event_remove_from_track(), smf_seek_to_event(), and smf_track_add_event().
Tracks are numbered consecutively, starting from 1.
Definition at line 319 of file smf.h.
Referenced by smf_track_remove_from_smf().
API consumer is free to use this for whatever purpose.
NULL in freshly allocated event. Note that events might be deallocated not only explicitly, by calling smf_event_delete(), but also implicitly, e.g. when calling smf_track_delete() with events still added to the track; there is no mechanism for libsmf to notify you about removal of the event.