/*
  Tunes -- Play melodies on specified output pins.
  This code is in some domain.
 */
#ifndef TUNES_h
#define TUNES_h

#include <Arduino.h>
#include "./pitches.h"

/** definition of one note in a melody sequence
 **  an array of these is a Melody to be played
 **  where the last "length" should be 0 "DONE" to end, or
 **   the last pitch == 0xFFFF "REPEAT" to repeat
 **/
typedef struct
{
	uint16_t pitch;		// note frequency in tone() counts
	uint8_t duration;	// note on duration, 8ms steps
	uint8_t length;		// time until next note, 8ms steps, 0==Sequence End
} Note;

// melodies we have here,
//  note: need to be in *.cpp files or crapulation occurs
extern Note Lullaby[];
extern Note HatDance[];
extern Note Twinkle[];

#endif //TUNES_h
