 
     @running = false
     @duration = 500
-    @position = 0.0
     @repeat = @repeatCount = 0
     @reverse = false
     @autoreverse = false
+    @direction = true
 
     # control
     @inPorts.start.on 'data', () =>

    return unless @running

    # Measure delta
    delta = 0
    if @lastTime
      t = @currentTime()
      delta = t - @lastTime
      @lastTime = t

    # Add to elapsedTime
    if @direction then @elapsedTime += delta else @elapsedTime -= delta

    # End case
    if @isComplete()
      @position = if @direction then 1.0 else 0.0
      @emitPosition()
      @stop()
      return

    # Continue case
    if @repeat < 1
      @emitPosition()
      return

    # Loop case
    @elapsedTime = @elapsedTime - @duration

    @direction = !@direction if @autoreverse
    @repeat -= 1

    @emitPosition()




  start: () ->
    @lastTime = @currentTime()
    @elapsedTime = 0
    @repeat = @repeatCount
    @running = true
    return unless @outPorts.started.isAttached()
