Ardour  9.0-pre0-582-g084a23a80d
smf.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <glib.h>
Include dependency graph for smf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  smf_struct
 
struct  smf_tempo_struct
 
struct  smf_track_struct
 
struct  smf_event_struct
 

Macros

#define WARN_UNUSED_RESULT
 

Typedefs

typedef struct smf_struct smf_t
 
typedef struct smf_tempo_struct smf_tempo_t
 
typedef struct smf_track_struct smf_track_t
 
typedef struct smf_event_struct smf_event_t
 

Functions

smf_tsmf_new (void)
 
void smf_delete (smf_t *smf)
 
int smf_set_format (smf_t *smf, int format)
 
int smf_set_ppqn (smf_t *smf, uint16_t ppqn)
 
char * smf_decode (const smf_t *smf)
 
smf_track_tsmf_get_track_by_number (const smf_t *smf, int track_number)
 
smf_event_tsmf_peek_next_event (smf_t *smf)
 
smf_event_tsmf_get_next_event (smf_t *smf)
 
void smf_skip_next_event (smf_t *smf)
 
void smf_rewind (smf_t *smf)
 
int smf_seek_to_pulses (smf_t *smf, size_t pulses)
 
int smf_seek_to_event (smf_t *smf, const smf_event_t *event)
 
size_t smf_get_length_pulses (const smf_t *smf)
 
int smf_event_is_last (const smf_event_t *event)
 
void smf_add_track (smf_t *smf, smf_track_t *track)
 
void smf_track_remove_from_smf (smf_track_t *track)
 
smf_track_tsmf_track_new (void)
 
void smf_track_delete (smf_track_t *track)
 
smf_event_tsmf_track_get_next_event (smf_track_t *track)
 
smf_event_tsmf_track_get_event_by_number (const smf_track_t *track, size_t num)
 
smf_event_tsmf_track_get_last_event (const smf_track_t *track)
 
void smf_track_add_event_delta_pulses (smf_track_t *track, smf_event_t *event, uint32_t delta)
 
void smf_track_add_event_pulses (smf_track_t *track, smf_event_t *event, size_t pulses)
 
int smf_track_add_eot_delta_pulses (smf_track_t *track, uint32_t delta)
 
int smf_track_add_eot_pulses (smf_track_t *track, size_t pulses)
 
void smf_event_remove_from_track (smf_event_t *event)
 
smf_event_tsmf_event_new (void)
 
smf_event_tsmf_event_new_from_pointer (const void *midi_data, size_t len)
 
smf_event_tsmf_event_new_from_bytes (int byte1, int byte2, int byte3)
 
smf_event_tsmf_event_new_textual (int type, const char *text)
 
void smf_event_delete (smf_event_t *event)
 
int smf_event_is_valid (const smf_event_t *event)
 
int smf_event_is_metadata (const smf_event_t *event)
 
int smf_event_is_system_realtime (const smf_event_t *event)
 
int smf_event_is_system_common (const smf_event_t *event)
 
int smf_event_is_sysex (const smf_event_t *event)
 
int smf_event_is_eot (const smf_event_t *event)
 
int smf_event_is_textual (const smf_event_t *event)
 
char * smf_event_decode (const smf_event_t *event)
 
char * smf_event_extract_text (const smf_event_t *event)
 
int smf_format_vlq (unsigned char *buf, int length, unsigned long value)
 
int smf_extract_vlq (const unsigned char *buf, const size_t buffer_length, uint32_t *value, uint32_t *len)
 
smf_tsmf_load (FILE *)
 
smf_tsmf_load_from_memory (void *buffer, const size_t buffer_length)
 
int smf_save (smf_t *smf, FILE *file)
 
smf_tempo_tsmf_get_tempo_by_pulses (const smf_t *smf, size_t pulses)
 
smf_tempo_tsmf_get_tempo_by_seconds (const smf_t *smf, double seconds)
 
int smf_get_tempo_count (const smf_t *smf)
 
smf_tempo_tsmf_get_tempo_by_number (const smf_t *smf, size_t number)
 
smf_tempo_tsmf_get_last_tempo (const smf_t *smf)
 
const char * smf_get_version (void)
 

Detailed Description

Public interface declaration for libsmf, Standard MIDI File format library.

Definition in file smf.h.

Macro Definition Documentation

◆ WARN_UNUSED_RESULT

#define WARN_UNUSED_RESULT

Definition at line 230 of file smf.h.

Typedef Documentation

◆ smf_event_t

typedef struct smf_event_struct smf_event_t

Definition at line 1 of file smf.h.

◆ smf_t

typedef struct smf_struct smf_t

Definition at line 1 of file smf.h.

◆ smf_tempo_t

typedef struct smf_tempo_struct smf_tempo_t

Definition at line 1 of file smf.h.

◆ smf_track_t

typedef struct smf_track_struct smf_track_t

Definition at line 1 of file smf.h.

Function Documentation

◆ smf_add_track()

void smf_add_track ( smf_t smf,
smf_track_t track 
)

◆ smf_decode()

char* smf_decode ( const smf_t smf)

◆ smf_delete()

void smf_delete ( smf_t smf)

◆ smf_event_decode()

