Skip to content

Commit

Permalink
Fix bug where REC events sometimes used invalid values
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge committed Dec 1, 2022
1 parent 398e104 commit c8ba4c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/control_surfaces/control_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ def value_midi(self) -> int:
def value_rec(self) -> int:
"""
The value associated with the event, represented as a REC event value
between `0` and `2 ** 16`.
between `0` and `2 ** 30`.
"""
return round(self.value * (2 ** 16))
return round(self.value * (2 ** 30))

@property
def double(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion src/plugs/special/manual_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def editEvent(cls, control: ControlShadowEvent, start: int) -> bool:
general.processRECEvent(
event_id,
control.value_rec,
midi.REC_Control
midi.REC_MIDIController,
)
return True
else:
Expand Down

0 comments on commit c8ba4c2

Please sign in to comment.