Skip to content

Commit

Permalink
Playtime: Change damper_pedal_off to on_damper_pedal_off
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Jun 12, 2024
1 parent d30a467 commit 5208623
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions playtime-api/src/persistence/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1387,8 +1387,9 @@ pub struct MidiResetMessages {
pub all_sound_off: bool,
/// Sends MIDI CC121 (reset-all-controllers).
pub reset_all_controllers: bool,
/// Sends CC64 value 0 (damper-pedal-off).
pub damper_pedal_off: bool,
/// Sends CC64 value 0 events (damper-pedal-off) for all damper pedals that are currently pressed in this clip.
#[serde(alias = "damper_pedal_off")]
pub on_damper_pedal_off: bool,
}

impl MidiResetMessages {
Expand All @@ -1397,23 +1398,23 @@ impl MidiResetMessages {
all_notes_off: false,
all_sound_off: false,
reset_all_controllers: false,
damper_pedal_off: false,
on_damper_pedal_off: false,
};

pub const LIGHT: Self = Self {
on_notes_off: true,
all_notes_off: false,
all_sound_off: false,
reset_all_controllers: false,
damper_pedal_off: true,
on_damper_pedal_off: true,
};

pub fn at_least_one_enabled(&self) -> bool {
self.on_notes_off
|| self.all_notes_off
|| self.all_sound_off
|| self.reset_all_controllers
|| self.damper_pedal_off
|| self.on_damper_pedal_off
}
}

Expand Down
2 changes: 1 addition & 1 deletion playtime-clip-engine

0 comments on commit 5208623

Please sign in to comment.