def __init__(self, track, comp_location, start, orig_duration, new_duration):
        """Create a time-stetched segment. 

        It acts like a :py:class:`radiotool.composer.Segment` but you
        can specify the target duration. The segment will then
        resample its frames to meet this duration.

        :param track: Track to slice
        :type track: :py:class:`radiotool.composer.Track`
        :param float comp_location: Location in composition to play this segment (in seconds)
        :param float start: Start of segment (in seconds)
        :param float orig_duration: Original duration of segment (in seconds)
        :param float new_duration: Target (stretched) duration of segment (in seconds)
        """
        Segment.__init__(self, track, comp_location, start, new_duration)
        self.orig_duration = int(orig_duration * self.samplerate)
Beispiel #2
0
    def __init__(self, track, comp_location, start, orig_duration,
                 new_duration):
        """Create a time-stetched segment. 

        It acts like a :py:class:`radiotool.composer.Segment` but you
        can specify the target duration. The segment will then
        resample its frames to meet this duration.

        :param track: Track to slice
        :type track: :py:class:`radiotool.composer.Track`
        :param float comp_location: Location in composition to play this segment (in seconds)
        :param float start: Start of segment (in seconds)
        :param float orig_duration: Original duration of segment (in seconds)
        :param float new_duration: Target (stretched) duration of segment (in seconds)
        """
        Segment.__init__(self, track, comp_location, start, new_duration)
        self.orig_duration = int(orig_duration * self.samplerate)
Beispiel #3
0
 def __init__(self, x, y, size):
     Segment.__init__(self, x, y, size)
     self.image.fill((0, 255, 0))
Beispiel #4
0
 def __init__(self, x0, xf):
     Segment.__init__(self, x0, xf)
Beispiel #5
0
 def __init__(self, p1, p2, camera):
     self.camera = camera
     Segment.__init__(self, p1, p2)