Add MIDI input for interactive sequencer playback

This commit is contained in:
Jack Andersen
2016-05-19 20:17:02 -10:00
parent 3a8a9f0ef2
commit 2a5823d6de
8 changed files with 232 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ Engine::Engine(IBackendVoiceAllocator& backend)
: m_backend(backend)
{
backend.register5MsCallback(std::bind(&Engine::_5MsCallback, this, std::placeholders::_1));
m_midiReader = backend.allocateMIDIReader(*this);
}
std::pair<AudioGroup*, const SongGroupIndex*> Engine::_findSongGroup(int groupId) const
@@ -156,6 +157,8 @@ void Engine::_bringOutYourDead()
void Engine::_5MsCallback(double dt)
{
if (m_midiReader)
m_midiReader->pumpReader();
for (std::shared_ptr<Sequencer>& seq : m_activeSequencers)
seq->advance(dt);
}