//getdur --gets an index number from the scorefile and tempo.
// Returns the duration of that chord.
//--------------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>
#include <ugens.h>

extern struct chord curchord[MAXCHORDS];

double getdur(float *p, short n_args){

int num = p[0];
int tempo = (int)p[1];
float scalefactor, duration;

scalefactor = (60.0/tempo);

duration = curchord[num].dur * scalefactor;
return duration;

}//end getdur