/*
** Return string name of 'pitch' and octave number
** (e.g., 'itop(61)' is 'C#4', middle C sharp).
*/

static char *p[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"};
static char r[8];

char *
itop(pitch)
{
	sprintf(r, "%s%d", p[pitch % 12], pitch / 12 - 1);
	return (r);
}
