-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell data flow library for audio processing -- -- Haskell data flow library for audio processing @package hdf @version 0.7 module Sound.DF -- | Allocate buffer. b_alloc :: Int -> Int -> OSC -- | Load graph. g_load :: Int -> String -> OSC -- | Load graph. g_unload :: Int -> OSC -- | Run action with UDP link to jack.dl. with_jack_dl :: (UDP -> IO a) -> IO a -- | Audition graph n after sending initialisation messages -- is. audition :: [OSC] -> Node -> IO () -- | Generate C code for graph. code_gen :: Node -> String -- | Generate C code, write file disk and call GNU C compiler to build -- shared library. dl_gen :: FilePath -> Node -> IO () -- | Draw graph using graphviz. view :: Node -> IO () -- | List of nodes, in left biased order. nodes :: Node -> [Node] -- | Read label of node. label :: [(NodeID, Node)] -> Node -> NodeID -- | Transform node to source, see through rec_r and proxy and mrg. source :: [(NodeID, Node)] -> Node -> (NodeID, PortID) -- | Edge between ports. type Edge = ((NodeID, PortID), (NodeID, PortID)) -- | List incoming node edges, edges :: [(NodeID, Node)] -> Node -> [Edge] -- | Label nodes and list edges. Proxy and multiple-root nodes are erased. analyse :: [Node] -> [((NodeID, Node), [Edge])] -- | Transform edge into form required by fgl. mod_e :: Edge -> (NodeID, NodeID, (PortID, PortID)) -- | Generate graph. graph :: Node -> Gr Node (PortID, PortID) -- | Topological sort of nodes (via graph). tsort :: Node -> [Node] -- | Recursion identifer. data R_ID R_ID :: Int -> R_ID -- | Enumeration of types of data on ports. data Type Real_Type :: Type Integer_Type :: Type Boolean_Type :: Type -- | Constant values. data Constant Real_Constant :: Double -> Constant Integer_Constant :: Int -> Constant -- | Port meta data. data Port Port :: Type -> Int -> Port port_data_type :: Port -> Type port_tokens :: Port -> Int -- | Data flow node. data Node S :: Constant -> Node constant :: Node -> Constant A :: String -> [Node] -> [Port] -> Node operator :: Node -> String inputs :: Node -> [Node] outputs :: Node -> [Port] R :: R_ID -> Either Constant (Node, Node) -> Node identifier :: Node -> R_ID input :: Node -> Either Constant (Node, Node) P :: Node -> Int -> Node proxy :: Node -> Node port :: Node -> Int M :: Node -> Node -> Node mleft :: Node -> Node mright :: Node -> Node -- | Node identifier. type NodeID = Int -- | Port identifier. type PortID = Int -- | Multiple root graph (alias for M). mrg :: Node -> Node -> Node -- | Type of a constant value. constant_type :: Constant -> Type -- | Type of a node. node_type :: Node -> Type -- | Lift constant to node. n_real_constant :: Double -> Node -- | Lift constant to node. n_integer_constant :: Int -> Node -- | Unary operator over Real and Integer values. numerical_unary_operator :: String -> Node -> Node -- | Binary operator over Real and Integer values. numerical_binary_operator :: String -> Node -> Node -> Node -- | Unary operator over Real values. real_unary_operator :: String -> Node -> Node -- | Binary operator over Real values. real_binary_operator :: String -> Node -> Node -> Node -- | Addition. n_add :: Node -> Node -> Node -- | Multiplication. n_mul :: Node -> Node -> Node -- | Subtraction. n_sub :: Node -> Node -> Node -- | Negation. n_negate :: Node -> Node -- | Absolute value. n_abs :: Node -> Node -- | Sign of. n_signum :: Node -> Node -- | Division. n_div :: Node -> Node -> Node -- | Reciprocal. n_recip :: Node -> Node -- | Natural exponential. n_exp :: Node -> Node -- | Square root. n_sqrt :: Node -> Node -- | Natural logarithm. n_log :: Node -> Node -- | p to the power of q. n_pow :: Node -> Node -> Node -- | Sine. n_sin :: Node -> Node -- | Cosine. n_cos :: Node -> Node -- | Tangent. n_tan :: Node -> Node -- | Operator from Real or Integer values to a Boolean value. numerical_comparison_operator :: String -> Node -> Node -> Node -- | Less than. n_lt :: Node -> Node -> Node -- | Greater than or equal to. n_gte :: Node -> Node -> Node -- | Greater than. n_gt :: Node -> Node -> Node -- | Less than or equal to. n_lte :: Node -> Node -> Node -- | Maximum. n_max :: Node -> Node -> Node -- | Minimum. n_min :: Node -> Node -> Node -- | Real valued floor. n_floor :: Node -> Node -- | Integer valued floor. n_lrint :: Node -> Node class (Monad m) => ID m generateID :: (ID m) => m Int -- | Introduce backward arc with implicit unit delay. rec_r :: R_ID -> Constant -> (Node -> (Node, Node)) -> Node -- | Monadic variant of rec_r. rec :: (ID m) => Constant -> (Node -> (Node, Node)) -> m Node -- | Variant or rec with monadic action in backward arc. recm :: (ID m) => Constant -> (Node -> m (Node, Node)) -> m Node -- | Uniform input type operator. uniform_operator :: Type -> Int -> String -> [Node] -> Node -- | Single channel output. out1 :: Node -> Node -- | Two channel output. out2 :: (Node, Node) -> Node -- | Three channel output. out3 :: (Node, Node, Node) -> Node -- | Operating sample rate. sample_rate :: Node -- | Equal to. eq :: Node -> Node -> Node -- | If p then q else r. select2 :: Node -> Node -> Node -> Node -- | Binary boolean valued operator. logical_operator :: String -> Node -> Node -> Node -- | Logical and. n_and :: Node -> Node -> Node -- | Logical or. n_or :: Node -> Node -> Node -- | Buffer read. b_read :: Node -> Node -> Node -- | Buffer write. b_write :: Node -> Node -> Node -> Node -- | White noise (0, 1). white_noise_u :: Node -> Node -- | Linear pan. pan2 :: Node -> Node -> (Node, Node) -- | Reversed tuple constructor, (ie. flip (,)) swap :: a -> b -> (b, a) -- | Duplicate a value into a tuple. split :: a -> (a, a) -- | Single sample delay with indicated initial value. unit_delay :: (ID m) => Constant -> Node -> m Node -- | Single place infinte impulse response filter with indicated initial -- value. iir1 :: (ID m) => Constant -> (Node -> Node -> Node) -> Node -> m Node -- | Two place infinte impulse response filter. iir2 :: (ID m) => (Node -> Node -> Node -> Node) -> Node -> m Node -- | Single place finte impulse response filter. fir1 :: (ID m) => (Node -> Node -> Node) -> Node -> m Node -- | Two place finte impulse response filter. fir2 :: (ID m) => (Node -> Node -> Node -> Node) -> Node -> m Node -- | Ordinary biquad filter section. biquad :: (ID m) => (Node -> Node -> Node -> Node -> Node -> Node) -> Node -> m Node -- | Counter from indicated initial value. counter :: (ID m) => Constant -> Node -> m Node -- | Environment value, equal to two_pi / -- sample_rate. radians_per_sample :: Node -- | r = cycle (two-pi), hz = frequency, sr = sample rate hz_to_incr :: Node -> Node -> Node -> Node -- | Two pi. two_pi :: (Floating a) => a -- | If 'q >= p' then 'q - p' else q. clipr :: Node -> Node -> Node -- | r = right hand edge, ip = initial phase, x = increment phasor :: (ID m) => Constant -> Node -> Node -> m Node -- | Sine oscillator, f = frequency in hz. sin_osc :: (ID m) => Node -> Double -> m Node -- | Non-band limited sawtooth oscillator. lf_saw :: (ID m) => Node -> Double -> m Node -- | Non-band limited pulse oscillator, w = width (0,1). lf_pulse :: (ID m) => Node -> Double -> Node -> m Node -- | Midi note number to cycles per second. midi_cps :: (Floating a) => a -> a -- | Multiply and add. mul_add :: (Num a) => a -> a -> a -> a calc_fb :: (Floating a) => a -> a -> a -- | Delay. delay :: (ID m) => Node -> Node -> Node -> m Node -- | Comb filter. buf_comb_n :: (ID m) => Node -> Node -> Node -> Node -> m Node -- | Resonant low pass filter, f = frequency, r = resonance. rlpf :: (ID m) => Node -> Node -> Node -> m Node -- | Constrain p in (-q, q). clip2 :: Node -> Node -> Node -- | White noise (-1, 1). white_noise :: Node -> Node -- | White noise (-1, 1). white_noise_m :: (ID m) => m Node -- | Brown noise (-1, 1). brown_noise_m :: (ID m) => m Node -- | Two zero fixed midpass filter. bpz2 :: (ID m) => Node -> m Node -- | Two zero fixed midcut filter. brz2 :: (ID m) => Node -> m Node -- | Two point average filter lpz1 :: (ID m) => Node -> m Node -- | Two zero fixed lowpass filter lpz2 :: (ID m) => Node -> m Node -- | One pole filter. one_pole :: (ID m) => Node -> Node -> m Node -- | One zero filter. one_zero :: (ID m) => Node -> Node -> m Node -- | Second order filter section. sos :: (ID m) => Node -> Node -> Node -> Node -> Node -> Node -> m Node -- | Impulse oscillator (non band limited). impulse :: (ID m) => Node -> Double -> m Node -- | Two pole resonant filter. resonz :: (ID m) => Node -> Node -> Node -> m Node -- | Sample and hold. latch :: (ID m) => Node -> Node -> m Node -- | Linear range conversion. lin_lin :: (Fractional a) => a -> a -> a -> a -> a -> a -- | Exponential range conversion. lin_exp :: (Floating a) => a -> a -> a -> a -> a -> a -- | Exponential decay. decay :: (ID m) => Node -> Node -> m Node -- | Exponential decay (equvalent to decay dcy - decay atk). decay2 :: (ID m) => Node -> Node -> Node -> m Node -- | Single sample delay. delay1 :: (ID m) => Node -> m Node -- | Two sample delay. delay2 :: (ID m) => Node -> m Node -- | Simple averaging filter. lag :: (ID m) => Node -> Node -> m Node -- | Nested lag filter. lag2 :: (ID m) => Node -> Node -> m Node -- | Twice nested lag filter. lag3 :: (ID m) => Node -> Node -> m Node