Skip to content

Commit

Permalink
TempoConverter: Fix needless conversion warnings
Browse files Browse the repository at this point in the history
Since commit b10a5a7
'core_events.TempoEnvelope' use 'TempoPoint' objects as parameters.
The 'TempoConverter' expected 'TempoPoint' objects or 'floats' but
raises warnings for 'floats'. Because TempoEnvelope can actually return
points these warnings can easily be omitted when the 'TempoConverter'
simply iterates over the parameter entries instead over the value
entries.
  • Loading branch information
levinericzimmermann committed Nov 24, 2022
1 parent 83efe12 commit 0cf86a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mutwo/core_converters/tempos.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _tempo_envelope_to_beat_length_in_seconds_envelope(
"""Convert bpm / TempoPoint based env to beat-length-in-seconds env."""

level_list: list[float] = []
for tempo_point in tempo_envelope.value_tuple:
for tempo_point in tempo_envelope.parameter_tuple:
beat_length_in_seconds = (
TempoConverter._tempo_point_to_beat_length_in_seconds(tempo_point)
)
Expand Down

0 comments on commit 0cf86a1

Please sign in to comment.