char* smf_event_decode ( const smf_event_t event)

◆ smf_event_delete()

void smf_event_delete ( smf_event_t event)

◆ smf_event_extract_text()

char* smf_event_extract_text ( const smf_event_t event)

◆ smf_event_is_eot()

int smf_event_is_eot ( const smf_event_t event)

◆ smf_event_is_last()

int smf_event_is_last ( const smf_event_t event)

◆ smf_event_is_metadata()

int smf_event_is_metadata ( const smf_event_t event)

◆ smf_event_is_sysex()

int smf_event_is_sysex ( const smf_event_t event)

◆ smf_event_is_system_common()

int smf_event_is_system_common ( const smf_event_t event)

◆ smf_event_is_system_realtime()

int smf_event_is_system_realtime ( const smf_event_t event)

◆ smf_event_is_textual()

int smf_event_is_textual ( const smf_event_t event)

◆ smf_event_is_valid()

int smf_event_is_valid ( const smf_event_t event)

◆ smf_event_new()

smf_event_t* smf_event_new ( void  )

◆ smf_event_new_from_bytes()

smf_event_t* smf_event_new_from_bytes ( int  byte1,
int  byte2,
int  byte3 
)

◆ smf_event_new_from_pointer()

smf_event_t* smf_event_new_from_pointer ( const void *  midi_data,
size_t  len 
)

◆ smf_event_new_textual()

smf_event_t* smf_event_new_textual ( int  type,
const char *  text 
)

◆ smf_event_remove_from_track()

void smf_event_remove_from_track ( smf_event_t event)

◆ smf_extract_vlq()

int smf_extract_vlq ( const unsigned char *  buf,
const size_t  buffer_length,
uint32_t *  value,
uint32_t *  len 
)

◆ smf_format_vlq()

int smf_format_vlq ( unsigned char *  buf,
int  length,
unsigned long  value 
)

◆ smf_get_last_tempo()

smf_tempo_t* smf_get_last_tempo ( const smf_t smf)

◆ smf_get_length_pulses()

size_t smf_get_length_pulses ( const smf_t smf)

◆ smf_get_next_event()

smf_event_t* smf_get_next_event ( smf_t smf)

◆ smf_get_tempo_by_number()

smf_tempo_t* smf_get_tempo_by_number ( const smf_t smf,
size_t  number 
)

◆ smf_get_tempo_by_pulses()

smf_tempo_t* smf_get_tempo_by_pulses ( const smf_t smf,
size_t  pulses 
)

◆ smf_get_tempo_by_seconds()

smf_tempo_t* smf_get_tempo_by_seconds ( const smf_t smf,
double  seconds 
)

◆ smf_get_tempo_count()

int smf_get_tempo_count ( const smf_t smf)

◆ smf_get_track_by_number()

smf_track_t* smf_get_track_by_number ( const smf_t smf,
int  track_number 
)

◆ smf_get_version()

const char* smf_get_version ( void  )

◆ smf_load()

smf_t* smf_load ( FILE *  )

◆ smf_load_from_memory()

smf_t* smf_load_from_memory ( void *  buffer,
const size_t  buffer_length 
)

◆ smf_new()

smf_t* smf_new ( void  )

◆ smf_peek_next_event()

smf_event_t* smf_peek_next_event ( smf_t smf)

◆ smf_rewind()

void smf_rewind ( smf_t smf)

◆ smf_save()

int smf_save ( smf_t smf,
FILE *  file 
)

◆ smf_seek_to_event()

int smf_seek_to_event ( smf_t smf,
const smf_event_t event 
)

◆ smf_seek_to_pulses()

int smf_seek_to_pulses ( smf_t smf,
size_t  pulses 
)

◆ smf_set_format()

int smf_set_format ( smf_t smf,
int  format 
)

◆ smf_set_ppqn()

int smf_set_ppqn ( smf_t smf,
uint16_t  ppqn 
)

◆ smf_skip_next_event()

void smf_skip_next_event ( smf_t smf)

◆ smf_track_add_eot_delta_pulses()

int smf_track_add_eot_delta_pulses ( smf_track_t track,
uint32_t  delta 
)

◆ smf_track_add_eot_pulses()

int smf_track_add_eot_pulses ( smf_track_t track,
size_t  pulses 
)

◆ smf_track_add_event_delta_pulses()

void smf_track_add_event_delta_pulses ( smf_track_t track,
smf_event_t event,
uint32_t  delta 
)

◆ smf_track_add_event_pulses()

void smf_track_add_event_pulses ( smf_track_t track,
smf_event_t event,
size_t  pulses 
)

◆ smf_track_delete()

void smf_track_delete ( smf_track_t track)

◆ smf_track_get_event_by_number()

smf_event_t* smf_track_get_event_by_number ( const smf_track_t track,
size_t  num 
)

◆ smf_track_get_last_event()

smf_event_t* smf_track_get_last_event ( const smf_track_t track)

◆ smf_track_get_next_event()

smf_event_t* smf_track_get_next_event ( smf_track_t track)

◆ smf_track_new()

smf_track_t* smf_track_new ( void  )

◆ smf_track_remove_from_smf()

void smf_track_remove_from_smf ( smf_track_t track)