-- | Data types for enumerated and non signal unit generator inputs.
module Sound.SC3.UGen.Enum where

import Sound.SC3.Common.Envelope
import Sound.SC3.Common.Enum
import Sound.SC3.UGen.Type

-- | Type specialised ('UGen') envelope curve.
type EnvCurve = Envelope_Curve UGen

-- | Lift to 'UGen'.
from_buffer :: Buffer UGen -> UGen
from_buffer :: Buffer UGen -> UGen
from_buffer Buffer UGen
b =
    case Buffer UGen
b of
      Buffer_Id Int
i -> Int -> UGen
forall n. Real n => n -> UGen
constant Int
i
      Buffer UGen
u -> UGen
u