csound-expression-0.0: src/CsoundExpr/Opcodes/Sigio/Pdisplay.hs
-- | Printing and Display
module CsoundExpr.Opcodes.Sigio.Pdisplay
(dispfft,
display,
flashtxt,
print',
printf,
printf_i,
printk,
printk2,
printks,
prints)
where
import CsoundExpr.Base.Types
import CsoundExpr.Base.MultiOut
import CsoundExpr.Base.SideEffect
import CsoundExpr.Base.UserDefined
-- | * opcode : dispfft
--
--
-- * syntax :
--
-- > dispfft xsig, iprd, iwsiz [, iwtyp] [, idbout] [, iwtflg]
--
--
-- * description :
--
-- These units will print orchestra init-values, or produce graphic
-- display of orchestra control signals and audio signals. Uses X11
-- windows if enabled, else (or if -g flag is set) displays are
-- approximated in ASCII characters.
--
--
-- * url : <http://www.csounds.com/manual/html/dispfft.html>
dispfft :: (X x0) => [Irate] -> x0 -> Irate -> Irate -> SignalOut
dispfft i0init x1sig i2prd i3wsiz = outOpcode "dispfft" args
where args = [to x1sig, to i2prd, to i3wsiz] ++ map to i0init
-- | * opcode : display
--
--
-- * syntax :
--
-- > display xsig, iprd [, inprds] [, iwtflg]
--
--
-- * description :
--
-- These units will print orchestra init-values, or produce graphic
-- display of orchestra control signals and audio signals. Uses X11
-- windows if enabled, else (or if -g flag is set) displays are
-- approximated in ASCII characters.
--
--
-- * url : <http://www.csounds.com/manual/html/display.html>
display :: (X x0) => [Irate] -> x0 -> Irate -> SignalOut
display i0init x1sig i2prd = outOpcode "display" args
where args = [to x1sig, to i2prd] ++ map to i0init
-- | * opcode : flashtxt
--
--
-- * syntax :
--
-- > flashtxt iwhich, String
--
--
-- * description :
--
-- Allows text to be displayed from instruments like sliders etc.
-- (only on Unix and Windows at present)
--
--
-- * url : <http://www.csounds.com/manual/html/flashtxt.html>
flashtxt :: Irate -> String -> SignalOut
flashtxt i0which s1tring = outOpcode "flashtxt" args
where args = [to i0which, to s1tring]
-- | * opcode : print
--
--
-- * syntax :
--
-- > print iarg [, iarg1] [, iarg2] [...]
--
--
-- * description :
--
-- These units will print orchestra init-values.
--
--
-- * url : <http://www.csounds.com/manual/html/print.html>
print' :: [Irate] -> SignalOut
print' i0argN = outOpcode "print" args
where args = map to i0argN
-- | * opcode : printf
--
--
-- * syntax :
--
-- > printf_i Sfmt, itrig, [iarg1[, iarg2[,... ]]]
-- > printf Sfmt, ktrig, [xarg1[, xarg2[,... ]]]
--
--
-- * description :
--
-- printf and printf_i write formatted output, similarly to the C
-- function printf(). printf_i runs at i-time only, while printf
-- runs both at initialization and performance time.
--
--
-- * url : <http://www.csounds.com/manual/html/printf.html>
printf :: (K k0, X x0) => String -> k0 -> [x0] -> SignalOut
printf s0fmt k1trig x2argN = outOpcode "printf" args
where args = [to s0fmt, to k1trig] ++ map to x2argN
-- | * opcode : printf_i
--
--
-- * syntax :
--
-- > printf_i Sfmt, itrig, [iarg1[, iarg2[,... ]]]
-- > printf Sfmt, ktrig, [xarg1[, xarg2[,... ]]]
--
--
-- * description :
--
-- printf and printf_i write formatted output, similarly to the C
-- function printf(). printf_i runs at i-time only, while printf
-- runs both at initialization and performance time.
--
--
-- * url : <http://www.csounds.com/manual/html/printf.html>
printf_i :: String -> Irate -> [Irate] -> SignalOut
printf_i s0fmt i1trig i2argN = outOpcode "printf_i" args
where args = [to s0fmt, to i1trig] ++ map to i2argN
-- | * opcode : printk
--
--
-- * syntax :
--
-- > printk itime, kval [, ispace]
--
--
-- * description :
--
-- Prints one k-rate value at specified intervals.
--
--
-- * url : <http://www.csounds.com/manual/html/printk.html>
printk :: (K k0) => [Irate] -> Irate -> k0 -> SignalOut
printk i0init i1time k2val = outOpcode "printk" args
where args = [to i1time, to k2val] ++ map to i0init
-- | * opcode : printk2
--
--
-- * syntax :
--
-- > printk2 kvar [, inumspaces]
--
--
-- * description :
--
-- Prints a new value every time a control variable changes.
--
--
-- * url : <http://www.csounds.com/manual/html/printk2.html>
printk2 :: (K k0) => [Irate] -> k0 -> SignalOut
printk2 i0init k1var = outOpcode "printk2" args
where args = [to k1var] ++ map to i0init
-- | * opcode : printks
--
--
-- * syntax :
--
-- > printks "string", itime [, kval1] [, kval2] [...]
--
--
-- * description :
--
-- Prints at k-rate using a printf() style syntax.
--
--
-- * url : <http://www.csounds.com/manual/html/printks.html>
printks :: (K k0) => String -> Irate -> [k0] -> SignalOut
printks s0string i1time k2argN = outOpcode "printks" args
where args = [to s0string, to i1time] ++ map to k2argN
-- | * opcode : prints
--
--
-- * syntax :
--
-- > prints "string" [, kval1] [, kval2] [...]
--
--
-- * description :
--
-- Prints at init-time using a printf() style syntax.
--
--
-- * url : <http://www.csounds.com/manual/html/prints.html>
prints :: (K k0) => String -> [k0] -> SignalOut
prints s0string k1argN = outOpcode "prints" args
where args = [to s0string] ++ map to k1argN