libsmf

- Main Page
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

Data Fields
smf_event_struct Struct Reference

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. More...
int | event_number
| Number of this event in the track. More...
int | delta_time_pulses
| Note that the time fields are invalid, if event is not attached to a track. More...
int | time_pulses
| Time, in pulses, since the start of the song. More...
double | time_seconds
| Time, in seconds, since the start of the song. More...
int | track_number
| Tracks are numbered consecutively, starting from 1. More...
unsigned char * | midi_buffer
| Pointer to the buffer containing MIDI message. More...
int | midi_buffer_length
| Length of the MIDI message in the buffer, in bytes. More...
void * | user_pointer
| API consumer is free to use this for whatever purpose. More...

## Detailed Description

Represents a single MIDI event or metaevent.

Definition at line 301 of file smf.h.

## Field Documentation

int smf_event_struct::delta_time_pulses

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().

int smf_event_struct::event_number

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().

int smf_event_struct::midi_buffer_length

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().

int smf_event_struct::time_pulses

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().

double smf_event_struct::time_seconds

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().

smf_track_t* smf_event_struct::track

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().

int smf_event_struct::track_number

Tracks are numbered consecutively, starting from 1.

Definition at line 319 of file smf.h.

Referenced by smf_track_remove_from_smf().

void* smf_event_struct::user_pointer

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.

Definition at line 331 of file smf.h.

The documentation for this struct was generated from the following file:

- smf.h