diff --git a/pretty_midi/pretty_midi.py b/pretty_midi/pretty_midi.py index 76d111c..a2d00fe 100644 --- a/pretty_midi/pretty_midi.py +++ b/pretty_midi/pretty_midi.py @@ -947,7 +947,7 @@ def tick_to_time(self, tick): if tick >= len(self.__tick_to_time): self._update_tick_to_time(tick) # Ticks should be integers - if type(tick) != int: + if not isinstance(tick, int): warnings.warn('tick should be an int.') # Otherwise just return the time return self.__tick_to_time[int(tick)]