Beispiel #1
0
 def _put_x_in_bounds(self, x):
     return Utils.put_in_bounds(x, 0, self.width())
Beispiel #2
0
 def get_frame_number_from_ratio(self, ratio):
     ratio = Utils.put_in_bounds(ratio, 0, 1)
     return int(self.start_frame + len(self) * ratio)
Beispiel #3
0
 def _get_scaled_len(self, scale_factor):
     return Utils.put_in_bounds(self.MINIMAL_LEN, len(self.wave_state),
                                scale_factor * len(self))