main.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. Program RecordPlayback: A MIDI tool
  3. Author: Harry van Haaren
  4. E-mail: harryhaaren@gmail.com
  5. Copyright (C) 2010 Harry van Haaren
  6. PrintJackMidi is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. PrintJackMidi is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with PrintJackMidi. If not, see <http://www.gnu.org/licenses/>. */
  16. #include <iostream>
  17. #include <unistd.h>
  18. #include "jack.hpp"
  19. std::string basedir;
  20. int main(int argc,char *argv[])
  21. {
  22. basedir = argv[1];
  23. std::cout << "\
  24. \t\t\t Midi Record Play\n\
  25. \tThis program creates JACK MIDI input & output ports and will\n\
  26. \tprint in the console all input it recieves, and print\n\
  27. \tevents as they're played back" << std::endl;
  28. // Create Jack object, the constructor registers the MIDI port, etc
  29. Jack jack;
  30. jack.activate();
  31. for(;;)
  32. {
  33. sleep(1);
  34. }
  35. return 0;
  36. }