module CsoundExpr.Base.Types
(X(..), K,
Arate, Krate, Irate, SignalOut,
itime, idur, num, double, string)
where
import Text.PrettyPrint(Doc, vcat, text, space)
import qualified CsoundExpr.Translator.Cs.CsTree as La
import CsoundExpr.Translator.Cs.IM
import CsoundExpr.Translator.Types
import CsoundExpr.Base.Imperative
import CsoundExpr.Base.UserDefined(opcode, prefixOperation)
import CsoundExpr.Translator.Csd
itime :: Irate
itime = La.param 2
idur :: Irate
idur = La.param 3
num :: Irate -> Irate
num = id
double :: Double -> Irate
double = La.double
string :: String -> Irate
string = La.string
instance Show Arate where
show x = show $ vcat [title , ppCsTrees $ fromSignalOut (ar "Out" <=> x)]
where title = text "; Arate expression :"
instance Show Krate where
show x = show $ vcat [title , ppCsTrees $ fromSignalOut (kr "Out" <=> x)]
where title = text "; Krate expression :"
instance Show Irate where
show x = show $ vcat [title , ppCsTrees $ fromSignalOut (ir "Out" <=> x)]
where title = text "; Irate expression :"
instance Show SignalOut where
show x = show $ vcat [title , ppCsTrees $ fromSignalOut x]
where title = text "; SignalOut expression :"