#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "instruments.h"
#include "global.h"
#include "table.h"
Go to the source code of this file.
Functions | |
int | load_midi (FILE *input) |
int load_midi | ( | FILE * | input | ) |
This function receives a MIDI file, reads its bytes, interprets them and fills the table of MIDI events. It also assigns values to some important global variables (like 'n_tracks' and 'ticks_per_beat'). It returns 0 in case of success and returns 1 otherwise.