def time_to_tick(self, time):
        # Ticks will be accumulated over tick scale changes
        tick = 0
        # Iterate through all the tempo changes (tick scale changes!)
        for change_tick, tick_scale in reversed(self.__tick_scales):
            change_time = self.tick_to_time(change_tick)
            if time > change_time:
                tick += (time - change_time)/tick_scale
                time = change_time
        return int(tick)
Converts from a time in seconds to absolute tick using
dataset/ETHPy150Open craffel/pretty-midi/pretty_midi/pretty_midi.py/PrettyMIDI.time_to_tick