-- | Time Reading module CsoundExpr.Opcodes.Control.Timeread (readclock, rtclockI, rtclockK, timeinstk, timeinsts, timesI, timesK, timekI, timekK, date, dates) where import CsoundExpr.Base.Types import CsoundExpr.Base.MultiOut import CsoundExpr.Base.SideEffect import CsoundExpr.Base.UserDefined -- | * opcode : readclock -- -- -- * syntax : -- -- > ir readclock inum -- -- -- * description : -- -- Reads the value of an internal clock. -- -- -- * url : readclock :: Irate -> Irate readclock i0num = opcode "readclock" args where args = [to i0num] -- | * opcode : rtclock -- -- -- * syntax : -- -- > ires rtclock -- > kres rtclock -- -- -- * description : -- -- Read the real-time clock from the operating system. -- -- -- * url : rtclockI :: Irate rtclockI = opcode "rtclock" args where args = [] -- | * opcode : rtclock -- -- -- * syntax : -- -- > ires rtclock -- > kres rtclock -- -- -- * description : -- -- Read the real-time clock from the operating system. -- -- -- * url : rtclockK :: Krate rtclockK = opcode "rtclock" args where args = [] -- | * opcode : timeinstk -- -- -- * syntax : -- -- > kres timeinstk -- -- -- * description : -- -- Read absolute time, in k-rate cycles, since the start of an -- instance of an instrument. Called at both i-time as well as -- k-time. -- -- -- * url : timeinstk :: Krate timeinstk = opcode "timeinstk" args where args = [] -- | * opcode : timeinsts -- -- -- * syntax : -- -- > kres timeinsts -- -- -- * description : -- -- Read absolute time, in seconds, since the start of an instance -- of an instrument. -- -- -- * url : timeinsts :: Krate timeinsts = opcode "timeinsts" args where args = [] -- | * opcode : times -- -- -- * syntax : -- -- > ires times -- > kres times -- -- -- * description : -- -- Read absolute time, in seconds, since the start of the -- performance. -- -- -- * url : timesI :: Irate timesI = opcode "times" args where args = [] -- | * opcode : times -- -- -- * syntax : -- -- > ires times -- > kres times -- -- -- * description : -- -- Read absolute time, in seconds, since the start of the -- performance. -- -- -- * url : timesK :: Krate timesK = opcode "times" args where args = [] -- | * opcode : timek -- -- -- * syntax : -- -- > ires timek -- > kres timek -- -- -- * description : -- -- Read absolute time, in k-rate cycles, since the start of the -- performance. -- -- -- * url : timekI :: Irate timekI = opcode "timek" args where args = [] -- | * opcode : timek -- -- -- * syntax : -- -- > ires timek -- > kres timek -- -- -- * description : -- -- Read absolute time, in k-rate cycles, since the start of the -- performance. -- -- -- * url : timekK :: Krate timekK = opcode "timek" args where args = [] -- | * opcode : date -- -- -- * syntax : -- -- > ir date -- -- -- * description : -- -- Returns the number seconds since 1 January 1970, using the -- operating system's clock. -- -- -- * url : date :: Irate date = opcode "date" args where args = [] -- | * opcode : dates -- -- -- * syntax : -- -- > Sir dates [ itime] -- -- -- * description : -- -- Returns as a string the date and time specified. -- -- -- * url : dates :: [Irate] -> String dates i0init = opcode "dates" args where args = map to i0init