Skip to content

Commit

Permalink
#1119 Improve overall consistency between different ways of playing/s…
Browse files Browse the repository at this point in the history
…topping/panicking

Different modes:

- Via MIDI in real-time
- Via OSC/keyboard
- Via GUI
  • Loading branch information
helgoboss committed Aug 27, 2024
1 parent 0e01432 commit 328c43b
Show file tree
Hide file tree
Showing 5 changed files with 1,071 additions and 582 deletions.
2 changes: 1 addition & 1 deletion main/src/domain/targets/playtime_column_action_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ mod playtime_impl {
if !value.is_on() {
return Ok(HitResponse::ignored());
}
matrix.stop_column(self.column_index)?;
matrix.stop_column(self.column_index);
}
PlaytimeColumnAction::ArmState => {
matrix.set_column_armed(self.column_index, value.is_on())?;
Expand Down
12 changes: 6 additions & 6 deletions main/src/domain/targets/playtime_slot_transport_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ mod playtime_impl {
self.basics.play_options(value),
);
} else {
matrix.stop_slot(self.basics.slot_address)?;
matrix.stop_slot(self.basics.slot_address);
}
HitResponse::processed_with_effect()
}
Expand All @@ -194,7 +194,7 @@ mod playtime_impl {
}
Stop => {
if value.is_on() {
matrix.stop_slot(self.basics.slot_address)?;
matrix.stop_slot(self.basics.slot_address);
HitResponse::processed_with_effect()
} else {
HitResponse::ignored()
Expand All @@ -217,7 +217,7 @@ mod playtime_impl {
}
matrix.record_or_overdub_slot(self.basics.slot_address)?;
} else {
matrix.stop_slot(self.basics.slot_address)?;
matrix.stop_slot(self.basics.slot_address);
}
HitResponse::processed_with_effect()
}
Expand All @@ -235,7 +235,7 @@ mod playtime_impl {
// Not armed but column stopping on empty slots enabled.
// Since we already know that the slot is empty, we do
// it explicitly without invoking play passing that option.
matrix.stop_column(self.basics.slot_address.column())?;
matrix.stop_column(self.basics.slot_address.column());
} else {
bail!(NOT_RECORDING_BECAUSE_NOT_ARMED);
}
Expand All @@ -247,7 +247,7 @@ mod playtime_impl {
);
}
} else {
matrix.stop_slot(self.basics.slot_address)?;
matrix.stop_slot(self.basics.slot_address);
}
HitResponse::processed_with_effect()
}
Expand All @@ -260,7 +260,7 @@ mod playtime_impl {
matrix
.midi_overdub_clip(ClipAddress::new(self.basics.slot_address, 0))?;
} else {
matrix.stop_slot(self.basics.slot_address)?;
matrix.stop_slot(self.basics.slot_address);
}
HitResponse::processed_with_effect()
}
Expand Down
Loading

0 comments on commit 328c43b

Please sign in to comment.