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