Skip to content

ClipSound class

Bases: pytvpaint.sound.BaseSound['Clip']

A clip sound.

Source code in pytvpaint/sound.py
204
205
206
207
208
209
210
211
212
def __init__(
    self,
    track_index: int,
    clip: Clip | None = None,
) -> None:
    from pytvpaint.clip import Clip

    clip = clip or Clip.current_clip()
    super().__init__(track_index, clip)

clip: Clip property

The sound's clip.

make_current() -> None

Makes the sound clip current.

Source code in pytvpaint/sound.py
237
238
239
def make_current(self) -> None:
    """Makes the sound clip current."""
    self.clip.make_current()

remove() -> None

Remove the sound from the clip.

Source code in pytvpaint/sound.py
241
242
243
244
245
@set_as_current
def remove(self) -> None:
    """Remove the sound from the clip."""
    george.tv_sound_clip_remove(self.track_index)
    self.mark_removed()

reload() -> None

Reload the sound from file.

Source code in pytvpaint/sound.py
247
248
249
250
@set_as_current
def reload(self) -> None:
    """Reload the sound from file."""
    george.tv_sound_clip_reload(self._parent.id, self.track_index)