Feat: introduce follow up actions

This commit is contained in:
2026-02-22 03:59:09 +01:00
parent d3b27e8245
commit e2f3bcd4a9
25 changed files with 203 additions and 307 deletions

View File

@@ -24,26 +24,37 @@ pub enum PatternPropsField {
Speed,
Quantization,
SyncMode,
FollowUp,
ChainBank,
ChainPattern,
}
impl PatternPropsField {
pub fn next(&self) -> Self {
pub fn next(&self, follow_up_is_chain: bool) -> Self {
match self {
Self::Name => Self::Length,
Self::Length => Self::Speed,
Self::Speed => Self::Quantization,
Self::Quantization => Self::SyncMode,
Self::SyncMode => Self::SyncMode,
Self::SyncMode => Self::FollowUp,
Self::FollowUp if follow_up_is_chain => Self::ChainBank,
Self::FollowUp => Self::FollowUp,
Self::ChainBank => Self::ChainPattern,
Self::ChainPattern => Self::ChainPattern,
}
}
pub fn prev(&self) -> Self {
pub fn prev(&self, follow_up_is_chain: bool) -> Self {
match self {
Self::Name => Self::Name,
Self::Length => Self::Name,
Self::Speed => Self::Length,
Self::Quantization => Self::Speed,
Self::SyncMode => Self::Quantization,
Self::FollowUp => Self::SyncMode,
Self::ChainBank => Self::FollowUp,
Self::ChainPattern if follow_up_is_chain => Self::ChainBank,
Self::ChainPattern => Self::FollowUp,
}
}
}