All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.sciss.fscape.graph.ImageFileSeqOut.scala Maven / Gradle / Ivy

/*
 *  ImageFileSeqOut.scala
 *  (FScape)
 *
 *  Copyright (c) 2001-2016 Hanns Holger Rutz. All rights reserved.
 *
 *  This software is published under the GNU General Public License v2+
 *
 *
 *  For further information, please contact Hanns Holger Rutz at
 *  [email protected]
 */

package de.sciss.fscape
package graph

import de.sciss.file.File
import de.sciss.fscape.stream.StreamIn

import scala.collection.immutable.{IndexedSeq => Vec}

final case class ImageFileSeqOut(template: File, spec: ImageFile.Spec, indices: GE, in: GE)
  extends UGenSource.ZeroOut {

  protected def makeUGens(implicit b: UGenGraph.Builder): Unit =
    unwrap(indices.expand +: in.expand.outputs)

  protected def makeUGen(args: Vec[UGenIn])(implicit b: UGenGraph.Builder): Unit =
    UGen.ZeroOut(this, inputs = args, rest = template :: spec :: Nil, isIndividual = true)

  private[fscape] def makeStream(args: Vec[StreamIn])(implicit b: stream.Builder): Unit = {
    val indices +: in = args
    stream.ImageFileSeqOut(template = template, spec = spec, indices = indices.toInt, in = in.map(_.toDouble))
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy