schema_version: 0.3
type: producer
identifier: timewarp
title: Time Warp
version: 1
copyright: Meltytech, LLC
creator: Brian Matherly
license: LGPLv2.1
language: en
tags:
  - Audio
  - Video
description: >
  Timewarp is a wrapper producer that allows temporal effects on an encapsulated
  producer. The encapsulated producer can be modified to change the speed 
  (faster/slower) or direction (forward/reverse)
  
  In addition to the parameters listed below, this producer inherits all 
  parameters of the encapsulated producer. The encapsulated producer parameters
  can be accessed directly (without any prefix) by getting and setting those 
  parameters on the timewarp producer.
  
  In addition to modifying the speed of the video, the audio is also slowed down
  or sped up to match the video.
parameters:
  - identifier: resource
    title: Speed and Resource
    type: string
    argument: yes
    description: |
      The speed factor and the producer resource in the form: [speed:resource]
      The speed can be any decimal number between 20 and 0.01.
      Negative speed values cause the file to be played backwards.
      The resource can be a file name or any producer service name. 
      The resource will be passed to the loader to create the encapsulated 
      producer.
      
      Examples:
          File opened for 2x speed forward:
              "2.0:example.mp4"
          File opened for 2x speed reverse:
              "-2.0:example.mp4"
          File opened for 1x speed reverse:
              "-1.0:example.mp4"
          File opened for 0.25x speed (slow motion) forward:
              "0.25:example.mp4"
              
      The most common use for this producer is to change the speed of a file. 
      However, any arbitrary producer can be specified. E.g.:
              "2.0:colour:red"
    readonly: no
    required: yes
    mutable: no

  - identifier: warp_pitch
    title: Pitch Compensation
    type: boolean
    description: Enable or disable pitch compensation
    readonly: no
    mutable: no
    default: 0

  - identifier: warp_speed
    title: Warp Speed
    type: float
    description: >
      A convenience parameter to access the speed that was passed as part of 
      the argument.
    readonly: yes

  - identifier: warp_resource
    title: Warp Producer
    type: string
    description: >
      A convenience parameter to access the resource that was passed as part of
      the argument
    readonly: yes
