Skip to content

Commit

Permalink
Pass keyPress/keyRelease/keyKill event from groups to children
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Jul 18, 2024
1 parent 6f55e89 commit 6fa8c7b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/core/rendering/reactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ void Reactor::keyPress(ID channelId, float velocity, bool canRecordActions, bool
/*velocity=*/0.0f, /*canQuantize=*/false, /*isAnyLoopMode=*/false,
/*velocityAsVol=*/false);
}
else if (ch.type == ChannelType::GROUP)
{
for (const ID childId : ch.groupChannel->getChildren())
keyPress(childId, velocity, canRecordActions, canQuantize, currentFrameQuantized);
}

m_model.swap(model::SwapType::SOFT);
}
Expand Down Expand Up @@ -103,6 +108,11 @@ void Reactor::keyRelease(ID channelId, bool canRecordActions, Frame currentFrame
{
releaseSampleChannel(*ch.shared, SamplePlayerMode::SINGLE_BASIC_PAUSE);
}
else if (ch.type == ChannelType::GROUP)
{
for (const ID childId : ch.groupChannel->getChildren())
keyRelease(childId, canRecordActions, currentFrameQuantized);
}

m_model.swap(model::SwapType::SOFT);
}
Expand Down Expand Up @@ -136,6 +146,11 @@ void Reactor::keyKill(ID channelId, bool canRecordActions, Frame currentFrameQua

killSampleChannel(*ch.shared, mode);
}
else if (ch.type == ChannelType::GROUP)
{
for (const ID childId : ch.groupChannel->getChildren())
keyKill(childId, canRecordActions, currentFrameQuantized);
}

m_model.swap(model::SwapType::SOFT);
}
Expand Down

0 comments on commit 6fa8c7b

Please sign in to comment.