// midiLew.h
// 
// midi software interface for particle fountain application
//
// this is an objectification of the /usr/share/src/dmedia/midi/simple/simple.c
// dmedia example program source code  provided with silicon graphics systems.//

#ifndef _MIDI_LEW_
#define _MIDI_LEW_


//#include </usr/include/dmedia/midi.h>
//#include <dmedia/dmedia.h>


#include <getopt.h>
#include <stdio.h>
#include <sys/syssgi.h>
#include <stdlib.h>
#include <unistd.h>


#include "MidiEvent.h"

class midiLew{
  
 public:
  midiLew();
  ~midiLew();

  void init();

  void playnote(char note, unsigned long long length, char channel, 
	 char velocity);

  void playSound(/*MidiEvent* event */);

  void m_Lew_exit();

 private:
  unsigned  long long stamp;
  //  MDport 	outport;		/* Output MIDI port */
  //MDevent ev;
  char    *interface;	/* The interface name string */ 
  int	num_interfaces;	/* # of configured interfaces */	
  int     octaves; 	/* Octave range */
  int     mode;		/* Play mode */
  char    startnote;	/* First note to play */
  char    topnote;	/* Last note played */
  char    upflag ;	/* Play notes up, or down */
  char    loop_forever;	/* Continue playing until interrupted */
  char    channel;	/* Channel to transmit on */
  char    velocity;	/* Velocity for note */
  char	program ;	/* Selected program */
  int     inp;		/* Random input control variable */
  int     c;		/* Getopt option */
  unsigned long long future;  	/* Amount of time before play starts */
  unsigned long long length;     /* Amount of time note is held */ 
  
  
};

#endif

