12345678910111213141516171819202122232425 |
- #include "Sequencer.h"
- #include <iostream>
- Sequencer::Sequencer()
- : launchpad(), playbackScreen(*this), messages(midi::Launchpad::height - 1),
- defaultOutputChannel(9)//, player(/*&midiOut, &beats*/0, 0, *this)
- {
- playbackScreen.setLaunchpad(launchpad);
- beats.resize(midi::Launchpad::width - 1);
- }
- void Sequencer::run()
- {
- std::cout << __func__ << std::endl;
- midiOut.openVirtualPort("launchpad sequencer");
- for(int i=0; i<messages.size(); i++) {
- messages[i] = std::make_shared<midi::NoteOnMessage>(defaultOutputChannel, 20 + i * 12, 100 + i);
- }
- playbackScreen.enable();
- std::cin.ignore();
- }
|