Skip to content

Commit

Permalink
Syntax fix for equality check with 0. (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinzakka authored Oct 23, 2022
1 parent 241279b commit c510b12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pretty_midi/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def get_piano_roll(self, fs=100, times=None,
# Easiest to process differently depending on bend sign
if start_bend.pitch >= 0:
# First, pitch shift by the int amount
if bend_int is not 0:
if bend_int != 0:
bent_roll[bend_int:] = piano_roll[:-bend_int, bend_range]
else:
bent_roll = piano_roll[:, bend_range]
Expand All @@ -173,7 +173,7 @@ def get_piano_roll(self, fs=100, times=None,
bend_decimal*bent_roll[:-1])
else:
# Same procedure as for positive bends
if bend_int is not 0:
if bend_int != 0:
bent_roll[:bend_int] = piano_roll[-bend_int:, bend_range]
else:
bent_roll = piano_roll[:, bend_range]
Expand Down

0 comments on commit c510b12

Please sign in to comment.