src/matching.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/poll.h>
#include <sys/time.h>
#include "global.h"
#include "table.h"

Go to the source code of this file.

Defines

#define MAX_ERRORS   25
#define DEADLINE   100

Functions

void matching ()

Variables

long int virtual_clock
long int prev_virtual_clocks [2]
long int real_clock
long int prev_real_clocks [2]
struct timeval starting_time current_time
unsigned char ** c
short FLAG
long int before
long int after

Define Documentation

#define MAX_ERRORS   25
#define DEADLINE   100

Function Documentation

void matching (  ) 

This function is the kernel of this program. We can divide it into four parts: (1) first, it handles the musician input in real time; (2) compares it with the score using the LCS problem algorithm; (3) updates the virtual clock according to the musician's tempo; (4) plays the accompaniment given the evolution of the virtual clock.


Variable Documentation

long int virtual_clock
long int prev_virtual_clocks[2]
long int real_clock
long int prev_real_clocks[2]
struct timeval starting_time current_time
unsigned char** c
short FLAG
long int before
long int after
 All Data Structures Files Functions Variables Typedefs Defines
Generated by  doxygen 1.6.2-20100124