Advertisement
mrgar

mrgar/Midf.h

Aug 20th, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.66 KB | None | 0 0
  1.  1 // This is the specification for the Midf (Midifunction) class.
  2.   2 // The Midf class includes public midi functions.
  3.   3 #ifndef MIDF_H
  4.   4 #define MIDF_H
  5.   5 #include <windows.h>
  6.   6 #include <mmsystem.h>
  7.   7 #include <vector>
  8.   8 //using namespace std;
  9.   9
  10.  10 class Midf{
  11.  11
  12.  12 // Public midi functions in the Midf class:
  13.  13 public:
  14.  14
  15.  15         // Function play_note receives an int and plays a single note.
  16.  16         // It should throw an exception if the argument sent is < 0 or > 127.
  17.  17         // It should also throw an exception if the midi mapper is not found.
  18.  18         void play_note(int);
  19.  19
  20.  20         // Function play_mel receives a vector of ints and plays the notes with the same duration.
  21.  21         // It should throw an exception if the argument sent is < 0 or > 127.
  22.  22         // It should also throw an exception if the midi mapper is not found.
  23.  23         void play_mel(std::vector<int>);
  24.  24
  25.  25         // Function play_mel is an overridden function.
  26.  26         // It receives two vectors of ints and plays the note durations according to the second vector.
  27.  27         // It should throw an exception if the argument sent is < 0 or > 127.
  28.  28         // It should also throw an exception if the midi mapper is not found.
  29.  29         void play_mel(std::vector<int>, std::vector<int>);
  30.  30
  31.  31         // Function play_har_intvl receives two ints and plays a harmonic interval.
  32.  32         // It should throw an exception if either argument sent is < 0 or > 127.
  33.  33         // It should also throw an exception if the midi mapper is not found.
  34.  34         void play_har_intvl(int, int);
  35.  35
  36.  36  };
  37.  37 #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement