-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell SuperCollider -- -- Library for communicating with the SuperCollider synthesiser @package hsc3 @version 0.21 -- | Common core functions. module Sound.Sc3.Common.Base -- | Unary function. type Fn1 a b = a -> b -- | Binary function. type Fn2 a b c = a -> b -> c -- | Ternary function. type Fn3 a b c d = a -> b -> c -> d -- | Quaternary function. type Fn4 a b c d e = a -> b -> c -> d -> e -- | 5-parameter function. type Fn5 a b c d e f = a -> b -> c -> d -> e -> f -- | 6-parameter function. type Fn6 a b c d e f g = a -> b -> c -> d -> e -> f -> g -- | 10-parameter function. type Fn10 a b c d e f g h i j k = a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -- | 11-parameter function. type Fn11 a b c d e f g h i j k l = a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -- | Apply f n times, ie. iterate f x !! n -- --
-- >>> iter 3 (* 2) 1 -- 8 ---- --
-- >>> iterate (* 2) 1 !! 3 -- 8 --iter :: Int -> (a -> a) -> a -> a -- | This is the same function as Control.Monad.void, which however hugs -- does not know of. fvoid :: Functor f => f a -> f () -- | Variant of reads requiring exact match. reads_exact :: Read a => String -> Maybe a -- | Similar to Data.List.Split.splitOn, which however hugs doesn't know -- of. -- --
-- >>> string_split_at_char ':' "/usr/local/bin:/usr/bin:/bin" -- ["/usr/local/bin","/usr/bin","/bin"] ---- --
-- >>> string_split_at_char ':' "/usr/local/bin" -- ["/usr/local/bin"] --string_split_at_char :: Char -> String -> [String] -- | Ci = Case insensitive, Cs = case sensitive, Sci = separator & case -- insensitive data Case_Rule Ci :: Case_Rule Cs :: Case_Rule Sci :: Case_Rule string_op :: (String -> String -> t) -> Case_Rule -> String -> String -> t -- | String equality with Case_Rule. -- --
-- >>> string_eq Ci "sinOsc" "SinOsc" -- True ---- --
-- >>> string_eq Sci "sin-osc" "SinOsc" -- True --string_eq :: Case_Rule -> String -> String -> Bool string_cmp :: Case_Rule -> String -> String -> Ordering -- | rlookup_by of string_eq. rlookup_str :: Case_Rule -> String -> [(a, String)] -> Maybe a -- | Enum parser with Case_Rule. -- --
-- >>> parse_enum Ci "false" :: Maybe Bool -- Just False --parse_enum :: (Show t, Enum t, Bounded t) => Case_Rule -> String -> Maybe t -- | Left to right composition of a list of functions. -- --
-- >>> compose_l [(* 2),(+ 1)] 3 -- 7 --compose_l :: [t -> t] -> t -> t -- | Right to left composition of a list of functions. -- --
-- >>> compose_r [(* 2),(+ 1)] 3 -- 8 --compose_r :: [t -> t] -> t -> t -- | SequenceableCollection.differentiate -- --
-- [3,4,1,1].differentiate == [3,1,-3,0] ---- --
-- >>> d_dx [3,4,1,1] -- [3,1,-3,0] ---- --
-- >>> d_dx [0,1,3,6] -- [0,1,2,3] --d_dx :: Num a => [a] -> [a] -- | Variant that does not prepend zero to input, ie. tail of -- d_dx. -- --
-- > d_dx' [3,4,1,1] ---- --
-- >>> d_dx' [0,1,3,6] -- [1,2,3] --d_dx' :: Num n => [n] -> [n] -- | SequenceableCollection.integrate -- --
-- [3,4,1,1].integrate == [3,7,8,9] ---- --
-- >>> dx_d [3,4,1,1] -- [3,7,8,9] ---- --
-- >>> dx_d (d_dx [0,1,3,6]) -- [0,1,3,6] ---- --
-- >>> dx_d [0.5,0.5] -- [0.5,1.0] --dx_d :: Num n => [n] -> [n] -- | Variant pre-prending zero to output. -- --
-- >>> dx_d' [3,4,1,1] -- [0,3,7,8,9] ---- --
-- >>> dx_d' (d_dx' [0,1,3,6]) -- [0,1,3,6] ---- --
-- >>> dx_d' [0.5,0.5] -- [0.0,0.5,1.0] --dx_d' :: Num n => [n] -> [n] -- | lookup with equality function. lookup_by :: (a -> t -> Bool) -> a -> [(t, b)] -> Maybe b -- | Erroring variant, with message. lookup_by_note :: String -> (a -> t -> Bool) -> a -> [(t, b)] -> b -- | Erroring variant. lookup_by_err :: (a -> t -> Bool) -> a -> [(t, b)] -> b -- | Reverse lookup with equality function. rlookup_by :: (b -> b -> Bool) -> b -> [(a, b)] -> Maybe a -- | (prev,cur,next) triples. -- --
-- >>> pcn_triples [1..3] -- [(Nothing,1,Just 2),(Just 1,2,Just 3),(Just 2,3,Nothing)] --pcn_triples :: [a] -> [(Maybe a, a, Maybe a)] -- | Separate first list element. -- --
-- >>> sep_first "astring"
-- Just ('a',"string")
--
sep_first :: [t] -> Maybe (t, [t])
-- | Separate last list element.
--
--
-- >>> sep_last "stringb"
-- Just ("string",'b')
--
sep_last :: [t] -> Maybe ([t], t)
-- | Are lists of equal length?
--
-- -- >>> equal_length_p ["t1","t2"] -- True ---- --
-- >>> equal_length_p ["t","t1","t2"] -- False --equal_length_p :: [[a]] -> Bool -- | Histogram histogram :: Ord a => [a] -> [(a, Int)] -- | !! with localised error message at_with_error_message :: String -> [t] -> Int -> t -- | concat of intersperse. This is the same function as intercalate, which -- hugs doesn't know of. concat_intersperse :: [a] -> [[a]] -> [a] -- | Similar to Data.List.Split.splitOn, which however hugs doesn't know -- of. -- --
-- >>> list_split_at_elem ' ' "a sequence of words" -- ["a","sequence","of","words"] --list_split_at_elem :: Eq t => t -> [t] -> [[t]] -- | Data.List.sortOn, which however hugs does not know of. -- --
-- >>> sort_on snd [('a',1),('b',0)]
-- [('b',0),('a',1)]
--
sort_on :: Ord b => (a -> b) -> [a] -> [a]
-- | Inserts at the first position where it compares less but not equal to
-- the next element.
--
-- -- >>> import Data.Function -- -- >>> insertBy (compare `on` fst) (3,'x') (zip [1..5] ['a'..]) -- [(1,'a'),(2,'b'),(3,'x'),(3,'c'),(4,'d'),(5,'e')] ---- --
-- >>> insertBy_post (compare `on` fst) (3,'x') (zip [1..5] ['a'..]) -- [(1,'a'),(2,'b'),(3,'c'),(3,'x'),(4,'d'),(5,'e')] --insertBy_post :: (a -> a -> Ordering) -> a -> [a] -> [a] -- | insertBy_post using compare. insert_post :: Ord t => t -> [t] -> [t] -- | Apply f at all but last element, and g at last element. -- --
-- >>> at_last (* 2) negate [1..4] -- [2,4,6,-4] --at_last :: (a -> b) -> (a -> b) -> [a] -> [b] -- | Zip two 4-tuples. p4_zip :: (a, b, c, d) -> (e, f, g, h) -> ((a, e), (b, f), (c, g), (d, h)) -- | Two-tuple. type T2 a = (a, a) -- | Three-tuple. type T3 a = (a, a, a) -- | Four-tuple. type T4 a = (a, a, a, a) -- | t -> (t,t) dup2 :: t -> T2 t -- | t -> (t,t,t) dup3 :: t -> T3 t -- | t -> (t,t,t,t) dup4 :: t -> T4 t -- | concatMap of f at x and g at y. mk_duples :: (a -> c) -> (b -> c) -> [(a, b)] -> [c] -- | Length prefixed list variant of mk_duples. mk_duples_l :: (Int -> c) -> (a -> c) -> (b -> c) -> [(a, [b])] -> [c] -- | concatMap of f at x and g at y and -- h at z. mk_triples :: (a -> d) -> (b -> d) -> (c -> d) -> [(a, b, c)] -> [d] -- |
-- >>> get_env_with_default "undefined_environment_variable" "default" -- "default" --get_env_with_default :: String -> String -> IO String -- | getEnvironment with lookup and default value. -- --
-- get_env_default "PATH" "/usr/bin" --get_env_default :: String -> String -> IO String -- | lookupEnv with default value. -- --
-- lookup_env_default "PATH" "/usr/bin" --lookup_env_default :: String -> String -> IO String -- | Interpreter (module) contexts for hsc3. module Sound.Sc3.Common.Context -- | (moduleName, qualifierName, packageName) type Context = [(String, Maybe String, String)] -- | Format a Context as a sequence of import commands. context_format :: Context -> [String] -- | writeFile of context_format context_write :: FilePath -> Context -> IO () -- | Minimal hsc3 context min_context :: Context -- | Standard hsc3 context std_context :: Context -- | Data types for enumerated and non signal unit generator inputs. module Sound.Sc3.Common.Enum -- | Loop indicator input. data Loop t -- | 0 NoLoop :: Loop t -- | 1 Loop :: Loop t WithLoop :: t -> Loop t -- | Apply f at WithLoop. loop_map :: (t -> u) -> Loop t -> Loop u -- | Resolve Loop. from_loop :: Num t => Loop t -> t -- | Interpolation indicator input. data Interpolation t NoInterpolation :: Interpolation t LinearInterpolation :: Interpolation t CubicInterpolation :: Interpolation t WithInterpolation :: t -> Interpolation t -- | Resolve Interpolation. from_interpolation :: Num t => Interpolation t -> t -- | Completion mode indicator input. data DoneAction t DoNothing :: DoneAction t PauseSynth :: DoneAction t RemoveSynth :: DoneAction t RemoveGroup :: DoneAction t WithDoneAction :: t -> DoneAction t -- | Apply f at WithDoneAction. done_action_map :: (t -> u) -> DoneAction t -> DoneAction u -- | Resolve DoneAction. from_done_action :: Num t => DoneAction t -> t -- | Warp interpolation indicator input. data Warp t Linear :: Warp t Exponential :: Warp t WithWarp :: t -> Warp t -- | Resolve Warp. -- --
-- >>> map from_warp [Linear,Exponential] -- [0,1] --from_warp :: Num t => Warp t -> t -- | Apply f at WithWarp warp_map :: (t -> u) -> Warp t -> Warp u -- | Unification of integer and Ugen buffer identifiers. data Buffer t Buffer_Id :: Int -> Buffer t Buffer :: t -> Buffer t instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Common.Enum.Loop t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Common.Enum.Loop t) instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Common.Enum.Interpolation t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Common.Enum.Interpolation t) instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Common.Enum.DoneAction t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Common.Enum.DoneAction t) instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Common.Enum.Warp t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Common.Enum.Warp t) instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Common.Enum.Buffer t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Common.Enum.Buffer t) instance GHC.Base.Functor Sound.Sc3.Common.Enum.Warp instance GHC.Base.Functor Sound.Sc3.Common.Enum.DoneAction instance GHC.Base.Functor Sound.Sc3.Common.Enum.Loop -- | Functions to access to the Sc3 Rtf & Html based help systems. module Sound.Sc3.Common.Help -- | Directory containing Sc3 Rtf help files. sc3_rtf_help_dir :: IO FilePath -- | Find (case-insensitively) indicated file at sc3_rtf_help_dir. -- Runs the command "find -name" (so Unix only). -- --
-- sc3_rtf_find_file "SinOsc.help.rtf" -- sc3_rtf_find_file "lfsaw.help.rtf" -- sc3_rtf_find_file "softClip.rtf" --sc3_rtf_find_file :: FilePath -> IO (Maybe FilePath) -- | error variant. sc3_rtf_find_file_err :: FilePath -> IO FilePath -- | Run the command unrtf (so UNIX only) to convert an RTF file to a TEXT -- (.scd) file. sc3_rtf_to_scd :: FilePath -> FilePath -> IO () -- | sc3_rtf_to_scd of sc3_rtf_find_file_err, writing output -- to TMPDIR sc3_rtf_help_translate :: String -> IO FilePath -- | sc3_rtf_help_translate and run editor. sc3_rtf_help_scd_open :: (String, [String]) -> String -> IO () -- | sc3_rtf_help_scd_open with emacsclient --no-wait. -- --
-- sc3_rtf_help_scd_open_emacs "lfsaw" --sc3_rtf_help_scd_open_emacs :: String -> IO () -- | Url for online Sc-Doc SuperCollider documentation. sc3_scdoc_help_url :: String -- | Read the environment variable Sc3_ScDoc_Html_Help_Dir. The -- default value is ~/.local/share/SuperCollider/Help. sc3_scdoc_help_dir :: IO String -- | Path to indicated Sc3 class help file. -- --
-- >>> sc3_scdoc_help_class "SinOsc" -- "Classes/SinOsc.html" --sc3_scdoc_help_class :: String -> String -- | Generate path to indicated Sc3 operator help file. -- --
-- >>> sc3_scdoc_help_operator "+" -- "Overviews/Operators.html#+" --sc3_scdoc_help_operator :: String -> FilePath -- | Generate path to indicated Sc3 method help. -- --
-- >>> sc3_scdoc_help_method '*' ("C","m")
-- "Classes/C.html#*m"
--
sc3_scdoc_help_method :: Char -> (String, String) -> FilePath
-- | Generate path to indicated Sc3 class method help.
--
--
-- >>> sc3_scdoc_help_class_method ("C","m")
-- "Classes/C.html#*m"
--
sc3_scdoc_help_class_method :: (String, String) -> FilePath
-- | Generate path to indicated Sc3 instance method help.
--
--
-- >>> sc3_scdoc_help_instance_method ("C","m")
-- "Classes/C.html#-m"
--
sc3_scdoc_help_instance_method :: (String, String) -> FilePath
-- | Sc3 help path documenting x.
--
-- -- >>> sc3_scdoc_help_path "Operator.distort" -- "Overviews/Operators.html#distort" ---- --
-- >>> sc3_scdoc_help_path "Collection.*fill" -- "Classes/Collection.html#*fill" ---- --
-- >>> sc3_scdoc_help_path "Collection.inject" -- "Classes/Collection.html#-inject" ---- --
-- >>> sc3_scdoc_help_path "SinOsc" -- "Classes/SinOsc.html" --sc3_scdoc_help_path :: String -> String -- | Open Sc3 help path, either the local file or the online version. Use -- BROWSER or x-www-browser. -- --
-- Base.System.get_env_default "BROWSER" "x-www-browser" ---- --
-- sc3_scdoc_help_open True (sc3_scdoc_help_path "SinOsc") -- sc3_scdoc_help_open True (sc3_scdoc_help_path "Collection.*fill") -- sc3_scdoc_help_open False (sc3_scdoc_help_path "Collection.inject") --sc3_scdoc_help_open :: Bool -> String -> IO () -- | Generate path to indicated Sc3 instance method help. Adds initial -- forward slash if not present. -- --
-- let r = "Reference/Server-Command-Reference.html#/b_alloc" -- sc3_scdoc_help_server_command_path "b_alloc" == r --sc3_scdoc_help_server_command_path :: String -> FilePath -- | sc3_scdoc_help_open of sc3_server_command_path -- --
-- sc3_scdoc_help_server_command_open True "s_new" -- sc3_scdoc_help_server_command_open False "/b_allocRead" --sc3_scdoc_help_server_command_open :: Bool -> String -> IO () -- | Apply function at lines of string. on_lines_of :: ([String] -> [[String]]) -> String -> [String] -- | Split text into fragments at empty lines. Hsc3 (and related projects) -- write help files as sets of distinct fragments. Fragments are -- separated by empty lines. A line containing the special character -- sequence ---- indicates the end of the fragments. -- --
-- >>> on_lines_of split_multiple_fragments ";a\nb\n\n\n;c\nd" -- [";a\nb\n",";c\nd\n"] --split_multiple_fragments :: [String] -> [[String]] -- | The text '----' appearing anywhere in a line indicates the end of the -- graph fragments. The text '# ' appearing at the start of a line also -- indicates the end of the graph fragments. -- --
-- >>> drop_post_graph_section ["a","b","c","","----d","e","f"] -- ["a","b","c",""] ---- --
-- >>> drop_post_graph_section ["a","b","c","","----d","# e","","f"] -- ["a","b","c",""] --drop_post_graph_section :: [String] -> [String] -- | Some help files are in Markdown format. These are recognised by -- examing the first two characters, which must be a # and ' '. is_md_help :: String -> Bool -- | There are two code block formats in markdown help files. The first -- indents the block using a single tab or four spaces. The second marks -- the start and end of the block by lines starting with three back ticks -- (`). -- -- See: https://spec.commonmark.org/0.30/#indented-code-blocks and -- https://spec.commonmark.org/0.30/#fenced-code-blocks data CodeBlockType IndentedCodeBlock :: CodeBlockType FencedCodeBlock :: CodeBlockType -- | Get code blocks from Markdown help file. md_help_get_code_blocks :: [String] -> [(CodeBlockType, [String])] is_doctest_block :: [String] -> Bool md_help_get_tab_indented_code_blocks :: [String] -> [[String]] -- | Get indented code blocks from Markdown help file. -- --
-- >>> s <- readFile "/home/rohan/sw/spl/Help/Reference/AllpassC.help.sl" -- -- >>> is_md_help s -- True ---- --
-- >>> let b = md_help_get_fenced_code_blocks (lines s) -- -- >>> length b -- 3 --md_help_get_fenced_code_blocks :: [String] -> [[String]] get_help_file_fragments :: String -> [String] -- | Read text fragments from file. read_file_fragments :: FilePath -> IO [String] -- | Read text fragments from set of files. read_file_set_fragments :: [FilePath] -> IO [String] instance GHC.Show.Show Sound.Sc3.Common.Help.CodeBlockType instance GHC.Read.Read Sound.Sc3.Common.Help.CodeBlockType instance GHC.Classes.Eq Sound.Sc3.Common.Help.CodeBlockType instance GHC.Enum.Enum Sound.Sc3.Common.Help.CodeBlockType instance GHC.Enum.Bounded Sound.Sc3.Common.Help.CodeBlockType -- | Functions related to the Sc2 help files. module Sound.Sc3.Common.Help.Sc2 -- | Approximate Ugen categorisation from Sc2. The help files were -- organised in sub-directories. -- --
-- map fst sc2_ugen_categories --sc2_ugen_categories :: [(String, [String])] -- | Common math functions. module Sound.Sc3.Common.Math -- | Half pi. -- --
-- >>> half_pi -- 1.5707963267948966 --half_pi :: Floating a => a -- | Two pi. -- --
-- >>> two_pi -- 6.283185307179586 --two_pi :: Floating n => n -- | abs of (-). absdif :: Num a => a -> a -> a -- | Sc3 MulAdd type signature, arguments in Sc3 order of input, multiply, -- add. type Sc3_MulAdd t = t -> t -> t -> t -- | Ordinary (un-optimised) multiply-add, see also mulAdd Ugen. -- --
-- >>> sc3_mul_add 2 3 4 == 2 * 3 + 4 -- True ---- --
-- >>> map (\x -> sc3_mul_add x 2 3) [1,5] -- [5,13] ---- --
-- >>> map (\x -> sc3_mul_add x 3 2) [1,5] -- [5,17] --sc3_mul_add :: Num t => Sc3_MulAdd t -- | Ordinary Haskell order (un-optimised) multiply-add. -- --
-- >>> mul_add 3 4 2 == 2 * 3 + 4 -- True ---- --
-- >>> map (mul_add 2 3) [1,5] -- [5,13] ---- --
-- > map (mul_add 3 4) [1,5] ---- --
-- >>> mul_add_hs (3,4) 2 == 2 * 3 + 4 -- True --mul_add_hs :: Num t => (t, t) -> t -> t -- | fromInteger of truncate. sc3_truncate :: RealFrac a => a -> a -- | fromInteger of round. sc3_round :: RealFrac a => a -> a -- | fromInteger of ceiling. sc3_ceiling :: RealFrac a => a -> a -- | fromInteger of floor. sc3_floor :: RealFrac a => a -> a -- | Variant of Sc3 roundTo function. -- --
-- >>> sc3_round_to (2/3) 0.25 -- 0.75 ---- --
-- >>> map (`sc3_round_to` 0.25) [0,0.1 .. 1] -- [0.0,0.0,0.25,0.25,0.5,0.5,0.5,0.75,0.75,1.0,1.0] ---- --
-- >>> map (`sc3_round_to` 5.0) [100.0 .. 110.0] -- [100.0,100.0,100.0,105.0,105.0,105.0,105.0,105.0,110.0,110.0,110.0] --sc3_round_to :: RealFrac n => n -> n -> n -- | fromInteger of div of floor. sc3_idiv :: RealFrac n => n -> n -> n -- | sc3_lcm -- -- Least common multiple. This definition extends the usual definition -- and returns a negative number if any of the operands is negative. This -- makes it consistent with the lattice-theoretical interpretation and -- its idempotency, commutative, associative, absorption laws. -- --
-- >>> lcm 4 6 -- 12 ---- --
-- >>> lcm 1 1 -- 1 ---- --
-- >>> lcm 1624 26 -- 21112 ---- --
-- >>> lcm 1624 (-26) /= (-21112) -- True ---- --
-- >>> lcm (-1624) (-26) /= (-21112) -- True ---- --
-- >>> lcm 513 (gcd 513 44) -- 513 --sc3_lcm :: t -> t -> t -- | sc3_gcd -- -- Greatest common divisor. This definition extends the usual definition -- and returns a negative number if both operands are negative. This -- makes it consistent with the lattice-theoretical interpretation and -- its idempotency, commutative, associative, absorption laws. -- https://www.jsoftware.com/papers/eem/gcd.htm -- --
-- >>> gcd 4 6 -- 2 ---- --
-- >>> gcd 0 1 -- 1 ---- --
-- >>> gcd 1024 256 -- 256 ---- --
-- >>> gcd 1024 (-256) -- 256 ---- --
-- >>> gcd (-1024) (-256) /= (-256) -- True ---- --
-- >>> gcd (-1024) (lcm (-1024) 256) /= (-1024) -- True ---- --
-- >>> gcd 66 54 * lcm 66 54 == 66 * 54 -- True --sc3_gcd :: t -> t -> t -- | The Sc3 % Ugen operator is the mod' function. -- --
-- 1.5 % 1.2 // ~= 0.3 -- -1.5 % 1.2 // ~= 0.9 -- 1.5 % -1.2 // ~= -0.9 -- -1.5 % -1.2 // ~= -0.3 ---- --
-- >>> let (~=) p q = abs (p - q) < 0.000001 -- -- >>> let (%) = sc3_mod -- -- >>> (1.5 % 1.2) ~= 0.3 -- True ---- --
-- >>> ((-1.5) % 1.2) ~= 0.9 -- True ---- --
-- >>> (1.5 % (-1.2)) ~= (-0.9) -- True ---- --
-- >>> ((-1.5) % (-1.2)) ~= (-0.3) -- True ---- --
-- 1.2 % 1.5 // ~= 1.2 -- -1.2 % 1.5 // ~= 0.3 -- 1.2 % -1.5 // ~= -0.3 -- -1.2 % -1.5 // ~= -1.2 ---- --
-- >>> (1.2 % 1.5) ~= 1.2 -- True ---- --
-- >>> ((-1.2) % 1.5) ~= 0.3 -- True ---- --
-- >>> (1.2 % (-1.5)) ~= (-0.3) -- True ---- --
-- >>> ((-1.2) % (-1.5)) ~= (-1.2) -- True ---- --
-- >>> map (\n -> sc3_mod n 12.0) [-1.0,12.25,15.0] -- [11.0,0.25,3.0] --sc3_mod :: RealFrac n => n -> n -> n -- | Type specialised sc3_mod. fmod_f32 :: Float -> Float -> Float -- | Type specialised sc3_mod. fmod_f64 :: Double -> Double -> Double -- | Sc3 clip function. Clip n to within range -- (i,j). clip is a Ugen. -- --
-- >>> map (\n -> sc3_clip n 5 10) [3..12] -- [5,5,5,6,7,8,9,10,10,10] --sc3_clip :: Ord a => a -> a -> a -> a -- | Variant of sc3_clip with haskell argument structure. -- --
-- >>> map (clip_hs (5,10)) [3..12] -- [5,5,5,6,7,8,9,10,10,10] --clip_hs :: Ord a => (a, a) -> a -> a -- | Fractional modulo, alternate implementation. -- --
-- >>> map (\n -> sc3_mod_alt n 12.0) [-1.0,12.25,15.0] -- [11.0,0.25,3.0] --sc3_mod_alt :: RealFrac a => a -> a -> a -- | Wrap function that is non-inclusive at right edge, ie. the Wrap -- Ugen rule. -- --
-- >>> map (round . sc3_wrap_ni 0 5) [4,5,6] -- [4,0,1] ---- --
-- >>> map (round . sc3_wrap_ni 5 10) [3..12] -- [8,9,5,6,7,8,9,5,6,7] ---- --
-- Sound.Sc3.Plot.plot_fn_r1_ln (sc3_wrap_ni (-1) 1) (-2,2) --sc3_wrap_ni :: RealFrac a => a -> a -> a -> a -- | sc_wrap::int -- --
-- [5,6].wrap(0,5) == [5,0] ---- --
-- >>> map (wrap_hs_int (0,5)) [5,6] -- [5,0] ---- --
-- [9,10,5,6,7,8,9,10,5,6].wrap(5,10) == [9,10,5,6,7,8,9,10,5,6] ---- --
-- >>> map (wrap_hs_int (5,10)) [3..12] -- [9,10,5,6,7,8,9,10,5,6] --wrap_hs_int :: Integral a => (a, a) -> a -> a -- | Wrap n to within range (i,j), ie. -- AbstractFunction.wrap, ie. inclusive at right edge. -- wrap is a Ugen, hence prime. -- --
-- [5.0,6.0].wrap(0.0,5.0) == [0.0,1.0] ---- --
-- >>> map (round . wrap_hs (0,4)) [-1,0 .. 5] -- [3,0,1,2,3,0,1] ---- --
-- >>> map (round . wrap_hs (0,5)) [5,6] -- [0,1] ---- --
-- >>> map (round . wrap_hs (5,10)) [3..12] -- [8,9,5,6,7,8,9,5,6,7] ---- --
-- Sound.Sc3.Plot.plot_fn_r1_ln (wrap_hs (-1,1)) (-2,2) --wrap_hs :: RealFrac n => (n, n) -> n -> n -- | Variant of wrap_hs with Sc3 argument ordering. -- --
-- >>> map (\n -> sc3_wrap n 5 10) [3..12] == map (wrap_hs (5,10)) [3..12] -- True ---- --
-- >>> map (\n -> sc3_wrap n 0 4) [-1, 0 .. 5] -- [3.0,0.0,1.0,2.0,3.0,0.0,1.0] --sc3_wrap :: RealFrac n => n -> n -> n -> n -- | Generic variant of wrap'. -- --
-- [5,6].wrap(0,5) == [5,0] ---- --
-- >>> map (generic_wrap (0,5)) [5,6] -- [5,0] ---- --
-- [9,10,5,6,7,8,9,10,5,6].wrap(5,10) == [9,10,5,6,7,8,9,10,5,6] ---- --
-- >>> map (generic_wrap (5::Integer,10)) [3..12] -- [9,10,5,6,7,8,9,10,5,6] --generic_wrap :: (Ord a, Num a) => (a, a) -> a -> a -- | Given sample-rate sr and bin-count n calculate frequency -- of ith bin. -- --
-- >>> bin_to_freq 44100 2048 32 -- 689.0625 --bin_to_freq :: (Fractional n, Integral i) => n -> i -> i -> n -- | Fractional midi note number to cycles per second. -- --
-- >>> map (floor . midi_to_cps) [0,24,69,120,127] -- [8,32,440,8372,12543] ---- --
-- >>> map (floor . midi_to_cps) [-36,138] -- [1,23679] ---- --
-- >>> map (floor . midi_to_cps) [69.0,69.25 .. 70.0] -- [440,446,452,459,466] --midi_to_cps :: Floating a => a -> a -- | Cycles per second to fractional midi note number. -- --
-- >>> map (round . cps_to_midi) [8,32,440,8372,12543] -- [0,24,69,120,127] ---- --
-- >>> map (round . cps_to_midi) [1,24000] -- [-36,138] --cps_to_midi :: Floating a => a -> a -- | Cycles per second to linear octave (4.75 = A4 = 440). -- --
-- >>> map (cps_to_oct . midi_to_cps) [60,63,69] -- [4.0,4.25,4.75] --cps_to_oct :: Floating a => a -> a -- | Linear octave to cycles per second. -- --
-- [4.0,4.25,4.75].octcps.cpsmidi == [60,63,69] ---- --
-- >>> map (cps_to_midi . oct_to_cps) [4.0,4.25,4.75] -- [60.0,63.0,69.0] --oct_to_cps :: Floating a => a -> a -- | Degree, scale and steps per octave to key. degree_to_key :: RealFrac a => [a] -> a -> a -> a -- | One-indexed piano key number (for standard 88 key piano) to midi note -- number. -- --
-- >>> map pianokey_to_midi [1,49,88] -- [21,69,108] --pianokey_to_midi :: Num n => n -> n -- | Piano key to hertz (ba.pianokey2hz in Faust). This is useful as a more -- musical gamut than midi note numbers. Ie. if x is in (0,1) then -- pianokey_to_cps of (x * 88) is in (26,4168) -- --
-- >>> map (round . pianokey_to_cps) [0,1,40,49,88] -- [26,28,262,440,4186] ---- --
-- >>> map (round . midi_to_cps) [0,60,69,127] -- [8,262,440,12544] --pianokey_to_cps :: Floating n => n -> n -- | Linear amplitude to decibels. -- --
-- >>> map (round . amp_to_db) [0.01,0.05,0.0625,0.125,0.25,0.5] -- [-40,-26,-24,-18,-12,-6] --amp_to_db :: Floating a => a -> a -- | Decibels to linear amplitude. -- --
-- >>> map (floor . (* 100). db_to_amp) [-40,-26,-24,-18,-12,-6] -- [1,5,6,12,25,50] ---- --
-- >>> let amp = map (2 **) [0 .. 15] -- -- >>> let db = [0,-6 .. -90] -- -- >>> map (round . amp_to_db . (/) 1) amp == db -- True ---- --
-- >>> db_to_amp (-3) -- 0.7079457843841379 ---- --
-- >>> amp_to_db 0.7079457843841379 -- -3.0 --db_to_amp :: Floating a => a -> a -- | Fractional midi note interval to frequency multiplier. -- --
-- >>> map midi_to_ratio [-12,0,7,12] -- [0.5,1.0,1.4983070768766815,2.0] --midi_to_ratio :: Floating a => a -> a -- | Inverse of midi_to_ratio. -- --
-- >>> map ratio_to_midi [3/2,2] -- [7.019550008653875,12.0] --ratio_to_midi :: Floating a => a -> a -- | sr = sample rate, r = cycle (two-pi), cps = -- frequency -- --
-- >>> cps_to_incr 48000 128 375 -- 1.0 ---- --
-- >>> cps_to_incr 48000 two_pi 458.3662361046586 -- 6.0e-2 --cps_to_incr :: Fractional a => a -> a -> a -> a -- | Inverse of cps_to_incr. -- --
-- >>> incr_to_cps 48000 128 1 -- 375.0 --incr_to_cps :: Fractional a => a -> a -> a -> a -- | Pan2 function, identity is linear, sqrt is equal power. pan2_f :: Fractional t => (t -> t) -> t -> t -> (t, t) -- | Linear pan. -- --
-- >>> map (lin_pan2 1) [-1,-0.5,0,0.5,1] -- [(1.0,0.0),(0.75,0.25),(0.5,0.5),(0.25,0.75),(0.0,1.0)] --lin_pan2 :: Fractional t => t -> t -> (t, t) -- | Equal power pan. -- --
-- >>> map (eq_pan2 1) [-1,-0.5,0,0.5,1] -- [(1.0,0.0),(0.8660254037844386,0.5),(0.7071067811865476,0.7071067811865476),(0.5,0.8660254037844386),(0.0,1.0)] --eq_pan2 :: Floating t => t -> t -> (t, t) -- | fromInteger of properFraction. sc3_properFraction :: RealFrac t => t -> (t, t) -- | a^2 - b^2. sc3_dif_sqr :: Num a => a -> a -> a -- | Euclidean distance function (sqrt of sum of squares). sc3_hypot :: Floating a => a -> a -> a -- | Sc3 hypotenuse approximation function. sc3_hypotx :: (Ord a, Floating a) => a -> a -> a -- | Fold k to within range (i,j), ie. -- AbstractFunction.fold -- --
-- >>> map (foldToRange 5 10) [3..12] -- [7,6,5,6,7,8,9,10,9,8] --foldToRange :: (Ord a, Num a) => a -> a -> a -> a -- | Variant of foldToRange with Sc3 argument ordering. sc3_fold :: (Ord a, Num a) => a -> a -> a -> a -- | Sc3 distort operator. sc3_distort :: Fractional n => n -> n -- | Sc3 softclip operator. sc3_softclip :: (Ord n, Fractional n) => n -> n -- | True is conventionally 1. The test to determine true is > -- 0. sc3_true :: Num n => n -- | False is conventionally 0. The test to determine true is <= -- 0. sc3_false :: Num n => n -- | Lifted not. -- --
-- >>> sc3_not sc3_true == sc3_false -- True ---- --
-- >>> sc3_not sc3_false == sc3_true -- True --sc3_not :: (Ord n, Num n) => n -> n -- | Translate Bool to sc3_true and sc3_false. sc3_bool :: Num n => Bool -> n -- | Lift comparison function. sc3_comparison :: Num n => (n -> n -> Bool) -> n -> n -> n -- | Lifted ==. sc3_eq :: (Num n, Eq n) => n -> n -> n -- | Lifted /=. sc3_neq :: (Num n, Eq n) => n -> n -> n -- | Lifted <. sc3_lt :: (Num n, Ord n) => n -> n -> n -- | Lifted <=. sc3_lte :: (Num n, Ord n) => n -> n -> n -- | Lifted >. sc3_gt :: (Num n, Ord n) => n -> n -> n -- | Lifted >=. sc3_gte :: (Num n, Ord n) => n -> n -> n -- | Enumeration of clipping rules. data Clip_Rule Clip_None :: Clip_Rule Clip_Left :: Clip_Rule Clip_Right :: Clip_Rule Clip_Both :: Clip_Rule -- | Clip a value that is expected to be within an input range to an output -- range, according to a rule. -- --
-- >>> let f r = map (\x -> apply_clip_rule r 0 1 (-1) 1 x) [-1,0,0.5,1,2] -- -- >>> map f [minBound .. maxBound] -- [[Nothing,Nothing,Nothing,Nothing,Nothing],[Just (-1.0),Just (-1.0),Nothing,Nothing,Nothing],[Nothing,Nothing,Nothing,Just 1.0,Just 1.0],[Just (-1.0),Just (-1.0),Nothing,Just 1.0,Just 1.0]] --apply_clip_rule :: Ord n => Clip_Rule -> n -> n -> n -> n -> n -> Maybe n -- | Scale uni-polar (0,1) input to linear (l,r) range. urange_ma :: Fractional a => Sc3_MulAdd a -> a -> a -> a -> a -- | Scale (0,1) input to linear (l,r) range. u = uni-polar. -- --
-- >>> map (urange 3 4) [0,0.5,1] -- [3.0,3.5,4.0] --urange :: Fractional a => a -> a -> a -> a -- | Calculate multiplier and add values for (-1,1) range transform. -- --
-- >>> range_muladd 3 4 -- (0.5,3.5) --range_muladd :: Fractional t => t -> t -> (t, t) -- | Scale bi-polar (-1,1) input to linear (l,r) range. Note that the -- argument order is not the same as linLin. range_ma :: Fractional a => Sc3_MulAdd a -> a -> a -> a -> a -- | Scale (-1,1) input to linear (l,r) range. Note that the argument order -- is not the same as linlin. Note also that the various range -- Ugen methods at sclang select mul-add values given the output range of -- the Ugen, ie LFPulse.range selects a (0,1) input range. -- --
-- >>> map (range 3 4) [-1,0,1] -- [3.0,3.5,4.0] ---- --
-- >>> map (\x -> let (m,a) = linlin_muladd (-1) 1 3 4 in x * m + a) [-1,0,1] -- [3.0,3.5,4.0] --range :: Fractional a => a -> a -> a -> a -- | uncurry range range_hs :: Fractional a => (a, a) -> a -> a -- | flip range_hs. This allows cases such as osc -- in_range (0,1) in_range :: Fractional a => a -> (a, a) -> a -- | Calculate multiplier and add values for linlin transform. -- Inputs are: input-min input-max output-min output-max -- --
-- >>> range_muladd 3 4 -- (0.5,3.5) ---- --
-- >>> linlin_muladd (-1) 1 3 4 -- (0.5,3.5) ---- --
-- >>> linlin_muladd 0 1 3 4 -- (1.0,3.0) ---- --
-- >>> linlin_muladd (-1) 1 0 1 -- (0.5,0.5) ---- --
-- >>> linlin_muladd (-0.3) 1 (-1) 1 -- (1.5384615384615383,-0.5384615384615385) --linlin_muladd :: Fractional t => t -> t -> t -> t -> (t, t) -- | Map from one linear range to another linear range. -- --
-- >>> linlin_ma sc3_mul_add 5 0 10 (-1) 1 -- 0.0 --linlin_ma :: Fractional a => Sc3_MulAdd a -> a -> a -> a -> a -> a -> a -- | linLin with a more typical haskell argument structure, ranges -- as pairs and input last. -- --
-- >>> map (linlin_hs (0,127) (-0.5,0.5)) [0,63.5,127] -- [-0.5,0.0,0.5] --linlin_hs :: Fractional a => (a, a) -> (a, a) -> a -> a -- | Map from one linear range to another linear range. -- --
-- >>> map (\i -> sc3_linlin i (-1) 1 0 1) [-1,-0.75 .. 1] -- [0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0] --sc3_linlin :: Fractional a => a -> a -> a -> a -> a -> a -- | Given enumeration from dst that is in the same relation as -- n is from src. -- --
-- >>> linlin_enum_plain 'a' 'A' 'e' -- 'E' ---- --
-- >>> linlin_enum_plain 0 (-50) 16 -- -34 ---- --
-- >>> linlin_enum_plain 0 (-50) (-1) -- -51 --linlin_enum_plain :: (Enum t, Enum u) => t -> u -> t -> u -- | Variant of linlin_enum_plain that requires src and -- dst ranges to be of equal size, -- and for n to lie in -- src. -- --
-- >>> linlin_enum (0,100) (-50,50) 0x10 -- 16 -- Just (-34) ---- --
-- >>> linlin_enum (-50,50) (0,100) (-34) -- Just 16 ---- --
-- >>> linlin_enum (0,100) (-50,50) (-1) -- Nothing --linlin_enum :: (Enum t, Enum u) => (t, t) -> (u, u) -> t -> Maybe u -- | Erroring variant. linlin_enum_err :: (Enum t, Enum u) => (t, t) -> (u, u) -> t -> u -- | Variant of linlin that requires src and dst -- ranges to be of -- equal size, thus with constraint of Num and -- Eq instead of -- Fractional. -- --
-- >>> linlin_eq (0,100) (-50,50) 0x10 -- 16 -- Just (-34) ---- --
-- >>> linlin_eq (-50,50) (0,100) (-34) -- Just 16 --linlin_eq :: (Eq a, Num a) => (a, a) -> (a, a) -> a -> Maybe a -- | Erroring variant. linlin_eq_err :: (Eq a, Num a) => (a, a) -> (a, a) -> a -> a -- | Linear to exponential range conversion. Rule is as at linExp Ugen, -- haskell manner argument ordering. Destination values must be nonzero -- and have the same sign. -- --
-- >>> map (floor . linexp_hs (1,2) (10,100)) [0,1,1.5,2,3] -- [1,10,31,100,1000] ---- --
-- >>> map (floor . linexp_hs (-2,2) (1,100)) [-3,-2,-1,0,1,2,3] -- [0,1,3,10,31,100,316] --linexp_hs :: Floating a => (a, a) -> (a, a) -> a -> a -- | Variant of linexp_hs with argument ordering as at -- linExp Ugen. -- --
-- >>> map (\i -> lin_exp i 1 2 1 3) [1,1.1,1.9,2] -- [1.0,1.1161231740339046,2.6878753795222865,3.0] ---- --
-- >>> map (\i -> floor (lin_exp i 1 2 10 100)) [0,1,1.5,2,3] -- [1,10,31,100,1000] --lin_exp :: Floating a => a -> a -> a -> a -> a -> a -- | SimpleNumber.linexp shifts from linear to exponential ranges. -- --
-- >>> map (sc3_linexp 1 2 1 3) [1,1.1,1.9,2] -- [1.0,1.1161231740339046,2.6878753795222865,3.0] ---- --
-- [1,1.5,2].collect({|i| i.linexp(1,2,10,100).floor}) == [10,31,100]
--
--
-- -- >>> map (floor . sc3_linexp 1 2 10 100) [0,1,1.5,2,3] -- [10,10,31,100,100] --sc3_linexp :: (Ord a, Floating a) => a -> a -> a -> a -> a -> a -- | SimpleNumber.explin is the inverse of linexp. -- --
-- >>> map (sc3_explin 10 100 1 2) [10,10,31,100,100] -- [1.0,1.0,1.4913616938342726,2.0,2.0] --sc3_explin :: (Ord a, Floating a) => a -> a -> a -> a -> a -> a -- | Translate from one exponential range to another. -- --
-- >>> map (round . sc3_expexp 0.1 10 4.3 100) [1 .. 10] -- [21,33,44,53,62,71,78,86,93,100] --sc3_expexp :: (Ord a, Floating a) => a -> a -> a -> a -> a -> a -- | Map x from an assumed linear input range (src_l,src_r) to an -- exponential curve output range (dst_l,dst_r). curve is like -- the parameter in Env. Unlike with linexp, the output range may include -- zero. -- --
-- (0..10).lincurve(0,10,-4.3,100,-3).round == [-4,24,45,61,72,81,87,92,96,98,100] ---- --
-- >>> let f = round . sc3_lincurve (-3) 0 10 (-4.3) 100 -- -- >>> map f [0 .. 10] -- [-4,24,45,61,72,81,87,92,96,98,100] ---- --
-- import Sound.Sc3.Plot {\- hsc3-plot -\}
-- plotTable (map (\c-> map (sc3_lincurve c 0 1 (-1) 1) [0,0.01 .. 1]) [-6,-4 .. 6])
--
sc3_lincurve :: (Ord a, Floating a) => a -> a -> a -> a -> a -> a -> a
-- | Inverse of sc3_lincurve.
--
-- -- >>> let f = round . sc3_curvelin (-3) (-4.3) 100 0 10 -- -- >>> map f [-4,24,45,61,72,81,87,92,96,98,100] == [0..10] -- True --sc3_curvelin :: (Ord a, Floating a) => a -> a -> a -> a -> a -> a -> a -- | Removes all but the last trailing zero from floating point string. double_pp_rm0 :: String -> String -- | The default show is odd, 0.05 shows as 5.0e-2. -- --
-- >>> unwords (map (double_pp 4) [0.0001,0.001,0.01,0.1,1.0]) -- "0.0001 0.001 0.01 0.1 1.0" --double_pp :: Int -> Double -> String -- | Print as integer if integral, else as real. -- --
-- >>> unwords (map (real_pp 5) [0.0001,0.001,0.01,0.1,1.0]) -- "0.0001 0.001 0.01 0.1 1" --real_pp :: Int -> Double -> String -- | Type-specialised readMaybe. parse_double :: String -> Maybe Double -- | Non-specialised optimised sum function (3 & 4 element adders). sum_opt_f :: Num t => (t -> t -> t -> t) -> (t -> t -> t -> t -> t) -> [t] -> t -- | Taylor approximation of sin, (-pi, pi). -- --
-- import Sound.Sc3.Plot -- let xs = [-pi, -pi + 0.05 .. pi] in plot_p1_ln [map sin_taylor_approximation xs, map sin xs] -- let xs = [-pi, -pi + 0.05 .. pi] in plot_p1_ln [map (\x -> sin_taylor_approximation x - sin x) xs] --sin_taylor_approximation :: Floating a => a -> a -- | Bhaskara approximation of sin, (0, pi). -- --
-- import Sound.Sc3.Plot -- let xs = [0, 0.05 .. pi] in plot_p1_ln [map sin_bhaskara_approximation xs, map sin xs] -- let xs = [0, 0.05 .. pi] in plot_p1_ln [map (\x -> sin_bhaskara_approximation x - sin x) xs] --sin_bhaskara_approximation :: Floating a => a -> a -- | Robin Green, robin_green@playstation.sony.com, (-pi, pi) -- --
-- import Sound.Sc3.Plot -- let xs = [-pi, -pi + 0.05 .. pi] in plot_p1_ln [map sin_green_approximation xs, map sin xs] -- let xs = [-pi, -pi + 0.05 .. pi] in plot_p1_ln [map (\x -> sin_green_approximation x - sin x) xs] --sin_green_approximation :: Floating a => a -> a -- | Paul Adenot, (-pi, pi) -- --
-- import Sound.Sc3.Plot -- let xs = [-pi, -pi + 0.05 .. pi] in plot_p1_ln [map sin_adenot_approximation xs, map sin xs] -- let xs = [-pi, -pi + 0.05 .. pi] in plot_p1_ln [map (\x -> sin_adenot_approximation x - sin x) xs] --sin_adenot_approximation :: Floating a => a -> a sin_robin_approximation :: Floating a => a -> a instance GHC.Enum.Bounded Sound.Sc3.Common.Math.Clip_Rule instance GHC.Enum.Enum Sound.Sc3.Common.Math.Clip_Rule -- | Signals & wavetables module Sound.Sc3.Common.Buffer -- | z ranges from 0 (for i) to 1 (for j). -- --
-- 1.5.blend(2.0,0.50) ---- --
-- >>> blend 0.50 1.5 2 -- 1.75 ---- --
-- >>> blend 0.75 1.5 2 -- 1.875 --blend :: Num a => a -> a -> a -> a -- | Variant of (!!) but values for index greater than the size of -- the collection will be clipped to the last index. -- --
-- >>> map (\x -> clipAt x "abc") [-1,0,1,2,3] -- "aabcc" --clipAt :: Int -> [a] -> a -- | blendAt with clip function as argument. blendAtBy :: (Integral i, RealFrac n) => (i -> t -> n) -> n -> t -> n -- | SequenceableCollection.blendAt returns a linearly -- interpolated value between the two closest indices. Inverse operation -- is indexInBetween. -- --
-- [2,5,6].blendAt(0.4) ---- --
-- >>> blendAt 0 [2,5,6] -- 2.0 -- -- >>> blendAt 0.4 [2,5,6] -- 3.2 --blendAt :: RealFrac a => a -> [a] -> a -- | Resampling function, n is destination length, r is -- source length, f is the indexing function, c is the -- collection. resamp1_gen :: (Integral i, RealFrac n) => i -> i -> (i -> t -> n) -> t -> i -> n -- | SequenceableCollection.resamp1 returns a new collection of -- the desired length, with values resampled evenly-spaced from the -- receiver with linear interpolation. -- --
-- [1].resamp1(3) == [1,1,1] -- [1,2,3,4].resamp1(12) -- [1,2,3,4].resamp1(3) == [1,2.5,4] ---- --
-- >>> resamp1 3 [1] -- [1.0,1.0,1.0] ---- --
-- >>> resamp1 7 [1,2,3,4] -- [1.0,1.5,2.0,2.5,3.0,3.5,4.0] ---- --
-- >>> resamp1 3 [1,2,3,4] -- [1.0,2.5,4.0] --resamp1 :: RealFrac n => Int -> [n] -> [n] -- | ArrayedCollection.normalizeSum ensures sum of elements is -- one. -- --
-- [1,2,3].normalizeSum == [1/6,1/3,0.5] ---- --
-- >>> normalizeSum [1,2,3] == [1/6,2/6,3/6] -- True --normalizeSum :: Fractional a => [a] -> [a] -- | Variant that specifies range of input sequence separately. normalise_rng :: Fractional n => (n, n) -> (n, n) -> [n] -> [n] -- | ArrayedCollection.normalize returns a new Array with the -- receiver items normalized between min and max. -- --
-- [1,2,3].normalize == [0,0.5,1] -- [1,2,3].normalize(-20,10) == [-20,-5,10] ---- --
-- >>> normalize 0 1 [1,2,3] -- [0.0,0.5,1.0] ---- --
-- >>> normalize (-20) 10 [1,2,3] -- [-20.0,-5.0,10.0] --normalize :: (Fractional n, Ord n) => n -> n -> [n] -> [n] -- | List of 2-tuples of elements at distance (stride) n. -- --
-- >>> t2_window 3 [1..9] -- [(1,2),(4,5),(7,8)] --t2_window :: Integral i => i -> [t] -> [(t, t)] -- | List of 2-tuples of adjacent elements. -- --
-- >>> t2_adjacent [1..6] -- [(1,2),(3,4),(5,6)] ---- --
-- >>> t2_adjacent [1..5] -- [(1,2),(3,4)] --t2_adjacent :: [t] -> [(t, t)] -- | List of 2-tuples of overlapping elements. -- --
-- >>> t2_overlap [1..4] -- [(1,2),(2,3),(3,4)] --t2_overlap :: [b] -> [(b, b)] -- | Concat of 2-tuples. -- --
-- >>> t2_concat (t2_adjacent [1..6]) -- [1,2,3,4,5,6] ---- --
-- >>> t2_concat (t2_overlap [1..4]) -- [1,2,2,3,3,4] --t2_concat :: [(a, a)] -> [a] -- | A Signal is half the size of a Wavetable, each element is the sum of -- two adjacent elements of the Wavetable. -- --
-- >>> from_wavetable [-0.5,0.5,0,0.5,1.5,-0.5,1,-0.5] -- [0.0,0.5,1.0,0.5] ---- --
-- >>> let s = [0,0.5,1,0.5] -- -- >>> from_wavetable (to_wavetable s) == s -- True --from_wavetable :: Num n => [n] -> [n] -- | A Wavetable has n * 2 elements, where n is the number of elements of -- the Signal. Each signal element e0 expands to the two elements (2 * e0 -- - e1, e1 - e0) where e1 is the next element, or zero at the final -- element. Properly wavetables are only of power of two element signals. -- --
-- Signal[0,0.5,1,0.5].asWavetable == Wavetable[-0.5,0.5,0,0.5,1.5,-0.5,1,-0.5] ---- --
-- >>> to_wavetable [0,0.5,1,0.5] -- [-0.5,0.5,0.0,0.5,1.5,-0.5,1.0,-0.5] --to_wavetable :: Num a => [a] -> [a] -- | Shaper requires wavetables without wrap. -- --
-- >>> to_wavetable_nowrap [0,0.5,1,0.5] -- [-0.5,0.5,0.0,0.5,1.5,-0.5] --to_wavetable_nowrap :: Num a => [a] -> [a] -- | Variant of sineFill that gives each component table. -- --
-- >>> let t = sineGen 1024 (map recip [1, 2, 3, 5, 8, 13, 21, 34, 55]) (replicate 9 0) -- -- >>> map length t == replicate 9 1024 -- True ---- --
-- Sound.Sc3.Plot.plot_p1_ln t --sineGen :: (Floating n, Enum n) => Int -> [n] -> [n] -> [[n]] -- | Signal.*sineFill is a table generator. Frequencies are -- partials, amplitudes and initial phases are as given. Result is -- normalised. -- --
-- let a = [[21,5,34,3,2,13,1,8,55],[13,8,55,34,5,21,3,1,2],[55,34,1,3,2,13,5,8,21]] -- let t = map (\amp -> sineFill 1024 (map recip amp) (replicate 9 0)) a -- Sound.Sc3.Plot.plot_p1_ln t --sineFill :: (Ord n, Floating n, Enum n) => Int -> [n] -> [n] -> [n] -- | Vector variants of Sound.Sc3.Common.Buffer. These functions -- have the same names as the plain forms and are not re-exported by -- Sound.Sc3.Common. module Sound.Sc3.Common.Buffer.Vector -- | clipAt. clipAt :: Storable t => Int -> Vector t -> t -- | blendAtBy of clipAt. -- --
-- Sound.Sc3.Common.Buffer.Vector.blendAt 0 (V.fromList [2,5,6]) == 2 -- Sound.Sc3.Common.Buffer.Vector.blendAt 0.4 (V.fromList [2,5,6]) == 3.2 -- Sound.Sc3.Common.Buffer.Vector.blendAt 2.1 (V.fromList [2,5,6]) == 6 --blendAt :: (Storable t, RealFrac t) => t -> Vector t -> t -- | from_wavetable -- --
-- Sound.Sc3.Common.Buffer.Vector.from_wavetable (V.fromList [-0.5,0.5,0,0.5,1.5,-0.5,1,-0.5]) --from_wavetable :: (Storable t, Num t) => Vector t -> Vector t -- | resamp1. -- --
-- Sound.Sc3.Common.Buffer.Vector.resamp1 12 (V.fromList [1,2,3,4]) -- Sound.Sc3.Common.Buffer.Vector.resamp1 3 (V.fromList [1,2,3,4]) == V.fromList [1,2.5,4] --resamp1 :: (Storable t, RealFrac t) => Int -> Vector t -> Vector t -- | Implementation of server b_gen routines. -- -- The naming scheme is: _p generates one partial, _l generates a list of -- partials, _nrm is the unit normalised form. module Sound.Sc3.Common.Buffer.Gen -- | Sum (mix) multiple tables into one. sum_l :: Num n => [[n]] -> [n] -- | Unit normalisation. nrm_u :: (Fractional n, Ord n) => [n] -> [n] -- | sine3_p with zero phase. -- --
-- import Sound.Sc3.Plot -- plot_p1_ln [sine1_p 512 (1, 1)] --sine1_p :: (Enum n, Floating n) => Int -> (n, n) -> [n] -- | Series of sine wave harmonics using specified amplitudes. sine1_l :: (Enum n, Floating n) => Int -> [n] -> [[n]] -- | sum_l of sine1_l. -- --
-- plot_p1_ln [sine1 256 [1, 0.95 .. 0.5]] --sine1 :: (Enum n, Floating n) => Int -> [n] -> [n] -- | nrm_u of sine1_l. -- --
-- Sound.Sc3.Plot.plot_p1_ln [sine1_nrm 256 [1, 0.95 .. 0.5]] -- Sound.Sc3.Plot.plot_p1_ln [sine1_nrm 256 [1, 1/2, 1/3, 1/4, 1/5]] --sine1_nrm :: (Enum n, Floating n, Ord n) => Int -> [n] -> [n] -- | Variant that generates a wavetable (without guard point) suitable for -- the Shaper Ugen. sine1Tbl :: (Enum n, Floating n, Ord n) => Int -> [n] -> [n] -- | Series of n sine wave partials using specified frequencies and -- amplitudes. sine2_l :: (Enum n, Floating n) => Int -> [(n, n)] -> [[n]] -- | sum_l of sine2_l. -- --
-- Sound.Sc3.Plot.plot_p1_ln [sine2 256 (zip [1, 2..] [1, 0.95 .. 0.5])] -- Sound.Sc3.Plot.plot_p1_ln [sine2 256 (zip [1, 1.5 ..] [1, 0.95 .. 0.5])] --sine2 :: (Enum n, Floating n) => Int -> [(n, n)] -> [n] -- | nrm_u of sine2_l. sine2_nrm :: (Enum n, Floating n, Ord n) => Int -> [n] -> [n] -- | Sine wave table at specified frequency, amplitude and phase. The table -- does not arrive back at the starting point. -- --
-- >>> map (round . (* 100)) (sine3_p 8 (1, 1, 0)) -- [0,71,100,71,0,-71,-100,-71] --sine3_p :: (Enum n, Floating n) => Int -> (n, n, n) -> [n] -- | map of sine3_p. sine3_l :: (Enum n, Floating n) => Int -> [(n, n, n)] -> [[n]] -- | sum_l of sine3_l. -- --
-- plot_p1_ln [sine3 256 (zip3 [1,1.5 ..] [1,0.95 .. 0.5] [0,pi/7..])] --sine3 :: (Enum n, Floating n) => Int -> [(n, n, n)] -> [n] -- | Generate Chebyshev waveshaping table, see b_gen_cheby. Cf. -- https://www.csounds.com/manual/html/GEN13.html -- --
-- import Sound.Sc3.Plot -- let p x = plot_p1_ln [gen_cheby 512 x] ---- --
-- p [1, 0, 1, 1, 0, 1] -- p [100, -50, -33, 25, 20, -16.7, -14.2, 12.5, 11.1, -10, -9.09, 8.333, 7.69, -7.14, -6.67, 6.25, 5.88, -5.55, -5.26, 5] -- p [100, 0, -33, 0, 20, 0, -14.2, 0, 11.1, 0, -9.09, 0, 7.69, 0, -6.67, 0, 5.88, 0, -5.26] -- p [100, 0, -11.11, 0, 4, 0, -2.04, 0, 1.23, 0, -0.826, 0, 0.59, 0, -0.444, 0, 0.346, 0, -0.277] -- p [1, -0.8, 0, 0.6, 0, 0, 0, 0.4, 0, 0, 0, 0, 0.1, -0.2, -0.3, 0.5] -- p [0, 0, -0.1, 0, 0.3, 0, -0.5, 0, 0.7, 0, -0.9, 0, 1, 0, -1, 0] -- p [0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, -0.1, 0, 0.1, 0, -0.2, 0.3, 0, -0.7, 0, 0.2, 0, -0.1] -- p [5, 0, 3, 0, 1] --gen_cheby :: (Enum n, Floating n, Ord n, Integral i) => i -> [n] -> [n] -- | Type specialised gen_cheby. cheby :: (Enum n, Floating n, Ord n) => Int -> [n] -> [n] -- | Variant that generates a wavetable (without guard point) suitable for -- the Shaper Ugen. chebyShaperTbl :: (Enum n, Floating n, Ord n) => Int -> [n] -> [n] -- | Array variants of Sound.Sc3.Common.Buffer. These functions have -- the same names as the plain forms and are not re-exported by -- Sound.Sc3.Common. module Sound.Sc3.Common.Buffer.Array -- | clipAt. clipAt :: Int -> Array Int a -> a -- | blendAtBy of clipAt. -- --
-- Sound.Sc3.Common.Buffer.Array.blendAt 0 (A.listArray (0,2) [2,5,6]) == 2 -- Sound.Sc3.Common.Buffer.Array.blendAt 0.4 (A.listArray (0,2) [2,5,6]) == 3.2 --blendAt :: RealFrac a => a -> Array Int a -> a -- | resamp1. -- --
-- Sound.Sc3.Common.Buffer.Array.resamp1 12 (A.listArray (0,3) [1,2,3,4]) -- Sound.Sc3.Common.Buffer.Array.resamp1 3 (A.listArray (0,3) [1,2,3,4]) == A.listArray (0,2) [1,2.5,4] --resamp1 :: RealFrac n => Int -> Array Int n -> Array Int n -- | Filter coefficient calculations. module Sound.Sc3.Common.Math.Filter -- | Sos filter coefficients, (a0, a1, a2, b1, b2) type SosCoef t = (t, t, t, t, t) -- | Butterworth low pass or high pass Sos filter coefficients. bw_lpf_or_hpf_coef :: Floating n => Bool -> n -> n -> SosCoef n -- | Two place infinite impulse response filter coefficients, (a0, b1, b2) type Iir2Coef t = (t, t, t) -- | rlpf coefficients, (a0,b1,b2). rlpf_coef :: Floating n => (n -> n -> n) -> (n, n, n) -> Iir2Coef n -- | resonz coefficients, (a0,b1,b2). resonz_coef :: Floating n => (n, n, n) -> Iir2Coef n type Pinking_Param t = (t, t, t, t, t, t, t) -- | Sample rate variable pinking filter. -- -- -- https://www.musicdsp.org/en/latest/Filters/76-pink-noise-filter.html pinking_filter_freq_48000 :: Fractional t => Pinking_Param t pinking_filter_freq_96000 :: Fractional t => Pinking_Param t pinking_filter_freq_192000 :: Fractional t => Pinking_Param t -- | Pinking filter coefficients -- --
-- >>> pinking_filter_coef 48000 pinking_filter_freq_48000 -- (0.5368186045507747,0.5899888969306109,0.6945314610687594,0.8175983529924599,0.9542588306160661,0.9908788735874952,0.9960807097281633) --pinking_filter_coef :: Floating t => t -> Pinking_Param t -> Pinking_Param t pinking_filter_next :: Floating t => Pinking_Param t -> Pinking_Param t -> t -> (t, Pinking_Param t) -- | Beq filter coefficient calculations. module Sound.Sc3.Common.Math.Filter.Beq -- | Beq coefficients, (a0, a1, a2, b1, b2). type Beq t = (t, t, t, t, t) -- | Calculate coefficients for bi-quad low pass filter. bLowPassCoef :: Floating t => t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad high pass filter. bHiPassCoef :: Floating t => t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad all pass filter. bAllPassCoef :: Floating t => t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad band pass filter. bBandPassCoef :: Floating t => t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad stop band filter. bBandStopCoef :: Floating t => t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad peaking Eq filter. bPeakEqCoef :: Floating t => t -> t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad low shelf filter. bLowShelfCoef :: Floating t => t -> t -> t -> t -> Beq t -- | Calculate coefficients for bi-quad high shelf filter. bHiShelfCoef :: Floating t => t -> t -> t -> t -> Beq t -- | Interpolation functions, ie. for envelope segments. Present naming is -- for qualified import. module Sound.Sc3.Common.Math.Interpolate -- | An interpolation function takes three arguments. x0 is the left or -- begin value, x1 is the right or end value, t is a (0,1) index. type Interpolation_f t = t -> t -> t -> t -- | Clip x to (0,1) and run f. -- --
-- >>> interpolate linear (-1,1) 0.5 -- 0.0 --interpolate :: (Num t, Ord t) => Interpolation_f t -> (t, t) -> t -> t -- | Step function, ignores t and returns x1. step :: Interpolation_f t -- | Linear interpolation funtion. -- --
-- >>> map (linear 1 10) [0,0.25 .. 1] -- [1.0,3.25,5.5,7.75,10.0] ---- --
-- import Sound.Sc3.Plot {\- hsc3-plot -\}
-- plot_fn_r1_ln (linear (-1) 1) (0,1)
--
linear :: Num t => Interpolation_f t
-- | Exponential interpolation. x0 must not be zero and (x0,x1) must not
-- span zero.
--
-- -- plot_fn_r1_ln [exponential 0.001 1] (0,1) -- plot_fn_r1_ln [exponential 1 2] (0,1) -- plot_fn_r1_ln [exponential 20 20000] (0,1) --exponential :: Floating t => Interpolation_f t -- | Variant that allows x0 to be zero, though (x0,x1) must not span zero. -- --
-- plot_fn_r1_ln [exponential_0 0 1] (0,1) -- plot_fn_r1_ln [exponential_0 0 (-1)] (0,1) --exponential_0 :: (Eq t, Floating t) => Interpolation_f t -- | linear of exponential_0 of (0,1), ie. allows (x0,x1) to -- span zero. -- --
-- plot_fn_r1_ln [exponential_lin (-1) 1] (0,1) --exponential_lin :: (Eq t, Floating t) => Interpolation_f t -- | linear with t transformed by sine function over -- (-pi2,pi2). -- --
-- plot_fn_r1_ln [sine (-1) 1] (0,1) -- plot_fn_r1_ln [sine 1 (-1)] (0,1) --sine :: Floating t => Interpolation_f t -- | If x0 < x1 rising sine segment (0,pi2), else falling -- segment (pi2,pi). -- --
-- plot_fn_r1_ln [welch (-1) 1] (0,1) -- plot_fn_r1_ln [welch 1 (-1)] (0,1) --welch :: (Ord t, Floating t) => Interpolation_f t -- | Curvature controlled by single parameter c. Zero is linear, -- increasing c approaches exponential and continues past it. The -- value for c at which the curve is close to exponential depends on the -- range. -- --
-- plot_p1_ln (map (\c-> map (curve c (-1) 1) [0,0.01 .. 1]) [-6,-4 .. 6]) -- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [curve 4.4 1 100,exponential 1 100,curve 4.5 1 100]) -- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [exponential 20 20000,curve 7 20 20000]) -- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [fader 0 2,curve 2 0 2]) --curve :: (Ord t, Floating t) => t -> Interpolation_f t -- | Square of linear of sqrt of x0 and x1, therefore neither -- may be negative. -- --
-- plot_fn_r1_ln [squared 0 1] (0,1) -- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [curve 2.05 0 1,squared 0 1]) --squared :: Floating t => Interpolation_f t -- | Cubic variant of squared. -- --
-- plot_fn_r1_ln [cubed 0 1] (0,1) -- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [curve 3.25 0 1,cubed 0 1]) --cubed :: Floating t => Interpolation_f t -- | x0 until end, then immediately x1. -- --
-- plot_fn_r1_ln [hold 0 1] (0,2) --hold :: (Num t, Ord t) => Interpolation_f t -- | Fader curve, equal to squared when x1 > x0. -- --
-- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [squared 0 1,fader 0 1]) -- plot_p1_ln (map (\f -> map f [0,0.01 .. 1]) [curve 2 1 0,fader 1 0]) --fader :: (Num t, Ord t) => Interpolation_f t -- | Envelope generators. module Sound.Sc3.Common.Envelope -- | Envelope curve indicator input. data Envelope_Curve a EnvStep :: Envelope_Curve a EnvLin :: Envelope_Curve a EnvExp :: Envelope_Curve a EnvSin :: Envelope_Curve a -- | Note: not implemented at Sc3 EnvWelch :: Envelope_Curve a EnvNum :: a -> Envelope_Curve a EnvSqr :: Envelope_Curve a EnvCub :: Envelope_Curve a EnvHold :: Envelope_Curve a -- | Envelope curve pair. type Envelope_Curve_2 a = T2 (Envelope_Curve a) -- | Envelope curve triple. type Envelope_Curve_3 a = T3 (Envelope_Curve a) -- | Envelope curve quadruple. type Envelope_Curve_4 a = T4 (Envelope_Curve a) -- | Convert Envelope_Curve to shape value. -- --
-- >>> map env_curve_shape [EnvSin,EnvSqr] -- [3,6] --env_curve_shape :: Num a => Envelope_Curve a -> a -- | The value of EnvCurve is non-zero for EnvNum. -- --
-- >>> map env_curve_value [EnvWelch,EnvNum 2] -- [0,2] --env_curve_value :: Num a => Envelope_Curve a -> a -- | Interpolation_f of Envelope_Curve. env_curve_interpolation_f :: (Ord t, Floating t) => Envelope_Curve t -> Interpolation_f t -- | Apply f to EnvNum value. env_curve_map :: (a -> b) -> Envelope_Curve a -> Envelope_Curve b -- | Sc3 envelope segment model data Envelope a Envelope :: [a] -> [a] -> [Envelope_Curve a] -> Maybe Int -> Maybe Int -> a -> Envelope a -- | Set of n levels, n is >= 1 [env_levels] :: Envelope a -> [a] -- | Set of n-1 time intervals [env_times] :: Envelope a -> [a] -- | Possibly empty curve set [env_curves] :: Envelope a -> [Envelope_Curve a] -- | Maybe index to release node [env_release_node] :: Envelope a -> Maybe Int -- | Maybe index to loop node [env_loop_node] :: Envelope a -> Maybe Int -- | An offset for all time values (IEnvGen only) [env_offset] :: Envelope a -> a -- | Apply f to all a at Envelope. envelope_map :: (a -> b) -> Envelope a -> Envelope b -- | Variant without release and loop node inputs (defaulting to nil). -- --
-- Sound.Sc3.Plot.plotEnvelope [envelope [0,1,0] [3,2] [EnvSin,EnvSin]] --envelope :: Num a => [a] -> [a] -> [Envelope_Curve a] -> Envelope a -- | Duration of Envelope, ie. sum . env_times. envelope_duration :: Num n => Envelope n -> n -- | Number of segments at Envelope, ie. length . -- env_times. envelope_n_segments :: Integral i => Envelope n -> i -- | Determine which envelope segment a given time t falls in. envelope_segment_ix :: (Ord a, Num a) => Envelope a -> a -> Maybe Int -- | A set of start time, start level, end time, end level and curve. type Envelope_Segment t = (t, t, t, t, Envelope_Curve t) -- | Extract envelope segment given at index i. envelope_segment :: Num t => Envelope t -> Int -> Envelope_Segment t -- | Extract all segments. envelope_segments :: Num t => Envelope t -> [Envelope_Segment t] -- | Transform list of Envelope_Segments into lists -- (env_levels,env_times,env_curves). pack_envelope_segments :: Num t => [Envelope_Segment t] -> ([t], [t], [Envelope_Curve t]) -- | An envelope is normal if it has no segments with zero duration. envelope_is_normal :: (Eq n, Num n) => Envelope n -> Bool -- | Normalise envelope by deleting segments of zero duration. envelope_normalise :: (Num a, Ord a) => Envelope a -> Envelope a -- | Get value for Envelope at time t, or zero if t is -- out of range. By convention if the envelope has a segment of zero -- duration we give the rightmost value. envelope_at :: (Ord t, Floating t) => Envelope t -> t -> t -- | Render Envelope to breakpoint set of n equi-distant -- places. envelope_render :: (Ord t, Floating t, Enum t) => Int -> Envelope t -> [(t, t)] -- | Contruct a lookup table of n places from Envelope. envelope_table :: (Ord t, Floating t, Enum t) => Int -> Envelope t -> [t] -- | Variant on env_curves that expands the, possibly empty, user -- list by cycling (if not empty) or by filling with EnvLin. envelope_curves :: Envelope a -> [Envelope_Curve a] -- | Linear Sc3 form of Envelope data. -- -- Form is: l0 #t reset loop l1 t0 c0 c0' ... -- --
-- >>> envelope_sc3_array (envelope [0,1] [0.1] [EnvLin]) -- Just [0.0,1.0,-99.0,-99.0,1.0,0.1,1.0,0.0] ---- --
-- >>> let l = [0,0.6,0.3,1.0,0] -- -- >>> let t = [0.1,0.02,0.4,1.1] -- -- >>> let c = [EnvLin,EnvExp,EnvNum (-6),EnvSin] -- -- >>> envelope_sc3_array (Envelope l t c Nothing Nothing 0) -- Just [0.0,4.0,-99.0,-99.0,0.6,0.1,1.0,0.0,0.3,2.0e-2,2.0,0.0,1.0,0.4,5.0,-6.0,0.0,1.1,3.0,0.0] --envelope_sc3_array :: Num a => Envelope a -> Maybe [a] -- | IEnvGen Sc3 form of Envelope data. -- --
-- >>> let l = [0,0.6,0.3,1.0,0] -- -- >>> let t = [0.1,0.02,0.4,1.1] -- -- >>> let c = [EnvLin,EnvExp,EnvNum (-6),EnvSin] -- -- >>> let e = Envelope l t c Nothing Nothing 0 -- -- >>> envelope_sc3_ienvgen_array e -- Just [0.0,0.0,4.0,1.62,0.1,1.0,0.0,0.6,2.0e-2,2.0,0.0,0.3,0.4,5.0,-6.0,1.0,1.1,3.0,0.0,0.0] --envelope_sc3_ienvgen_array :: Num a => Envelope a -> Maybe [a] -- | True if env_release_node is not Nothing. env_is_sustained :: Envelope a -> Bool -- | Delay the onset of the envelope (add initial segment). env_delay :: Envelope a -> a -> Envelope a -- | Connect releaseNode (or end) to first node of envelope. z is a value -- that is first zero and thereafter one. tc & cc are time and curve -- from first to last. env_circle_z :: Fractional a => a -> a -> Envelope_Curve a -> Envelope a -> Envelope a -- | env_circle_z with cycle time of zero. env_circle_0 :: Fractional a => Envelope a -> Envelope a -- | Trapezoidal envelope generator. -- -- Requires (and (=) functions returning 1 for true and -- 0 for false. -- -- The arguments are: 1. shape determines the sustain time as a -- proportion of dur, zero is a triangular envelope, one a -- rectangular envelope; 2. skew determines the attack/decay -- ratio, zero is an immediate attack and a slow decay, one a slow attack -- and an immediate decay; 3. duration in seconds; 4. -- amplitude as linear gain. envTrapezoid_f :: Num t => (t -> t -> t, t -> t -> t) -> t -> t -> t -> t -> Envelope t -- | Coordinate based static envelope generator. Points are (time,value) -- pairs. -- --
-- >>> let e = envCoord [(0,0),(1/4,1),(1,0)] 1 1 EnvLin -- -- >>> envelope_sc3_array e -- Just [0.0,2.0,-99.0,-99.0,1.0,0.25,1.0,0.0,0.0,0.75,1.0,0.0] ---- --
-- import Sound.Sc3.Plot {\- hsc3-plot -\}
-- plotEnvelope [envCoord [(0,0),(1/4,1),(1,0)] 1 1 EnvLin]
--
envCoord :: Num n => [(n, n)] -> n -> n -> Envelope_Curve n -> Envelope n
-- | Segments given as pairs of (time,level). The input is sorted by time
-- before processing.
--
-- -- >>> env_levels (envPairs [(0, 1), (3, 1.4), (2.1, 0.5)] EnvSin) -- [1.0,0.5,1.4] --envPairs :: (Num n, Ord n) => [(n, n)] -> Envelope_Curve n -> Envelope n -- | Percussive envelope, with attack, release, level and curve inputs. envPerc_c :: Num a => a -> a -> a -> Envelope_Curve_2 a -> Envelope a -- | Percussive envelope, with attack and release inputs. envPerc :: Num a => a -> a -> Envelope a -- | Triangular envelope, with duration and level inputs. -- --
-- >>> let e = envTriangle 1 0.1 -- -- >>> envelope_sc3_array e -- Just [0.0,2.0,-99.0,-99.0,0.1,0.5,1.0,0.0,0.0,0.5,1.0,0.0] --envTriangle :: Fractional a => a -> a -> Envelope a -- | Sine envelope, with duration and level inputs. -- --
-- >>> envelope_sc3_array (envSine 0 0.1) -- Just [0.0,2.0,-99.0,-99.0,0.1,0.0,3.0,0.0,0.0,0.0,3.0,0.0] --envSine :: Fractional a => a -> a -> Envelope a -- | Parameters for Linen envelopes. data Linen a Linen :: a -> a -> a -> a -> Envelope_Curve_3 a -> Linen a [linen_attackTime] :: Linen a -> a [linen_sustainTime] :: Linen a -> a [linen_releaseTime] :: Linen a -> a [linen_level] :: Linen a -> a [linen_curve] :: Linen a -> Envelope_Curve_3 a -- | Sc3 defaults for Linen. linen_def :: Fractional t => Linen t -- | Record (Linen) variant of envLinen. envLinen_r :: Num a => Linen a -> Envelope a -- | Variant of envLinen with user specified 'Envelope_Curve a'. envLinen_c :: Num a => a -> a -> a -> a -> Envelope_Curve_3 a -> Envelope a -- | Linear envelope parameter constructor. -- --
-- >>> let e = envLinen 0 1 0 1 -- -- >>> let s = envelope_segments e -- -- >>> let p = pack_envelope_segments s -- -- >>> p == (env_levels e,env_times e,env_curves e) -- True --envLinen :: Num a => a -> a -> a -> a -> Envelope a -- | Parameters for Adsr envelopes. The sustain level is given as a -- proportion of the peak level. data Adsr a Adsr :: a -> a -> a -> a -> a -> Envelope_Curve_3 a -> a -> Adsr a [adsr_attackTime] :: Adsr a -> a [adsr_decayTime] :: Adsr a -> a [adsr_sustainLevel] :: Adsr a -> a [adsr_releaseTime] :: Adsr a -> a [adsr_peakLevel] :: Adsr a -> a [adsr_curve] :: Adsr a -> Envelope_Curve_3 a [adsr_bias] :: Adsr a -> a -- | Sc3 defaults for Adsr. adsr_def :: Fractional n => Adsr n -- | Attack, decay, sustain, release envelope parameter constructor. envAdsr :: Num a => a -> a -> a -> a -> a -> Envelope_Curve a -> a -> Envelope a -- | Variant with defaults for pL, c and b. envAdsr_def :: Num a => a -> a -> a -> a -> Envelope a -- | Record (Adsr) variant of envAdsr. envAdsr_r :: Num a => Adsr a -> Envelope a -- | Parameters for Roland type Adssr envelopes. data Adssr a Adssr :: a -> a -> a -> a -> a -> a -> a -> Envelope_Curve_4 a -> a -> Adssr a [adssr_attackTime] :: Adssr a -> a [adssr_attackLevel] :: Adssr a -> a [adssr_decayTime] :: Adssr a -> a [adssr_decayLevel] :: Adssr a -> a [adssr_slopeTime] :: Adssr a -> a [adssr_sustainLevel] :: Adssr a -> a [adssr_releaseTime] :: Adssr a -> a [adssr_curve] :: Adssr a -> Envelope_Curve_4 a [adssr_bias] :: Adssr a -> a -- | Attack, decay, slope, sustain, release envelope parameter constructor. envAdssr :: Num a => a -> a -> a -> a -> a -> a -> a -> Envelope_Curve a -> a -> Envelope a -- | Record (Adssr) variant of envAdssr. envAdssr_r :: Num a => Adssr a -> Envelope a -- | Parameters for Asr envelopes. data Asr a Asr :: a -> a -> a -> Envelope_Curve_2 a -> Asr a [asr_attackTime] :: Asr a -> a [asr_sustainLevel] :: Asr a -> a [asr_releaseTime] :: Asr a -> a [asr_curve] :: Asr a -> Envelope_Curve_2 a -- | Sc3 default values for Asr. asr_def :: Fractional t => Asr t -- | Sc3 .asr has singular curve argument, hence _c suffix. envAsr_c :: Num a => a -> a -> a -> Envelope_Curve_2 a -> Envelope a -- | Attack, sustain, release envelope parameter constructor. -- --
-- >>> envelope_sc3_array (envAsr 3 0.1 2 EnvSin) -- Just [0.0,2.0,1.0,-99.0,0.1,3.0,3.0,0.0,0.0,2.0,3.0,0.0] --envAsr :: Num a => a -> a -> a -> Envelope_Curve a -> Envelope a -- | Record (Asr) variant of envAsr. envAsr_r :: Num a => Asr a -> Envelope a -- | All segments are horizontal lines. envStep :: Num a => [a] -> [a] -> Maybe Int -> Maybe Int -> Envelope a -- | Segments given as triples of (time,level,curve). The final curve is -- ignored. -- --
-- >>> env_levels (envXyc [(0, 1, EnvSin), (2.1, 0.5, EnvLin), (3, 1.4, EnvLin)]) -- [1.0,0.5,1.4] --envXyc :: Num n => [(n, n, Envelope_Curve n)] -> Envelope n -- | Variant where the input is sorted by time before processing. -- --
-- >>> env_levels (envXyc_sort [(0, 1, EnvSin), (3, 1.4, EnvLin), (2.1, 0.5, EnvLin)]) -- [1.0,0.5,1.4] --envXyc_sort :: (Num n, Ord n) => [(n, n, Envelope_Curve n)] -> Envelope n instance GHC.Show.Show a => GHC.Show.Show (Sound.Sc3.Common.Envelope.Envelope_Curve a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Sound.Sc3.Common.Envelope.Envelope_Curve a) instance GHC.Show.Show a => GHC.Show.Show (Sound.Sc3.Common.Envelope.Envelope a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Sound.Sc3.Common.Envelope.Envelope a) instance GHC.Base.Functor Sound.Sc3.Common.Envelope.Envelope -- | Noise generating functions. module Sound.Sc3.Common.Math.Noise -- | x(n+1) = a - b * sqrt(|x(n)|) cusp_f :: Floating t => t -> t -> t -> t -- | x(n+1) = sin(im * y(n) + fb * x(n)) y(n+1) = (a * y(n) + c) % 2pi fbSine_f :: (Floating t, RealFrac t) => t -> t -> t -> t -> (t, t) -> (t, t) -- | x(n+2) = 1 - a * x(n+1)^2 + b * x(n) henon_f :: Floating t => t -> t -> (t, t) -> (t, t) -- | x(n+1) = sin(b * y(n)) + c * sin(b * x(n)) y(n+1) = sin(a * x(n)) + d -- * sin(a * y(n)) latoocarfian_f :: Floating t => t -> t -> t -> t -> (t, t) -> (t, t) -- | x(n+1) = (a * x(n) + c) % m linCong_f :: RealFrac t => t -> t -> t -> t -> t -- | x(n+1) = a * x * (1.0 - x) logistic_f :: Num t => t -> t -> t -- | x' = s * (y - x) y' = x * (r - z) - y z' = x * y - b * z lorenz_f :: Num t => t -> t -> t -> (t, t, t) -> (t, t, t) -- | x(n+1) = a * x(n)^2 + b * x(n) + c quad_f :: Floating t => t -> t -> t -> t -> t -- | x(n+1) = (x(n) + y(n+1)) % 2pi y(n+1) = (y(n) + k * sin(x(n))) % 2pi standard_f :: (RealFrac t, Floating t) => t -> (t, t) -> (t, t) -- | Non-standard mathematical enumerations, classes and base instances. -- -- Enumerations of the unary and binary math unit generators. Names that -- conflict with existing names have a _ suffix. -- -- The Eq and Ord classes in the Prelude require Bool, hence EqE and -- OrdE. True is 1.0, False is 0.0 -- -- The RealFrac class requires Integral results, hence RealFracE. module Sound.Sc3.Common.Math.Operator -- | Enumeration of Sc3 unary operator Ugens. The names here are -- from the enumeration at "serverpluginsUnaryOpUgens.cpp". The -- capitalisation is edited since these names become function names in -- rsc3. Names have a _ suffix if they conflict with Ugen names. -- --
-- zip (map show [minBound :: Sc3_Unary_Op .. maxBound]) [0..] --data Sc3_Unary_Op OpNeg :: Sc3_Unary_Op OpNot :: Sc3_Unary_Op OpIsNil :: Sc3_Unary_Op OpNotNil :: Sc3_Unary_Op OpBitNot :: Sc3_Unary_Op OpAbs :: Sc3_Unary_Op OpAsFloat :: Sc3_Unary_Op OpAsInt :: Sc3_Unary_Op OpCeil :: Sc3_Unary_Op OpFloor :: Sc3_Unary_Op OpFrac :: Sc3_Unary_Op OpSign :: Sc3_Unary_Op OpSquared :: Sc3_Unary_Op OpCubed :: Sc3_Unary_Op OpSqrt :: Sc3_Unary_Op OpExp :: Sc3_Unary_Op OpRecip :: Sc3_Unary_Op OpMidiCps :: Sc3_Unary_Op OpCpsMidi :: Sc3_Unary_Op OpMidiRatio :: Sc3_Unary_Op OpRatioMidi :: Sc3_Unary_Op OpDbAmp :: Sc3_Unary_Op OpAmpDb :: Sc3_Unary_Op OpOctCps :: Sc3_Unary_Op OpCpsOct :: Sc3_Unary_Op OpLog :: Sc3_Unary_Op OpLog2 :: Sc3_Unary_Op OpLog10 :: Sc3_Unary_Op OpSin :: Sc3_Unary_Op OpCos :: Sc3_Unary_Op OpTan :: Sc3_Unary_Op OpArcSin :: Sc3_Unary_Op OpArcCos :: Sc3_Unary_Op OpArcTan :: Sc3_Unary_Op OpSinh :: Sc3_Unary_Op OpCosh :: Sc3_Unary_Op OpTanh :: Sc3_Unary_Op OpRand_ :: Sc3_Unary_Op OpRand2 :: Sc3_Unary_Op OpLinRand_ :: Sc3_Unary_Op OpBiLinRand :: Sc3_Unary_Op OpSum3Rand :: Sc3_Unary_Op OpDistort :: Sc3_Unary_Op OpSoftClip :: Sc3_Unary_Op OpCoin :: Sc3_Unary_Op OpDigitValue :: Sc3_Unary_Op OpSilence :: Sc3_Unary_Op OpThru :: Sc3_Unary_Op OpRectWindow :: Sc3_Unary_Op OpHanWindow :: Sc3_Unary_Op OpWelchWindow :: Sc3_Unary_Op OpTriWindow :: Sc3_Unary_Op OpRamp_ :: Sc3_Unary_Op OpScurve :: Sc3_Unary_Op -- | Enum name without Op prefix. sc3_unary_op_name :: Sc3_Unary_Op -> String -- | parse_enum with Op prefix. -- --
-- >>> Data.Maybe.mapMaybe (parse_unary Base.Cs) (words "Abs Rand") -- [OpAbs] --parse_unary :: Case_Rule -> String -> Maybe Sc3_Unary_Op -- | Table of operator names (non-symbolic) and indices. -- --
-- map fst sc3_unary_op_tbl --sc3_unary_op_tbl :: [(String, Int)] -- | Table of symbolic names for standard unary operators. unary_sym_tbl :: [(Sc3_Unary_Op, String)] -- | Lookup possibly symbolic name for standard unary operators. unaryName :: Int -> String -- | Given name of unary operator derive index. -- --
-- >>> Data.Maybe.mapMaybe (unaryIndex Base.Ci) (words "abs Cubed midiCps Neg") -- [5,13,17,0] ---- --
-- >>> unaryIndex Base.Cs "SinOsc" -- Nothing --unaryIndex :: Case_Rule -> String -> Maybe Int -- | isJust of unaryIndex. -- --
-- >>> map (is_unary Base.Ci) (words "Abs MidiCps Neg") -- [True,True,True] ---- --
-- >>> map (is_unary Base.Ci) (words "- rand") -- [False,False] ---- --
-- >>> map (is_unary Base.Ci) (words "arctan atan") -- [True,False] --is_unary :: Case_Rule -> String -> Bool -- | Enumeration of Sc3 unary operator Ugens. The names here are -- from the enumeration at "serverpluginsBinaryOpUgens.cpp". -- --
-- zip (map show [minBound :: Sc3_Binary_Op .. maxBound]) [0..] --data Sc3_Binary_Op OpAdd :: Sc3_Binary_Op OpSub :: Sc3_Binary_Op OpMul :: Sc3_Binary_Op OpIdiv :: Sc3_Binary_Op OpFdiv :: Sc3_Binary_Op OpMod :: Sc3_Binary_Op OpEq :: Sc3_Binary_Op OpNe :: Sc3_Binary_Op OpLt :: Sc3_Binary_Op OpGt :: Sc3_Binary_Op OpLe :: Sc3_Binary_Op OpGe :: Sc3_Binary_Op OpMin :: Sc3_Binary_Op OpMax :: Sc3_Binary_Op OpBitAnd :: Sc3_Binary_Op OpBitOr :: Sc3_Binary_Op OpBitXor :: Sc3_Binary_Op OpLcm :: Sc3_Binary_Op OpGcd :: Sc3_Binary_Op OpRoundTo :: Sc3_Binary_Op OpRoundUp :: Sc3_Binary_Op OpTrunc :: Sc3_Binary_Op OpAtan2 :: Sc3_Binary_Op OpHypot :: Sc3_Binary_Op OpHypotx :: Sc3_Binary_Op OpPow :: Sc3_Binary_Op OpShiftLeft :: Sc3_Binary_Op OpShiftRight :: Sc3_Binary_Op OpUnsignedShift :: Sc3_Binary_Op OpFill :: Sc3_Binary_Op OpRing1 :: Sc3_Binary_Op OpRing2 :: Sc3_Binary_Op OpRing3 :: Sc3_Binary_Op OpRing4 :: Sc3_Binary_Op OpDifSqr :: Sc3_Binary_Op OpSumSqr :: Sc3_Binary_Op OpSqrSum :: Sc3_Binary_Op OpSqrDif :: Sc3_Binary_Op OpAbsDif :: Sc3_Binary_Op OpThresh :: Sc3_Binary_Op OpAmClip :: Sc3_Binary_Op OpScaleNeg :: Sc3_Binary_Op OpClip2 :: Sc3_Binary_Op OpExcess :: Sc3_Binary_Op OpFold2 :: Sc3_Binary_Op OpWrap2 :: Sc3_Binary_Op OpFirstArg :: Sc3_Binary_Op OpRandRange :: Sc3_Binary_Op OpExpRandRange :: Sc3_Binary_Op -- | Enum name without Op prefix. sc3_binary_op_name :: Sc3_Binary_Op -> String -- | Table of operator names (non-symbolic) and indices. sc3_binary_op_tbl :: [(String, Int)] -- | parse_enum with Op prefix. -- --
-- >>> parse_binary Base.Ci "mul" -- Just OpMul --parse_binary :: Case_Rule -> String -> Maybe Sc3_Binary_Op -- | Table of symbolic names for standard binary operators. binary_sym_tbl :: [(Sc3_Binary_Op, String)] -- | Table of operator names (non-symbolic) and indices. -- --
-- map fst sc3_binary_op_sym_tbl --sc3_binary_op_sym_tbl :: [(String, Int)] -- | Lookup possibly symbolic name for standard binary operators. -- --
-- >>> map binaryName [1,2,8,12] -- ["-","*","<","Min"] --binaryName :: Int -> String -- | Given name of binary operator derive index. -- --
-- >>> Data.Maybe.mapMaybe (binaryIndex Base.Ci) (words "* mul ring1 +") -- [2,2,30,0] ---- --
-- >>> binaryIndex Base.Ci "sinosc" -- Nothing ---- --
-- >>> map (\x -> (x,binaryIndex Base.Ci x)) (map snd binary_sym_tbl)
-- [("+",Just 0),("-",Just 1),("*",Just 2),("/",Just 4),("%",Just 5),("==",Just 6),("/=",Just 7),("<",Just 8),(">",Just 9),("<=",Just 10),(">=",Just 11),(".&.",Just 14),(".|.",Just 15),("**",Just 25)]
--
binaryIndex :: Case_Rule -> String -> Maybe Int
-- | isJust of binaryIndex.
--
-- -- >>> map (is_binary Base.Ci) (words "== > % Trunc max") -- [True,True,True,True,True] --is_binary :: Case_Rule -> String -> Bool -- | Lookup operator name for operator Ugens, else Ugen name. ugen_operator_name :: String -> Int -> Maybe String -- | Order of lookup: binary then unary. -- --
-- >>> map (resolve_operator Base.Ci) (words "+ - sub abs max")
-- [("BinaryOpUGen",Just 0),("BinaryOpUGen",Just 1),("BinaryOpUGen",Just 1),("UnaryOpUGen",Just 5),("BinaryOpUGen",Just 13)]
--
--
--
-- >>> map (resolve_operator Base.Cs) (words "Abs Add Neg")
-- [("UnaryOpUGen",Just 5),("BinaryOpUGen",Just 0),("UnaryOpUGen",Just 0)]
--
resolve_operator :: Case_Rule -> String -> (String, Maybe Int)
-- | Case-insensitive resolve_operator.
resolve_operator_ci :: String -> (String, Maybe Int)
-- | Variant on Eq class, result is of the same type as the values
-- compared.
class (Eq a, Num a) => EqE a
equal_to :: EqE a => a -> a -> a
not_equal_to :: EqE a => a -> a -> a
-- | Variant on Ord class, result is of the same type as the values
-- compared.
class (Ord a, Num a) => OrdE a
less_than :: OrdE a => a -> a -> a
less_than_or_equal_to :: OrdE a => a -> a -> a
greater_than :: OrdE a => a -> a -> a
greater_than_or_equal_to :: OrdE a => a -> a -> a
-- | Variant of RealFrac with non Integral results.
class RealFrac a => RealFracE a
properFractionE :: RealFracE a => a -> (a, a)
truncateE :: RealFracE a => a -> a
roundE :: RealFracE a => a -> a
ceilingE :: RealFracE a => a -> a
floorE :: RealFracE a => a -> a
-- | Unary operator class.
--
-- -- >>> map (floor . (* 1e4) . dbAmp) [-90,-60,-30,0] -- [0,10,316,10000] --class (Floating a, Ord a) => UnaryOp a ampDb :: UnaryOp a => a -> a asFloat :: UnaryOp a => a -> a asInt :: UnaryOp a => a -> a cpsMidi :: UnaryOp a => a -> a cpsOct :: UnaryOp a => a -> a cubed :: UnaryOp a => a -> a dbAmp :: UnaryOp a => a -> a distort :: UnaryOp a => a -> a frac :: UnaryOp a => a -> a isNil :: UnaryOp a => a -> a log10 :: UnaryOp a => a -> a log2 :: UnaryOp a => a -> a midiCps :: UnaryOp a => a -> a midiRatio :: UnaryOp a => a -> a notE :: UnaryOp a => a -> a notNil :: UnaryOp a => a -> a octCps :: UnaryOp a => a -> a ramp_ :: UnaryOp a => a -> a ratioMidi :: UnaryOp a => a -> a softClip :: UnaryOp a => a -> a squared :: UnaryOp a => a -> a -- | Sc3_Binary_Op operator class. class (Floating a, RealFrac a, Ord a) => BinaryOp a absDif :: BinaryOp a => a -> a -> a amClip :: BinaryOp a => a -> a -> a atan2E :: BinaryOp a => a -> a -> a clip2 :: BinaryOp a => a -> a -> a difSqr :: BinaryOp a => a -> a -> a excess :: BinaryOp a => a -> a -> a exprandRange :: BinaryOp a => a -> a -> a fill :: BinaryOp a => a -> a -> a firstArg :: BinaryOp a => a -> a -> a fold2 :: BinaryOp a => a -> a -> a gcdE :: BinaryOp a => a -> a -> a hypot :: BinaryOp a => a -> a -> a hypotx :: BinaryOp a => a -> a -> a iDiv :: BinaryOp a => a -> a -> a lcmE :: BinaryOp a => a -> a -> a modE :: BinaryOp a => a -> a -> a randRange :: BinaryOp a => a -> a -> a ring1 :: BinaryOp a => a -> a -> a ring2 :: BinaryOp a => a -> a -> a ring3 :: BinaryOp a => a -> a -> a ring4 :: BinaryOp a => a -> a -> a roundUp :: BinaryOp a => a -> a -> a scaleNeg :: BinaryOp a => a -> a -> a sqrDif :: BinaryOp a => a -> a -> a sqrSum :: BinaryOp a => a -> a -> a sumSqr :: BinaryOp a => a -> a -> a thresh :: BinaryOp a => a -> a -> a trunc :: BinaryOp a => a -> a -> a wrap2 :: BinaryOp a => a -> a -> a (==**) :: EqE a => a -> a -> a (/=**) :: EqE a => a -> a -> a (<**) :: OrdE a => a -> a -> a (<=**) :: OrdE a => a -> a -> a (>**) :: OrdE a => a -> a -> a (>=**) :: OrdE a => a -> a -> a -- | Association table for Sc3_Binary_Op to haskell function -- implementing operator. binop_hs_tbl :: (Real n, Floating n, RealFrac n) => [(Sc3_Binary_Op, n -> n -> n)] -- | lookup binop_hs_tbl via toEnum. binop_special_hs :: (RealFrac n, Floating n) => Int -> Maybe (n -> n -> n) -- | Association table for Unary to haskell function implementing -- operator. uop_hs_tbl :: (RealFrac n, Floating n) => [(Sc3_Unary_Op, n -> n)] -- | lookup uop_hs_tbl via toEnum. uop_special_hs :: (RealFrac n, Floating n) => Int -> Maybe (n -> n) instance GHC.Read.Read Sound.Sc3.Common.Math.Operator.Sc3_Unary_Op instance GHC.Enum.Bounded Sound.Sc3.Common.Math.Operator.Sc3_Unary_Op instance GHC.Enum.Enum Sound.Sc3.Common.Math.Operator.Sc3_Unary_Op instance GHC.Show.Show Sound.Sc3.Common.Math.Operator.Sc3_Unary_Op instance GHC.Classes.Eq Sound.Sc3.Common.Math.Operator.Sc3_Unary_Op instance GHC.Read.Read Sound.Sc3.Common.Math.Operator.Sc3_Binary_Op instance GHC.Enum.Bounded Sound.Sc3.Common.Math.Operator.Sc3_Binary_Op instance GHC.Enum.Enum Sound.Sc3.Common.Math.Operator.Sc3_Binary_Op instance GHC.Show.Show Sound.Sc3.Common.Math.Operator.Sc3_Binary_Op instance GHC.Classes.Eq Sound.Sc3.Common.Math.Operator.Sc3_Binary_Op instance Sound.Sc3.Common.Math.Operator.BinaryOp GHC.Types.Float instance Sound.Sc3.Common.Math.Operator.BinaryOp GHC.Types.Double instance Sound.Sc3.Common.Math.Operator.UnaryOp GHC.Types.Float instance Sound.Sc3.Common.Math.Operator.UnaryOp GHC.Types.Double instance Sound.Sc3.Common.Math.Operator.RealFracE GHC.Types.Float instance Sound.Sc3.Common.Math.Operator.RealFracE GHC.Types.Double instance Sound.Sc3.Common.Math.Operator.OrdE GHC.Types.Int instance Sound.Sc3.Common.Math.Operator.OrdE GHC.Num.Integer.Integer instance Sound.Sc3.Common.Math.Operator.OrdE GHC.Int.Int32 instance Sound.Sc3.Common.Math.Operator.OrdE GHC.Int.Int64 instance Sound.Sc3.Common.Math.Operator.OrdE GHC.Types.Float instance Sound.Sc3.Common.Math.Operator.OrdE GHC.Types.Double instance Sound.Sc3.Common.Math.Operator.EqE GHC.Types.Int instance Sound.Sc3.Common.Math.Operator.EqE GHC.Num.Integer.Integer instance Sound.Sc3.Common.Math.Operator.EqE GHC.Int.Int32 instance Sound.Sc3.Common.Math.Operator.EqE GHC.Int.Int64 instance Sound.Sc3.Common.Math.Operator.EqE GHC.Types.Float instance Sound.Sc3.Common.Math.Operator.EqE GHC.Types.Double -- | A warp is a mapping from the space [0,1] to a user defined -- space [l,r]. module Sound.Sc3.Common.Math.Warp -- | A warp function is lhs -> rhs -> x -> y type Warp_f t = t -> t -> t -> t -- | Linear real value map. -- --
-- >>> map (warp_lin 1 2) [0,1/2,1] == [1,3/2,2] -- True ---- --
-- >>> map (warp_lin (-1) 1) [0,1/2,1] == [-1,0,1] -- True --warp_lin :: Fractional t => Warp_f t -- | Inverse of warp_lin -- --
-- >>> map (warp_lin_inv 1 2) [1,3/2,2] == [0,1/2,1] -- True ---- --
-- >>> map (warp_lin_inv (-1) 1) [-1,0,1] == [0,1/2,1] -- True --warp_lin_inv :: Fractional t => Warp_f t -- | The left and right must both be non zero and have the same sign. -- --
-- >>> map (warp_exp 1 2) [0,0.5,1] == [1,2 ** 0.5,2] -- True ---- --
-- import Sound.Sc3.Plot {\- hsc3-plot -\}
-- plot_p1_ln [map (warp_exp 1 2) [0,0.01 .. 1]]
--
warp_exp :: Floating a => Warp_f a
warp_exp_inv :: Floating a => Warp_f a
-- | Cosine warp
--
-- -- map (warp_cos 1 2) [0,0.25,0.5,0.75,1] -- plot_p1_ln [map (warp_cos 1 2) [0,0.01 .. 1]] --warp_cos :: Floating t => Warp_f t warp_cos_inv :: Floating a => Warp_f a -- | Sine warp -- --
-- map (warp_sin 1 2) [0,0.25,0.5,0.75,1] -- plot_p1_ln [map (warp_sin 1 2) [0,0.01 .. 1]] --warp_sin :: Floating t => Warp_f t warp_sin_inv :: Floating t => Warp_f t -- | Fader warp. Left and right values are ordinarily zero and one. -- --
-- map (warp_amp 0 1) [0,0.5,1] == [0,0.25,1] ---- --
-- plot_p1_ln [map (warp_amp 0 2) [0,0.01 .. 1]] -- plot_p1_ln [map (warp_amp_inv 0 1 . warp_amp 0 1) [0,0.01 .. 1]] --warp_amp :: Num a => Warp_f a warp_amp_inv :: Floating a => Warp_f a -- | DB fader warp. Left and right values are ordinarily negative infinity -- and zero. An input of 0 gives -180. -- --
-- map (round . warp_db (-180) 0) [0,0.5,1] == [-180,-12,0] ---- --
-- plot_p1_ln [map (warp_db (-60) 0) [0,0.01 .. 1]] -- plot_p1_ln [map (warp_db_inv 0 60) [0 .. 60]] --warp_db :: (Eq a, Floating a) => Warp_f a warp_db_inv :: Floating a => Warp_f a -- | A curve warp given by a real n. -- --
-- warp_curve (-3) 1 2 0.25 == 1.5552791692202022 -- warp_curve (-3) 1 2 0.50 == 1.8175744761936437 ---- --
-- plot_p1_ln [map (warp_curve (-3) 1 2) [0,0.01 .. 1]] -- plot_p1_ln (map (\c -> map (warp_curve c 1 2) [0,0.01 .. 1]) [0,3,6,9]) -- plot_p1_ln [map (warp_curve_inv 7 20 20000 . warp_curve 7 20 20000) [0,0.01 .. 1]] --warp_curve :: (Ord a, Floating a) => a -> Warp_f a warp_curve_inv :: (Ord a, Floating a) => a -> Warp_f a -- | Select warp functions by name. Numerical names are interpreted as -- curve values for warpCurve. -- --
-- let Just w = warp_named "lin" -- let Just w = warp_named "-3" -- let Just w = warp_named "6" -- plot_p1_ln [map ((fst w) 1 2) [0,0.01 .. 1]] --warp_named :: (Floating t, RealFrac t) => String -> Maybe (Warp_f t, Warp_f t) -- | Windowing functions. module Sound.Sc3.Common.Math.Window -- | A function from a (0, 1) normalised input to an output. type Window x = x -> x -- | A discrete rendering of a Window. type Table x = [x] -- | Format for table. Closed indicates the end point should be equal to -- the start point. Open indicates it should be one place short. Guarded -- indicates that an extra place should be added that closes the table, -- ie. the table has one place more than requested. When using a table -- with an oscillator we want an Open or Guarded table, since the point -- following the end point is the start point. data TableFormat TableClosed :: TableFormat TableOpen :: TableFormat TableGuarded :: TableFormat -- | Generate an n element table from a (0, 1) normalised window -- function f. The cycle argument decides if the end point should -- be equal to the start point, or one place short. When using a table -- with an oscillator we want the latter, since the point following the -- end point is the start point. window_table :: (Integral n, Fractional a, Enum a) => TableFormat -> n -> Window a -> Table a -- | window_table of TableClosed. window_table_closed :: (Integral n, Fractional a, Enum a) => n -> Window a -> Table a -- | n ^ 2. square :: Num a => a -> a -- | Gaussian window, θ <= 0.5. gaussian :: Floating a => a -> Window a -- | Hann raised cosine window. hann :: Floating a => Window a -- | Hamming raised cosine window. hamming :: Floating a => Window a -- | Unit (id) window, also known as a Dirichlet window. rectangular :: Window a -- | sin window. sine :: Floating a => Window a -- | Triangular window, ie. Bartlett window with zero end-points. -- --
-- let n = 2 ^ 7 -- Sound.Sc3.Plot.plot_p1_ln (map (\fmt -> window_table fmt n triangular) [TableClosed, TableOpen]) -- Sound.Sc3.Plot.plot_p1_ln (map (\fmt -> window_table fmt n triangular) [TableClosed, TableGuarded]) --triangular :: Fractional a => Window a -- | window_table_closed . gaussian. -- --
-- Sound.Sc3.Plot.plot_p1_ln [gaussian_table 1024 0.25, gaussian_table 1024 0.5] --gaussian_table :: (Integral n, Floating b, Enum b) => n -> b -> [b] -- | window_table_closed . hamming. -- --
-- Sound.Sc3.Plot.plot_p1_ln [hann_table 128, hamming_table 128] --hamming_table :: Int -> [Double] -- | window_table_closed . hann. -- --
-- Sound.Sc3.Plot.plot_p1_ln [hann_table (2 ^ 7)] --hann_table :: Int -> [Double] -- | window_table_closed . sine. -- --
-- Sound.Sc3.Plot.plot_p1_ln [sine_table (2 ^ 7)] --sine_table :: (Integral n, Floating b, Enum b) => n -> [b] -- | window_table_closed . triangular. -- --
-- Sound.Sc3.Plot.plot_p1_ln [triangular_table (2 ^ 8)] --triangular_table :: (Integral n, Fractional b, Enum b) => n -> [b] instance GHC.Show.Show Sound.Sc3.Common.Math.Window.TableFormat instance GHC.Classes.Eq Sound.Sc3.Common.Math.Window.TableFormat -- | The Sc3 multiple channel expansion (Mce) rules over an abstract type. module Sound.Sc3.Common.Mce -- | Multiple channel expansion. The Mce type is a tree, however in hsc3 -- Mce_Vector will always hold Mce_Scalar elements. data Mce t Mce_Scalar :: t -> Mce t Mce_Vector :: [Mce t] -> Mce t -- | There are two invariants: 1. Mce should not be empty, ie. Mce_Vector -- should not have a null list. 2. Scalar Mce values should not be -- written as one-place vectors. -- --
-- >>> mce_is_well_formed (Mce_Vector []) -- False ---- --
-- >>> mce_is_well_formed (Mce_Vector [Mce_Scalar 1]) -- False --mce_is_well_formed :: Mce t -> Bool -- | Is Mce scalar. mce_is_scalar :: Mce t -> Bool -- | fromList for Mce, generates well-formed Mce. mce_from_list :: [t] -> Mce t -- | toList for Mce. -- --
-- >>> let v = Mce_Vector -- -- >>> mce_to_list (v[v[1, 2], 3, v[4, 5]]) -- [1,2,3,4,5] --mce_to_list :: Mce t -> [t] -- | Pretty printer for Mce. -- --
-- >>> let v = Mce_Vector -- -- >>> mce_show (v[1, 2, v[3, 4]] * 5 + v[6, 7, 8]) -- "[11, 17, [23, 28]]" --mce_show :: Show t => Mce t -> String -- | Read value from Mce_Scalar, error if Mce is Mce_Vector mce_scalar_value :: Mce t -> t -- | Length, or perhaps rather width, of Mce. Considers only the outermost -- level, i.e. mce_length is not necessarily the length of mce_to_list. mce_length :: Mce a -> Int -- | The depth of an Mce is the longest sequence of nested Mce_Vector -- nodes. -- --
-- >>> mce_depth 1 -- 1 ---- --
-- >>> mce_depth (Mce_Vector [1, 2]) -- 1 ---- --
-- >>> let v = Mce_Vector -- -- >>> mce_depth (v[v[1, 2], 3, v[4, 5]]) -- 2 ---- --
-- >>> mce_depth (v[v[1, 2, 3, v[4, 5], 6], 7]) -- 3 --mce_depth :: Mce a -> Int -- | Extend Mce to specified degree. Considers only the outermost level. mce_extend :: Int -> Mce t -> Mce t -- | fmap for Mce, apply f at elements of m. mce_map :: (a -> b) -> Mce a -> Mce b -- | Apply f pairwise at elements of m1 and m2. At -- each level this extends the shorter of the two operands. mce_binop :: (a -> b -> c) -> Mce a -> Mce b -> Mce c instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Common.Mce.Mce t) instance GHC.Read.Read t => GHC.Read.Read (Sound.Sc3.Common.Mce.Mce t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Common.Mce.Mce t) instance GHC.Classes.Ord t => GHC.Classes.Ord (Sound.Sc3.Common.Mce.Mce t) instance GHC.Base.Functor Sound.Sc3.Common.Mce.Mce instance GHC.Num.Num n => GHC.Num.Num (Sound.Sc3.Common.Mce.Mce n) instance GHC.Real.Fractional n => GHC.Real.Fractional (Sound.Sc3.Common.Mce.Mce n) instance GHC.Float.Floating n => GHC.Float.Floating (Sound.Sc3.Common.Mce.Mce n) -- | Common Monad variations. module Sound.Sc3.Common.Monad -- | sequence of repeat repeatM :: Monad m => m t -> m [t] -- | This is the same function as Control.Monad.void, which however hugs -- does not know of. mvoid :: Monad m => m a -> m () -- | void of repeatM. repeatM_ :: Monad m => m t -> m () -- | Right to left compositon of Monad functions. -- --
-- >>> composeM [return . (+ 1),return . (* 2)] 3 -- 7 ---- --
-- >>> composeM [return . (* 2),return . (+ 1)] 3 -- 8 --composeM :: Monad m => [a -> m a] -> a -> m a -- | Feed forward composition of n applications of f. -- --
-- fmap (== 3) (chainM 3 (return . (+ 1)) 0) --chainM :: Monad m => Int -> (b -> m b) -> b -> m b -- | Functions to make writing Applicative and Monad Ugen -- graphs less clumsy. module Sound.Sc3.Common.Monad.Operators -- | + variant with Functor at left. -- --
-- >>> fmap (== 5) (return 3 .+ 2) -- True ---- --
-- >>> [3,4] .+ 2 -- [5,6] --(.+) :: (Functor f, Num a) => f a -> a -> f a infixl 6 .+ -- | + variant with Functor at right. -- --
-- >>> fmap (== 5) (3 +. return 2) -- True ---- --
-- >>> 3 +. [2,3] -- [5,6] --(+.) :: (Functor f, Num a) => a -> f a -> f a infixl 6 +. -- | + variant with Applicative at left and right. -- --
-- >>> fmap (== 5) (return 3 .+. return 2) -- True ---- --
-- >>> [3,4] .+. [2,3] -- [5,6,6,7] ---- --
-- >>> import Control.Applicative -- -- >>> getZipList (ZipList [3,4] .+. ZipList [2,3]) -- [5,7] --(.+.) :: (Applicative m, Num a) => m a -> m a -> m a infixl 6 .+. -- | * variant with Functor at left. -- --
-- >>> fmap (== 6) (return 3 .* 2) -- True --(.*) :: (Functor f, Num a) => f a -> a -> f a infixl 7 .* -- | * variant with Functor at right. -- --
-- >>> fmap (== 6) (3 *. return 2) -- True --(*.) :: (Functor f, Num a) => a -> f a -> f a infixl 7 *. -- | * variant with Applicative at left and right. -- --
-- >>> fmap (== 6) (return 3 .*. return 2) -- True --(.*.) :: (Applicative m, Num a) => m a -> m a -> m a infixl 7 .*. -- | - variant with Functor at left. -- --
-- >>> fmap (== 1) (return 3 .- 2) -- True ---- --
-- >>> [3,4] .- 2 -- [1,2] --(.-) :: (Functor f, Num a) => f a -> a -> f a infixl 6 .- -- | - variant with Functor at right. -- --
-- >>> fmap (== 1) (3 -. return 2) -- True ---- --
-- >>> 3 -. [2,3] -- [1,0] --(-.) :: (Functor f, Num a) => a -> f a -> f a infixl 6 -. -- | - variant with Applicative at left and right. -- --
-- >>> fmap (== 1) (return 3 .-. return 2) -- True ---- --
-- >>> [3,4] .-. [2,3] -- [1,0,2,1] ---- --
-- >>> import Control.Applicative -- -- >>> getZipList (ZipList [3,4] .-. ZipList [2,3]) -- [1,1] --(.-.) :: (Applicative m, Num a) => m a -> m a -> m a infixl 6 .-. -- | / variant with Functor at left. -- --
-- >>> fmap (== 3) (return 6 ./ 2) -- True --(./) :: (Functor f, Fractional a) => f a -> a -> f a infixl 7 ./ -- | / variant with Functor at right. -- --
-- >>> fmap (== 3) (6 /. return 2) -- True --(/.) :: (Functor f, Fractional a) => a -> f a -> f a infixl 7 /. -- | / variant with Applicative at left and right. -- --
-- >>> fmap (== 3) (return 6 ./. return 2) -- True ---- --
-- >>> [5,6] ./. [2,3] == [5/2,5/3,3,2] -- True --(./.) :: (Applicative m, Fractional a) => m a -> m a -> m a infixl 7 ./. -- | Linear congruential generator and related utilities. Ordinarily use -- System.Random. module Sound.Sc3.Common.Random -- | Linear congruential generator given modulo function for type. -- -- See http://en.wikipedia.org/wiki/Linear_congruential_generator -- for possible parameters. lcg :: Num t => (t -> t) -> t -> t -> t -> t -- | lcg 6364136223846793005 1442695040888963407, so in (0, -- 18446744073709551615) -- --
-- take 5 (iterate lcgWord64Knuth 147092873413) -- (maxBound :: Word64) == (2 ^ 64 - 1) --lcgWord64Knuth :: Word64 -> Word64 -- | lcg 1103515245 12345, so in (-2147483648, 2147483647) -- --
-- take 5 (iterate lcgInt32Glibc 873413) -- (minBound :: Int32,maxBound :: Int32) == (-2147483648, 2147483647) --lcgInt32Glibc :: Int32 -> Int32 -- | Run getCPUTime and convert to Word64 cpuTimeSeedWord64 :: IO Word64 -- | Run getCPUTime and convert to Int32 cpuTimeSeedInt32 :: IO Int32 -- | Iterate lcgWord64Knuth using cpuTimeSeedWord64. lcgWord64KnuthCpuTime :: IO [Word64] -- | Convert Word64 to Double in range (0, 1). Shifts input right 11 places -- (ie. discards 11 least significant bits) then divide by 2^53. word64ToUnitDouble :: Word64 -> Double -- | word64ToUnitDouble of lcgWord64KnuthCpuTime -- --
-- x <- fmap (take 256) lcgDoubleKnuthCpuTime -- Sound.Sc3.Plot.plot_p1_ln [x] --lcgDoubleKnuthCpuTime :: IO [Double] -- | Operating rate definitions and utilities. module Sound.Sc3.Common.Rate -- | Enumeration of operating rates of unit generators. data Rate InitialisationRate :: Rate ControlRate :: Rate AudioRate :: Rate DemandRate :: Rate -- | Standard abbreviations of Rate values. ir = initialisation, kr = -- control, ar = audio, dr = demand. dr sorts to the right of the fixed -- clock rates. -- --
-- Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr] --ir :: Rate -- | Standard abbreviations of Rate values. ir = initialisation, kr = -- control, ar = audio, dr = demand. dr sorts to the right of the fixed -- clock rates. -- --
-- Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr] --kr :: Rate -- | Standard abbreviations of Rate values. ir = initialisation, kr = -- control, ar = audio, dr = demand. dr sorts to the right of the fixed -- clock rates. -- --
-- Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr] --ar :: Rate -- | Standard abbreviations of Rate values. ir = initialisation, kr = -- control, ar = audio, dr = demand. dr sorts to the right of the fixed -- clock rates. -- --
-- Data.List.sort [dr,ar,kr,ir] == [ir,kr,ar,dr] --dr :: Rate -- | Standard SuperCollider rate abbreviations. -- --
-- map rateAbbrev [minBound .. maxBound] == ["ir","kr","ar","dr"] --rateAbbrev :: Rate -> String -- | Standard SuperCollider rate abbreviations. -- --
-- map rateName [minBound .. maxBound] == ["scalar","control","audio","demand"] --rateName :: Rate -> String -- | Integer rate identifier, as required for scsynth bytecode. rateId :: Rate -> Int -- | Color identifiers for each Rate. rate_color :: Rate -> String -- | Set of all Rate values. all_rates :: [Rate] -- | Case insensitive parser for rate. -- --
-- Data.Maybe.mapMaybe rate_parse (words "ar kR IR Dr") == [AudioRate,ControlRate,InitialisationRate,DemandRate] --rate_parse :: String -> Maybe Rate -- | Enumeration of the four operating rates for controls. I = -- initialisation, K = control, T = trigger, A = audio. data K_Type K_InitialisationRate :: K_Type K_ControlRate :: K_Type K_TriggerRate :: K_Type K_AudioRate :: K_Type -- | Determine class of control given Rate and trigger -- status. ktype :: Rate -> Bool -> K_Type instance GHC.Read.Read Sound.Sc3.Common.Rate.Rate instance GHC.Show.Show Sound.Sc3.Common.Rate.Rate instance GHC.Enum.Bounded Sound.Sc3.Common.Rate.Rate instance GHC.Enum.Enum Sound.Sc3.Common.Rate.Rate instance GHC.Classes.Ord Sound.Sc3.Common.Rate.Rate instance GHC.Classes.Eq Sound.Sc3.Common.Rate.Rate instance GHC.Classes.Ord Sound.Sc3.Common.Rate.K_Type instance GHC.Show.Show Sound.Sc3.Common.Rate.K_Type instance GHC.Classes.Eq Sound.Sc3.Common.Rate.K_Type -- | Sound file functions. module Sound.Sc3.Common.SoundFile -- | Find the file fn (case-sensitively) starting from dir. Runs the system -- command "find" (so UNIX only). Note that fn must be a file name not a -- relative path name. -- --
-- findFileFromDirectory "/home/rohan/data/audio" "metal.wav" --findFileFromDirectory :: String -> String -> IO (Maybe String) -- | Find the file fn starting from dir. If dir/fn names a file return that -- file, else call findFileFromDirectory. Note this will not find -- dirpqr given qr, the query must be either pqr or -- r. -- --
-- findFileAtOrFromDirectory "/home/rohan/data/audio" "instr/bosendorfer/072/C5.aif" --findFileAtOrFromDirectory :: String -> String -> IO (Maybe String) -- | Run findFileAtOrFromDirectory for each entry in path until the file is -- found, or not. -- --
-- findFileAtOrFromPath ["/home/rohan/rd/data/"] "20.2-LW+RD.flac" --findFileAtOrFromPath :: [FilePath] -> FilePath -> IO (Maybe FilePath) -- | SFDIR environment variable. sfDir :: IO FilePath -- | SFPATH environment variable. sfPath :: IO FilePath -- | Find file fn at sfDir directly or along sfPath. If fn is -- either absolute or names a relative file and if that file exists it is -- returned. If sdDir/fn exists it is returned. Else each directory at -- sfPath is searched (recursively) in turn. Despite the name this will -- find any file type along the SFDIR and SFPATH, i.e. .sfz files -- &etc. -- --
-- mapM sfFindFile ["/home/rohan/data/audio/metal.wav", "pf-c5.aif", "20.2-LW+RD.flac"] --sfFindFile :: FilePath -> IO (Maybe FilePath) -- | sfFindFile or error. sfResolveFile :: FilePath -> IO FilePath -- | Unsafe sfResolveFile. For resolving sound file names at read only -- sound file archives this is quite safe. sfResolve :: FilePath -> FilePath -- | Return the number of channels at fn. Runs the system command "soxi" -- (so UNIX only). -- --
-- sfResolveFile "metal.wav" >>= sfNumChannels >>= print --sfNumChannels :: FilePath -> IO Int -- | Return the sample rate of fn. Runs the system command "soxi" (so UNIX -- only). -- --
-- sfResolveFile "metal.wav" >>= sfSampleRate >>= print --sfSampleRate :: FilePath -> IO Int -- | Return the number of frames at fn. Runs the system command "soxi" (so -- UNIX only). -- --
-- sfResolveFile "metal.wav" >>= sfFrameCount >>= print --sfFrameCount :: FilePath -> IO Int -- | Return the number of channels, sample-rate and number of frames at fn. -- Runs the system command "soxi" (so UNIX only). -- --
-- sfResolveFile "metal.wav" >>= sfMetadata >>= print --sfMetadata :: FilePath -> IO (Int, Int, Int) -- | Unsafe sfMetadata. For fetching sound file information from read only -- sound file archives this is quite safe. -- --
-- sfInfo (sfResolve "metal.wav") == (1,44100,1029664) -- sfInfo (sfResolve "pf-c5.aif") == (2,44100,576377) --sfInfo :: FilePath -> (Int, Int, Int) -- | Unique identifier types and classes. Used by non-deterministic (noise) -- and non-sharable (demand) unit generators. module Sound.Sc3.Common.Uid -- | Identifiers are integers. type Id = Int -- | A class indicating a monad (and functor and applicative) that will -- generate a sequence of unique integer identifiers. class (Functor m, Applicative m, Monad m) => Uid m generateUid :: Uid m => m Int -- | State Uid. type Uid_St = State Int -- | Alias for runIdentity. uid_id_eval :: Identity t -> t -- | evalState with initial state of zero. -- --
-- uid_st_eval (replicateM 3 generateUid) == [0, 1, 2] --uid_st_eval :: Uid_St t -> t -- | Thread state through sequence of runState. uid_st_seq :: [Uid_St t] -> ([t], Int) -- | fst of uid_st_seq. -- --
-- uid_st_seq_ (replicate 3 generateUid) == [0, 1, 2] --uid_st_seq_ :: [Uid_St t] -> [t] -- | Unary Uid lift. liftUid1 :: Uid m => (Int -> Fn1 a b) -> Fn1 a (m b) -- | Binary Uid lift. liftUid2 :: Uid m => (Int -> Fn2 a b c) -> Fn2 a b (m c) -- | Ternary Uid lift. liftUid3 :: Uid m => (Int -> Fn3 a b c d) -> Fn3 a b c (m d) -- | Quaternary Uid lift. liftUid4 :: Uid m => (Int -> Fn4 a b c d e) -> Fn4 a b c d (m e) -- | 5-parameter Uid lift. liftUid5 :: Uid m => (Int -> Fn5 a b c d e f) -> Fn5 a b c d e (m f) -- | 6-parameter Uid lift. liftUid6 :: Uid m => (Int -> Fn6 a b c d e f g) -> Fn6 a b c d e f (m g) -- | 10-parameter Uid lift. liftUid10 :: Uid m => (Int -> Fn10 a b c d e f g h i j k) -> Fn10 a b c d e f g h i j (m k) -- | 11-parameter Uid lift. liftUid11 :: Uid m => (Int -> Fn11 a b c d e f g h i j k l) -> Fn11 a b c d e f g h i j k (m l) -- | Typeclass to constrain Ugen identifiers. Char inputs are hashed to -- generate longer seeds for when ir (constant) random Ugens are -- optimised. -- --
-- map resolveID [0::Int,1] == [0, 1]
-- map resolveID ['α', 'β'] == [1439603815, 4131151318]
-- map resolveID [('α', 'β'),('β', 'α')] == [3538183581, 3750624898]
-- map resolveID [('α',('α', 'β')),('β',('α', 'β'))] == [0020082907, 2688286317]
-- map resolveID [('α', 'α', 'β'),('β', 'α', 'β')] == [0020082907, 2688286317]
--
class Hashable32 a => ID a
resolveID :: ID a => a -> Id
-- | n identifiers from x.
--
-- -- id_seq 10 'α' == [1439603815 .. 1439603824] --id_seq :: ID a => Int -> a -> [Id] instance Sound.Sc3.Common.Uid.ID GHC.Types.Char instance Sound.Sc3.Common.Uid.ID GHC.Types.Int instance (Sound.Sc3.Common.Uid.ID p, Sound.Sc3.Common.Uid.ID q) => Sound.Sc3.Common.Uid.ID (p, q) instance (Sound.Sc3.Common.Uid.ID p, Sound.Sc3.Common.Uid.ID q, Sound.Sc3.Common.Uid.ID r) => Sound.Sc3.Common.Uid.ID (p, q, r) instance Sound.Sc3.Common.Uid.Uid (Control.Monad.Trans.State.Lazy.StateT GHC.Types.Int Data.Functor.Identity.Identity) instance Sound.Sc3.Common.Uid.Uid GHC.Types.IO instance Sound.Sc3.Common.Uid.Uid m => Sound.Sc3.Common.Uid.Uid (Control.Monad.Trans.Reader.ReaderT t m) -- | Composite of SC3.Common sub-modules. module Sound.Sc3.Common -- | Unsafe variants of monadic functions. module Sound.Sc3.Common.Unsafe -- | Lift monadic r to unsafe form. liftUnsafe0 :: IO r -> x -> r -- | Lift monadic r to unsafe form. liftUnsafe1 :: (a -> IO r) -> a -> r -- | Lift monadic r to unsafe form. liftUnsafe2 :: (a -> b -> IO r) -> a -> b -> r -- | Lift monadic r to unsafe form. liftUnsafe3 :: (a -> b -> c -> IO r) -> a -> b -> c -> r -- | Lift monadic r to unsafe form. liftUnsafe4 :: (a -> b -> c -> d -> IO r) -> a -> b -> c -> d -> r -- | Lift monadic r to unsafe form. liftUnsafe5 :: (a -> b -> c -> d -> e -> IO r) -> a -> b -> c -> d -> e -> r -- | Lift monadic r to unsafe form. liftUnsafe6 :: (a -> b -> c -> d -> e -> f -> IO r) -> a -> b -> c -> d -> e -> f -> r -- | Lift monadic r to unsafe form. liftUnsafe7 :: (a -> b -> c -> d -> e -> f -> g -> IO r) -> a -> b -> c -> d -> e -> f -> g -> r -- | Lift monadic r to unsafe form. liftUnsafe8 :: (a -> b -> c -> d -> e -> f -> g -> h -> IO r) -> a -> b -> c -> d -> e -> f -> g -> h -> r -- | Lift monadic r to unsafe form. liftUnsafe9 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> IO r) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> r -- | Lift monadic r to unsafe form. liftUnsafe10 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> IO r) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> r -- | Lift monadic r to unsafe form. liftUnsafe11 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> IO r) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> r -- | Lift monadic r to unsafe form. liftUnsafe12 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> IO r) -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> r -- | Enumeration of SC3 server commands. module Sound.Sc3.Server.Command.Enum -- | SC3 server commands are strings. type SC3_Command = String -- | Enumerate server command numbers. sc3_cmd_enumeration :: [(SC3_Command, Int)] -- | Lookup command number in sc3_cmd_enumeration. -- --
-- >>> map sc3_cmd_number ["/b_alloc","/s_new"] -- [Just 28,Just 9] --sc3_cmd_number :: SC3_Command -> Maybe Int -- | isJust of sc3_cmd_number. known_sc3_cmd :: SC3_Command -> Bool -- | List of asynchronous server commands, ie. commands that reply with -- /done. async_cmds :: [SC3_Command] -- | True if Message is an asynchronous Message. -- --
-- import Sound.Sc3.Server.Command.Plain -- map isAsync [b_close 0,n_set1 0 "0" 0,status] == [True,False,False] --isAsync :: Message -> Bool -- | Asynchronous commands are at the left. This function should preserve -- the ordering of both branches. -- --
-- partition_async [b_close 0,n_set1 0 "0" 0] --partition_async :: [Message] -> ([Message], [Message]) -- | Types & names for b_info message fields. b_info_fields :: [(String, String)] -- | Type, name and value descriptors for fields of n_info -- message. n_info_fields :: [(String, String, String)] -- | Modify existing message to include completion message module Sound.Sc3.Server.Command.Completion -- | Add a completion packet to an existing asynchronous command. with_completion_packet :: Message -> PacketOf Message -> Message -- | Add a completion message to an existing asynchronous command. -- --
-- >>> import Sound.Sc3.Server.Command.Plain -- -- >>> let m = n_set1 0 "0" 0 -- -- >>> let e = encodeMessage m -- -- >>> withCm (b_close 0) m == Message "/b_close" [Int32 0,Blob e] -- True --withCm :: Message -> Message -> Message -- | Server input enumerations. module Sound.Sc3.Server.Enum -- | Enumeration of possible locations to add new nodes (s_new and g_new). -- --
-- >>> fromEnum AddToTail -- 1 --data AddAction AddToHead :: AddAction AddToTail :: AddAction AddBefore :: AddAction AddAfter :: AddAction AddReplace :: AddAction -- | Enumeration of flags for '/b_gen' command. data B_Gen Normalise :: B_Gen Wavetable :: B_Gen Clear :: B_Gen -- | B_Gen to bit number. -- --
-- >>> map b_gen_bit [minBound .. maxBound] -- [0,1,2] --b_gen_bit :: B_Gen -> Int -- | Set of B_Gen to flag. -- --
-- >>> b_gen_flag [minBound .. maxBound] -- 7 --b_gen_flag :: [B_Gen] -> Int -- | Error posting scope. data ErrorScope -- | Global scope Globally :: ErrorScope -- | Bundle scope Locally :: ErrorScope -- | Error posting mode. data ErrorMode -- | Turn error posting off ErrorsOff :: ErrorMode -- | Turn error posting on ErrorsOn :: ErrorMode -- | Enumeration of Message printer types. data PrintLevel NoPrinter :: PrintLevel TextPrinter :: PrintLevel HexPrinter :: PrintLevel AllPrinter :: PrintLevel -- | Sound file format. data SoundFileFormat Aiff :: SoundFileFormat Flac :: SoundFileFormat Ircam :: SoundFileFormat Next :: SoundFileFormat Raw :: SoundFileFormat Wave :: SoundFileFormat -- | Sample format. data SampleFormat PcmInt8 :: SampleFormat PcmInt16 :: SampleFormat PcmInt24 :: SampleFormat PcmInt32 :: SampleFormat PcmFloat :: SampleFormat PcmDouble :: SampleFormat PcmMulaw :: SampleFormat PcmAlaw :: SampleFormat -- | Sample format to standard file extension name. soundFileFormatString :: SoundFileFormat -> String -- | Infer sample format from file extension name. soundFileFormat_from_extension :: String -> Maybe SoundFileFormat -- | Erroring variant. soundFileFormat_from_extension_err :: String -> SoundFileFormat -- | SampleFormat string as recognised by scsynth NRT mode. sampleFormatString :: SampleFormat -> String instance GHC.Enum.Enum Sound.Sc3.Server.Enum.AddAction instance GHC.Show.Show Sound.Sc3.Server.Enum.AddAction instance GHC.Classes.Eq Sound.Sc3.Server.Enum.AddAction instance GHC.Show.Show Sound.Sc3.Server.Enum.B_Gen instance GHC.Enum.Bounded Sound.Sc3.Server.Enum.B_Gen instance GHC.Enum.Enum Sound.Sc3.Server.Enum.B_Gen instance GHC.Classes.Eq Sound.Sc3.Server.Enum.B_Gen instance GHC.Enum.Enum Sound.Sc3.Server.Enum.ErrorScope instance GHC.Show.Show Sound.Sc3.Server.Enum.ErrorScope instance GHC.Classes.Eq Sound.Sc3.Server.Enum.ErrorScope instance GHC.Enum.Enum Sound.Sc3.Server.Enum.ErrorMode instance GHC.Show.Show Sound.Sc3.Server.Enum.ErrorMode instance GHC.Classes.Eq Sound.Sc3.Server.Enum.ErrorMode instance GHC.Enum.Enum Sound.Sc3.Server.Enum.PrintLevel instance GHC.Show.Show Sound.Sc3.Server.Enum.PrintLevel instance GHC.Classes.Eq Sound.Sc3.Server.Enum.PrintLevel instance GHC.Show.Show Sound.Sc3.Server.Enum.SoundFileFormat instance GHC.Read.Read Sound.Sc3.Server.Enum.SoundFileFormat instance GHC.Classes.Eq Sound.Sc3.Server.Enum.SoundFileFormat instance GHC.Enum.Enum Sound.Sc3.Server.Enum.SoundFileFormat instance GHC.Show.Show Sound.Sc3.Server.Enum.SampleFormat instance GHC.Read.Read Sound.Sc3.Server.Enum.SampleFormat instance GHC.Classes.Eq Sound.Sc3.Server.Enum.SampleFormat instance GHC.Enum.Enum Sound.Sc3.Server.Enum.SampleFormat -- | Binary 'Graph Definition' as understood by scsynth. There are -- both binary and text encoders and decoders. module Sound.Sc3.Server.Graphdef -- | Names are Ascii strings (ie. ByteString.Char8) type Name = Ascii -- | Controls are a name and a ugen-index. type Control = (Name, Int) -- | Constants are floating point. type Sample = Double -- | Ugen indices are Int. type Ugen_Index = Int -- | Port indices are Int. type Port_Index = Int -- | Index used to indicate constants at Ugen inputs. Ie. if the ugen-index -- is this value (-1) it indicates a constant. constant_index :: Ugen_Index -- | Inputs are a ugen-index and a port-index. data Input Input :: Ugen_Index -> Port_Index -> Input -- | Rates are encoded as integers (IR = 0, KR = 1, AR = 2, DR = 3). type Rate = Int -- | Outputs each indicate a Rate. type Output = Rate -- | Secondary (special) index, used by operator Ugens to select operation. type Special = Int -- | Unit generator type. type Ugen = (Name, Rate, [Input], [Output], Special) -- | Ugen name. ugen_name_str :: Ugen -> String -- | Ugen name, using operator name if appropriate. ugen_name_op :: Ugen -> String -- | Ugen Rate. ugen_rate :: Ugen -> Rate ugen_rate_enum :: Ugen -> Rate -- | Ugen Inputs. ugen_inputs :: Ugen -> [Input] -- | Ugen Outputs. ugen_outputs :: Ugen -> [Output] -- | Predicate to examine Ugen name and decide if it is a control. ugen_is_control :: Ugen -> Bool -- | Input is a Ugen (ie. not a constant, indicated by a ugen-index of -1) -- and the Ugen is a control. input_is_control :: Graphdef -> Input -> Bool -- | Graph definition type. data Graphdef Graphdef :: Name -> [Sample] -> [(Control, Sample)] -> [Ugen] -> Graphdef [graphdef_name] :: Graphdef -> Name [graphdef_constants] :: Graphdef -> [Sample] [graphdef_controls] :: Graphdef -> [(Control, Sample)] [graphdef_ugens] :: Graphdef -> [Ugen] -- | Lookup Ugen by index. graphdef_ugen :: Graphdef -> Ugen_Index -> Ugen -- | Lookup Control and default value by index. graphdef_control :: Graphdef -> Int -> (Control, Sample) -- | nid of constant. graphdef_constant_nid :: Graphdef -> Int -> Int -- | nid of control. graphdef_control_nid :: Graphdef -> Int -> Int -- | nid of Ugen. graphdef_ugen_nid :: Graphdef -> Int -> Int -- | SCgf encoded as 32-bit unsigned integer. -- --
-- > map fromEnum "SCgf" ---- --
-- >>> import Sound.Osc.Coding.Byte -- -- >>> decode_i32 (encode_ascii (Datum.ascii "SCgf")) == scgf_i32 -- True --scgf_i32 :: Num n => n -- | Get functions for Graphdef types, (str_f,i8_f,i16_f,i32_f,f32_f) type Get_Functions m = (m Name, m Int, m Int, m Int, m Double) -- | Get a Control. get_control :: Monad m => (Get_Functions m, m Int) -> m Control -- | Get an Input. get_input :: Monad m => m Int -> m Input -- | Get a Ugen get_ugen :: Monad m => (Get_Functions m, m Int) -> m Ugen -- | Get a Graphdef. Supports version 0|1 and version 2 files. -- Ignores variants. get_graphdef :: Monad m => Get_Functions m -> m Graphdef -- | Encode functions for Graphdef types -- (join_f,str_f,i8_f,i16_f,i32_f,f32_f,com_f) type Encode_Functions t = ([t] -> t, Name -> t, Int -> t, Int -> t, Int -> t, Double -> t, String -> t) encode_input_f :: Encode_Functions t -> Input -> t encode_control_f :: Encode_Functions t -> Control -> t encode_ugen_f :: Encode_Functions t -> Ugen -> t encode_graphdef_f :: Encode_Functions t -> Graphdef -> t -- | Simple statistics printer for Graphdef. graphdef_stat :: Graphdef -> String -- | Pretty print Ugen in the manner of SynthDef>>dumpUgens. ugen_dump_ugen_str :: [Sample] -> [Ugen] -> Ugen_Index -> Ugen -> String -- | Print graphdef in format equivalent to SynthDef>>dumpUgens in -- SuperCollider graphdef_dump_ugens_str :: Graphdef -> [String] -- | putStrLn of unlines of graphdef_dump_ugens_str -- --
-- import Sound.Sc3.Server.Graphdef -- import Sound.Sc3.Server.Graphdef.Io -- dir = "/home/rohan/sw/rsc3-disassembler/scsyndef/" -- pp nm = read_graphdef_file (dir ++ nm) >>= graphdef_dump_ugens -- pp "simple.scsyndef" -- pp "with-ctl.scsyndef" -- pp "mce.scsyndef" -- pp "mrg.scsyndef" --graphdef_dump_ugens :: Graphdef -> IO () instance GHC.Show.Show Sound.Sc3.Server.Graphdef.Input instance GHC.Classes.Eq Sound.Sc3.Server.Graphdef.Input instance GHC.Show.Show Sound.Sc3.Server.Graphdef.Graphdef instance GHC.Classes.Eq Sound.Sc3.Server.Graphdef.Graphdef -- | Binary encoders and decoders. module Sound.Sc3.Server.Graphdef.Binary -- | Get a Name (Pascal string). get_pstr :: Get Name -- | Get_Functions for binary .scsyndef files. binary_get_f :: Get_Functions Get -- | Read Graphdef from .scsyndef file. -- --
-- dir = "/home/rohan/sw/rsc3-disassembler/scsyndef/" -- pp nm = read_graphdef_file (dir ++ nm) >>= putStrLn . graphdef_stat -- pp "simple.scsyndef" -- pp "with-ctl.scsyndef" -- pp "mce.scsyndef" -- pp "mrg.scsyndef" --read_graphdef_file :: FilePath -> IO Graphdef -- | read_graphdef_file and run graphdef_stat. scsyndef_stat :: FilePath -> IO String -- | Encode_Functions for ByteString enc_bytestring :: Encode_Functions ByteString -- | Pascal (length prefixed) encoding of Name. -- --
-- ByteString.unpack (encode_pstr (ascii "string")) == [6, 115, 116, 114, 105, 110, 103] --encode_pstr :: Name -> ByteString -- | Byte-encode Input. encode_input :: Input -> ByteString -- | Byte-encode Control. encode_control :: Control -> ByteString -- | Byte-encode Ugen. encode_ugen :: Ugen -> ByteString -- | Encode Sample as 32-bit IEEE float. encode_sample :: Sample -> ByteString -- | Encode Graphdef. encode_graphdef :: Graphdef -> ByteString -- | Write Graphdef to indicated file. graphdefWrite :: FilePath -> Graphdef -> IO () -- | Write Graphdef to indicated directory. The filename is the -- graphdef_name with the appropriate extension -- (scsyndef). graphdefWrite_dir :: FilePath -> Graphdef -> IO () -- | .scsyndef file encoded in plain text. There are reader and writer -- functions. module Sound.Sc3.Server.Graphdef.Text -- |
-- dir = "/home/rohan/sw/rsc3-disassembler/scsyndef/" -- pp nm = Sound.Sc3.Server.Graphdef.Io.read_graphdef_file (dir ++ nm) >>= putStrLn . print_graphdef True -- pp "simple.scsyndef" -- pp "with-ctl.scsyndef" -- pp "mce.scsyndef" -- pp "mrg.scsyndef" --print_graphdef :: Bool -> Graphdef -> String -- | Read the next value from a list. list_read_f :: (t -> u) -> State [t] u -- | Read function for floating point that admits inf and infinity. read_float :: (Fractional p, Read p) => String -> p -- | Get_Functions for text representation of Graphdef. text_get_f :: Get_Functions (StateT [String] Identity) -- | Is line empty or starts with ';' is_nil_or_comment :: String -> Bool -- | Read text representation of Graphdef, as written by -- print_graphdef. -- --
-- read_graphdef "1396926310 0 1 simple 2 0.0 440.0 0 0 2 SinOsc 2 2 1 0 -1 1 -1 0 2 Out 2 2 0 0 -1 0 0 0" --read_graphdef :: String -> Graphdef read_graphdef_file :: FilePath -> IO Graphdef -- | Encoding agnostic i/o. module Sound.Sc3.Server.Graphdef.Io -- | Encoding agnostic file reader. If the file has a .scsyndef.text -- extension it's read as a text file, else as a binary file. -- -- read_graphdef_file "tmpstsc3.scsyndef.text" read_graphdef_file :: FilePath -> IO Graphdef -- | Non-realtime score generation. module Sound.Sc3.Server.Nrt -- | Encode Bundle and prefix with encoded length. oscWithSize :: BundleOf Message -> ByteString -- | An Nrt score is a sequence of BundleOfs. newtype Nrt Nrt :: [BundleOf Message] -> Nrt [nrt_bundles] :: Nrt -> [BundleOf Message] -- | span of f of bundleTime. Can be used to -- separate the initialisation and remainder parts of a -- score. nrt_span :: (Time -> Bool) -> Nrt -> ([BundleOf Message], [BundleOf Message]) -- | Encode an Nrt score. encodeNrt :: Nrt -> ByteString -- | Write an Nrt score. -- --
-- import Sound.Osc {\- hosc -\}
-- import Sound.Sc3 {\- hsc3 -\}
-- m1 = g_new [(1, AddToTail, 0)]
-- m2 = d_recv (synthdef "sin" (out 0 (sinOsc ar 660 0 * 0.15)))
-- m3 = s_new "sin" 100 AddToTail 1 []
-- m4 = n_free [100]
-- m5 = nrt_end
-- sc = Nrt [bundle 0 [m1,m2],bundle 1 [m3],bundle 10 [m4],bundle 15 [m5]]
-- writeNrt "/tmp/t.osc" sc
--
writeNrt :: FilePath -> Nrt -> IO ()
-- | Write an Nrt score to a file handle.
putNrt :: Handle -> Nrt -> IO ()
-- | Decode an Nrt ByteString to a list of BundleOfs.
decode_nrt_bundles :: ByteString -> [BundleOf Message]
-- | Decode an Nrt ByteString.
decodeNrt :: ByteString -> Nrt
-- | decodeNrt of readFile.
--
-- -- readNrt "/tmp/t.osc" --readNrt :: FilePath -> IO Nrt -- | Find any non-ascending sequences. nrt_non_ascending :: Nrt -> [(BundleOf Message, BundleOf Message)] instance GHC.Show.Show Sound.Sc3.Server.Nrt.Nrt -- | Non-realtime score rendering. module Sound.Sc3.Server.Nrt.Render -- | Minimal Nrt rendering parameters. -- -- The sound file type is inferred from the file name extension. -- Structure is: Osc file name, input audio file name and input number of -- channels (use ("_",0) for no input file), output audio file name and -- output number of channels, sample rate (int), sample format, further -- parameters (ie. ["-m","32768"]) to be inserted before the Nrt -N -- option. type Nrt_Param_Plain = (FilePath, (FilePath, Int), (FilePath, Int), Int, SampleFormat, [String]) -- | Compile argument list from Nrt_Param_Plain. -- --
-- >>> let opt = ("/tmp/t.osc",("_",0),("/tmp/t.wav",1),48000,PcmInt16,[])
--
-- >>> nrt_param_plain_to_arg opt
-- ["-i","0","-o","1","-N","/tmp/t.osc","_","/tmp/t.wav","48000","wav","int16"]
--
nrt_param_plain_to_arg :: Nrt_Param_Plain -> [String]
-- | Compile argument list from Nrt_Param_Plain and run scynth.
--
-- -- nrt_exec_plain opt --nrt_exec_plain :: Nrt_Param_Plain -> IO () -- | Minimal Nrt rendering, for more control see Stefan Kersten's -- hsc3-process package at: -- https://github.com/kaoskorobase/hsc3-process. nrt_proc_plain :: Nrt_Param_Plain -> Nrt -> IO () -- | Variant for no input case. -- -- (osc-file-name, audio-file-name, number-of-channels, sample-rate, -- sample-format, param) type Nrt_Render_Plain = (FilePath, FilePath, Int, Int, SampleFormat, [String]) -- | Add ("-",0) as input parameters and run nrt_proc_plain. -- --
-- nrt_render_plain opt sc --nrt_render_plain :: Nrt_Render_Plain -> Nrt -> IO () -- | Nrt statistics. module Sound.Sc3.Server.Nrt.Stat -- | Nrt statistics, see nrt_stat_param for meanings. type Nrt_Stat = ((String, Time), (String, Int), (String, Int), (String, [(String, Int)])) -- | Nrt_Stat names. nrt_stat_param :: (String, String, String, String) -- | Trivial Nrt statistics. nrt_stat :: Nrt -> Nrt_Stat -- | scsynth server command-line options. module Sound.Sc3.Server.Options -- | (short-option, long-option, default-value) type Sc3_Opt i = (Char, String, i) -- | Get value from option. sc3_opt_value :: Sc3_Opt i -> i -- | Default host name string. sc3_host_name_def :: String -- | Default port number, either a u or a t option is -- required. sc3_port_def :: Num i => i -- | Protocol is either Udp or Tcp. data Sc3_Protocol Sc3_Udp :: Sc3_Protocol Sc3_Tcp :: Sc3_Protocol sc3_protocol_def :: Sc3_Protocol -- | Default port option. sc3_opt_port_def :: Num i => Sc3_Protocol -> Sc3_Opt i -- | Sc3 default options. sc3_opt_def :: Num i => Sc3_Protocol -> [Sc3_Opt i] -- | SC3 default options for Udp. sc3_opt_def_udp :: Num i => [Sc3_Opt i] -- | Is option boolean, ie. 0=False and 1=True. -- --
-- >>> filter sc3_opt_bool sc3_opt_def_udp
-- [('D',"load-synthdefs?",1),('R',"publish-to-rendezvous?",1)]
--
sc3_opt_bool :: Sc3_Opt i -> Bool
-- | Lookup option given either short or long name.
sc3_opt_get :: [Sc3_Opt i] -> Either Char String -> Maybe i
-- | Set option given either short or long name.
--
-- -- >>> sc3_opt_get (sc3_opt_set sc3_opt_def_udp (Left 'w',256)) (Right "number-of-wire-buffers") -- Just 256 --sc3_opt_set :: [Sc3_Opt i] -> (Either Char String, i) -> [Sc3_Opt i] -- | Apply set of edits to options. -- --
-- >>> unwords (sc3_opt_arg (sc3_opt_edit sc3_opt_def_udp [(Left 'w',256),(Left 'm',2 ^ 16)])) -- "-u 57110 -a 1024 -b 1024 -c 16384 -D 1 -d 1024 -i 8 -l 64 -m 65536 -n 1024 -o 8 -r 64 -R 1 -S 0 -V 0 -w 256 -z 64 -Z 0" --sc3_opt_edit :: [Sc3_Opt i] -> [(Either Char String, i)] -> [Sc3_Opt i] -- | Generate scsynth argument list. -- --
-- >>> unwords (sc3_opt_arg sc3_opt_def_udp) -- "-u 57110 -a 1024 -b 1024 -c 16384 -D 1 -d 1024 -i 8 -l 64 -m 8192 -n 1024 -o 8 -r 64 -R 1 -S 0 -V 0 -w 64 -z 64 -Z 0" --sc3_opt_arg :: Show i => [Sc3_Opt i] -> [String] -- | Generate arguments for callProcess or related functions. -- --
-- >>> let o = sc3_opt_def_udp in sc3_opt_cmd o == ("scsynth", sc3_opt_arg o)
-- True
--
sc3_opt_cmd :: Show i => [Sc3_Opt i] -> (FilePath, [String])
-- | Synthesis parameters
module Sound.Sc3.Server.Param
-- | An Sc3 synthesis parameter, ie. (controlName, controlValue).
type Param1 = (String, Double)
-- | Set of Sc3 synthesiser parameters.
type Param = [Param1]
-- | Add new, or overwrite existing, parameter.
param_insert :: Param -> Param1 -> Param
-- | Merge, require keys be unique.
--
--
-- >>> param_merge_uniq [("a",1),("b",2)] [("c",3),("d",4)]
-- [("a",1.0),("b",2.0),("c",3.0),("d",4.0)]
--
--
--
-- param_merge_uniq [("a",1)] [("a",2)] -- error
--
param_merge_uniq :: Param -> Param -> Param
-- | Merge, right biased.
--
--
-- >>> param_merge_r [("a",1),("b",2)] [("c",3),("a",4)]
-- [("b",2.0),("c",3.0),("a",4.0)]
--
param_merge_r :: Param -> Param -> Param
-- | Right-fold (right-biased) of param_merge
--
--
-- >>> param_merge_r_seq [[("a",1),("b",2)],[("c",3),("a",4)],[("b",5)]]
-- [("c",3.0),("a",4.0),("b",5.0)]
--
param_merge_r_seq :: [Param] -> Param
-- | Lookup parameter value, with default.
param_get :: Param -> String -> Double -> Double
-- | Given (param-separator,key-value-separator) parse paramter string.
--
--
-- >>> param_parse (';','=') "a=1;b=2"
-- [("a",1.0),("b",2.0)]
--
param_parse :: (Char, Char) -> String -> Param
-- | Inverse of param_parse, k is the precision to print
-- values to.
--
--
-- >>> param_pp (';','=') 4 [("a",1),("b",2)]
-- "a=1.0;b=2.0"
--
param_pp :: (Char, Char) -> Int -> Param -> String
-- | Brackets
module Sound.Sc3.Ugen.Brackets
-- | Brackets are two sets of Open Sound Control messages that can be
-- associated with a Ugen. The first is to be run prior to the graph
-- being executed, the other after it has ended.
type Brackets = ([Message], [Message])
-- | No messages.
emptyBrackets :: Brackets
-- | Combine a sequence of Brackets into one Bracket.
--
--
-- >>> f = Data.Bifunctor.bimap concat concat . unzip
--
-- >>> f [(['a'],['A']),(['b'],['B'])]
-- ("ab","AB")
--
concatBrackets :: [Brackets] -> Brackets
-- | Constant
module Sound.Sc3.Ugen.Constant
-- | Constants. Constants may have brackets. This allows for buffer
-- allocation and deallocation to be associated with a buffer identifier.
--
-- -- >>> Constant 3 emptyBrackets == Constant 3 emptyBrackets -- True ---- --
-- >>> Constant 3 emptyBrackets > Constant 1 emptyBrackets -- True --data Constant Constant :: Double -> Brackets -> Constant [constantValue] :: Constant -> Double [constantBrackets] :: Constant -> Brackets -- | Get fractional part of a double. fractionPart :: Double -> Double -- | Is integer? -- --
-- >>> constantIsInteger (Constant 1 emptyBrackets) -- True --constantIsInteger :: Constant -> Bool instance GHC.Show.Show Sound.Sc3.Ugen.Constant.Constant instance GHC.Read.Read Sound.Sc3.Ugen.Constant.Constant instance GHC.Classes.Eq Sound.Sc3.Ugen.Constant.Constant instance GHC.Classes.Ord Sound.Sc3.Ugen.Constant.Constant -- | Control module Sound.Sc3.Ugen.Control -- | Controls may form part of a control group. There are presently three -- types of groups. Ranges controls have two values (minima, maxima) and -- are ordinarily drawn as a range slider. Array controls have n values -- [e1 .. eN] and are ordinarily drawn as a multislider. Xy controls have -- two values (x, y) and are ordinarily drawn as a two dimensional -- slider. data Control_Group Control_Range :: Control_Group Control_Array :: Int -> Control_Group Control_Xy :: Control_Group -- | The number of elements in a control group. control_group_degree :: Control_Group -> Int -- | Grouped controls have names that have equal prefixes and identifying -- suffixes. Range controls have two elements, minima and maxima, -- suffixes are [ and ]. Array controls have n elements and have -- zero-indexed numerical suffixes. Xy controls have two elements, X and -- Y coordinates, suffixes are X and Y. control_group_suffixes :: Control_Group -> [String] -- | Control meta-data. data Control_Meta n Control_Meta :: n -> n -> String -> n -> String -> Maybe Control_Group -> Control_Meta n -- | Minimum [ctl_min] :: Control_Meta n -> n -- | Maximum [ctl_max] :: Control_Meta n -> n -- | (0,1) (min,max) transfer function. [ctl_warp] :: Control_Meta n -> String -- | The step to increment & decrement by. [ctl_step] :: Control_Meta n -> n -- | Unit of measure (ie hz, ms etc.). [ctl_units] :: Control_Meta n -> String -- | Control group. [controlGroup] :: Control_Meta n -> Maybe Control_Group -- | 3-tuple form of Control_Meta data. type Control_Meta_T3 n = (n, n, String) -- | Lift Control_Meta_T3 to Control_Meta allowing type -- coercion. control_meta_t3 :: Num m => (n -> m) -> Control_Meta_T3 n -> Control_Meta m -- | 5-tuple form of Control_Meta data. type Control_Meta_T5 n = (n, n, String, n, String) -- | Lift Control_Meta_T5 to Control_Meta allowing type -- coercion. control_meta_t5 :: (n -> m) -> Control_Meta_T5 n -> Control_Meta m -- | Control inputs. It is an unchecked invariant that controls with equal -- names within a Ugen graph must be equal in all other respects. data Control Control :: Rate -> Maybe Int -> String -> Double -> Bool -> Maybe (Control_Meta Double) -> Brackets -> Control [controlOperatingRate] :: Control -> Rate [controlIndex] :: Control -> Maybe Int [controlName] :: Control -> String [controlDefault] :: Control -> Double [controlTriggered] :: Control -> Bool [controlMeta] :: Control -> Maybe (Control_Meta Double) [controlBrackets] :: Control -> Brackets instance GHC.Show.Show Sound.Sc3.Ugen.Control.Control_Group instance GHC.Read.Read Sound.Sc3.Ugen.Control.Control_Group instance GHC.Classes.Eq Sound.Sc3.Ugen.Control.Control_Group instance GHC.Classes.Ord Sound.Sc3.Ugen.Control.Control_Group instance GHC.Show.Show n => GHC.Show.Show (Sound.Sc3.Ugen.Control.Control_Meta n) instance GHC.Read.Read n => GHC.Read.Read (Sound.Sc3.Ugen.Control.Control_Meta n) instance GHC.Classes.Eq n => GHC.Classes.Eq (Sound.Sc3.Ugen.Control.Control_Meta n) instance GHC.Classes.Ord n => GHC.Classes.Ord (Sound.Sc3.Ugen.Control.Control_Meta n) instance GHC.Show.Show Sound.Sc3.Ugen.Control.Control instance GHC.Read.Read Sound.Sc3.Ugen.Control.Control instance GHC.Classes.Eq Sound.Sc3.Ugen.Control.Control instance GHC.Classes.Ord Sound.Sc3.Ugen.Control.Control -- | Haskell implementations of Sc3 Ugens. module Sound.Sc3.Ugen.Hs -- | F = function, St = state type F_St0 st o = st -> (o, st) type F_St1 st i o = (i, st) -> (o, st) -- | U = uniform type F_U2 n = n -> n -> n type F_U3 n = n -> n -> n -> n type F_U4 n = n -> n -> n -> n -> n type F_U5 n = n -> n -> n -> n -> n -> n type F_U6 n = n -> n -> n -> n -> n -> n -> n type F_U7 n = n -> n -> n -> n -> n -> n -> n -> n type F_U8 n = n -> n -> n -> n -> n -> n -> n -> n -> n type F_U9 n = n -> n -> n -> n -> n -> n -> n -> n -> n -> n -- | T = tuple (see Base for T2-T4) type T5 n = (n, n, n, n, n) type T6 n = (n, n, n, n, n, n) type T7 n = (n, n, n, n, n, n, n) type T8 n = (n, n, n, n, n, n, n, n) type T9 n = (n, n, n, n, n, n, n, n, n) -- | avg = average avg2 :: Fractional n => F_U2 n avg3 :: Fractional n => F_U3 n avg4 :: Fractional n => F_U4 n avg5 :: Fractional n => F_U5 n avg9 :: Fractional n => F_U9 n -- | fir = finite impulse response -- --
-- >>> l_apply_f_st1 (fir1 (\x z1 -> (x + z1) / 2)) 0 [0 .. 5] -- [0.0,0.5,1.5,2.5,3.5,4.5] --fir1 :: F_U2 n -> F_St1 n n n -- | fir = finite impulse response -- --
-- >>> l_apply_f_st1 (fir2 (\x x1 x2 -> (x + x1 + x2) / 2)) (0,0) [0 .. 5] -- [0.0,0.5,1.5,3.0,4.5,6.0] --fir2 :: F_U3 n -> F_St1 (T2 n) n n fir3 :: F_U4 n -> F_St1 (T3 n) n n fir4 :: F_U5 n -> F_St1 (T4 n) n n fir8 :: F_U9 n -> F_St1 (T8 n) n n -- | iir = infinite impulse response -- --
-- > l_apply_f_st1 (iir1 (\x y1 -> x + y1)) 0 (replicate 10 1) ---- --
-- >>> l_apply_f_st1 (iir2 (\x y1 y2 -> x + y1 + y2)) (0,0) (replicate 10 1) -- [1,2,4,7,12,20,33,54,88,143] ---- --
-- >>> map (+1) [0+0,1+0,2+1,4+2,7+4,12+7,20+12,33+20,54+33,88+54] -- https://oeis.org/A000071 -- [1,2,4,7,12,20,33,54,88,143] --iir2 :: F_U3 n -> F_St1 (T2 n) n n -- | ff = feed-forward, fb = feed-back iir2_ff_fb :: (n -> n -> n -> T2 n) -> F_St1 (T2 n) n n biquad :: F_U5 n -> F_St1 (T4 n) n n -- | sos = second order section sos_f :: Num n => T5 n -> F_U5 n sos :: Num n => T5 n -> F_St1 (T4 n) n n -- | hp = high pass hpz1 :: Fractional n => F_St1 n n n hpz2 :: Fractional n => F_St1 (T2 n) n n -- | lp = low pass lpz1 :: Fractional n => F_St1 n n n lpz2 :: Fractional n => F_St1 (T2 n) n n -- | bp = band pass bpz2 :: Fractional n => F_St1 (T2 n) n n -- | br = band reject brz2 :: Fractional n => F_St1 (T2 n) n n -- | mavg = moving average mavg5 :: Fractional n => F_St1 (T4 n) n n mavg9 :: Fractional n => F_St1 (T8 n) n n -- | Sample rate (SR) to radians per sample (RPS). -- --
-- >>> sr_to_rps 44100 == 0.00014247585730565955 -- True --sr_to_rps :: Floating n => n -> n -- | resonz iir2_ff_fb function. param are for resonz_coef. resonz_f :: Floating n => T3 n -> n -> n -> n -> T2 n -- | ir = initialization rate resonz_ir :: Floating n => T3 n -> F_St1 (T2 n) n n -- | rlpf = resonant low pass filter rlpf_f :: Floating n => (n -> n -> n) -> T3 n -> F_U3 n rlpf_ir :: (Floating n, Ord n) => T3 n -> F_St1 (T2 n) n n bw_hpf_ir :: Floating n => T2 n -> F_St1 (T4 n) n n bw_lpf_ir :: Floating n => T2 n -> F_St1 (T4 n) n n white_noise :: (RandomGen g, Fractional n, Random n) => F_St0 g n brown_noise_f :: (Fractional n, Ord n) => n -> n -> n brown_noise :: (RandomGen g, Fractional n, Random n, Ord n) => F_St0 (g, n) n -- | http://musicdsp.org/files/pink.txt pk_pinking_filter_f :: Fractional a => (a, a, a, a, a, a, a) -> a -> (a, (a, a, a, a, a, a, a)) -- | http://musicdsp.org/files/pink.txt pk_pinking_filter_economy_f :: Fractional a => (a, a, a) -> a -> (a, (a, a, a)) -- | dt must not be zero. decay_f :: Floating a => a -> a -> a -> a -> a -- | Given time dt in frames construct iir1 lag -- function. dt must not be zero. lag_f_frames :: Floating a => a -> a -> a -> a -- | lag_f_frames with dt in seconds. lag_f :: Floating a => a -> a -> a -> a -> a lag :: Floating t => t -> F_St1 t (t, t) t slope :: Num t => t -> F_St1 t t t latch :: F_St1 t (t, Bool) t as_trig :: (Fractional t, Ord t) => F_St1 t t Bool phasor :: RealFrac t => F_St1 t (Bool, t, t, t, t) t mod_dif :: RealFrac a => a -> a -> a -> a -- |
-- >>> take 4 (l_white_noise 'α') -- [0.9687553280469108,0.808159221997721,-0.8993330152164296,0.23197278942699834] --l_white_noise :: (Enum e, Fractional n, Random n) => e -> [n] -- | Brown noise -- --
-- >>> take 4 (l_brown_noise 'α') -- [0.12109441600586385,0.22211431875557897,0.10969769185352526,0.13869429053190005] --l_brown_noise :: (Enum e, Fractional n, Ord n, Random n) => e -> [n] l_apply_f_st1 :: F_St1 st i o -> st -> [i] -> [o] l_lag :: Floating t => t -> [t] -> [t] -> [t] l_slope :: Floating t => t -> [t] -> [t] -- | Phasor -- --
-- >>> let rp = repeat -- -- >>> take 10 (l_phasor (rp False) (rp 1) (rp 0) (rp 4) (rp 0)) -- [0.0,1.0,2.0,3.0,0.0,1.0,2.0,3.0,0.0,1.0] --l_phasor :: RealFrac n => [Bool] -> [n] -> [n] -> [n] -> [n] -> [n] l_phasor_osc :: RealFrac n => n -> n -> [n] -> [n] l_sin_osc :: (Floating n, RealFrac n) => n -> [n] -> [n] l_cos_osc :: (Floating n, RealFrac n) => n -> [n] -> [n] l_hpz1 :: Fractional n => [n] -> [n] l_hpz2 :: Fractional n => [n] -> [n] l_lpz1 :: Fractional n => [n] -> [n] l_lpz2 :: Fractional n => [n] -> [n] l_bpz2 :: Fractional n => [n] -> [n] l_brz2 :: Fractional n => [n] -> [n] l_bw_hpf :: Floating n => T2 n -> [n] -> [n] l_bw_lpf :: Floating n => T2 n -> [n] -> [n] l_resonz_ir :: Floating n => T3 n -> [n] -> [n] l_rlpf_ir :: (Floating n, Ord n) => T3 n -> [n] -> [n] l_mavg5 :: Fractional n => [n] -> [n] l_mavg9 :: Fractional n => [n] -> [n] -- | Label. module Sound.Sc3.Ugen.Label newtype Label Label :: String -> Label [ugenLabel] :: Label -> String instance GHC.Show.Show Sound.Sc3.Ugen.Label.Label instance GHC.Read.Read Sound.Sc3.Ugen.Label.Label instance GHC.Classes.Eq Sound.Sc3.Ugen.Label.Label instance GHC.Classes.Ord Sound.Sc3.Ugen.Label.Label -- | Multiple root graph (Mrg) module Sound.Sc3.Ugen.Mrg data Mrg t Mrg :: t -> t -> Mrg t [mrgLeft] :: Mrg t -> t [mrgRight] :: Mrg t -> t instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Ugen.Mrg.Mrg t) instance GHC.Read.Read t => GHC.Read.Read (Sound.Sc3.Ugen.Mrg.Mrg t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Ugen.Mrg.Mrg t) instance GHC.Classes.Ord t => GHC.Classes.Ord (Sound.Sc3.Ugen.Mrg.Mrg t) -- | Functions to normalise Ugen names. -- -- Sc3 Ugen names are capitalised at word boundaries. -- hsc3 cannot use these names for Ugen constructor functions. -- Haskell names are given by lower-casing until the first word edge. -- Lisp names are given by lower-casing everything and adding hyphens -- before edges. module Sound.Sc3.Ugen.Name -- | Find all Sc3 name edges. Edges occur at non lower-case letters. This -- rule is very simple but is coherent and predictable and works well for -- .hs names. sc3_name_edges_plain :: String -> [Bool] -- | Find non-initial Sc3 name edges. -- --
-- >>> sc3_name_edges "SinOsc" -- [False,False,False,True,False,False] ---- --
-- >>> sc3_name_edges "FFT" -- [False,False,False] ---- --
-- >>> sc3_name_edges "DFM1" -- [False,False,False,False] ---- --
-- >>> sc3_name_edges "PV_Add" -- [False,False,False,True,False,False] ---- --
-- >>> sc3_name_edges "A2K" -- [False,False,False] ---- --
-- >>> sc3_name_edges "Lag2UD" -- [False,False,False,True,True,True] ---- --
-- >>> sc3_name_edges "PeakEQ" -- [False,False,False,False,True,True] --sc3_name_edges :: String -> [Bool] -- | Convert from ScLang (class) name to Haskell (function) name. -- --
-- >>> let f = unwords . map sc3_name_to_hs_name . words -- -- >>> f "SinOsc LFSaw FFT PV_Add AllpassN BHiPass BinaryOpUGen HPZ1 RLPF" -- "sinOsc lfSaw fft pv_Add allpassN bHiPass binaryOpUGen hpz1 rlpf" ---- --
-- >>> f "TGrains DFM1 FBSineC A2K Lag2UD IIRFilter FMGrainB Pan2 PeakEQ RIRandN" -- "tGrains dfm1 fbSineC a2k lag2UD iirFilter fmGrainB pan2 peakEQ riRandN" --sc3_name_to_hs_name :: String -> String -- | Convert from Sc3 name to Lisp style name. -- --
-- >>> let f = unwords . map sc3_name_to_lisp_name . words -- -- >>> f "SinOsc LFSaw FFT PV_Add AllpassN BHiPass BinaryOpUGen HPZ1 RLPF TGrains DFM1 BPeakEQ Pan2 RIRandN" -- "sin-osc lf-saw fft pv-add allpass-n b-hi-pass binary-op-u-gen hpz1 rlpf t-grains dfm1 b-peak-e-q pan-2 ri-rand-n" --sc3_name_to_lisp_name :: String -> String -- | Sc3 Ugen names are given with rate suffixes if oscillators, -- without if filters. -- --
-- >>> map sc3_ugen_name_sep (words "SinOsc.ar LPF *")
-- [Just ("SinOsc",Just AudioRate),Just ("LPF",Nothing),Just ("*",Nothing)]
--
sc3_ugen_name_sep :: String -> Maybe (String, Maybe Rate)
-- | SuperCollider Ugen primitive.
module Sound.Sc3.Ugen.Primitive
-- | Identifier used to distinguish otherwise equal non-deterministic
-- nodes.
data UgenId
NoId :: UgenId
Uid :: Int -> UgenId
-- | Alias of NoId, the UgenId used for deterministic Ugens.
no_id :: UgenId
-- | Unit generator output descriptor.
type Output = Rate
-- | Selector for unary and binary operators.
newtype Special
Special :: Int -> Special
-- | Sc Ugen primitive.
data Primitive t
Primitive :: Rate -> String -> [t] -> [Output] -> Special -> UgenId -> Brackets -> Primitive t
[ugenRate] :: Primitive t -> Rate
[ugenName] :: Primitive t -> String
[ugenInputs] :: Primitive t -> [t]
[ugenOutputs] :: Primitive t -> [Output]
[ugenSpecial] :: Primitive t -> Special
[ugenId] :: Primitive t -> UgenId
[primitiveBrackets] :: Primitive t -> Brackets
instance GHC.Show.Show Sound.Sc3.Ugen.Primitive.UgenId
instance GHC.Read.Read Sound.Sc3.Ugen.Primitive.UgenId
instance GHC.Classes.Eq Sound.Sc3.Ugen.Primitive.UgenId
instance GHC.Classes.Ord Sound.Sc3.Ugen.Primitive.UgenId
instance GHC.Show.Show Sound.Sc3.Ugen.Primitive.Special
instance GHC.Read.Read Sound.Sc3.Ugen.Primitive.Special
instance GHC.Classes.Eq Sound.Sc3.Ugen.Primitive.Special
instance GHC.Classes.Ord Sound.Sc3.Ugen.Primitive.Special
instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Ugen.Primitive.Primitive t)
instance GHC.Read.Read t => GHC.Read.Read (Sound.Sc3.Ugen.Primitive.Primitive t)
instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Ugen.Primitive.Primitive t)
instance GHC.Classes.Ord t => GHC.Classes.Ord (Sound.Sc3.Ugen.Primitive.Primitive t)
-- | Proxy indicating an output port at a multi-channel Primitive.
module Sound.Sc3.Ugen.Proxy
data Proxy t
Proxy :: Primitive t -> Int -> Proxy t
[proxySource] :: Proxy t -> Primitive t
[proxyIndex] :: Proxy t -> Int
proxyRate :: Proxy t -> Rate
instance GHC.Show.Show t => GHC.Show.Show (Sound.Sc3.Ugen.Proxy.Proxy t)
instance GHC.Read.Read t => GHC.Read.Read (Sound.Sc3.Ugen.Proxy.Proxy t)
instance GHC.Classes.Eq t => GHC.Classes.Eq (Sound.Sc3.Ugen.Proxy.Proxy t)
instance GHC.Classes.Ord t => GHC.Classes.Ord (Sound.Sc3.Ugen.Proxy.Proxy t)
-- | Unit generator (Ugen) type and instances.
module Sound.Sc3.Ugen.Ugen
-- | Sc3 samples are 32-bit Float. hsc3 uses 64-bit Double.
-- If Ugen values are used more generally (ie. see hsc3-forth)
-- Float may be too imprecise, i.e. for representing time stamps.
type Sample = Double
-- | Union type of Unit Generator forms.
data Ugen
Constant_U :: Constant -> Ugen
Control_U :: Control -> Ugen
Label_U :: Label -> Ugen
Primitive_U :: Primitive Ugen -> Ugen
Proxy_U :: Proxy Ugen -> Ugen
Mce_U :: Mce Ugen -> Ugen
Mrg_U :: Mrg Ugen -> Ugen
-- | Lookup operator name for operator Ugens, else Ugen name.
--
-- -- >>> map (\k -> ugen_user_name "BinaryOpUGen" (Special k)) [0, 2, 4, 9, 12, 17, 25] -- ["+","*","/",">","Min","Lcm","**"] --ugen_user_name :: String -> Special -> String -- | Ugen form or sc3_round_to. roundTo :: Ugen -> Ugen -> Ugen -- | constant of parse_double. parse_constant :: String -> Maybe Ugen -- | See into Constant_U. un_constant :: Ugen -> Maybe Constant -- | Value of Constant_U Constant. u_constant :: Ugen -> Maybe Sample -- | Erroring variant. u_constant_err :: Ugen -> Sample -- | Multiple root graph constructor. mrg :: [Ugen] -> Ugen -- | See into Mrg_U, follows leftmost rule until arriving at non-Mrg -- node. mrg_leftmost :: Ugen -> Ugen -- | Constant node predicate. isConstant :: Ugen -> Bool -- | True if input is a sink Ugen, ie. has no outputs. Sees into -- Mrg. isSink :: Ugen -> Bool -- | See into Proxy_U. un_proxy :: Ugen -> Maybe (Proxy Ugen) -- | Is Ugen a Proxy? isProxy :: Ugen -> Bool -- | Get Primitive from Ugen if Ugen is a Primitive. ugenPrimitive :: Ugen -> Maybe (Primitive Ugen) -- | Is Ugen a Primitive? isPrimitive :: Ugen -> Bool -- | Multiple channel expansion node constructor. mce :: [Ugen] -> Ugen -- | Type specified mce_to_list. mceProxies :: Mce Ugen -> [Ugen] -- | Multiple channel expansion node (Mce_U) predicate. Sees into -- Mrg. isMce :: Ugen -> Bool -- | Output channels of Ugen as a list. If required, preserves the RHS of -- an Mrg node in channel 0. See also: mceChannel mceChannels :: Ugen -> [Ugen] -- | Number of channels to expand to. This function sees into Mrg, and is -- defined only for Mce nodes. mceDegree :: Ugen -> Maybe Int -- | Erroring variant. mceDegree_err :: Ugen -> Int -- | Extend Ugen to specified degree. Follows "leftmost" rule for Mrg -- nodes. mceExtend :: Int -> Ugen -> [Ugen] -- | Is Mce required, ie. are any input values Mce? mceRequired :: [Ugen] -> Bool -- | Apply Mce transform to a list of inputs. The transform extends each -- input so all are of equal length, and then transposes the matrix. -- --
-- >>> mceInputTransform [mce [1, 2],mce [3, 4]] == Just [[1,3],[2,4]] -- True ---- --
-- >>> mceInputTransform [mce [1, 2],mce [3, 4], mce [5, 6, 7]] == Just [[1,3,5],[2,4,6],[1,3,7]] -- True ---- --
-- >>> mceInputTransform [mce [mce [1, 2], mce [3, 4]], mce [5, 6]] == Just [[mce [1, 2],5],[mce [3, 4],6]] -- True --mceInputTransform :: [Ugen] -> Maybe [[Ugen]] -- | Build a Ugen after Mce transformation of inputs. mceBuild :: ([Ugen] -> Ugen) -> [Ugen] -> Ugen -- | True if Mce is an immediate proxy for a multiple-out Primitive. This -- is useful when disassembling graphs, ie. ugen_graph_forth_pp at -- hsc3-db. It's also useful when editing a Primitive after it is -- constructed, as in bracketUgen. mce_is_direct_proxy :: Mce Ugen -> Bool -- | Attach Brackets (initialisation and cleanup message sequences) to -- Ugen. For simplicity and clarity, brackets can only be attached to -- Primitive, Constant and Control nodes. This will look into the direct -- (immediate) proxies of a Primitive. bracketUgen :: Ugen -> Brackets -> Ugen -- | Retrieve Brackets from Ugen. ugenBrackets :: Ugen -> Brackets -- | Ensure input Ugen is valid, ie. not a sink. checkInput :: Ugen -> Ugen -- | Constant value node constructor. constant :: Real n => n -> Ugen -- | Type specialised constant. int_to_ugen :: Int -> Ugen -- | Type specialised constant. float_to_ugen :: Float -> Ugen -- | Type specialised constant. double_to_ugen :: Double -> Ugen -- | Unit generator proxy node constructor. proxy :: Ugen -> Int -> Ugen -- | Determine the rate of a Ugen. rateOf :: Ugen -> Rate -- | Apply proxy transformation if required. proxify :: Ugen -> Ugen -- | Filters with DemandRate inputs run at ControlRate. This is a little -- unfortunate, it'd be nicer if the rate in this circumstance could be -- given. mk_ugen_select_rate :: String -> [Ugen] -> [Rate] -> Either Rate [Int] -> Rate -- | Construct proxied and multiple channel expanded Ugen. -- -- cf = constant function, rs = rate set, r = rate, nm = name, i = -- inputs, i_mce = list of Mce inputs, o = outputs. mkUgen :: Maybe ([Sample] -> Sample) -> [Rate] -> Either Rate [Int] -> String -> [Ugen] -> Maybe [Ugen] -> Int -> Special -> UgenId -> Ugen -- | Operator Ugen constructor. mkOperator :: ([Sample] -> Sample) -> String -> [Ugen] -> Int -> Ugen -- | Unary math constructor. mkUnaryOperator :: Sc3_Unary_Op -> (Sample -> Sample) -> Ugen -> Ugen -- | Binary math constructor with constant optimisation. -- --
-- >>> constant 2 * constant 3 == constant 6 -- True ---- --
-- >>> let o = mkUgen Nothing [AudioRate] (Left AudioRate) "SinOsc" [constant 440, constant 0] Nothing 1 (Special 0) (Uid 0) -- -- >>> o * 1 == o && 1 * o == o && o * 2 /= o -- True ---- --
-- >>> o + 0 == o && 0 + o == o && o + 1 /= o -- True ---- --
-- >>> o - 0 == o && 0 - o /= o -- True ---- --
-- >>> o / 1 == o && 1 / o /= o -- True ---- --
-- >>> o ** 1 == o && o ** 2 /= o -- True --mkBinaryOperator_optimise_constants :: Sc3_Binary_Op -> (Sample -> Sample -> Sample) -> (Either Sample Sample -> Bool) -> Ugen -> Ugen -> Ugen -- | Plain (non-optimised) binary math constructor. mkBinaryOperator :: Sc3_Binary_Op -> (Sample -> Sample -> Sample) -> Ugen -> Ugen -> Ugen -- | Is u the primitive for the named Ugen. is_primitive_for :: String -> Ugen -> Bool -- | Is u the primitive for the named Ugen. is_constant_of :: Sample -> Ugen -> Bool -- | Is u a binary math operator with SPECIAL of k. is_math_binop :: Int -> Ugen -> Bool -- | Is u an ADD operator? is_add_operator :: Ugen -> Bool assert_is_add_operator :: String -> Ugen -> Ugen -- | Is u an MUL operator? is_mul_operator :: Ugen -> Bool -- | MulAdd re-writer, applicable only directly at add operator Ugen. The -- MulAdd Ugen is very sensitive to input rates. Add=AudioRate with -- In|Mul=InitialisationRate|Const will crash scsynth. This only -- considers primitives that do not have bracketing messages. mul_add_optimise_direct :: Ugen -> Ugen -- | MulAdd optimiser, applicable at any Ugen (ie. checks u is an -- ADD ugen) -- --
-- import Sound.Sc3 -- g1 = sinOsc ar 440 0 * 0.1 + control ir "x" 0.05 -- g2 = sinOsc ar 440 0 * control ir "x" 0.1 + 0.05 -- g3 = control ir "x" 0.1 * sinOsc ar 440 0 + 0.05 -- g4 = 0.05 + sinOsc ar 440 0 * 0.1 --mul_add_optimise :: Ugen -> Ugen -- | Sum3 re-writer, applicable only directly at add operator Ugen. This -- only considers nodes that have no bracketing messages. sum3_optimise_direct :: Ugen -> Ugen -- | Sum3 optimiser, applicable at any u (ie. checks if -- u is an ADD operator). sum3_optimise :: Ugen -> Ugen -- | sum3_optimise of mul_add_optimise. add_optimise :: Ugen -> Ugen -- | OpBitAnd bitAnd :: Ugen -> Ugen -> Ugen -- | OpBitOr bitOr :: Ugen -> Ugen -> Ugen -- | OpBitXor bitXOr :: Ugen -> Ugen -> Ugen -- | OpBitNot bitNot :: Ugen -> Ugen -- | OpShiftLeft shiftLeft :: Ugen -> Ugen -> Ugen -- | OpShiftRight shiftRight :: Ugen -> Ugen -> Ugen -- | OpUnsignedShift unsignedShift :: Ugen -> Ugen -> Ugen instance GHC.Show.Show Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Read.Read Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Classes.Eq Sound.Sc3.Ugen.Ugen.Ugen instance Sound.Sc3.Common.Math.Operator.EqE Sound.Sc3.Ugen.Ugen.Ugen instance Sound.Sc3.Common.Math.Operator.OrdE Sound.Sc3.Ugen.Ugen.Ugen instance Sound.Sc3.Common.Math.Operator.RealFracE Sound.Sc3.Ugen.Ugen.Ugen instance Sound.Sc3.Common.Math.Operator.UnaryOp Sound.Sc3.Ugen.Ugen.Ugen instance Sound.Sc3.Common.Math.Operator.BinaryOp Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Num.Num Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Real.Fractional Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Float.Floating Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Real.Real Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Real.Integral Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Real.RealFrac Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Classes.Ord Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Enum.Enum Sound.Sc3.Ugen.Ugen.Ugen instance System.Random.Random Sound.Sc3.Ugen.Ugen.Ugen instance GHC.Bits.Bits Sound.Sc3.Ugen.Ugen.Ugen -- | Composite module of all Ugen related types. module Sound.Sc3.Ugen.Types -- | Ugen pretty-printer. module Sound.Sc3.Ugen.Pp -- | Print constants and labels directly, primitives as un-adorned names, -- mce as [p,q], mrg as p&q, contols as nm=def, proxies as u@n. -- Brackets are not printed. ugen_concise_pp :: Ugen -> String -- | Plain notation for SuperCollider Ugen graphs. -- --
-- s = ugen "SinOsc" ar [440,0] 1 -- m = binop Ci "*" ar s 0.1 -- o = ugen "Out" ar [0,m] 0 -- map Sound.Sc3.Ugen.Pp.ugen_concise_pp [s, m, o] ---- -- module Sound.Sc3.Ugen.Plain -- | Variant of mkUgen. mk_plain :: Rate -> String -> [Ugen] -> Int -> Special -> UgenId -> Ugen -- | Construct unary operator. -- --
-- uop Ci "Neg" ar 1 --uop :: Case_Rule -> String -> Rate -> Ugen -> Ugen -- | Construct binary operator. -- --
-- >>> binop Ci "*" ar 1 2 == binop Ci "Mul" ar 1 2 -- True ---- --
-- binop Cs "*" ar (ugen "SinOsc" ar [440,0] 1) 0.1 == sinOsc ar 440 0 * 0.1 ---- -- True binop :: Case_Rule -> String -> Rate -> Ugen -> Ugen -> Ugen -- | Construct deterministic Ugen. -- --
-- let o = ugen "SinOsc" ar [440,0] 1 -- o == sinOsc ar 440 0 -- ugen "Out" ar [0, o] 0 == out 0 (sinOsc ar 440 0) --ugen :: String -> Rate -> [Ugen] -> Int -> Ugen -- | Construct non-deterministic Ugen. -- --
-- import Sound.Sc3.Common.Uid -- binop Ci "*" ar (nondet "WhiteNoise" (Uid (fromEnum 'α')) ar [] 1) 0.05 --nondet :: String -> UgenId -> Rate -> [Ugen] -> Int -> Ugen -- | For hand-writing Ugens. module Sound.Sc3.Ugen.Bindings.Hw.Construct -- | Oscillator constructor with constrained set of operating Rates. mk_osc :: [Rate] -> UgenId -> Rate -> String -> [Ugen] -> Int -> Ugen -- | Oscillator constructor with all_rates. mkOsc :: Rate -> String -> [Ugen] -> Int -> Ugen -- | Oscillator constructor, rate restricted variant. mkOscR :: [Rate] -> Rate -> String -> [Ugen] -> Int -> Ugen -- | Rate restricted oscillator constructor, setting identifier. mkOscIdR :: [Rate] -> UgenId -> Rate -> String -> [Ugen] -> Int -> Ugen -- | Oscillator constructor, setting identifier. mkOscId :: UgenId -> Rate -> String -> [Ugen] -> Int -> Ugen -- | Provided UgenId variant of mkOscMCE. mk_osc_mce :: UgenId -> Rate -> String -> [Ugen] -> Ugen -> Int -> Ugen -- | Variant oscillator constructor with MCE collapsing input. mkOscMCE :: Rate -> String -> [Ugen] -> Ugen -> Int -> Ugen -- | Variant oscillator constructor with MCE collapsing input. mkOscMCEId :: UgenId -> Rate -> String -> [Ugen] -> Ugen -> Int -> Ugen -- | Rate constrained filter Ugen constructor. mk_filter :: [Rate] -> [Int] -> UgenId -> String -> [Ugen] -> Int -> Ugen -- | Filter Ugen constructor. mkFilterIdR :: [Rate] -> UgenId -> String -> [Ugen] -> Int -> Ugen -- | Filter Ugen constructor. mkFilterR :: [Rate] -> String -> [Ugen] -> Int -> Ugen -- | Filter Ugen constructor. mkFilter :: String -> [Ugen] -> Int -> Ugen -- | Filter Ugen constructor. mkFilterId :: UgenId -> String -> [Ugen] -> Int -> Ugen -- | Provided UgenId filter with mce input. mk_filter_mce :: [Rate] -> UgenId -> String -> [Ugen] -> Ugen -> Int -> Ugen -- | Variant filter constructor with MCE collapsing input. mkFilterMCER :: [Rate] -> String -> [Ugen] -> Ugen -> Int -> Ugen -- | Variant filter constructor with MCE collapsing input. mkFilterMCE :: String -> [Ugen] -> Ugen -> Int -> Ugen -- | Variant filter constructor with MCE collapsing input. mkFilterMCEId :: UgenId -> String -> [Ugen] -> Ugen -> Int -> Ugen -- | Information unit generators are very specialized. mkInfo :: String -> Ugen -- | Data types for enumerated and non signal unit generator inputs. module Sound.Sc3.Ugen.Enum -- | Type specialised envelope curve. type EnvCurve = Envelope_Curve Ugen -- | Lift to Ugen. from_buffer :: Buffer Ugen -> Ugen -- | Zita Ugen definitions. -- -- See hsc3extfaust to build the SC3 plugin. module Sound.Sc3.Ugen.Bindings.Hw.External.Zita -- | Parameter (name,value) pairs. zitaRev_param :: Num n => [(String, n, (n, n, String))] -- | ZitaRev binding. zitaRev :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Wavelet unit generators (Nick Collins). module Sound.Sc3.Ugen.Bindings.Hw.External.Wavelets -- | Forward wavelet transform. dwt :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Inverse of dwt. idwt :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Pass wavelets above a threshold, ie. pv_MagAbove. wt_MagAbove :: Ugen -> Ugen -> Ugen -- | Pass wavelets with scale above threshold. wt_FilterScale :: Ugen -> Ugen -> Ugen -- | Pass wavelets with time above threshold. wt_TimeWipe :: Ugen -> Ugen -> Ugen -- | Product in W domain, ie. pv_Mul. wt_Mul :: Ugen -> Ugen -> Ugen -- | F0 Ugens (f0plugins) module Sound.Sc3.Ugen.Bindings.Hw.External.F0 -- | Emulation of the sound generation hardware of the Atari TIA chip. atari2600 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | POKEY Chip Sound Simulator mzPokey :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | A phasor that can loop. redPhasor :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | A phasor that can loop. redPhasor2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Utility function over Ugen data structure. module Sound.Sc3.Ugen.Util -- | Uid of resolveID. toUid :: ID a => a -> UgenId -- | Depth first traversal of graph at u, stopping at -- halt_f, else applying map_f to each node. ugenTraverse :: (Ugen -> Bool) -> (Ugen -> Ugen) -> Ugen -> Ugen -- | Right fold of Ugen graph. -- --
-- import qualified Sound.Sc3.Ugen.Pp as Pp -- let pp = Pp.ugen_concise_pp -- map pp (ugenFoldr (:) [] (sinOsc ar 440 0 * 0.1)) ---- --
-- map pp (ugenFoldr (:) [] (pan2 (sinOsc ar 440 0) 0.25 0.1)) ---- --
-- map (\ix -> pp (mceChannelWrap ix (mce [1,2,3,4,5]))) [0 .. 9] ---- --
-- >>> mceRotate 1 (mce [1,2,3,4]) == mce [4,1,2,3] -- True --mceRotate :: Int -> Ugen -> Ugen -- | concat at mce channels of each input, ie. {{a,b},{c,d}} to -- {a,b,c,d}. -- --
-- >>> mceConcat (map mce [[1,2],[3,4]]) == mce [1..4] -- True --mceConcat :: [Ugen] -> Ugen -- | Collect subarrays of mce. -- --
-- >>> mceClump 2 (mce [1,2,3,4]) == mce2 (mce2 1 2) (mce2 3 4) -- True --mceClump :: Int -> Ugen -> Ugen -- | Foldl1 at channels of mce. mceReduce :: (Ugen -> Ugen -> Ugen) -> Ugen -> Ugen -- | mceReduce of *. mceProduct :: Ugen -> Ugen -- | Given unmce function make halt mce transform. halt_mce_transform_f :: (a -> [a]) -> [a] -> [a] -- | The halt Mce transform, ie. lift channels of last input into list. -- This is not used by hsc3, but it is used by hsc3-forth and stsc3. -- --
-- >>> halt_mce_transform [1,2,mce2 3 4] == [1,2,3,4] -- True --halt_mce_transform :: [Ugen] -> [Ugen] -- | If the root node of a Ugen graph is mce, transform to -- mrg. prepare_root :: Ugen -> Ugen -- | Multiple root graph node constructor (left input is output) mrg2 :: Ugen -> Ugen -> Ugen -- | Lift a String to a Ugen label (ie. for poll). label :: String -> Ugen -- | Unpack a label to a length prefixed list of Constants. There -- is a special case for mce nodes, but it requires labels to be equal -- length. Properly, poll would not unpack the label, it would -- be done by the synthdef builder. -- --
-- unpackLabel False (label "/tmp") --unpackLabel :: Bool -> Ugen -> [Ugen] -- | mce of envelope_sc3_array. envelope_to_ugen :: Envelope Ugen -> Ugen -- | mce of envelope_sc3_ienvgen_array. envelope_to_ienvgen_ugen :: Envelope Ugen -> Ugen -- | Traverse graph rewriting audio rate nodes as control rate. rewriteUgenRates :: (Rate -> Bool) -> Rate -> Ugen -> Ugen -- | Traverse graph rewriting audio rate nodes as control rate. rewriteToControlRate :: Ugen -> Ugen -- | Traverse graph rewriting all nodes as demand rate. rewriteToDemandRate :: Ugen -> Ugen -- | Traverse graph rewriting audio and control nodes as initialisation -- rate. rewriteToInitialisationRate :: Ugen -> Ugen -- | Select rewriting function given Rate. rewriteToRate :: Rate -> Ugen -> Ugen -- | Non-primitve math Ugens. module Sound.Sc3.Ugen.Math.Composite -- | Select q or r by p, ie. if p == 1 then q else -- if p == 0 then r. ugen_if :: Num a => a -> a -> a -> a -- | Separate input into integral and fractional parts. -- --
-- >>> ugen_integral_and_fractional_parts 1.5 == mce2 1 0.5 -- True --ugen_integral_and_fractional_parts :: Ugen -> Ugen -- | Fractional midi into integral midi and cents detune. -- --
-- >>> ugen_fmidi_to_midi_detune 60.5 == mce2 60 50 -- True --ugen_fmidi_to_midi_detune :: Ugen -> Ugen -- | Hand-written bindings. module Sound.Sc3.Ugen.Bindings.Hw -- | Zero local buffer. -- -- ClearBuf does not copy the buffer number through so this is an Mrg -- node. clearBuf :: Ugen -> Ugen -- | Demand rate weighted random sequence generator. dwrandId :: ID i => i -> Ugen -> Ugen -> Ugen -> Ugen dwrandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen dwrand :: Ugen -> Ugen -> Ugen -> Ugen -- | Variant on envGen without enumeration types. envGen_ll :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Outputs signal for FFT chains, without performing FFT. fftTrigger :: Ugen -> Ugen -> Ugen -> Ugen -- | Pack demand-rate FFT bin streams into an FFT chain. packFFT :: Ugen -> Int -> Int -> Int -> Ugen -> Ugen -> Ugen -- | Poll value of input Ugen when triggered. poll :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | FFT onset detector. pv_HainsworthFoote :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | FFT feature detector for onset detection. -- -- buffer, propsc=0.25, prophfe=0.25, prophfc=0.25, propsf=0.25, -- threshold=1.0, waittime=0.04 pv_JensenAndersen :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Ascii string to length prefixed list of constant Ugens. -- --
-- string_to_ugens "/label" == map fromIntegral [6,47,108,97,98,101,108] --string_to_ugens :: String -> [Ugen] -- | Send a reply message from the server back to all registered clients. sendReply :: Ugen -> Ugen -> String -> [Ugen] -> Ugen -- | Unpack a single value (magnitude or phase) from an FFT chain unpack1FFT :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | SC3 Ugen bindings (auto-generated). module Sound.Sc3.Ugen.Bindings.Db.External -- | (Undocumented class) -- -- A2B [AudioRate] a=0 b=0 c=0 d=0 a2b :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Emulator of the AY (aka YM) soundchip, used in Spectrum/Atari -- -- AY [AudioRate] tonea=1777 toneb=1666 tonec=1555 noise=1 control=7 -- vola=15 volb=15 volc=15 envfreq=4 envstyle=1 chiptype=0 ay :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | AY-3-891X Chip Sound Simulator -- -- AY8910 [AudioRate] r0=0 r1=0 r2=0 r3=0 r4=0 r5=0 r6=0 r7=0 r8=0 r9=0 -- rA=0 rB=0 rC=0 rD=0 rate=1 ay8910 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Allpass1 [AudioRate] in=0 freq=1200 allpass1 :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Allpass2 [AudioRate] in=0 freq=1200 rq=1 allpass2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | amplitude follower (deprecated) -- -- AmplitudeMod [ControlRate,AudioRate] in=0 attackTime=0.01 -- releaseTime=0.01 amplitudeMod :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogBassDrum [AudioRate] trig=0 infsustain=0 accent=0.5 freq=50 -- tone=0.5 decay=0.5 attackfm=0.5 selffm=0.25 analogBassDrum :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogFoldOsc [AudioRate] freq=100 amp=1 analogFoldOsc :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogPhaser [AudioRate] input=0 lfoinput=0 skew=0 feedback=0.25 -- modulation=0.5 stages=8; FILTER: TRUE analogPhaser :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogPhaserMod [ControlRate,AudioRate] input=0 skew=0 modulation=0.5 -- stages=8; FILTER: TRUE analogPhaserMod :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogPulseShaper [AudioRate] pulseinput=0 width=0.5 decay=0.5 -- double=0.5 analogPulseShaper :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogSnareDrum [AudioRate] trig=0 infsustain=0 accent=0.1 freq=200 -- tone=0.5 decay=0.5 snappy=0.5 analogSnareDrum :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogTape [AudioRate] input=0 bias=0.5 saturation=0.5 drive=0.5 -- oversample=1 mode=0; FILTER: TRUE analogTape :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AnalogVintageDistortion [AudioRate] input=0 drivegain=0.5 bias=0 -- lowgain=0.1 highgain=0.1 shelvingfreq=600 oversample=0; FILTER: TRUE analogVintageDistortion :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | event analyser (BBCut) -- -- AnalyseEvents2 [AudioRate] in=0 bufnum=0 threshold=0.34 triggerid=101 -- circular=0 pitch=0 analyseEvents2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 2-species Predator-Prey model -- -- ArneodoCoulletTresser [AudioRate] freq=22050 alpha=1.5 h=0.05 xi=0.5 -- yi=0.5 zi=0.5 arneodoCoulletTresser :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | detect the largest value (and its position) in an array of Ugens -- -- ArrayMax [ControlRate,AudioRate] *array=0; MCE=1, FILTER: TRUE arrayMax :: Ugen -> Ugen -- | detect the smallest value (and its position) in an array of Ugens -- -- ArrayMin [ControlRate,AudioRate] *array=0; MCE=1, FILTER: TRUE arrayMin :: Ugen -> Ugen -- | Sound Chip Simulator -- -- Astrocade [AudioRate] reg0=0 reg1=127 reg2=0 reg3=0 reg4=0 reg5=0 -- reg6=15 reg7=0 astrocade :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | TIA Chip Sound Simulator -- -- Atari2600 [AudioRate] audc0=1 audc1=2 audf0=3 audf1=4 audv0=5 audv1=5 -- rate=1 atari2600 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Use Amp data from a given partial -- -- AtsAmp [ControlRate,AudioRate] atsbuffer=0 partialNum=0 filePointer=0 atsAmp :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (put short description here) -- -- AtsBand [AudioRate] atsbuffer=0 band=0 filePointer=0 atsBand :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Use Freq data from a given partial -- -- AtsFreq [ControlRate,AudioRate] atsbuffer=0 partialNum=0 filePointer=0 atsFreq :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Resynthesize sine and noise data from an ATS analysis file -- -- AtsNoiSynth [AudioRate] atsbuffer=0 numPartials=0 partialStart=0 -- partialSkip=1 filePointer=0 sinePct=1 noisePct=1 freqMul=1 freqAdd=0 -- numBands=25 bandStart=0 bandSkip=1 atsNoiSynth :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AtsNoise [ControlRate,AudioRate] atsbuffer=0 bandNum=0 filePointer=0 atsNoise :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | One Ugen to return both Amp and Freq info -- -- AtsParInfo [ControlRate,AudioRate] atsbuffer=0 partialNum=0 -- filePointer=0 atsParInfo :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AtsPartial [AudioRate] atsbuffer=0 partial=0 filePointer=0 freqMul=1 -- freqAdd=0 atsPartial :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Resynthesize sine data from an ATS analysis file -- -- AtsSynth [AudioRate] atsbuffer=0 numPartials=0 partialStart=0 -- partialSkip=1 filePointer=0 freqMul=1 freqAdd=0 atsSynth :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Detect onsets and assess the nature of the attack slope -- -- AttackSlope [ControlRate] input=0 windowsize=1024 peakpicksize=20 -- leak=0.999 energythreshold=0.01 sumthreshold=20 mingap=30 -- numslopesaveraged=10 attackSlope :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- AudioMSG [AudioRate] in=0 index=0; FILTER: TRUE audioMSG :: Ugen -> Ugen -> Ugen -- | calculates mean average of audio or control rate signal -- -- AverageOutput [ControlRate,AudioRate] in=0 trig=0; FILTER: TRUE averageOutput :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- B2A [AudioRate] w=0 x=0 y=0 z=0 b2a :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- B2Ster [AudioRate] w=0 x=0 y=0 b2Ster :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- B2UHJ [AudioRate] w=0 x=0 y=0 b2uhj :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | MultiOut BetaBlocker VChip -- -- BBlockerBuf [AudioRate] freq=0 bufnum=0 startpoint=0 bBlockerBuf :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | 3D Ambisonic decoder -- -- BFDecode1 [AudioRate] w=0 x=0 y=0 z=0 azimuth=0 elevation=0 wComp=0 bfDecode1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BFDecoder [] maxSize=0 bfDecoder :: Rate -> Ugen -> Ugen -- | Ambisonic B format encoder -- -- BFEncode1 [AudioRate] in=0 azimuth=0 elevation=0 rho=1 gain=1 wComp=0 bfEncode1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Ambisonic B format encoder -- -- BFEncode2 [AudioRate] in=0 point_x=1 point_y=1 elevation=0 gain=1 -- wComp=0 bfEncode2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Ambisonic B format encoder for stereo signals -- -- BFEncodeSter [AudioRate] l=0 r=0 azimuth=0 width=1.5708 elevation=0 -- rho=1 gain=1 wComp=0 bfEncodeSter :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BFGrainPanner [] maxSize=0 bfGrainPanner :: Rate -> Ugen -> Ugen -- | BFormat sound manipulation -- -- BFManipulate [AudioRate] w=0 x=0 y=0 z=0 rotate=0 tilt=0 tumble=0 bfManipulate :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BFPanner [] maxSize=0 bfPanner :: Rate -> Ugen -> Ugen -- | (Undocumented class) -- -- BLBufRd [ControlRate,AudioRate] bufnum=0 phase=0 ratio=1 blBufRd :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BLOsc [ControlRate,AudioRate] freq=100 pulsewidth=0.5 waveform=0 blOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | 24dboct rolloff - 4nd order resonant LowHigh/Band Pass Filter -- -- BMoog [AudioRate] in=0 freq=440 q=0.2 mode=0 saturation=0.95; FILTER: -- TRUE bMoog :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Balances two signals with each other -- -- Balance [AudioRate] in=0 test=0 hp=10 stor=0 balance :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Extracts statistics on a beat histogram -- -- BeatStatistics [ControlRate] fft=0 leak=0.995 numpreviousbeats=4 beatStatistics :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Sound Chip Simulator (well...) -- -- Beep [AudioRate] freq=3250 vol=1 beep :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BeepU [] maxSize=0 beepU :: Rate -> Ugen -> Ugen -- | (Undocumented class) -- -- BinData [ControlRate,AudioRate] buffer=0 bin=0 overlaps=0.5 binData :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Band limited impulse generation -- -- BlitB3 [AudioRate] freq=440 blitB3 :: Rate -> Ugen -> Ugen -- | (Undocumented class) -- -- BlitB3D [AudioRate] freq=440 blitB3D :: Rate -> Ugen -> Ugen -- | BLIT derived sawtooth -- -- BlitB3Saw [AudioRate] freq=440 leak=0.99 blitB3Saw :: Rate -> Ugen -> Ugen -> Ugen -- | Bipolar BLIT derived square waveform -- -- BlitB3Square [AudioRate] freq=440 leak=0.99 blitB3Square :: Rate -> Ugen -> Ugen -> Ugen -- | Bipolar BLIT derived triangle -- -- BlitB3Tri [AudioRate] freq=440 leak=0.99 leak2=0.99 blitB3Tri :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | breakcore simulator -- -- Breakcore [AudioRate] bufnum=0 capturein=0 capturetrigger=0 -- duration=0.1 ampdropout=0 breakcore :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Prigogine oscillator -- -- Brusselator [AudioRate] reset=0 rate=0.01 mu=1 gamma=1 initx=0.5 -- inity=0.5 brusselator :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sound sampled in a buffer -- -- BufGrain [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 interp=2 bufGrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sound sampled in a buffer and user supplied -- envelope -- -- BufGrainB [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 envbuf=0 -- interp=2 bufGrainB :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BufGrainBBF [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 envbuf=0 -- azimuth=0 elevation=0 rho=1 interp=2 wComp=0 bufGrainBBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BufGrainBF [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 azimuth=0 -- elevation=0 rho=1 interp=2 wComp=0 bufGrainBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sound sampled in a buffer and user supplied -- envelopes -- -- BufGrainI [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 envbuf1=0 -- envbuf2=0 ifac=0.5 interp=2 bufGrainI :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BufGrainIBF [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 -- envbuf1=0 envbuf2=0 ifac=0.5 azimuth=0 elevation=0 rho=1 interp=2 -- wComp=0 bufGrainIBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | detect the largest value (and its position) in an array of Ugens -- -- BufMax [ControlRate] bufnum=0 gate=1 bufMax :: Rate -> Ugen -> Ugen -> Ugen -- | detect the largest value (and its position) in an array of Ugens -- -- BufMin [ControlRate] bufnum=0 gate=1 bufMin :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- CQ_Diff [ControlRate] in1=0 in2=0 databufnum=0 cq_Diff :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Quefrency analysis and liftering -- -- Cepstrum [] cepbuf=0 fftchain=0 cepstrum :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Chen [ControlRate,AudioRate] speed=0.5 a=0.5 b=0.3 c=0.28 chen :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Octave chroma band based representation of energy in a signal; -- Chromagram for nTET tuning systems with any base reference -- -- Chromagram [ControlRate] fft=0 fftsize=2048 n=12 tuningbase=32.7032 -- octaves=8 integrationflag=0 coeff=0.9 octaveratio=2 -- perframenormalize=0 chromagram :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | circular linear lag -- -- CircleRamp [ControlRate,AudioRate] in=0 lagTime=0.1 circmin=-180 -- circmax=180 circleRamp :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Clipper32 [AudioRate] in=0 lo=-0.8 hi=0.8 clipper32 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Clipper4 [AudioRate] in=0 lo=-0.8 hi=0.8 clipper4 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Clipper8 [AudioRate] in=0 lo=-0.8 hi=0.8 clipper8 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Clockmus [ControlRate] clockmus :: Rate -> Ugen -- | (Undocumented class) -- -- CombLP [AudioRate] in=0 gate=1 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1 coef=0.5 combLP :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | FM-modulable resonating filter -- -- ComplexRes [AudioRate] in=0 freq=100 decay=0.2; FILTER: TRUE complexRes :: Ugen -> Ugen -> Ugen -> Ugen -- | Concatenative Cross-Synthesis on Live Streams -- -- Concat [AudioRate] control=0 source=0 storesize=1 seektime=1 seekdur=1 -- matchlength=0.05 freezestore=0 zcr=1 lms=1 sc=1 st=0 randscore=0 concat :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Concatenative Cross-Synthesis on Live Streams -- -- Concat2 [AudioRate] control=0 source=0 storesize=1 seektime=1 -- seekdur=1 matchlength=0.05 freezestore=0 zcr=1 lms=1 sc=1 st=0 -- randscore=0 threshold=0.01 concat2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | an amplitude tracking based onset detector -- -- Coyote [ControlRate] in=0 trackFall=0.2 slowLag=0.2 fastLag=0.01 -- fastMul=0.5 thresh=0.05 minDur=0.1 coyote :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Measure the temporal crest factor of a signal -- -- Crest [ControlRate] in=0 numsamps=400 gate=1 crest :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | class B/AB power amp distortion simulation -- -- CrossoverDistortion [AudioRate] in=0 amp=0.5 smooth=0.5; FILTER: TRUE crossoverDistortion :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- DCompressor [AudioRate] input=0 sidechainIn=0 sidechain=0 ratio=4 -- threshold=-40 attack=0.1 release=100.1 makeup=0.5 automakeup=1; -- FILTER: TRUE dCompressor :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Digitally modelled analog filter -- -- DFM1 [AudioRate] in=0 freq=1000 res=0.1 inputgain=1 type=0 -- noiselevel=0.0003; FILTER: TRUE dfm1 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Demand rate implementation of a Wiard noise ring -- -- DNoiseRing [DemandRate] change=0.5 chance=0.5 shift=1 numBits=8 -- resetval=0; DEMAND/NONDET dNoiseRingId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of DNoiseRing. dNoiseRingM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of DNoiseRing. dNoiseRing :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Triangle via 3rd order differerentiated polynomial waveform -- -- DPW3Tri [AudioRate] freq=440 dpw3Tri :: Rate -> Ugen -> Ugen -- | Sawtooth via 4th order differerentiated polynomial waveform -- -- DPW4Saw [AudioRate] freq=440 dpw4Saw :: Rate -> Ugen -> Ugen -- | Plucked physical model. -- -- DWGBowed [AudioRate] freq=440 velb=0.5 force=1 gate=1 pos=0.14 -- release=0.1 c1=1 c3=3 impZ=0.55 fB=2 dwgBowed :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plucked physical model. -- -- DWGBowedSimple [AudioRate] freq=440 velb=0.5 force=1 gate=1 pos=0.14 -- release=0.1 c1=1 c3=30 dwgBowedSimple :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plucked physical model. -- -- DWGBowedTor [AudioRate] freq=440 velb=0.5 force=1 gate=1 pos=0.14 -- release=0.1 c1=1 c3=3 impZ=0.55 fB=2 mistune=5.2 c1tor=1 c3tor=3000 -- iZtor=1.8 dwgBowedTor :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Clarinet physical model. -- -- DWGClarinet3 [AudioRate] freq=440.0 pm=1.0 pc=1.0 m=0.8 gate=1.0 -- release=1.0e-2 c1=0.25 c3=7.0 dwgClarinet3 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Reimplementation of STK flute model. -- -- DWGFlute [AudioRate] freq=400.0 pm=1.0 endr=0.5 jetr=0.25 jetRa=0.33 -- gate=1.0 release=0.1 dwgFlute :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plucked physical model. -- -- DWGPlucked [AudioRate] freq=440 amp=0.5 gate=1 pos=0.14 c1=1 c3=30 -- inp=0 release=0.1 dwgPlucked :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plucked physical model. -- -- DWGPlucked2 [AudioRate] freq=440 amp=0.5 gate=1 pos=0.14 c1=1 c3=30 -- inp=0 release=0.1 mistune=1.008 mp=0.55 gc=0.01 dwgPlucked2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plucked physical model. -- -- DWGPluckedStiff [AudioRate] freq=440 amp=0.5 gate=1 pos=0.14 c1=1 -- c3=30 inp=0 release=0.1 fB=2 dwgPluckedStiff :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- DWGSoundBoard [AudioRate] inp=0 c1=20 c3=20 mix=0.8 d1=199 d2=211 -- d3=223 d4=227 d5=229 d6=233 d7=239 d8=241; FILTER: TRUE dwgSoundBoard :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | demand rate brownian movement with Gendyn distributions -- -- Dbrown2 [] lo=0 hi=0 step=0 dist=0 length=100000000 dbrown2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | demand rate tag system on a buffer -- -- DbufTag [DemandRate] bufnum=0 v=0 axiom=0 rules=0 recycle=0 mode=0; -- DEMAND/NONDET dbufTagId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of DbufTag. dbufTagM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of DbufTag. dbufTag :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Samplerate and bitrate reduction -- -- Decimator [AudioRate] in=0 rate=44100 bits=24 decimator :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Demand version of the BetaBlocker VChip -- -- DetaBlockerBuf [DemandRate] bufnum=0 startpoint=0; DEMAND/NONDET detaBlockerBufId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of DetaBlockerBuf. detaBlockerBufM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of DetaBlockerBuf. detaBlockerBuf :: Ugen -> Ugen -> Ugen -- | demand rate finite state machine -- -- Dfsm [DemandRate] rules=0 n=1 rgen=0; DEMAND/NONDET dfsmId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dfsm. dfsmM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dfsm. dfsm :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Dgauss [] lo=0 hi=0 length=100000000 dgauss :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Ring modulation based on the physical model of a diode. -- -- DiodeRingMod [AudioRate] car=0 mod=0; FILTER: TRUE diodeRingMod :: Ugen -> Ugen -> Ugen -- | port of some ladspa plugins -- -- Disintegrator [AudioRate] in=0 probability=0.5 multiplier=0; FILTER: -- TRUE, NONDET disintegratorId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Disintegrator. disintegratorM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Disintegrator. disintegrator :: Ugen -> Ugen -> Ugen -> Ugen -- | discrete time neurodynamics -- -- Dneuromodule [ControlRate,AudioRate,DemandRate] dt=0 *theta=0 *x=0 -- *weights=0; MCE=3, NC INPUT: True, NONDET dneuromoduleId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dneuromodule. dneuromoduleM :: Uid m => Int -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dneuromodule. dneuromodule :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Nested Allpass filters as proposed by Vercoe and Pluckett -- -- DoubleNestedAllpassC [AudioRate] in=0 maxdelay1=0.0047 delay1=0.0047 -- gain1=0.15 maxdelay2=0.022 delay2=0.022 gain2=0.25 maxdelay3=0.0083 -- delay3=0.0083 gain3=0.3; FILTER: TRUE doubleNestedAllpassC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Nested Allpass filters as proposed by Vercoe and Pluckett -- -- DoubleNestedAllpassL [AudioRate] in=0 maxdelay1=0.0047 delay1=0.0047 -- gain1=0.15 maxdelay2=0.022 delay2=0.022 gain2=0.25 maxdelay3=0.0083 -- delay3=0.0083 gain3=0.3; FILTER: TRUE doubleNestedAllpassL :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Nested Allpass filters as proposed by Vercoe and Pluckett -- -- DoubleNestedAllpassN [AudioRate] in=0 maxdelay1=0.0047 delay1=0.0047 -- gain1=0.15 maxdelay2=0.022 delay2=0.022 gain2=0.25 maxdelay3=0.0083 -- delay3=0.0083 gain3=0.3; FILTER: TRUE doubleNestedAllpassN :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Forced DoubleWell Oscillator -- -- DoubleWell [AudioRate] reset=0 ratex=0.01 ratey=0.01 f=1 w=0.001 -- delta=1 initx=0 inity=0 doubleWell :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Forced DoubleWell Oscillator -- -- DoubleWell2 [AudioRate] reset=0 ratex=0.01 ratey=0.01 f=1 w=0.001 -- delta=1 initx=0 inity=0 doubleWell2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Forced DoubleWell Oscillator -- -- DoubleWell3 [AudioRate] reset=0 rate=0.01 f=0 delta=0.25 initx=0 -- inity=0 doubleWell3 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- DriveNoise [AudioRate] in=0 amount=1 multi=5 driveNoise :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Crosscorrelation search and drum pattern matching beat tracker -- -- DrumTrack [ControlRate] in=0 lock=0 dynleak=0 tempowt=0 phasewt=0 -- basswt=0 patternwt=1 prior=0 kicksensitivity=1 snaresensitivity=1 -- debugmode=0 drumTrack :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | demand rate tag system -- -- Dtag [] bufsize=0 v=0 axiom=0 rules=0 recycle=0 mode=0 dtag :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Envelope Follower Filter -- -- EnvDetect [AudioRate] in=0 attack=100 release=0 envDetect :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Envelope Follower -- -- EnvFollow [ControlRate,AudioRate] input=0 decaycoeff=0.99 envFollow :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTComplexDev [ControlRate] buffer=0 rectify=0 powthresh=0.1 fftComplexDev :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Spectral crest measure -- -- FFTCrest [ControlRate] buffer=0 freqlo=0 freqhi=50000 fftCrest :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTDiffMags [ControlRate] bufferA=0 bufferB=0 fftDiffMags :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTFlux [ControlRate] buffer=0 normalise=1 fftFlux :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTFluxPos [ControlRate] buffer=0 normalise=1 fftFluxPos :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTMKL [ControlRate] buffer=0 epsilon=0.0 fftmkl :: Rate -> Ugen -> Ugen -> Ugen -- | Find peak value in an FFT frame -- -- FFTPeak [ControlRate] buffer=0 freqlo=0 freqhi=50000 fftPeak :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTPhaseDev [ControlRate] buffer=0 weight=0 powthresh=0.1 fftPhaseDev :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Instantaneous spectral power -- -- FFTPower [ControlRate] buffer=0 square=1 fftPower :: Rate -> Ugen -> Ugen -> Ugen -- | Spectral slope -- -- FFTSlope [ControlRate] buffer=0 fftSlope :: Rate -> Ugen -> Ugen -- | Spectral spread -- -- FFTSpread [ControlRate] buffer=0 centroid=0 fftSpread :: Rate -> Ugen -> Ugen -> Ugen -- | Spectral flatness, divided into subbands -- -- FFTSubbandFlatness [ControlRate] chain=0 cutfreqs=0 fftSubbandFlatness :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FFTSubbandFlux [ControlRate] chain=0 cutfreqs=0 posonly=0 fftSubbandFlux :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Spectral power, divided into subbands -- -- FFTSubbandPower [ControlRate] chain=0 cutfreqs=0 square=1 scalemode=1 fftSubbandPower :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Phase modulation oscillator matrix. -- -- FM7 [AudioRate] *ctlMatrix=0 *modMatrix=0; MCE=2 fm7 :: Rate -> Ugen -> Ugen -> Ugen -- | Granular synthesis with FM grains -- -- FMGrain [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1; -- FILTER: TRUE fmGrain :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with FM grains and user supplied envelope -- -- FMGrainB [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1 -- envbuf=0; FILTER: TRUE fmGrainB :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FMGrainBBF [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1 -- envbuf=0 azimuth=0 elevation=0 rho=1 wComp=0 fmGrainBBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FMGrainBF [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1 -- azimuth=0 elevation=0 rho=1 wComp=0 fmGrainBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with FM grains and user supplied envelopes -- -- FMGrainI [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1 -- envbuf1=0 envbuf2=0 ifac=0.5 fmGrainI :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FMGrainIBF [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1 -- envbuf1=0 envbuf2=0 ifac=0.5 azimuth=0 elevation=0 rho=1 wComp=0 fmGrainIBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Decode an FMH signal for a specific speaker -- -- FMHDecode1 [AudioRate] w=0 x=0 y=0 z=0 r=0 s=0 t=0 u=0 v=0 azimuth=0 -- elevation=0 fmhDecode1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FMHEncode0 [AudioRate] in=0 azimuth=0 elevation=0 gain=1 fmhEncode0 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Second Order Ambisonic encoder -- -- FMHEncode1 [AudioRate] in=0 azimuth=0 elevation=0 rho=1 gain=1 wComp=0 fmhEncode1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Second Order Ambisonic encoder -- -- FMHEncode2 [AudioRate] in=0 point_x=0 point_y=0 elevation=0 gain=1 -- wComp=0 fmhEncode2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Storing feature data from Ugens in NRT mode -- -- FeatureSave [ControlRate] features=0 trig=0 featureSave :: Rate -> Ugen -> Ugen -> Ugen -- | FitzHughNagumo Neuron Firing Oscillator -- -- Fhn2DC [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 urate=0.1 -- wrate=0.1 b0=0.6 b1=0.8 i=0 u0=0 w0=0 fhn2DC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | FitzHughNagumo Neuron Firing Oscillator -- -- Fhn2DL [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 urate=0.1 -- wrate=0.1 b0=0.6 b1=0.8 i=0 u0=0 w0=0 fhn2DL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | FitzHughNagumo Neuron Firing Oscillator -- -- Fhn2DN [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 urate=0.1 -- wrate=0.1 b0=0.6 b1=0.8 i=0 u0=0 w0=0 fhn2DN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FhnTrig [ControlRate,AudioRate] minfreq=4 maxfreq=10 urate=0.1 -- wrate=0.1 b0=0.6 b1=0.8 i=0 u0=0 w0=0 fhnTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FincoSprottL [AudioRate] freq=22050 a=2.45 h=0.05 xi=0 yi=0 zi=0 fincoSprottL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FincoSprottM [AudioRate] freq=22050 a=-7 b=4 h=0.05 xi=0 yi=0 zi=0 fincoSprottM :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- FincoSprottS [AudioRate] freq=22050 a=8 b=2 h=0.05 xi=0 yi=0 zi=0 fincoSprottS :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Neuron Firing Model Oscillator -- -- FitzHughNagumo [AudioRate] reset=0 rateu=0.01 ratew=0.01 b0=1 b1=1 -- initu=0 initw=0 fitzHughNagumo :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | calculates spectral MSE distance of two fft chains -- -- FrameCompare [ControlRate] buffer1=0 buffer2=0 wAmount=0.5 frameCompare :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | A physical model of a system with dry-friction. A chaotic filter. -- -- Friction [ControlRate,AudioRate] in=0 friction=0.5 spring=0.414 -- damp=0.313 mass=0.1 beltmass=1 friction :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Single gammatone filter -- -- Gammatone [AudioRate] input=0 centrefrequency=440 bandwidth=200; -- FILTER: TRUE gammatone :: Ugen -> Ugen -> Ugen -> Ugen -- | Gaussian classifier -- -- GaussClass [ControlRate] in=0 bufnum=0 gate=0 gaussClass :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | impulses around a certain frequency -- -- GaussTrig [ControlRate,AudioRate] freq=440 dev=0.3 gaussTrig :: Rate -> Ugen -> Ugen -> Ugen -- | gingerbreadman map 2D chaotic generator -- -- Gbman2DC [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 x0=1.2 -- y0=2.1 gbman2DC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | gingerbreadman map 2D chaotic generator -- -- Gbman2DL [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 x0=1.2 -- y0=2.1 gbman2DL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | gingerbreadman map 2D chaotic generator -- -- Gbman2DN [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 x0=1.2 -- y0=2.1 gbman2DN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- GbmanTrig [ControlRate,AudioRate] minfreq=5 maxfreq=10 x0=1.2 y0=2.1 gbmanTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Dynamic stochastic synthesis generator -- -- Gendy4 [ControlRate,AudioRate] ampdist=1 durdist=1 adparam=1 ddparam=1 -- minfreq=440 maxfreq=660 ampscale=0.5 durscale=0.5 initCPs=12 knum=0 gendy4 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Dynamic stochastic synthesis generator -- -- Gendy5 [ControlRate,AudioRate] ampdist=1 durdist=1 adparam=1 ddparam=1 -- minfreq=440 maxfreq=660 ampscale=0.5 durscale=0.5 initCPs=12 knum=0 gendy5 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Read (numeric) shell environment variables into a synth -- -- Getenv [] key=0 defaultval=0 getenv :: Rate -> Ugen -> Ugen -> Ugen -- | backward compatibility -- -- GlitchBPF [ControlRate,AudioRate] in=0 freq=440 rq=1 glitchBPF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | backward compatibility -- -- GlitchBRF [ControlRate,AudioRate] in=0 freq=440 rq=1 glitchBRF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | backward compatibility -- -- GlitchHPF [ControlRate,AudioRate] in=0 freq=440 glitchHPF :: Rate -> Ugen -> Ugen -> Ugen -- | backward compatibility -- -- GlitchRHPF [ControlRate,AudioRate] in=0 freq=440 rq=1; FILTER: TRUE glitchRHPF :: Ugen -> Ugen -> Ugen -> Ugen -- | Calculate a single DFT bin, to detect presence of a frequency -- -- Goertzel [ControlRate] in=0 bufsize=1024 freq=0 hop=1 goertzel :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- GrainBufJ [AudioRate] numChannels=1 trigger=0 dur=1 sndbuf=0 rate=1 -- pos=0 loop=0 interp=2 grainAmp=1 pan=0 envbufnum=-1 maxGrains=512 grainBufJ :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- GrainFMJ [AudioRate] numChannels=1 trigger=0 dur=1 carfreq=440 -- modfreq=200 index=1 grainAmp=1 pan=0 envbufnum=-1 maxGrains=512 grainFMJ :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- GrainInJ [AudioRate] numChannels=1 trigger=0 dur=1 in=0 grainAmp=1 -- pan=0 envbufnum=-1 maxGrains=512 grainInJ :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- GrainSinJ [AudioRate] numChannels=1 trigger=0 dur=1 freq=440 -- grainAmp=1 pan=0 envbufnum=-1 maxGrains=512 grainSinJ :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | dynamical system simulation (Newtonian gravitational force) -- -- GravityGrid [AudioRate] reset=0 rate=0.1 newx=0 newy=0 bufnum=0 gravityGrid :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | dynamical system simulation (Newtonian gravitational force) -- -- GravityGrid2 [AudioRate] reset=0 rate=0.1 newx=0 newy=0 bufnum=0 gravityGrid2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | algorithmic delay -- -- GreyholeRaw [AudioRate] in1=0 in2=0 damping=0 delaytime=2 -- diffusion=0.5 feedback=0.9 moddepth=0.1 modfreq=2 size=1; FILTER: TRUE greyholeRaw :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Simple cochlear hair cell model -- -- HairCell [ControlRate,AudioRate] input=0 spontaneousrate=0 -- boostrate=200 restorerate=1000 loss=0.99; FILTER: TRUE hairCell :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- HarmonicOsc [ControlRate,AudioRate] freq=100 firstharmonic=1 -- *amplitudes=0; MCE=1 harmonicOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | henon map 2D chaotic generator -- -- Henon2DC [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 a=1.4 -- b=0.3 x0=0.30502 y0=0.20939 henon2DC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | henon map 2D chaotic generator -- -- Henon2DL [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 a=1.4 -- b=0.3 x0=0.30502 y0=0.20939 henon2DL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | henon map 2D chaotic generator -- -- Henon2DN [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 a=1.4 -- b=0.3 x0=0.30502 y0=0.20939 henon2DN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- HenonTrig [ControlRate,AudioRate] minfreq=5 maxfreq=10 a=1.4 b=0.3 -- x0=0.30502 y0=0.20939 henonTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Transform a cepstrum back to a spectrum -- -- ICepstrum [] cepchain=0 fftbuf=0 iCepstrum :: Rate -> Ugen -> Ugen -> Ugen -- | 24db/oct rolloff, 4nd order resonant Low Pass Filter -- -- IirFilter [AudioRate] in=0 freq=440 rq=1; FILTER: TRUE iirFilter :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- InGrain [AudioRate] trigger=0 dur=1 in=0 inGrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- InGrainB [AudioRate] trigger=0 dur=1 in=0 envbuf=0 inGrainB :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- InGrainBBF [AudioRate] trigger=0 dur=1 in=0 envbuf=0 azimuth=0 -- elevation=0 rho=1 wComp=0 inGrainBBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- InGrainBF [AudioRate] trigger=0 dur=1 in=0 azimuth=0 elevation=0 rho=1 -- wComp=0 inGrainBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- InGrainI [AudioRate] trigger=0 dur=1 in=0 envbuf1=0 envbuf2=0 ifac=0.5 inGrainI :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- InGrainIBF [AudioRate] trigger=0 dur=1 in=0 envbuf1=0 envbuf2=0 -- ifac=0.5 azimuth=0 elevation=0 rho=1 wComp=0 inGrainIBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Distortion by subtracting magnitude from 1 -- -- InsideOut [ControlRate,AudioRate] in=0 insideOut :: Rate -> Ugen -> Ugen -- | instruction synthesis (breakpoint set interpreter) -- -- Instruction [AudioRate] bufnum=0 instruction :: Rate -> Ugen -> Ugen -- | Raw version of the JPverb algorithmic reverberator, designed to -- produce long tails with chorusing -- -- JPverbRaw [ControlRate,AudioRate] in1=0 in2=0 damp=0 earlydiff=0.707 -- highband=2000 highx=1 lowband=500 lowx=1 mdepth=0.1 mfreq=2 midx=1 -- size=1 t60=1; FILTER: TRUE jPverbRaw :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | k-means classification in real time -- -- KMeansRT [ControlRate] bufnum=0 inputdata=0 k=5 gate=1 reset=0 learn=1 kMeansRT :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Running score of maximum correlation of chromagram with key profiles -- -- KeyClarity [ControlRate] chain=0 keydecay=2 chromaleak=0.5 keyClarity :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Find best correlated key mode with chromagram between major, minor and -- chromatic cluster -- -- KeyMode [ControlRate] chain=0 keydecay=2 chromaleak=0.5 keyMode :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | K-means Oscillator -- -- KmeansToBPSet1 [AudioRate] freq=440 numdatapoints=20 maxnummeans=4 -- nummeans=4 tnewdata=1 tnewmeans=1 soft=1 bufnum=0 kmeansToBPSet1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | random walk step -- -- LFBrownNoise0 [ControlRate,AudioRate] freq=20 dev=1 dist=0; NONDET lfBrownNoise0Id :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of LFBrownNoise0. lfBrownNoise0M :: Uid m => Rate -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of LFBrownNoise0. lfBrownNoise0 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | random walk linear interp -- -- LFBrownNoise1 [ControlRate,AudioRate] freq=20 dev=1 dist=0; NONDET lfBrownNoise1Id :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of LFBrownNoise1. lfBrownNoise1M :: Uid m => Rate -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of LFBrownNoise1. lfBrownNoise1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | random walk cubic interp -- -- LFBrownNoise2 [ControlRate,AudioRate] freq=20 dev=1 dist=0; NONDET lfBrownNoise2Id :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of LFBrownNoise2. lfBrownNoise2M :: Uid m => Rate -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of LFBrownNoise2. lfBrownNoise2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Live Linear Predictive Coding Analysis and Resynthesis -- -- LPCAnalyzer [AudioRate] input=0 source=0.01 n=256 p=10 testE=0 -- delta=0.999 windowtype=0; FILTER: TRUE lpcAnalyzer :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Linear Predictive Coding Gone Wrong -- -- LPCError [AudioRate] input=0 p=10 lpcError :: Rate -> Ugen -> Ugen -> Ugen -- | Utilize LPC data -- -- LPCSynth [AudioRate] buffer=0 signal=0 pointer=0 lpcSynth :: Ugen -> Ugen -> Ugen -> Ugen -- | Utilize LPC data -- -- LPCVals [ControlRate,AudioRate] buffer=0 pointer=0 lpcVals :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- LPF1 [ControlRate,AudioRate] in=0 freq=1000 lpf1 :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- LPF18 [AudioRate] in=0 freq=100 res=1 dist=0.4 lpf18 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- LPFVS6 [ControlRate,AudioRate] in=0 freq=1000 slope=0.5 lpfvs6 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- LPG [AudioRate] input=0 controlinput=0 controloffset=0 controlscale=1 -- vca=1 resonance=1.5 lowpassmode=1 linearity=1; FILTER: TRUE lpg :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Linear Time Invariant General Filter Equation -- -- LTI [AudioRate] input=0 bufnuma=0 bufnumb=1 lti :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | latoocarfian 2D chaotic generator -- -- Latoocarfian2DC [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 -- a=1 b=3 c=0.5 d=0.5 x0=0.34082 y0=-0.3827 latoocarfian2DC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | latoocarfian 2D chaotic generator -- -- Latoocarfian2DL [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 -- a=1 b=3 c=0.5 d=0.5 x0=0.34082 y0=-0.3827 latoocarfian2DL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | latoocarfian 2D chaotic generator -- -- Latoocarfian2DN [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 -- a=1 b=3 c=0.5 d=0.5 x0=0.34082 y0=-0.3827 latoocarfian2DN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- LatoocarfianTrig [ControlRate,AudioRate] minfreq=5 maxfreq=10 a=1 b=3 -- c=0.5 d=0.5 x0=0.34082 y0=-0.3827 latoocarfianTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Emit a sequence of triggers at specified time offsets -- -- ListTrig [ControlRate] bufnum=0 reset=0 offset=0 numframes=0 listTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Emit a sequence of triggers at specified time offsets -- -- ListTrig2 [ControlRate] bufnum=0 reset=0 numframes=0 listTrig2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Store values to a buffer, whenever triggered -- -- Logger [ControlRate] inputArray=0 trig=0 bufnum=0 reset=0 logger :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | sample looping oscillator -- -- LoopBuf [AudioRate] bufnum=0 rate=1 gate=1 startPos=0 startLoop=0 -- endLoop=0 interpolation=2; NC INPUT: True loopBuf :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | lorenz 2D chaotic generator -- -- Lorenz2DC [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 s=10 -- r=28 b=2.66667 h=0.02 x0=0.09088 y0=2.97077 z0=24.28204 lorenz2DC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | lorenz 2D chaotic generator -- -- Lorenz2DL [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 s=10 -- r=28 b=2.66667 h=0.02 x0=0.09088 y0=2.97077 z0=24.28204 lorenz2DL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | lorenz 2D chaotic generator -- -- Lorenz2DN [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 s=10 -- r=28 b=2.66667 h=0.02 x0=0.09088 y0=2.97077 z0=24.28204 lorenz2DN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | lorenz chaotic trigger generator -- -- LorenzTrig [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 s=10 -- r=28 b=2.66667 h=0.02 x0=0.09088 y0=2.97077 z0=24.28204 lorenzTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | simple resonating lowpass filter -- -- Lores [AudioRate] in=0 freq=880 res=0.5; FILTER: TRUE lores :: Ugen -> Ugen -> Ugen -> Ugen -- | 2-species Predator-Prey model -- -- LotkaVolterra [AudioRate] freq=22050 a=1.5 b=1.5 c=0.5 d=1.5 h=0.05 -- xi=1 yi=0.2 lotkaVolterra :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- MCLDChaosGen [] maxSize=0 mcldChaosGen :: Rate -> Ugen -> Ugen -- | POKEY Chip Sound Simulator -- -- MZPokey [AudioRate] audf1=0 audc1=0 audf2=0 audc2=0 audf3=0 audc3=0 -- audf4=0 audc4=0 audctl=0 mzPokey :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | First order Markov Chain implementation for audio signals -- -- MarkovSynth [AudioRate] in=0 isRecording=1 waitTime=2 tableSize=10 markovSynth :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Real time sparse representation -- -- MatchingP [ControlRate,AudioRate] dict=0 in=0 dictsize=1 ntofind=1 -- hop=1 method=0 matchingP :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- MatchingPResynth [ControlRate,AudioRate] dict=0 method=0 trigger=0 -- residual=0 activs=0 matchingPResynth :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | maximum within last x samples -- -- Max [ControlRate] in=0 numsamp=64 max :: Rate -> Ugen -> Ugen -> Ugen -- | Tracks and prints amplitudes -- -- Maxamp [AudioRate] in=0 numSamps=1000 maxamp :: Rate -> Ugen -> Ugen -> Ugen -- | Piano synthesiser -- -- MdaPiano [AudioRate] freq=440 gate=1 vel=100 decay=0.8 release=0.8 -- hard=0.8 velhard=0.8 muffle=0.8 velmuff=0.8 velcurve=0.8 stereo=0.2 -- tune=0.5 random=0.1 stretch=0.1 sustain=0 mdaPiano :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Mean of recent values, triggered -- -- MeanTriggered [ControlRate,AudioRate] in=0 trig=0 length=10 meanTriggered :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Meddis cochlear hair cell model -- -- Meddis [ControlRate,AudioRate] input=0; FILTER: TRUE meddis :: Ugen -> Ugen -- | Separate harmonic and percussive parts of a signal -- -- MedianSeparation [] fft=0 fftharmonic=0 fftpercussive=0 fftsize=1024 -- mediansize=17 hardorsoft=0 p=2 medianormax=0 medianSeparation :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Median of recent values, triggered -- -- MedianTriggered [ControlRate,AudioRate] in=0 trig=0 length=10 medianTriggered :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Waveguide mesh physical models of drum membranes -- -- MembraneCircle [AudioRate] excitation=0 tension=0.05 loss=0.99999 membraneCircle :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Waveguide mesh physical models of drum membranes -- -- MembraneHexagon [AudioRate] excitation=0 tension=0.05 loss=0.99999 membraneHexagon :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Metronome -- -- Metro [ControlRate,AudioRate] bpm=0 numBeats=0 metro :: Rate -> Ugen -> Ugen -> Ugen -- | a macro oscillator -- -- MiBraids [AudioRate] pitch=60 timbre=0.5 color=0.5 model=0 trig=0 -- resamp=0 decim=0 bits=0 ws=0 miBraids :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | granular audio processor and texture synthesizer -- -- MiClouds [AudioRate] pit=0 pos=0.5 size=0.25 dens=0.4 tex=0.5 -- drywet=0.5 in_gain=1 spread=0.5 rvb=0 fb=0 freeze=0 mode=0 lofi=0 -- trig=0 *inputArray=0; MCE=1, REORDERS INPUTS: -- [14,0,1,2,3,4,5,6,7,8,9,10,11,12,13] miClouds :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Physical modelling based on Modal Synthesis. -- -- MiElements [AudioRate] blow_in=0 strike_in=0 gate=0 pit=48 -- strength=0.5 contour=0.2 bow_level=0 blow_level=0 strike_level=0 -- flow=0.5 mallet=0.5 bow_timb=0.5 blow_timb=0.5 strike_timb=0.5 -- geom=0.25 bright=0.5 damp=0.7 pos=0.2 space=0.3 model=0 easteregg=0 miElements :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | topographic drum sequencer -- -- MiGrids [AudioRate] bpm=120 map_x=0.5 map_y=0.5 chaos=0 -- bd_density=0.25 sd_density=0.25 hh_density=0.25 mode=1 swing=0 -- config=0 miGrids :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | µ-law audio companding -- -- MiMu [AudioRate] in=0 gain=1 bypass=0 miMu :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | FM Synth-Voice based on ominous -- -- MiOmi [AudioRate] audio_in=0 gate=0 pit=48 contour=0.2 detune=0.25 -- level1=0.5 level2=0.5 ratio1=0.5 ratio2=0.5 fm1=0 fm2=0 fb=0 xfb=0 -- filter_mode=0 cutoff=0.5 reson=0 strength=0.5 env=0.5 rotate=0.2 -- space=0.5 miOmi :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a macro oscillator -- -- MiPlaits [AudioRate] pitch=60 engine=0 harm=0.1 timbre=0.5 morph=0.5 -- trigger=0 level=0 fm_mod=0 timb_mod=0 morph_mod=0 decay=0.5 -- lpg_colour=0.5 miPlaits :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a resonator -- -- MiRings [AudioRate] in=0 trig=0 pit=60 struct=0.25 bright=0.5 damp=0.7 -- pos=0.25 model=0 poly=1 intern_exciter=0 easteregg=0 bypass=0 miRings :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Classic resonant LP filter -- -- MiRipples [AudioRate] in=0 cf=0.3 reson=0.2 drive=1; FILTER: TRUE miRipples :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a quad LFO -- -- MiTides [AudioRate] freq=1 shape=0.5 slope=0.5 smooth=0.5 shift=0.2 -- trig=0 clock=0 output_mode=3 ramp_mode=1 ratio=9 rate=1 miTides :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | stereo reverb -- -- MiVerb [AudioRate] time=0.7 drywet=0.5 damp=0.5 hp=0.05 freeze=0 -- diff=0.625 *inputArray=0; MCE=1, FILTER: TRUE, REORDERS INPUTS: -- [6,0,1,2,3,4,5] miVerb :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a meta modulator -- -- MiWarps [AudioRate] carrier=0 modulator=0 lev1=0.5 lev2=0.5 algo=0 -- timb=0 osc=0 freq=110 vgain=1 easteregg=0 miWarps :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granulates real-time input -- -- MonoGrain [AudioRate] in=0 winsize=0.1 grainrate=10 winrandpct=0 monoGrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granulates real-time input with Ambisonic panning -- -- MonoGrainBF [AudioRate] in=0 winsize=0.1 grainrate=10 winrandpct=0 -- azimuth=0 azrand=0 elevation=0 elrand=0 rho=1 monoGrainBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Moog Filter Emulation -- -- MoogLadder [ControlRate,AudioRate] in=0 ffreq=440 res=0; FILTER: TRUE moogLadder :: Ugen -> Ugen -> Ugen -> Ugen -- | Moog filter emulation -- -- MoogVCF [AudioRate] in=0 fco=0 res=0; FILTER: TRUE moogVCF :: Ugen -> Ugen -> Ugen -> Ugen -- | Stereo reverb -- -- NHHall [AudioRate] in1=0.0 in2=0.0 rt60=1.0 stereo=0.5 lowFreq=200.0 -- lowRatio=0.5 hiFreq=4000.0 hiRatio=0.5 earlyDiffusion=0.5 -- lateDiffusion=0.5 modRate=0.2 modDepth=0.3 nhHall :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Non Linear Filter Equation -- -- NL [AudioRate] input=0 bufnuma=0 bufnumb=1 guard1=1000 guard2=100 nl :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Arbitrary Non Linear Filter Equation -- -- NL2 [AudioRate] input=0 bufnum=0 maxsizea=10 maxsizeb=10 guard1=1000 -- guard2=100 nl2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Non-linear Filter -- -- NLFiltC [ControlRate,AudioRate] input=0 a=0 b=0 d=0 c=0 l=0 nlFiltC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Non-linear Filter -- -- NLFiltL [ControlRate,AudioRate] input=0 a=0 b=0 d=0 c=0 l=0 nlFiltL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Non-linear Filter -- -- NLFiltN [ControlRate,AudioRate] input=0 a=0 b=0 d=0 c=0 l=0 nlFiltN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | physical modeling simulation; N tubes -- -- NTube [AudioRate] input=0 lossarray=1 karray=0 delaylengtharray=0 nTube :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Find the nearest-neighbours in a set of points -- -- NearestN [ControlRate] treebuf=0 in=0 gate=1 num=1 nearestN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- NeedleRect [AudioRate] rate=1 imgWidth=100 imgHeight=100 rectX=0 -- rectY=0 rectW=100 rectH=100 needleRect :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- NeoFormant [ControlRate,AudioRate] formantfreq=100 carrierfreq=200 -- phaseshift=0.5 neoFormant :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- NeoVarSawOsc [ControlRate,AudioRate] freq=100 pw=0.5 waveshape=0.5 neoVarSawOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | APU Chip Sound Simulator -- -- Nes2 [AudioRate] trig=0 a0=0 a1=0 a2=0 a3=0 b0=0 b1=0 b2=0 b3=0 c0=0 -- c2=0 c3=0 d0=0 d2=0 d3=0 e0=0 e1=0 e2=0 e3=0 smask=0 nes2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Nested Allpass filters as proposed by Vercoe and Pluckett -- -- NestedAllpassC [AudioRate] in=0 maxdelay1=0.036 delay1=0.036 -- gain1=0.08 maxdelay2=0.03 delay2=0.03 gain2=0.3; FILTER: TRUE nestedAllpassC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Nested Allpass filters as proposed by Vercoe and Pluckett -- -- NestedAllpassL [AudioRate] in=0 maxdelay1=0.036 delay1=0.036 -- gain1=0.08 maxdelay2=0.03 delay2=0.03 gain2=0.3; FILTER: TRUE nestedAllpassL :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Nested Allpass filters as proposed by Vercoe and Pluckett -- -- NestedAllpassN [AudioRate] in=0 maxdelay1=0.036 delay1=0.036 -- gain1=0.08 maxdelay2=0.03 delay2=0.03 gain2=0.3; FILTER: TRUE nestedAllpassN :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OSFold4 [AudioRate] in=0 lo=0 hi=0 osFold4 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OSFold8 [AudioRate] in=0 lo=0 hi=0 osFold8 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OSTrunc4 [AudioRate] in=0 quant=0.5 osTrunc4 :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OSTrunc8 [AudioRate] in=0 quant=0.5 osTrunc8 :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OSWrap4 [AudioRate] in=0 lo=0 hi=0 osWrap4 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OSWrap8 [AudioRate] in=0 lo=0 hi=0 osWrap8 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Extract basic statistics from a series of onset triggers -- -- OnsetStatistics [ControlRate] input=0 windowsize=1 hopsize=0.1 onsetStatistics :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Chemical reaction modelling Oscillator -- -- Oregonator [AudioRate] reset=0 rate=0.01 epsilon=1 mu=1 q=1 initx=0.5 -- inity=0.5 initz=0.5 oregonator :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OscBank [ControlRate,AudioRate] freq=100 gain=1 saw8=0.5 square8=0.5 -- saw4=0.5 square4=0.5 saw2=0.5 square2=0.5 saw1=0.5 oscBank :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Piano physical model. -- -- OteyPiano [AudioRate] freq=440 vel=1 t_gate=0 rmin=0.35 rmax=2 rampl=4 -- rampr=8 rcore=1 lmin=0.07 lmax=1.4 lampl=-4 lampr=4 rho=1 e=1 zb=1 -- zh=0 mh=1 k=0.2 alpha=1 p=1 hpos=0.142 loss=1 detune=0.0003 -- hammer_type=1 oteyPiano :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Piano physical model. -- -- OteyPianoStrings [AudioRate] freq=440 vel=1 t_gate=0 rmin=0.35 rmax=2 -- rampl=4 rampr=8 rcore=1 lmin=0.07 lmax=1.4 lampl=-4 lampr=4 rho=1 e=1 -- zb=1 zh=0 mh=1 k=0.2 alpha=1 p=1 hpos=0.142 loss=1 detune=0.0003 -- hammer_type=1 oteyPianoStrings :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- OteySoundBoard [AudioRate] inp=0 c1=20 c3=20 mix=0.8; FILTER: TRUE oteySoundBoard :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Return mag and freq data from a CSound pv -- -- PVInfo [ControlRate,AudioRate] pvbuffer=0 binNum=0 filePointer=0 pvInfo :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Resynthesize Csound PV data -- -- PVSynth [AudioRate] pvbuffer=0 numBins=0 binStart=0 binSkip=1 -- filePointer=0 freqMul=1 freqAdd=0 pvSynth :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plays FFT data to a memory buffer -- -- PV_BinBufRd [ControlRate] buffer=0 playbuf=0 point=1 binStart=0 -- binSkip=1 numBins=1 clear=0 pv_BinBufRd :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Delay and Feedback on a bin by bin basis. -- -- PV_BinDelay [ControlRate] buffer=0 maxdelay=0 delaybuf=0 fbbuf=0 -- hop=0.5 pv_BinDelay :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_BinFilter [ControlRate] buffer=0 start=0 end=0 pv_BinFilter :: Ugen -> Ugen -> Ugen -> Ugen -- | Plays FFT data to a memory buffer -- -- PV_BinPlayBuf [ControlRate] buffer=0 playbuf=0 rate=1 offset=0 -- binStart=0 binSkip=1 numBins=1 loop=0 clear=0 pv_BinPlayBuf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Plays FFT data from a memory buffer -- -- PV_BufRd [ControlRate] buffer=0 playbuf=0 point=1 pv_BufRd :: Ugen -> Ugen -> Ugen -> Ugen -- | returns common magnitudes -- -- PV_CommonMag [ControlRate] bufferA=0 bufferB=0 tolerance=0 remove=0 pv_CommonMag :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | multiplies common magnitudes -- -- PV_CommonMul [ControlRate] bufferA=0 bufferB=0 tolerance=0 remove=0 pv_CommonMul :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | simple spectral compression/expansion -- -- PV_Compander [ControlRate] buffer=0 thresh=50 slopeBelow=1 -- slopeAbove=1 pv_Compander :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | zero bins with interpolation -- -- PV_Cutoff [ControlRate] bufferA=0 bufferB=0 wipe=0 pv_Cutoff :: Ugen -> Ugen -> Ugen -> Ugen -- | Return the even numbered bins in an FFT buffer -- -- PV_EvenBin [ControlRate] buffer=0 pv_EvenBin :: Ugen -> Ugen -- | extract a repeating loop out from audio -- -- PV_ExtractRepeat [ControlRate] buffer=0 loopbuf=0 loopdur=0 -- memorytime=30 which=0 ffthop=0.5 thresh=1 pv_ExtractRepeat :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Freeze FFT frames -- -- PV_Freeze [ControlRate] buffer=0 freeze=0 pv_Freeze :: Ugen -> Ugen -> Ugen -- | Store FFT data in another buffer for other use -- -- PV_FreqBuffer [ControlRate] buffer=0 databuffer=0 pv_FreqBuffer :: Ugen -> Ugen -> Ugen -- | Invert FFT frames -- -- PV_Invert [ControlRate] buffer=0 pv_Invert :: Ugen -> Ugen -- | Store FFT data in another buffer for other use -- -- PV_MagBuffer [ControlRate] buffer=0 databuffer=0 pv_MagBuffer :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_MagExp [ControlRate] buffer=0 pv_MagExp :: Ugen -> Ugen -- | reduces magnitudes above or below thresh -- -- PV_MagGate [ControlRate] buffer=0 thresh=1 remove=0 pv_MagGate :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_MagLog [ControlRate] buffer=0 pv_MagLog :: Ugen -> Ugen -- | Remap magnitudes to a new mag curve -- -- PV_MagMap [ControlRate] buffer=0 mapbuf=0 pv_MagMap :: Ugen -> Ugen -> Ugen -- | subtract spectral energy -- -- PV_MagMinus [ControlRate] bufferA=0 bufferB=0 remove=1 pv_MagMinus :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_MagMulAdd [ControlRate] buffer=0 pv_MagMulAdd :: Ugen -> Ugen -- | (Undocumented class) -- -- PV_MagScale [ControlRate] bufferA=0 bufferB=0 pv_MagScale :: Ugen -> Ugen -> Ugen -- | Smooth spectral magnitudes over time -- -- PV_MagSmooth [ControlRate] buffer=0 factor=0.1 pv_MagSmooth :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_MagSubtract [ControlRate] bufferA=0 bufferB=0 zerolimit=0 pv_MagSubtract :: Ugen -> Ugen -> Ugen -> Ugen -- | Return the N strongest bins -- -- PV_MaxMagN [ControlRate] buffer=0 numbins=0 pv_MaxMagN :: Ugen -> Ugen -> Ugen -- | Return the N weakest bins -- -- PV_MinMagN [ControlRate] buffer=0 numbins=0 pv_MinMagN :: Ugen -> Ugen -> Ugen -- | one kind of spectral morphing -- -- PV_Morph [ControlRate] bufferA=0 bufferB=0 morph=0 pv_Morph :: Ugen -> Ugen -> Ugen -> Ugen -- | Return only bins that are unstable -- -- PV_NoiseSynthF [ControlRate] buffer=0 threshold=0.1 numFrames=2 -- initflag=0 pv_NoiseSynthF :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Return only bins that are unstable -- -- PV_NoiseSynthP [ControlRate] buffer=0 threshold=0.1 numFrames=2 -- initflag=0 pv_NoiseSynthP :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Return the odd numbered bins in an FFT buffer -- -- PV_OddBin [ControlRate] buffer=0 pv_OddBin :: Ugen -> Ugen -- | Return only bins that are stable -- -- PV_PartialSynthF [ControlRate] buffer=0 threshold=0.1 numFrames=2 -- initflag=0 pv_PartialSynthF :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Return only bins that are stable -- -- PV_PartialSynthP [ControlRate] buffer=0 threshold=0.1 numFrames=2 -- initflag=0 pv_PartialSynthP :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_PitchShift [ControlRate] buffer=0 ratio=0 pv_PitchShift :: Ugen -> Ugen -> Ugen -- | Plays FFT data to a memory buffer -- -- PV_PlayBuf [ControlRate] buffer=0 playbuf=0 rate=1 offset=0 loop=0 pv_PlayBuf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Records FFT data to a memory buffer -- -- PV_RecordBuf [ControlRate] buffer=0 recbuf=0 offset=0 run=0 loop=0 -- hop=0.5 wintype=0 pv_RecordBuf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | combine low and high bins from two inputs with interpolation -- -- PV_SoftWipe [ControlRate] bufferA=0 bufferB=0 wipe=0 pv_SoftWipe :: Ugen -> Ugen -> Ugen -> Ugen -- | A harmonic enhancer -- -- PV_SpectralEnhance [ControlRate] buffer=0 numPartials=8 ratio=2 -- strength=0.1 pv_SpectralEnhance :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Maps the spectral envelope of one FFT process onto another -- -- PV_SpectralMap [ControlRate] buffer=0 specBuffer=0 floor=0 freeze=0 -- mode=0 norm=0 window=0 pv_SpectralMap :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_Split [ControlRate] bufferA=0 bufferB=0 pv_Split :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PV_Whiten [ControlRate] chain=0 trackbufnum=0 relaxtime=2 floor=0.1 -- smear=0 bindownsample=0 pv_Whiten :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | one kind of spectral morphing -- -- PV_XFade [ControlRate] bufferA=0 bufferB=0 fade=0 pv_xFade :: Ugen -> Ugen -> Ugen -> Ugen -- | Equal power pan across an array of speakers -- -- PanX [ControlRate,AudioRate] numChans=0 in=0 pos=0 level=1 width=2 panX :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PanX2D [ControlRate,AudioRate] numChansX=0 numChansY=0 in=0 posX=0 -- posY=0 level=1 widthX=2 widthY=2 panX2D :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PeakEQ2 [AudioRate] in=0 freq=1200 rs=1 db=0 peakEQ2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PeakEQ4 [AudioRate] in=0 freq=1200 rs=1 db=0 peakEQ4 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 3D Perlin Noise -- -- Perlin3 [ControlRate,AudioRate] x=0 y=0 z=0 perlin3 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Sample permutation Ugen. -- -- PermMod [AudioRate] in=0 freq=100 permMod :: Rate -> Ugen -> Ugen -> Ugen -- | Sample permutation Ugen with programmable pattern. -- -- PermModArray [AudioRate] in=0 freq=50 pattern=0 permModArray :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Sample permutation Ugen with tail. -- -- PermModT [AudioRate] in=0 outfreq=440 infreq=5000 permModT :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PhasorModal [AudioRate] input=0 freq=100 decay=0.25 damp=1 amp=0.5 -- phase=0; FILTER: TRUE phasorModal :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Tree classifier using (hyper)planes – Ugen or language-side -- -- PlaneTree [ControlRate] treebuf=0 in=0 gate=1 planeTree :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | POKEY Chip Sound Simulator -- -- Pokey [AudioRate] audf1=0 audc1=0 audf2=0 audc2=0 audf3=0 audc3=0 -- audf4=0 audc4=0 audctl=0 pokey :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- PosRatio [AudioRate] in=0 period=100 thresh=0.1 posRatio :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | debug assistance -- -- PrintVal [ControlRate] in=0 numblocks=100 id=0 printVal :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | constant Q transform pitch follower -- -- Qitch [ControlRate] in=0 databufnum=0 ampThreshold=0.01 algoflag=1 -- ampbufnum=0 minfreq=0 maxfreq=2500 qitch :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Bezier [ControlRate,AudioRate] haltAfter=100 dx=0.0001 freq=440 -- phase=0 *param=0; MCE=1 bezier :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | rotating clock divider -- -- RCD [AudioRate] clock=0 rotate=0 reset=0 div=0 spread=0 auto=0 len=0 -- down=0 gates=0; FILTER: TRUE rcd :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RDL [AudioRate] numChannels=1 inputArray=0 rdl :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- DX7 [AudioRate] bufnum=0 on=0 off=0 data=0 vc=0 mnn=60 vel=99 pw=0 -- mw=0 bc=0 fc=0 dx7 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RDX7Env [AudioRate] gate=0 data=0 r1=0 r2=0 r3=0 r4=0 l1=0 l2=0 l3=0 -- l4=0 ol=0 rdx7Env :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RDelayMap [AudioRate] bufnum=0 in=0 dynamic=0 *spec=0; MCE=1, FILTER: -- TRUE rDelayMap :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RDelaySet [AudioRate] input=0 *setArray=0; MCE=1, FILTER: TRUE rDelaySet :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RDelaySetBuf [AudioRate] bufnum=0 in=0 spec=0 rDelaySetBuf :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- dustRange [AudioRate] iot_min=0.1 iot_max=1 dustRangeId :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- ExpRandN [InitialisationRate] lo=0 hi=1; NC INPUT: True, NONDET expRandNId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -- | Monad variant of ExpRandN. expRandNM :: Uid m => Int -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of ExpRandN. expRandN :: Int -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Freezer [AudioRate] bufnum=0 left=0 right=1 gain=1 increment=1 -- incrementOffset=0 incrementRandom=0 rightRandom=0 syncPhaseTrigger=0 -- randomizePhaseTrigger=0 numberOfLoops=4 freezer :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- IRandN [] numChannels=2 lo=0 hi=127 iRandNId :: ID a => a -> Int -> Ugen -> Ugen -> Ugen -- | Monad variant of IRandN. iRandNM :: Uid m => Int -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of IRandN. iRandN :: Int -> Ugen -> Ugen -> Ugen -- | TB303 Filter Emulation -- -- RLPFD [ControlRate,AudioRate] in=0 ffreq=440 res=0 dist=0; FILTER: -- TRUE rlpfd :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RLagC [ControlRate] in=0 timeUp=0.1 curveUp=0 timeDown=0.1 -- curveDown=0; FILTER: TRUE rLagC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- LinRandN [InitialisationRate] lo=0 hi=1 minmax=0; NC INPUT: True, -- NONDET linRandNId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of LinRandN. linRandNM :: Uid m => Int -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of LinRandN. linRandN :: Int -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RLoopSet [AudioRate] bufnum=0 left=0 right=1 gain=1 increment=1 spec=0 rLoopSet :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RMAFoodChainL [AudioRate] freq=22050 a1=5 b1=3 d1=0.4 a2=0.1 b2=2 -- d2=0.01 k=1.0943 r=0.8904 h=0.05 xi=0.1 yi=0 zi=0 rmaFoodChainL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RMEQ [AudioRate] in=0 freq=440 rq=0.1 k=0; FILTER: TRUE rmeq :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RMEQSuite [] maxSize=0 rmeqSuite :: Rate -> Ugen -> Ugen -- | root mean square -- -- RMS [ControlRate,AudioRate] in=0 lpFreq=10 rms :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RMShelf [AudioRate] in=0 freq=440 k=0 rmShelf :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RMShelf2 [AudioRate] in=0 freq=440 k=0 rmShelf2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- ObxdFilter [AudioRate] in=0 cutoff=440 resonance=0 multimode=0.5 -- bandpass=0 fourpole=0 obxdFilter :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RPVDecayTbl [] fft_buf=0 decay_rate_buf=0 history_buf=0 rpvDecayTbl :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RandN [InitialisationRate] lo=0 hi=1; NC INPUT: True, NONDET randNId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -- | Monad variant of RandN. randNM :: Uid m => Int -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of RandN. randN :: Int -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RSVFBP [AudioRate] in=0 freq=440 q=0 svfBp :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SvfHp [AudioRate] in=0 freq=440 q=0 svfHp :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SvflP [AudioRate] in=0 freq=440 q=0 svfLp :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- ShufflerB [AudioRate] bufnum=0 readLocationMinima=0.01 -- readLocationMaxima=0.02 readIncrementMinima=1 readIncrementMaxima=1 -- durationMinima=0.2 durationMaxima=0.2 envelopeAmplitudeMinima=0.5 -- envelopeAmplitudeMaxima=0.5 envelopeShapeMinima=0.5 -- envelopeShapeMaxima=0.5 envelopeSkewMinima=0.5 envelopeSkewMaxima=0.5 -- stereoLocationMinima=0.5 stereoLocationMaxima=0.5 -- interOffsetTimeMinima=0.05 interOffsetTimeMaxima=0.01 -- ftableReadLocationIncrement=1 readIncrementQuanta=0 -- interOffsetTimeQuanta=0 shufflerB :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RShufflerL [AudioRate] in=0 fragmentSize=0.01 maxDelay=0.01 rShufflerL :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RSmplrIndex [ControlRate] buf=0 size=0 mnn=60 rSmplrIndex :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- TExpRandN [ControlRate] lo=0 hi=1 trigger=0; NC INPUT: True, FILTER: -- TRUE, NONDET tExpRandNId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TExpRandN. tExpRandNM :: Uid m => Int -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TExpRandN. tExpRandN :: Int -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- TLinRandN [ControlRate] lo=0 hi=1 minmax=0 trigger=0; NC INPUT: True, -- FILTER: TRUE, NONDET tLinRandNId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TLinRandN. tLinRandNM :: Uid m => Int -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TLinRandN. tLinRandN :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- TRandN [ControlRate] lo=0 hi=1 trigger=0; NC INPUT: True, FILTER: -- TRUE, NONDET tRandNId :: ID a => Int -> a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TRandN. tRandNM :: Uid m => Int -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TRandN. tRandN :: Int -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- TScramble [InitialisationRate,ControlRate] trigger=0 *inputs=0; MCE=1, -- FILTER: TRUE, NONDET tScrambleId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of TScramble. tScrambleM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of TScramble. tScramble :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RTracePlay [ControlRate,AudioRate] bufnum=0 degree=4 rate=0 axis=1 rTracePlay :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RTraceRd [ControlRate,AudioRate] bufnum=0 degree=4 index=0 axis=1 rTraceRd :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | differential pulse-code modulation -- -- RedDPCMdecode [ControlRate,AudioRate] in=0 redDPCMdecode :: Rate -> Ugen -> Ugen -- | differential pulse-code modulation -- -- RedDPCMencode [ControlRate,AudioRate] in=0 round=0 redDPCMencode :: Rate -> Ugen -> Ugen -> Ugen -- | look before you leap -- -- RedLbyl [ControlRate,AudioRate] in=0 thresh=0.5 samples=2 redLbyl :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | a really bad pseudo-random noise generator -- -- RedNoise [ControlRate,AudioRate] clock=0 redNoise :: Rate -> Ugen -> Ugen -- | a phasor that can loop -- -- RedPhasor [ControlRate,AudioRate] trig=0 rate=1 start=0 end=1 loop=0 -- loopstart=0 loopend=1 redPhasor :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a phasor that can loop - version2 -- -- RedPhasor2 [ControlRate,AudioRate] trig=0 rate=1 start=0 end=1 loop=0 -- loopstart=0 loopend=1 redPhasor2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RegaliaMitraEQ [AudioRate] in=0 freq=440 rq=0.1 k=0 regaliaMitraEQ :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Resonator [AudioRate] input=0 freq=100 position=0.001 resolution=24 -- structure=0.5 brightness=0.5 damping=0.5; FILTER: TRUE resonator :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Rongs [AudioRate] trigger=0 sustain=1 f0=0.01 structure=0.5 -- brightness=0.5 damping=0.75 accent=0.9 stretch=0.5 position=0.15 -- loss=0.15 modeNum=2 cosFreq=0.25 rongs :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Rossler chaotic generator -- -- RosslerL [AudioRate] freq=22050 a=0.2 b=0.2 c=5.7 h=0.05 xi=0.1 yi=0 -- zi=0 rosslerL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- RosslerResL [AudioRate] in=0 stiff=1 freq=22050 a=0.2 b=0.2 c=5.7 -- h=0.05 xi=0.1 yi=0 zi=0 rosslerResL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Rotate [AudioRate] w=0 x=0 y=0 z=0 rotate=0 rotate :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (faulty) SID Sound Chip Simulator -- -- SID6581f [AudioRate] freqLo0=0 freqHi0=0 pwLo0=0 pwHi0=0 ctrl0=0 -- atkDcy0=0 susRel0=0 freqLo1=0 freqHi1=0 pwLo1=0 pwHi1=0 ctrl1=0 -- atkDcy1=0 susRel1=0 freqLo2=0 freqHi2=0 pwLo2=0 pwHi2=0 ctrl2=0 -- atkDcy2=0 susRel2=0 fcLo=0 fcHi=0 resFilt=0 modeVol=0 rate=1 sid6581f :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | experimental time domain onset detector -- -- SLOnset [ControlRate] input=0 memorysize1=20 before=5 after=5 -- threshold=10 hysteresis=10 slOnset :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Spectral Modeling Synthesis -- -- SMS [AudioRate] input=0 maxpeaks=80 currentpeaks=80 tolerance=4 -- noisefloor=0.2 freqmult=1 freqadd=0 formantpreserve=0 useifft=0 -- ampmult=1 graphicsbufnum=0; FILTER: TRUE sms :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Sound Chip Simulator -- -- SN76489 [AudioRate] tone0=512 tone1=0 tone2=0 noise=0 vol0=15 vol1=0 -- vol2=0 vol3=0 rate=1 sn76489 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SOMAreaWr [ControlRate] bufnum=0 inputdata=0 coords=0 netsize=10 -- numdims=2 nhood=0.5 gate=1 somAreaWr :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Map an input using a Self-Organising Map -- -- SOMRd [ControlRate,AudioRate] bufnum=0 inputdata=0 netsize=10 -- numdims=2 gate=1 somRd :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Create (train) a Self-Organising Map -- -- SOMTrain [ControlRate] bufnum=0 inputdata=0 netsize=10 numdims=2 -- traindur=5000 nhood=0.5 gate=1 initweight=1 somTrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 12db/Oct State Variable Filter -- -- SVF [ControlRate,AudioRate] signal=0 cutoff=2200 res=0.1 lowpass=1 -- bandpass=0 highpass=0 notch=0 peak=0; FILTER: TRUE svf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | super-efficient sawtooth oscillator with low aliasing -- -- SawDPW [ControlRate,AudioRate] freq=440 iphase=0 sawDPW :: Rate -> Ugen -> Ugen -> Ugen -- | Perceptual feature modeling sensory dissonance -- -- SensoryDissonance [ControlRate] fft=0 maxpeaks=100 peakthreshold=0.1 -- norm=0 clamp=1 sensoryDissonance :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Fuzzy sieve based synthesis -- -- Sieve1 [ControlRate,AudioRate] bufnum=0 gap=2 alternate=1 sieve1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sinusoidal grains -- -- SinGrain [AudioRate] trigger=0 dur=1 freq=440 sinGrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sinusoidal grains and user supplied envelope -- -- SinGrainB [AudioRate] trigger=0 dur=1 freq=440 envbuf=0 sinGrainB :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sinusoidal grains with Ambisonic panning and -- user supplied envelope -- -- SinGrainBBF [AudioRate] trigger=0 dur=1 freq=440 envbuf=0 azimuth=0 -- elevation=0 rho=1 wComp=0 sinGrainBBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sinusoidal grains with Ambisonic panning -- -- SinGrainBF [AudioRate] trigger=0 dur=1 freq=440 azimuth=0 elevation=0 -- rho=1 wComp=0 sinGrainBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sinusoidal grains and user supplied envelopes -- -- SinGrainI [AudioRate] trigger=0 dur=1 freq=440 envbuf1=0 envbuf2=0 -- ifac=0.5 sinGrainI :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sinusoidal grains with Ambisonic panning and -- user supplied envelopes -- -- SinGrainIBF [AudioRate] trigger=0 dur=1 freq=440 envbuf1=0 envbuf2=0 -- ifac=0.5 azimuth=0 elevation=0 rho=1 wComp=0 sinGrainIBF :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SinTone [AudioRate] freq=440 phase=0 sinTone :: Rate -> Ugen -> Ugen -> Ugen -- | port of some ladspa plugins -- -- SineShaper [AudioRate] in=0 limit=1; FILTER: TRUE sineShaper :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SkipNeedle [AudioRate] range=44100 rate=10 offset=0 skipNeedle :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | lowpass filter for envelope following -- -- Slide [ControlRate,AudioRate] in=0 slideup=50 slidedown=3000 slide :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | generate cpu spikes -- -- Slub [ControlRate,AudioRate] trig=0 spike=4.04 slub :: Rate -> Ugen -> Ugen -> Ugen -- | Smooth samplerate and bitrate reduction -- -- SmoothDecimator [AudioRate] in=0 rate=44100 smoothing=0.5 smoothDecimator :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SoftClipAmp [AudioRate] in=0 pregain=1; FILTER: TRUE softClipAmp :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SoftClipAmp4 [AudioRate] in=0 pregain=1; FILTER: TRUE softClipAmp4 :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SoftClipAmp8 [AudioRate] in=0 pregain=1; FILTER: TRUE softClipAmp8 :: Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SoftClipper4 [AudioRate] in=0 softClipper4 :: Rate -> Ugen -> Ugen -- | (Undocumented class) -- -- SoftClipper8 [AudioRate] in=0 softClipper8 :: Rate -> Ugen -> Ugen -- | LPC analizer. -- -- SonLPC [AudioRate] buff=-1.0 in=0.0 hop=0.5 poles=10.0 sonLPC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- SonLPCSynth [AudioRate] chain=-1.0 sonLPCSynth :: Rate -> Ugen -> Ugen -- | (Undocumented class) -- -- SonLPCSynthIn [AudioRate] chain=-1.0 in=0.0 sonLPCSynthIn :: Rate -> Ugen -> Ugen -> Ugen -- | Karplus-Strong via a sorting algorithm -- -- SortBuf [AudioRate] bufnum=0 sortrate=10 reset=0 sortBuf :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Spectral feature extraction -- -- SpectralEntropy [ControlRate] fft=0 fftsize=2048 numbands=1; NC INPUT: -- True spectralEntropy :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Spreader [AudioRate] in=0 theta=1.5708 filtsPerOctave=8 spreader :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Spruce bud worm model equations -- -- SpruceBudworm [AudioRate] reset=0 rate=0.1 k1=27.9 k2=1.5 alpha=0.1 -- beta=10.1 mu=0.3 rho=10.1 initx=0.9 inity=0.1 spruceBudworm :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Wave squeezer. Maybe a kind of pitch shifter. -- -- Squiz [ControlRate,AudioRate] in=0 pitchratio=2 zcperchunk=1 -- memlen=0.1; FILTER: TRUE squiz :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | standard map 2D chaotic generator -- -- Standard2DC [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 k=1.4 -- x0=4.97898 y0=5.74734 standard2DC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | standard map 2D chaotic generator -- -- Standard2DL [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 k=1.4 -- x0=4.97898 y0=5.74734 standard2DL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | standard map 2D chaotic generator -- -- Standard2DN [ControlRate,AudioRate] minfreq=11025 maxfreq=22050 k=1.4 -- x0=4.97898 y0=5.74734 standard2DN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StandardTrig [ControlRate,AudioRate] minfreq=5 maxfreq=10 k=1.4 -- x0=4.97898 y0=5.74734 standardTrig :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkBandedWG [ControlRate,AudioRate] freq=440 instr=0 bowpressure=0 -- bowmotion=0 integration=0 modalresonance=64 bowvelocity=0 -- setstriking=0 trig=1 stkBandedWG :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkBeeThree [ControlRate,AudioRate] freq=440 op4gain=10 op3gain=20 -- lfospeed=64 lfodepth=0 adsrtarget=64 trig=1 stkBeeThree :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkBlowHole [ControlRate,AudioRate] freq=440 reedstiffness=64 -- noisegain=20 tonehole=64 register=11 breathpressure=64 stkBlowHole :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkBowed [ControlRate,AudioRate] freq=220 bowpressure=64 -- bowposition=64 vibfreq=64 vibgain=64 loudness=64 gate=1 attackrate=1 -- decayrate=1 stkBowed :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkClarinet [ControlRate,AudioRate] freq=440 reedstiffness=64 -- noisegain=4 vibfreq=64 vibgain=11 breathpressure=64 trig=1 stkClarinet :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkFlute [ControlRate,AudioRate] freq=440 jetDelay=49 noisegain=0.15 -- jetRatio=0.32 stkFlute :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Wrapping Synthesis toolkit. -- -- StkInst [AudioRate] freq=220 gate=1 onamp=1 offamp=0.5 instNumber=6 -- *args=0; MCE=1, REORDERS INPUTS: [4,0,1,2,3,5] stkInst :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkMandolin [ControlRate,AudioRate] freq=520 bodysize=64 -- pickposition=64 stringdamping=69 stringdetune=10 aftertouch=64 trig=1 stkMandolin :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkModalBar [ControlRate,AudioRate] freq=440 instrument=0 -- stickhardness=64 stickposition=64 vibratogain=20 vibratofreq=20 -- directstickmix=64 volume=64 trig=1 stkModalBar :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkMoog [ControlRate,AudioRate] freq=440 filterQ=10 sweeprate=20 -- vibfreq=64 vibgain=0 gain=64 trig=1 stkMoog :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkPluck [ControlRate,AudioRate] freq=440 decay=0.99 stkPluck :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkSaxofony [ControlRate,AudioRate] freq=220 reedstiffness=64 -- reedaperture=64 noisegain=20 blowposition=26 vibratofrequency=20 -- vibratogain=20 breathpressure=128 trig=1 stkSaxofony :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkShakers [ControlRate,AudioRate] instr=0 energy=64 decay=64 -- objects=64 resfreq=64 stkShakers :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StkVoicForm [ControlRate,AudioRate] freq=440 vuvmix=64 vowelphon=64 -- vibfreq=64 vibgain=20 loudness=64 trig=1 stkVoicForm :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | String resonance filter -- -- Streson [ControlRate,AudioRate] input=0 delayTime=0.003 res=0.9; -- FILTER: TRUE streson :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- StringVoice [AudioRate] trig=0 infsustain=0 freq=100 accent=0.5 -- structure=0.5 brightness=0.5 damping=0.5 stringVoice :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Pulse counter with floating point steps -- -- Summer [ControlRate,AudioRate] trig=0 step=1 reset=0 resetval=0; -- FILTER: TRUE summer :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | feedback delay line implementing switch-and-ramp buffer jumping -- -- SwitchDelay [AudioRate] in=0 drylevel=1 wetlevel=1 delaytime=1 -- delayfactor=0.7 maxdelaytime=20; FILTER: TRUE switchDelay :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | triggered beta random distribution -- -- TBetaRand [ControlRate,AudioRate] lo=0 hi=1 prob1=0 prob2=0 trig=0; -- FILTER: TRUE, NONDET tBetaRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TBetaRand. tBetaRandM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TBetaRand. tBetaRand :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | triggered random walk generator -- -- TBrownRand [ControlRate,AudioRate] lo=0 hi=1 dev=1 dist=0 trig=0; -- FILTER: TRUE, NONDET tBrownRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TBrownRand. tBrownRandM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TBrownRand. tBrownRand :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | triggered gaussian random distribution -- -- TGaussRand [ControlRate,AudioRate] lo=0 hi=1 trig=0; FILTER: TRUE, -- NONDET tGaussRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TGaussRand. tGaussRandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TGaussRand. tGaussRand :: Ugen -> Ugen -> Ugen -> Ugen -- | buffer granulator with linear att/dec -- -- TGrains2 [AudioRate] trigger=0 bufnum=0 rate=1 centerPos=0 dur=0.1 -- pan=0 amp=0.1 att=0.5 dec=0.5 interp=4; NC INPUT: True tGrains2 :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | buffer granulator with user envelope -- -- TGrains3 [AudioRate] trigger=0 bufnum=0 rate=1 centerPos=0 dur=0.1 -- pan=0 amp=0.1 att=0.5 dec=0.5 window=1 interp=4; NC INPUT: True tGrains3 :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Tracking Phase Vocoder -- -- TPV [AudioRate] chain=0 windowsize=1024 hopsize=512 maxpeaks=80 -- currentpeaks=0 freqmult=1 tolerance=4 noisefloor=0.2 tpv :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- TTendency [ControlRate,AudioRate] trigger=0 dist=0 parX=0 parY=1 -- parA=0 parB=0 tTendency :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | pitch tracker -- -- Tartini [ControlRate] in=0 threshold=0.93 n=2048 k=0 overlap=1024 -- smallCutoff=0.5 tartini :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Neural Oscillator -- -- TermanWang [AudioRate] input=0 reset=0 ratex=0.01 ratey=0.01 alpha=1 -- beta=1 eta=1 initx=0 inity=0 termanWang :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | display level of a Ugen as a textual meter -- -- TextVU [ControlRate,AudioRate] trig=2 in=0 label=0 width=21 reset=0 -- ana=0 textVU :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Tilt [AudioRate] w=0 x=0 y=0 z=0 tilt=0 tilt :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | triggered signal averager -- -- TrigAvg [ControlRate] in=0 trig=0 trigAvg :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Tumble [AudioRate] w=0 x=0 y=0 z=0 tilt=0 tumble :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | physical modeling simulation; two tubes -- -- TwoTube [AudioRate] input=0 k=0.01 loss=1 d1length=100 d2length=100 twoTube :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- UHJ2B [AudioRate] ls=0 rs=0 uhj2b :: Rate -> Ugen -> Ugen -> Ugen -- | Vector Base Amplitude Panner -- -- VBAP [ControlRate,AudioRate] in=0 bufnum=0 azimuth=0 elevation=1 -- spread=0; NC INPUT: True vbap :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a Chebyshev low/highpass filter -- -- VBChebyFilt [AudioRate] in=0 freq=880 mode=0 order=4 vbChebyFilt :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a chaotic oscillator network -- -- VBFourses [AudioRate] smoother=0.5 *freqarray=0; MCE=1, REORDERS -- INPUTS: [1,0] vbFourses :: Rate -> Ugen -> Ugen -> Ugen -- | artifical reverberator -- -- VBJonVerb [AudioRate] in=0 decay=0.6 damping=0.3 inputbw=0.8 erfl=0.5 -- tail=0.5; FILTER: TRUE vbJonVerb :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | a simple phase vocoder for time-stretching -- -- VBPVoc [AudioRate] numChannels=0 bufnum=0 playpos=0 fftsize=2048 vbpVoc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | lowpass filter for envelope following -- -- VBSlide [KR,AR] in=0.0 slideup=50.0 slidedown=3000.0; FILTER: TRUE vbSlide :: Ugen -> Ugen -> Ugen -> Ugen -- | 2D scanning pattern virtual machine -- -- VMScan2D [AudioRate] bufnum=0 vmScan2D :: Rate -> Ugen -> Ugen -- | vosim pulse generator -- -- VOSIM [AudioRate] trig=0.1 freq=400 nCycles=1 decay=0.9 vosim :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- VarShapeOsc [ControlRate,AudioRate] freq=100 pw=0.5 waveshape=0.5 -- sync=1 syncfreq=105 varShapeOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- VosimOsc [ControlRate,AudioRate] freq=100 form1freq=951 form2freq=919 -- shape=0 vosimOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | windowed amplitude follower -- -- WAmp [ControlRate] in=0 winSize=0.1 wAmp :: Rate -> Ugen -> Ugen -> Ugen -- | decomposition into square waves, and reconstruction -- -- WalshHadamard [AudioRate] input=0 which=0 walshHadamard :: Rate -> Ugen -> Ugen -> Ugen -- | Warp a buffer with a time pointer -- -- WarpZ [AudioRate] bufnum=0 pointer=0 freqScale=1 windowSize=0.2 -- envbufnum=-1 overlaps=8 windowRandRatio=0 interp=1 zeroSearch=0 -- zeroStart=0; NC INPUT: True warpZ :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Lose bits of your waves -- -- WaveLoss [ControlRate,AudioRate] in=0 drop=20 outof=40 mode=1 waveLoss :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | wave terrain synthesis -- -- WaveTerrain [AudioRate] bufnum=0 x=0 y=0 xsize=100 ysize=100 waveTerrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | decomposition into Daub4 wavelets, and reconstruction -- -- WaveletDaub [AudioRate] input=0 n=64 which=0 waveletDaub :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Weakly Nonlinear Oscillator -- -- WeaklyNonlinear [AudioRate] input=0 reset=0 ratex=1 ratey=1 freq=440 -- initx=0 inity=0 alpha=0 xexponent=0 beta=0 yexponent=0 weaklyNonlinear :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Weakly Nonlinear Oscillator -- -- WeaklyNonlinear2 [AudioRate] input=0 reset=0 ratex=1 ratey=1 freq=440 -- initx=0 inity=0 alpha=0 xexponent=0 beta=0 yexponent=0 weaklyNonlinear2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- Werner [AudioRate] input=0 freq=0.5 damp=0.5 feedback=0.5 drive=0 -- oversample=1 werner :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Pulse counter with floating point steps -- -- WrapSummer [ControlRate,AudioRate] trig=0 step=1 min=0 max=1 reset=0 -- resetval=0 wrapSummer :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- ZOsc [ControlRate,AudioRate] freq=100 formantfreq=91 shape=0.5 -- mode=0.5 zOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Bindings to unit generators in sc3-plugins. module Sound.Sc3.Ugen.Bindings.Hw.External.Sc3_Plugins -- | Convert frequency value to value appropriate for Ay tone inputs. ayFreqToTone :: Fractional a => a -> a -- | Ladspa plugins inside SuperCollider. ladspa :: Int -> Rate -> Ugen -> [Ugen] -> Ugen -- | Lookup index of Stk instrument by name. stkAt :: (Num t, Enum t) => String -> t -- | freq=220, gate=1, onamp=1, offamp=1, bowpressure=64, bowposition=64, -- vibfreq=64, vibgain=64, loudness=64 stkBowedI :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Wrapping Synthesis toolkit. -- -- StkGlobals [ar] showWarnings=0.0 printErrors=0.0 rawfilepath=0.0 stkGlobals :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Bindings to unit generators not distributed with SuperCollider proper. module Sound.Sc3.Ugen.Bindings.Hw.External -- | Sc3 Ugen bindings (auto-generated). module Sound.Sc3.Ugen.Bindings.Db -- | Apply a binary operation to the values of an input Ugen -- -- BinaryOpUgen [InitialisationRate,ControlRate,AudioRate,DemandRate] a=0 -- b=0; FILTER: TRUE binaryOpUgen :: Ugen -> Ugen -> Ugen -- | Apply a unary operation to the values of an input ugen -- -- UnaryOpUgen [InitialisationRate,ControlRate,AudioRate,DemandRate] a=0; -- FILTER: TRUE unaryOpUgen :: Ugen -> Ugen -- | Audio to control rate converter. -- -- A2K [ControlRate] in=0 a2k :: Ugen -> Ugen -- | FIXME: APF purpose. -- -- APF [ControlRate,AudioRate] in=0 freq=440 radius=0.8; FILTER: TRUE apf :: Ugen -> Ugen -> Ugen -> Ugen -- | Schroeder allpass delay line with cubic interpolation. -- -- AllpassC [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1; FILTER: TRUE allpassC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Schroeder allpass delay line with linear interpolation. -- -- AllpassL [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1; FILTER: TRUE allpassL :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Schroeder allpass delay line with no interpolation. -- -- AllpassN [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1; FILTER: TRUE allpassN :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Basic psychoacoustic amplitude compensation. -- -- AmpComp [InitialisationRate,ControlRate,AudioRate] freq=0 root=0 -- exp=0.3333 ampComp :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Basic psychoacoustic amplitude compensation (ANSI A-weighting curve). -- -- AmpCompA [InitialisationRate,ControlRate,AudioRate] freq=1000 root=0 -- minAmp=0.32 rootAmp=1 ampCompA :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Amplitude follower -- -- Amplitude [ControlRate,AudioRate] in=0 attackTime=0.01 -- releaseTime=0.01 amplitude :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | All Pass Filter -- -- BAllPass [AudioRate] in=0 freq=1200 rq=1; FILTER: TRUE bAllPass :: Ugen -> Ugen -> Ugen -> Ugen -- | Band Pass Filter -- -- BBandPass [AudioRate] in=0 freq=1200 bw=1; FILTER: TRUE bBandPass :: Ugen -> Ugen -> Ugen -> Ugen -- | Band reject filter -- -- BBandStop [AudioRate] in=0 freq=1200 bw=1; FILTER: TRUE bBandStop :: Ugen -> Ugen -> Ugen -> Ugen -- | 12db/oct rolloff - 2nd order resonant Hi Pass Filter -- -- BHiPass [AudioRate] in=0 freq=1200 rq=1; FILTER: TRUE bHiPass :: Ugen -> Ugen -> Ugen -> Ugen -- | Hi Shelf -- -- BHiShelf [AudioRate] in=0 freq=1200 rs=1 db=0; FILTER: TRUE bHiShelf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 12db/oct rolloff - 2nd order resonant Low Pass Filter -- -- BLowPass [AudioRate] in=0 freq=1200 rq=1; FILTER: TRUE bLowPass :: Ugen -> Ugen -> Ugen -> Ugen -- | Low Shelf -- -- BLowShelf [AudioRate] in=0 freq=1200 rs=1 db=0; FILTER: TRUE bLowShelf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 2nd order Butterworth bandpass filter. -- -- BPF [ControlRate,AudioRate] in=0 freq=440 rq=1; FILTER: TRUE bpf :: Ugen -> Ugen -> Ugen -> Ugen -- | Two zero fixed midpass. -- -- BPZ2 [ControlRate,AudioRate] in=0; FILTER: TRUE bpz2 :: Ugen -> Ugen -- | Parametric equalizer -- -- BPeakEQ [AudioRate] in=0 freq=1200 rq=1 db=0; FILTER: TRUE bPeakEQ :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 2nd order Butterworth band reject filter. -- -- BRF [ControlRate,AudioRate] in=0 freq=440 rq=1; FILTER: TRUE brf :: Ugen -> Ugen -> Ugen -> Ugen -- | Two zero fixed midcut. -- -- BRZ2 [ControlRate,AudioRate] in=0; FILTER: TRUE brz2 :: Ugen -> Ugen -- | Stereo signal balancer -- -- Balance2 [ControlRate,AudioRate] left=0 right=0 pos=0 level=1; FILTER: -- TRUE balance2 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | physical model of bouncing object -- -- Ball [ControlRate,AudioRate] in=0 g=1 damp=0 friction=0.01 ball :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Autocorrelation beat tracker -- -- BeatTrack [ControlRate] chain=0 lock=0 beatTrack :: Rate -> Ugen -> Ugen -> Ugen -- | Template matching beat tracker -- -- BeatTrack2 [ControlRate] busindex=0 numfeatures=0 windowsize=2 -- phaseaccuracy=0.02 lock=0 weightingscheme=0 beatTrack2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 2D Ambisonic B-format panner. -- -- BiPanB2 [ControlRate,AudioRate] inA=0 inB=0 azimuth=0 gain=1 biPanB2 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Band limited impulse oscillator. -- -- Blip [ControlRate,AudioRate] freq=440 numharm=200 blip :: Rate -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- BlockSize [InitialisationRate] blockSize :: Ugen -- | Brown Noise. -- -- BrownNoise [ControlRate,AudioRate] ; NONDET brownNoiseId :: ID a => a -> Rate -> Ugen -- | Monad variant of BrownNoise. brownNoiseM :: Uid m => Rate -> m Ugen -- | Unsafe variant of BrownNoise. brownNoise :: Rate -> Ugen -- | Buffer based all pass delay line with cubic interpolation. -- -- BufAllpassC [AudioRate] buf=0 in=0 delaytime=0.2 decaytime=1; FILTER: -- TRUE bufAllpassC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based all pass delay line with linear interpolation. -- -- BufAllpassL [AudioRate] buf=0 in=0 delaytime=0.2 decaytime=1; FILTER: -- TRUE bufAllpassL :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based all pass delay line with no interpolation. -- -- BufAllpassN [AudioRate] buf=0 in=0 delaytime=0.2 decaytime=1; FILTER: -- TRUE bufAllpassN :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Current number of channels of soundfile in buffer. -- -- BufChannels [InitialisationRate,ControlRate] bufnum=0 bufChannels :: Rate -> Ugen -> Ugen -- | Buffer based comb delay line with cubic interpolation. -- -- BufCombC [AudioRate] buf=0 in=0 delaytime=0.2 decaytime=1; FILTER: -- TRUE bufCombC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based comb delay line with linear interpolation. -- -- BufCombL [AudioRate] buf=0 in=0 delaytime=0.2 decaytime=1; FILTER: -- TRUE bufCombL :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based comb delay line with no interpolation. -- -- BufCombN [AudioRate] buf=0 in=0 delaytime=0.2 decaytime=1; FILTER: -- TRUE bufCombN :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based simple delay line with cubic interpolation. -- -- BufDelayC [ControlRate,AudioRate] buf=0 in=0 delaytime=0.2; FILTER: -- TRUE bufDelayC :: Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based simple delay line with linear interpolation. -- -- BufDelayL [ControlRate,AudioRate] buf=0 in=0 delaytime=0.2; FILTER: -- TRUE bufDelayL :: Ugen -> Ugen -> Ugen -> Ugen -- | Buffer based simple delay line with no interpolation. -- -- BufDelayN [ControlRate,AudioRate] buf=0 in=0 delaytime=0.2; FILTER: -- TRUE bufDelayN :: Ugen -> Ugen -> Ugen -> Ugen -- | Current duration of soundfile in buffer. -- -- BufDur [InitialisationRate,ControlRate] bufnum=0 bufDur :: Rate -> Ugen -> Ugen -- | Current number of frames allocated in the buffer. -- -- BufFrames [InitialisationRate,ControlRate] bufnum=0 bufFrames :: Rate -> Ugen -> Ugen -- | Buffer rate scaling in respect to server samplerate. -- -- BufRateScale [InitialisationRate,ControlRate] bufnum=0 bufRateScale :: Rate -> Ugen -> Ugen -- | Buffer reading oscillator. -- -- BufRd [ControlRate,AudioRate] bufnum=0 phase=0 loop=1 interpolation=2; -- NC INPUT: True, ENUMERATION INPUTS: 2=Loop, 3=Interpolation bufRd :: Int -> Rate -> Ugen -> Ugen -> Loop Ugen -> Interpolation Ugen -> Ugen -- | Buffer sample rate. -- -- BufSampleRate [InitialisationRate,ControlRate] bufnum=0 bufSampleRate :: Rate -> Ugen -> Ugen -- | Current number of samples in buffer. -- -- BufSamples [InitialisationRate,ControlRate] bufnum=0 bufSamples :: Rate -> Ugen -> Ugen -- | Buffer writing oscillator. -- -- BufWr [ControlRate,AudioRate] bufnum=0 phase=0 loop=1 *inputArray=0; -- MCE=1, FILTER: TRUE, REORDERS INPUTS: [3,0,1,2], ENUMERATION INPUTS: -- 2=Loop bufWr :: Ugen -> Ugen -> Loop Ugen -> Ugen -> Ugen -- | Chorusing wavetable oscillator. -- -- COsc [ControlRate,AudioRate] bufnum=0 freq=440 beats=0.5 cOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Test for infinity, not-a-number, and denormals -- -- CheckBadValues [ControlRate,AudioRate] in=0 id=0 post=2; FILTER: TRUE checkBadValues :: Ugen -> Ugen -> Ugen -> Ugen -- | Clip a signal outside given thresholds. -- -- Clip [InitialisationRate,ControlRate,AudioRate] in=0 lo=0 hi=1; -- FILTER: TRUE clip :: Ugen -> Ugen -> Ugen -> Ugen -- | Clip Noise. -- -- ClipNoise [ControlRate,AudioRate] ; NONDET clipNoiseId :: ID a => a -> Rate -> Ugen -- | Monad variant of ClipNoise. clipNoiseM :: Uid m => Rate -> m Ugen -- | Unsafe variant of ClipNoise. clipNoise :: Rate -> Ugen -- | Statistical gate. -- -- CoinGate [ControlRate,AudioRate] prob=0 in=0; FILTER: TRUE, NONDET coinGateId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of CoinGate. coinGateM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of CoinGate. coinGate :: Ugen -> Ugen -> Ugen -- | Comb delay line with cubic interpolation. -- -- CombC [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1; FILTER: TRUE combC :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Comb delay line with linear interpolation. -- -- CombL [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1; FILTER: TRUE combL :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Comb delay line with no interpolation. -- -- CombN [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1; FILTER: TRUE combN :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Compressor, expander, limiter, gate, ducker -- -- Compander [AudioRate] in=0 control=0 thresh=0.5 slopeBelow=1 -- slopeAbove=1 clampTime=0.01 relaxTime=0.1; FILTER: TRUE compander :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Compressor, expander, limiter, gate, ducker. -- -- CompanderD [AudioRate] in=0 thresh=0.5 slopeBelow=1 slopeAbove=1 -- clampTime=0.01 relaxTime=0.01 companderD :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Duration of one block -- -- ControlDur [InitialisationRate] controlDur :: Ugen -- | Server control rate. -- -- ControlRate [InitialisationRate] controlRate :: Ugen -- | Real-time convolver. -- -- Convolution [AudioRate] in=0 kernel=0 framesize=512 convolution :: Ugen -> Ugen -> Ugen -> Ugen -- | Real-time fixed kernel convolver. -- -- Convolution2 [AudioRate] in=0 kernel=0 trigger=0 framesize=2048 convolution2 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Real-time convolver with linear interpolation -- -- Convolution2L [AudioRate] in=0 kernel=0 trigger=0 framesize=2048 -- crossfade=1 convolution2L :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Time based convolver. -- -- Convolution3 [ControlRate,AudioRate] in=0 kernel=0 trigger=0 -- framesize=2048 convolution3 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Chaotic noise function. -- -- Crackle [ControlRate,AudioRate] chaosParam=1.5 crackle :: Rate -> Ugen -> Ugen -- | Cusp map chaotic generator -- -- CuspL [AudioRate] freq=22050 a=1 b=1.9 xi=0 cuspL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Cusp map chaotic generator -- -- CuspN [AudioRate] freq=22050 a=1 b=1.9 xi=0 cuspN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Create a constant amplitude signal -- -- DC [ControlRate,AudioRate] in=0 dc :: Rate -> Ugen -> Ugen -- | Demand rate brownian movement generator. -- -- Dbrown [DemandRate] length=100000000 lo=0 hi=1 step=0.01; REORDERS -- INPUTS: [1,2,3,0], DEMAND/NONDET dbrownId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dbrown. dbrownM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dbrown. dbrown :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Buffer read demand ugen -- -- Dbufrd [DemandRate] bufnum=0 phase=0 loop=1; ENUMERATION INPUTS: -- 2=Loop, DEMAND/NONDET dbufrdId :: ID a => a -> Ugen -> Ugen -> Loop Ugen -> Ugen -- | Monad variant of Dbufrd. dbufrdM :: Uid m => Ugen -> Ugen -> Loop Ugen -> m Ugen -- | Unsafe variant of Dbufrd. dbufrd :: Ugen -> Ugen -> Loop Ugen -> Ugen -- | Buffer write demand ugen -- -- Dbufwr [DemandRate] bufnum=0 phase=0 input=0 loop=1; REORDERS INPUTS: -- [2,0,1,3], ENUMERATION INPUTS: 3=Loop, DEMAND/NONDET dbufwrId :: ID a => a -> Ugen -> Ugen -> Ugen -> Loop Ugen -> Ugen -- | Monad variant of Dbufwr. dbufwrM :: Uid m => Ugen -> Ugen -> Ugen -> Loop Ugen -> m Ugen -- | Unsafe variant of Dbufwr. dbufwr :: Ugen -> Ugen -> Ugen -> Loop Ugen -> Ugen -- | Constrain a demand-rate stream to a given sum -- -- Dconst [DemandRate] sum=0 in=0 tolerance=0.001; DEMAND/NONDET dconstId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dconst. dconstM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dconst. dconst :: Ugen -> Ugen -> Ugen -> Ugen -- | Exponential decay -- -- Decay [ControlRate,AudioRate] in=0 decayTime=1; FILTER: TRUE decay :: Ugen -> Ugen -> Ugen -- | Exponential decay -- -- Decay2 [ControlRate,AudioRate] in=0 attackTime=0.01 decayTime=1; -- FILTER: TRUE decay2 :: Ugen -> Ugen -> Ugen -> Ugen -- | 2D Ambisonic B-format decoder. -- -- DecodeB2 [ControlRate,AudioRate] w=0 x=0 y=0 orientation=0.5; NC -- INPUT: True, FILTER: TRUE decodeB2 :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Convert signal to modal pitch. -- -- DegreeToKey [ControlRate,AudioRate] bufnum=0 in=0 octave=12; FILTER: -- TRUE degreeToKey :: Ugen -> Ugen -> Ugen -> Ugen -- | Tap a delay line from a DelTapWr Ugen -- -- DelTapRd [ControlRate,AudioRate] buffer=0 phase=0 delTime=0 interp=1; -- FILTER: TRUE delTapRd :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Write to a buffer for a DelTapRd Ugen -- -- DelTapWr [ControlRate,AudioRate] buffer=0 in=0; FILTER: TRUE delTapWr :: Ugen -> Ugen -> Ugen -- | Single sample delay. -- -- Delay1 [ControlRate,AudioRate] in=0; FILTER: TRUE delay1 :: Ugen -> Ugen -- | Two sample delay. -- -- Delay2 [ControlRate,AudioRate] in=0; FILTER: TRUE delay2 :: Ugen -> Ugen -- | Simple delay line with cubic interpolation. -- -- DelayC [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2; -- FILTER: TRUE delayC :: Ugen -> Ugen -> Ugen -> Ugen -- | Simple delay line with linear interpolation. -- -- DelayL [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2; -- FILTER: TRUE delayL :: Ugen -> Ugen -> Ugen -> Ugen -- | Simple delay line with no interpolation. -- -- DelayN [ControlRate,AudioRate] in=0 maxdelaytime=0.2 delaytime=0.2; -- FILTER: TRUE delayN :: Ugen -> Ugen -> Ugen -> Ugen -- | Demand results from demand rate Ugens. -- -- Demand [ControlRate,AudioRate] trig=0 reset=0 *demandUgens=0; MCE=1, -- FILTER: TRUE demand :: Ugen -> Ugen -> Ugen -> Ugen -- | Demand rate envelope generator -- -- DemandEnvGen [ControlRate,AudioRate] level=0 dur=0 shape=1 curve=0 -- gate=1 reset=1 levelScale=1 levelBias=0 timeScale=1 doneAction=0; -- ENUMERATION INPUTS: 9=DoneAction demandEnvGen :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -- | Search a buffer for a value -- -- DetectIndex [ControlRate,AudioRate] bufnum=0 in=0; FILTER: TRUE detectIndex :: Ugen -> Ugen -> Ugen -- | Detect when input falls below an amplitude threshold -- -- DetectSilence [ControlRate,AudioRate] in=0 amp=0.0001 time=0.1 -- doneAction=0; FILTER: TRUE, ENUMERATION INPUTS: 3=DoneAction detectSilence :: Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -- | Demand rate geometric series Ugen. -- -- Dgeom [DemandRate] length=100000000 start=1 grow=2; REORDERS INPUTS: -- [1,2,0], DEMAND/NONDET dgeomId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dgeom. dgeomM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dgeom. dgeom :: Ugen -> Ugen -> Ugen -> Ugen -- | Demand rate brownian movement generator. -- -- Dibrown [DemandRate] length=100000000 lo=0 hi=1 step=0.01; REORDERS -- INPUTS: [1,2,3,0], DEMAND/NONDET dibrownId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dibrown. dibrownM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dibrown. dibrown :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Stream in audio from a file. -- -- DiskIn [AudioRate] bufnum=0 loop=0; NC INPUT: True, ENUMERATION -- INPUTS: 1=Loop diskIn :: Int -> Ugen -> Loop Ugen -> Ugen -- | Record to a soundfile to disk. -- -- DiskOut [AudioRate] bufnum=0 *channelsArray=0; MCE=1 diskOut :: Ugen -> Ugen -> Ugen -- | Demand rate white noise random generator. -- -- Diwhite [DemandRate] length=100000000 lo=0 hi=1; REORDERS INPUTS: -- [1,2,0], DEMAND/NONDET diwhiteId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Diwhite. diwhiteM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Diwhite. diwhite :: Ugen -> Ugen -> Ugen -> Ugen -- | Monitors another Ugen to see when it is finished -- -- Done [ControlRate] src=0 done :: Ugen -> Ugen -- | Print the current output value of a demand rate Ugen -- -- Dpoll [DemandRate] in=0 label=0 run=1 trigid=-1; DEMAND/NONDET dpollId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dpoll. dpollM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dpoll. dpoll :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Demand rate random sequence generator. -- -- Drand [DemandRate] repeats=1 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET drandId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Drand. drandM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Drand. drand :: Ugen -> Ugen -> Ugen -- | demand rate reset -- -- Dreset [DemandRate] in=0 reset=0; DEMAND/NONDET dresetId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dreset. dresetM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dreset. dreset :: Ugen -> Ugen -> Ugen -- | Demand rate sequence generator. -- -- Dseq [DemandRate] repeats=1 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET dseqId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dseq. dseqM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dseq. dseq :: Ugen -> Ugen -> Ugen -- | Demand rate sequence generator. -- -- Dser [DemandRate] repeats=1 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET dserId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dser. dserM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dser. dser :: Ugen -> Ugen -> Ugen -- | Demand rate arithmetic series Ugen. -- -- Dseries [DemandRate] length=100000000 start=1 step=1; REORDERS INPUTS: -- [1,2,0], DEMAND/NONDET dseriesId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dseries. dseriesM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dseries. dseries :: Ugen -> Ugen -> Ugen -> Ugen -- | Demand rate random sequence generator -- -- Dshuf [DemandRate] repeats=1 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET dshufId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dshuf. dshufM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dshuf. dshuf :: Ugen -> Ugen -> Ugen -- | Demand rate input replicator -- -- Dstutter [DemandRate] n=0 in=0; DEMAND/NONDET dstutterId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dstutter. dstutterM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dstutter. dstutter :: Ugen -> Ugen -> Ugen -- | Demand rate generator for embedding different inputs -- -- Dswitch [DemandRate] index=0 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET dswitchId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dswitch. dswitchM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dswitch. dswitch :: Ugen -> Ugen -> Ugen -- | Demand rate generator for switching between inputs. -- -- Dswitch1 [DemandRate] index=0 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET dswitch1Id :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dswitch1. dswitch1M :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dswitch1. dswitch1 :: Ugen -> Ugen -> Ugen -- | Return the same unique series of values for several demand streams -- -- Dunique [DemandRate] source=0 maxBufferSize=1024 protected=1; -- DEMAND/NONDET duniqueId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dunique. duniqueM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dunique. dunique :: Ugen -> Ugen -> Ugen -> Ugen -- | Random impulses. -- -- Dust [ControlRate,AudioRate] density=0; NONDET dustId :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of Dust. dustM :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of Dust. dust :: Rate -> Ugen -> Ugen -- | Random impulses. -- -- Dust2 [ControlRate,AudioRate] density=0; NONDET dust2Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of Dust2. dust2M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of Dust2. dust2 :: Rate -> Ugen -> Ugen -- | Demand results from demand rate Ugens. -- -- Duty [ControlRate,AudioRate] dur=1 reset=0 doneAction=0 level=1; -- REORDERS INPUTS: [0,1,3,2], ENUMERATION INPUTS: 2=DoneAction duty :: Rate -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -> Ugen -- | Demand rate white noise random generator. -- -- Dwhite [DemandRate] length=100000000 lo=0 hi=1; REORDERS INPUTS: -- [1,2,0], DEMAND/NONDET dwhiteId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Dwhite. dwhiteM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dwhite. dwhite :: Ugen -> Ugen -> Ugen -> Ugen -- | Demand rate random sequence generator. -- -- Dxrand [DemandRate] repeats=1 *list=0; MCE=1, REORDERS INPUTS: [1,0], -- DEMAND/NONDET dxrandId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Dxrand. dxrandM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Dxrand. dxrand :: Ugen -> Ugen -> Ugen -- | Envelope generator -- -- EnvGen [ControlRate,AudioRate] gate=1 levelScale=1 levelBias=0 -- timeScale=1 doneAction=0 *envelope=0; MCE=1, REORDERS INPUTS: -- [5,0,1,2,3,4], ENUMERATION INPUTS: 4=DoneAction, 5=Envelope envGen :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Envelope Ugen -> Ugen -- | Exponential single random number generator. -- -- ExpRand [InitialisationRate] lo=0.01 hi=1; NONDET expRandId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of ExpRand. expRandM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of ExpRand. expRand :: Ugen -> Ugen -> Ugen -- | Feedback sine with chaotic phase indexing -- -- FBSineC [AudioRate] freq=22050 im=1 fb=0.1 a=1.1 c=0.5 xi=0.1 yi=0.1 fbSineC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Feedback sine with chaotic phase indexing -- -- FBSineL [AudioRate] freq=22050 im=1 fb=0.1 a=1.1 c=0.5 xi=0.1 yi=0.1 fbSineL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Feedback sine with chaotic phase indexing -- -- FBSineN [AudioRate] freq=22050 im=1 fb=0.1 a=1.1 c=0.5 xi=0.1 yi=0.1 fbSineN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Fast Fourier Transform -- -- FFT [ControlRate] buffer=0 in=0 hop=0.5 wintype=0 active=1 winsize=0 fft :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | First order filter section. -- -- FOS [ControlRate,AudioRate] in=0 a0=0 a1=0 b1=0; FILTER: TRUE fos :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Fast sine oscillator. -- -- FSinOsc [ControlRate,AudioRate] freq=440 iphase=0 fSinOsc :: Rate -> Ugen -> Ugen -> Ugen -- | Fold a signal outside given thresholds. -- -- Fold [InitialisationRate,ControlRate,AudioRate] in=0 lo=0 hi=1; -- FILTER: TRUE fold :: Ugen -> Ugen -> Ugen -> Ugen -- | Formant oscillator -- -- Formant [AudioRate] fundfreq=440 formfreq=1760 bwfreq=880 formant :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | FOF-like filter. -- -- Formlet [ControlRate,AudioRate] in=0 freq=440 attacktime=1 -- decaytime=1; FILTER: TRUE formlet :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | When triggered, frees a node. -- -- Free [ControlRate] trig=0 id=0; FILTER: TRUE free :: Ugen -> Ugen -> Ugen -- | When triggered, free enclosing synth. -- -- FreeSelf [ControlRate] in=0 freeSelf :: Ugen -> Ugen -- | Free the enclosing synth when a Ugen is finished -- -- FreeSelfWhenDone [ControlRate] src=0 freeSelfWhenDone :: Ugen -> Ugen -- | A reverb -- -- FreeVerb [AudioRate] in=0 mix=0.33 room=0.5 damp=0.5; FILTER: TRUE freeVerb :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | A two-channel reverb -- -- FreeVerb2 [AudioRate] in=0 in2=0 mix=0.33 room=0.5 damp=0.5; FILTER: -- TRUE freeVerb2 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Frequency Shifter. -- -- FreqShift [AudioRate] in=0 freq=0 phase=0 freqShift :: Ugen -> Ugen -> Ugen -> Ugen -- | A two-channel reverb -- -- GVerb [AudioRate] in=0 roomsize=10 revtime=3 damping=0.5 inputbw=0.5 -- spread=15 drylevel=1 earlyreflevel=0.7 taillevel=0.5 maxroomsize=300; -- FILTER: TRUE gVerb :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Gate or hold. -- -- Gate [ControlRate,AudioRate] in=0 trig=0; FILTER: TRUE gate :: Ugen -> Ugen -> Ugen -- | Gingerbreadman map chaotic generator -- -- GbmanL [AudioRate] freq=22050 xi=1.2 yi=2.1 gbmanL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Gingerbreadman map chaotic generator -- -- GbmanN [AudioRate] freq=22050 xi=1.2 yi=2.1 gbmanN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Dynamic stochastic synthesis generator. -- -- Gendy1 [ControlRate,AudioRate] ampdist=1 durdist=1 adparam=1 ddparam=1 -- minfreq=440 maxfreq=660 ampscale=0.5 durscale=0.5 initCPs=12 knum=0; -- NONDET gendy1Id :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Gendy1. gendy1M :: Uid m => Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Gendy1. gendy1 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Dynamic stochastic synthesis generator. -- -- Gendy2 [ControlRate,AudioRate] ampdist=1 durdist=1 adparam=1 ddparam=1 -- minfreq=440 maxfreq=660 ampscale=0.5 durscale=0.5 initCPs=12 knum=0 -- a=1.17 c=0.31; NONDET gendy2Id :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Dynamic stochastic synthesis generator. -- -- Gendy3 [ControlRate,AudioRate] ampdist=1 durdist=1 adparam=1 ddparam=1 -- freq=440 ampscale=0.5 durscale=0.5 initCPs=12 knum=0; NONDET gendy3Id :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Gendy3. gendy3M :: Uid m => Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Gendy3. gendy3 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sound stored in a buffer -- -- GrainBuf [AudioRate] trigger=0 dur=1 sndbuf=0 rate=1 pos=0 interp=2 -- pan=0 envbufnum=-1 maxGrains=512; NC INPUT: True grainBuf :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with frequency modulated sine tones -- -- GrainFM [AudioRate] trigger=0 dur=1 carfreq=440 modfreq=200 index=1 -- pan=0 envbufnum=-1 maxGrains=512; NC INPUT: True grainFM :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granulate an input signal -- -- GrainIn [AudioRate] trigger=0 dur=1 in=0 pan=0 envbufnum=-1 -- maxGrains=512; NC INPUT: True grainIn :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Granular synthesis with sine tones -- -- GrainSin [AudioRate] trigger=0 dur=1 freq=440 pan=0 envbufnum=-1 -- maxGrains=512; NC INPUT: True grainSin :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Gray Noise. -- -- GrayNoise [ControlRate,AudioRate] ; NONDET grayNoiseId :: ID a => a -> Rate -> Ugen -- | Monad variant of GrayNoise. grayNoiseM :: Uid m => Rate -> m Ugen -- | Unsafe variant of GrayNoise. grayNoise :: Rate -> Ugen -- | 2nd order Butterworth highpass filter. -- -- HPF [ControlRate,AudioRate] in=0 freq=440; FILTER: TRUE hpf :: Ugen -> Ugen -> Ugen -- | Two point difference filter -- -- HPZ1 [ControlRate,AudioRate] in=0; FILTER: TRUE hpz1 :: Ugen -> Ugen -- | Two zero fixed midcut. -- -- HPZ2 [ControlRate,AudioRate] in=0; FILTER: TRUE hpz2 :: Ugen -> Ugen -- | Scrambled value with a hash function. -- -- Hasher [ControlRate,AudioRate] in=0; FILTER: TRUE hasher :: Ugen -> Ugen -- | Henon map chaotic generator -- -- HenonC [AudioRate] freq=22050 a=1.4 b=0.3 x0=0 x1=0 henonC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Henon map chaotic generator -- -- HenonL [AudioRate] freq=22050 a=1.4 b=0.3 x0=0 x1=0 henonL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Henon map chaotic generator -- -- HenonN [AudioRate] freq=22050 a=1.4 b=0.3 x0=0 x1=0 henonN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Applies the Hilbert transform to an input signal. -- -- Hilbert [AudioRate] in=0; FILTER: TRUE hilbert :: Ugen -> Ugen -- | Envelope generator for polling values from an Env -- -- IEnvGen [ControlRate,AudioRate] index=0 *envelope=0; MCE=1, REORDERS -- INPUTS: [1,0], ENUMERATION INPUTS: 1=IEnvelope iEnvGen :: Rate -> Ugen -> Envelope Ugen -> Ugen -- | Inverse Fast Fourier Transform -- -- IFFT [ControlRate,AudioRate] buffer=0 wintype=0 winsize=0 ifft :: Ugen -> Ugen -> Ugen -> Ugen -- | Single integer random number generator. -- -- iRand [InitialisationRate] lo=0 hi=127; NONDET iRandId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of irand. iRandM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of irand. iRand :: Ugen -> Ugen -> Ugen -- | Impulse oscillator. -- -- Impulse [ControlRate,AudioRate] freq=440 phase=0 impulse :: Rate -> Ugen -> Ugen -> Ugen -- | Read a signal from a bus. -- -- In [ControlRate,AudioRate] bus=0; NC INPUT: True in' :: Int -> Rate -> Ugen -> Ugen -- | Read signal from a bus with a current or one cycle old timestamp. -- -- InFeedback [AudioRate] bus=0; NC INPUT: True inFeedback :: Int -> Ugen -> Ugen -- | Tests if a signal is within a given range. -- -- InRange [InitialisationRate,ControlRate,AudioRate] in=0 lo=0 hi=1; -- FILTER: TRUE inRange :: Ugen -> Ugen -> Ugen -> Ugen -- | Test if a point is within a given rectangle. -- -- InRect [ControlRate,AudioRate] x=0 y=0 rect=0 inRect :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Generate a trigger anytime a bus is set. -- -- InTrig [ControlRate] bus=0; NC INPUT: True inTrig :: Int -> Ugen -> Ugen -- | Index into a table with a signal -- -- Index [ControlRate,AudioRate] bufnum=0 in=0; FILTER: TRUE index :: Ugen -> Ugen -> Ugen -- | Finds the (lowest) point in the Buffer at which the input signal lies -- in-between the two values -- -- IndexInBetween [ControlRate,AudioRate] bufnum=0 in=0; FILTER: TRUE indexInBetween :: Ugen -> Ugen -> Ugen -- | Index into a table with a signal, linear interpolated -- -- IndexL [ControlRate,AudioRate] bufnum=0 in=0; FILTER: TRUE indexL :: Ugen -> Ugen -> Ugen -- | Base class for info ugens -- -- InfoUgenBase [InitialisationRate] infoUgenBase :: Rate -> Ugen -- | A leaky integrator. -- -- Integrator [ControlRate,AudioRate] in=0 coef=1; FILTER: TRUE integrator :: Ugen -> Ugen -> Ugen -- | Control to audio rate converter. -- -- K2A [AudioRate] in=0 k2a :: Ugen -> Ugen -- | Respond to the state of a key -- -- KeyState [ControlRate] keycode=0 minval=0 maxval=1 lag=0.2 keyState :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Key tracker -- -- KeyTrack [ControlRate] chain=0 keydecay=2 chromaleak=0.5 keyTrack :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Sine oscillator bank -- -- Klang [AudioRate] freqscale=1 freqoffset=0 *specificationsArrayRef=0; -- MCE=1, REORDERS INPUTS: [2,0,1] klang :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Bank of resonators -- -- Klank [AudioRate] input=0 freqscale=1 freqoffset=0 decayscale=1 -- *specificationsArrayRef=0; MCE=1, FILTER: TRUE, REORDERS INPUTS: -- [4,0,1,2,3] klank :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Clipped noise -- -- LFClipNoise [ControlRate,AudioRate] freq=500; NONDET lfClipNoiseId :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFClipNoise. lfClipNoiseM :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFClipNoise. lfClipNoise :: Rate -> Ugen -> Ugen -- | A sine like shape made of two cubic pieces -- -- LFCub [ControlRate,AudioRate] freq=440 iphase=0 lfCub :: Rate -> Ugen -> Ugen -> Ugen -- | Dynamic clipped noise -- -- LFDClipNoise [ControlRate,AudioRate] freq=500; NONDET lfdClipNoiseId :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFDClipNoise. lfdClipNoiseM :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFDClipNoise. lfdClipNoise :: Rate -> Ugen -> Ugen -- | Dynamic step noise -- -- LFDNoise0 [ControlRate,AudioRate] freq=500; NONDET lfdNoise0Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFDNoise0. lfdNoise0M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFDNoise0. lfdNoise0 :: Rate -> Ugen -> Ugen -- | Dynamic ramp noise -- -- LFDNoise1 [ControlRate,AudioRate] freq=500; NONDET lfdNoise1Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFDNoise1. lfdNoise1M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFDNoise1. lfdNoise1 :: Rate -> Ugen -> Ugen -- | Dynamic cubic noise -- -- LFDNoise3 [ControlRate,AudioRate] freq=500; NONDET lfdNoise3Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFDNoise3. lfdNoise3M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFDNoise3. lfdNoise3 :: Rate -> Ugen -> Ugen -- | Gaussian function oscillator -- -- LFGauss [ControlRate,AudioRate] duration=1 width=0.1 iphase=0 loop=1 -- doneAction=0; ENUMERATION INPUTS: 3=Loop, 4=DoneAction lfGauss :: Rate -> Ugen -> Ugen -> Ugen -> Loop Ugen -> DoneAction Ugen -> Ugen -- | Step noise -- -- LFNoise0 [ControlRate,AudioRate] freq=500; NONDET lfNoise0Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFNoise0. lfNoise0M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFNoise0. lfNoise0 :: Rate -> Ugen -> Ugen -- | Ramp noise -- -- LFNoise1 [ControlRate,AudioRate] freq=500; NONDET lfNoise1Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFNoise1. lfNoise1M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFNoise1. lfNoise1 :: Rate -> Ugen -> Ugen -- | Quadratic noise. -- -- LFNoise2 [ControlRate,AudioRate] freq=500; NONDET lfNoise2Id :: ID a => a -> Rate -> Ugen -> Ugen -- | Monad variant of LFNoise2. lfNoise2M :: Uid m => Rate -> Ugen -> m Ugen -- | Unsafe variant of LFNoise2. lfNoise2 :: Rate -> Ugen -> Ugen -- | Parabolic oscillator -- -- LFPar [ControlRate,AudioRate] freq=440 iphase=0 lfPar :: Rate -> Ugen -> Ugen -> Ugen -- | pulse oscillator -- -- LFPulse [ControlRate,AudioRate] freq=440 iphase=0 width=0.5 lfPulse :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Sawtooth oscillator -- -- LFSaw [ControlRate,AudioRate] freq=440 iphase=0 lfSaw :: Rate -> Ugen -> Ugen -> Ugen -- | Triangle oscillator -- -- LFTri [ControlRate,AudioRate] freq=440 iphase=0 lfTri :: Rate -> Ugen -> Ugen -> Ugen -- | 2nd order Butterworth lowpass filter -- -- LPF [ControlRate,AudioRate] in=0 freq=440; FILTER: TRUE lpf :: Ugen -> Ugen -> Ugen -- | Two point average filter -- -- LPZ1 [ControlRate,AudioRate] in=0; FILTER: TRUE lpz1 :: Ugen -> Ugen -- | Two zero fixed lowpass -- -- LPZ2 [ControlRate,AudioRate] in=0; FILTER: TRUE lpz2 :: Ugen -> Ugen -- | Exponential lag -- -- Lag [ControlRate,AudioRate] in=0 lagTime=0.1; FILTER: TRUE lag :: Ugen -> Ugen -> Ugen -- | Exponential lag -- -- Lag2 [ControlRate,AudioRate] in=0 lagTime=0.1; FILTER: TRUE lag2 :: Ugen -> Ugen -> Ugen -- | Exponential lag -- -- Lag2UD [ControlRate,AudioRate] in=0 lagTimeU=0.1 lagTimeD=0.1; FILTER: -- TRUE lag2UD :: Ugen -> Ugen -> Ugen -> Ugen -- | Exponential lag -- -- Lag3 [ControlRate,AudioRate] in=0 lagTime=0.1; FILTER: TRUE lag3 :: Ugen -> Ugen -> Ugen -- | Exponential lag -- -- Lag3UD [ControlRate,AudioRate] in=0 lagTimeU=0.1 lagTimeD=0.1; FILTER: -- TRUE lag3UD :: Ugen -> Ugen -> Ugen -> Ugen -- | Read a control signal from a bus with a lag -- -- LagIn [ControlRate] bus=0 lag=0.1; NC INPUT: True lagIn :: Int -> Ugen -> Ugen -> Ugen -- | Exponential lag -- -- LagUD [ControlRate,AudioRate] in=0 lagTimeU=0.1 lagTimeD=0.1; FILTER: -- TRUE lagUD :: Ugen -> Ugen -> Ugen -> Ugen -- | Output the last value before the input changed -- -- LastValue [ControlRate,AudioRate] in=0 diff=0.01; FILTER: TRUE lastValue :: Ugen -> Ugen -> Ugen -- | Sample and hold -- -- Latch [ControlRate,AudioRate] in=0 trig=0; FILTER: TRUE latch :: Ugen -> Ugen -> Ugen -- | Latoocarfian chaotic generator -- -- LatoocarfianC [AudioRate] freq=22050 a=1 b=3 c=0.5 d=0.5 xi=0.5 yi=0.5 latoocarfianC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Latoocarfian chaotic generator -- -- LatoocarfianL [AudioRate] freq=22050 a=1 b=3 c=0.5 d=0.5 xi=0.5 yi=0.5 latoocarfianL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Latoocarfian chaotic generator -- -- LatoocarfianN [AudioRate] freq=22050 a=1 b=3 c=0.5 d=0.5 xi=0.5 yi=0.5 latoocarfianN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Remove DC -- -- LeakDC [ControlRate,AudioRate] in=0 coef=0.995; FILTER: TRUE leakDC :: Ugen -> Ugen -> Ugen -- | Output least changed -- -- LeastChange [ControlRate,AudioRate] a=0 b=0 leastChange :: Rate -> Ugen -> Ugen -> Ugen -- | Peak limiter -- -- Limiter [AudioRate] in=0 level=1 dur=0.01; FILTER: TRUE limiter :: Ugen -> Ugen -> Ugen -> Ugen -- | Linear congruential chaotic generator -- -- LinCongC [AudioRate] freq=22050 a=1.1 c=0.13 m=1 xi=0 linCongC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Linear congruential chaotic generator -- -- LinCongL [AudioRate] freq=22050 a=1.1 c=0.13 m=1 xi=0 linCongL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Linear congruential chaotic generator -- -- LinCongN [AudioRate] freq=22050 a=1.1 c=0.13 m=1 xi=0 linCongN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Map a linear range to an exponential range -- -- LinExp [InitialisationRate,ControlRate,AudioRate] in=0 srclo=0 srchi=1 -- dstlo=1 dsthi=2; FILTER: TRUE linExp :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Two channel linear pan. -- -- LinPan2 [ControlRate,AudioRate] in=0 pos=0 level=1; FILTER: TRUE linPan2 :: Ugen -> Ugen -> Ugen -> Ugen -- | Skewed random number generator. -- -- LinRand [InitialisationRate] lo=0 hi=1 minmax=0; NONDET linRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of LinRand. linRandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of LinRand. linRand :: Ugen -> Ugen -> Ugen -> Ugen -- | Two channel linear crossfade. -- -- LinXFade2 [ControlRate,AudioRate] inA=0 inB=0 pan=0 level=1; FILTER: -- TRUE, PSUEDO INPUTS: [3] linXFade2 :: Ugen -> Ugen -> Ugen -> Ugen -- | Line generator. -- -- Line [ControlRate,AudioRate] start=0 end=1 dur=1 doneAction=0; -- ENUMERATION INPUTS: 3=DoneAction line :: Rate -> Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -- | Simple linear envelope generator. -- -- Linen [ControlRate] gate=1 attackTime=0.01 susLevel=1 releaseTime=1 -- doneAction=0; ENUMERATION INPUTS: 4=DoneAction linen :: Ugen -> Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -- | Allocate a buffer local to the synth -- -- LocalBuf [InitialisationRate] numChannels=1 numFrames=1; REORDERS -- INPUTS: [1,0], NONDET localBufId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of LocalBuf. localBufM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of LocalBuf. localBuf :: Ugen -> Ugen -> Ugen -- | Define and read from buses local to a synth. -- -- LocalIn [ControlRate,AudioRate] *default=0; MCE=1, NC INPUT: True localIn :: Int -> Rate -> Ugen -> Ugen -- | Write to buses local to a synth. -- -- LocalOut [ControlRate,AudioRate] *channelsArray=0; MCE=1, FILTER: TRUE localOut :: Ugen -> Ugen -- | Chaotic noise function -- -- Logistic [ControlRate,AudioRate] chaosParam=3 freq=1000 init=0.5 logistic :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Lorenz chaotic generator -- -- LorenzL [AudioRate] freq=22050 s=10 r=28 b=2.667 h=0.05 xi=0.1 yi=0 -- zi=0 lorenzL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Extraction of instantaneous loudness in sones -- -- Loudness [ControlRate] chain=0 smask=0.25 tmask=1 loudness :: Ugen -> Ugen -> Ugen -> Ugen -- | Mel frequency cepstral coefficients -- -- MFCC [ControlRate] chain=0 numcoeff=13 mfcc :: Rate -> Ugen -> Ugen -> Ugen -- | Reduce precision. -- -- MantissaMask [ControlRate,AudioRate] in=0 bits=3; FILTER: TRUE mantissaMask :: Ugen -> Ugen -> Ugen -- | Median filter. -- -- Median [ControlRate,AudioRate] length=3 in=0; FILTER: TRUE median :: Ugen -> Ugen -> Ugen -- | Parametric filter. -- -- MidEQ [ControlRate,AudioRate] in=0 freq=440 rq=1 db=0; FILTER: TRUE midEQ :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Minimum difference of two values in modulo arithmetics -- -- ModDif [InitialisationRate,ControlRate,AudioRate] x=0 y=0 mod=1; -- FILTER: TRUE modDif :: Ugen -> Ugen -> Ugen -> Ugen -- | Moog VCF implementation, designed by Federico Fontana -- -- MoogFF [ControlRate,AudioRate] in=0 freq=100 gain=2 reset=0; FILTER: -- TRUE moogFF :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Output most changed. -- -- MostChange [ControlRate,AudioRate] a=0 b=0; FILTER: TRUE mostChange :: Ugen -> Ugen -> Ugen -- | Mouse button Ugen. -- -- MouseButton [ControlRate] minval=0 maxval=1 lag=0.2 mouseButton :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Cursor tracking Ugen. -- -- MouseX [ControlRate] minval=0 maxval=1 warp=0 lag=0.2; ENUMERATION -- INPUTS: 2=Warp mouseX :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen -- | Cursor tracking Ugen. -- -- MouseY [ControlRate] minval=0 maxval=1 warp=0 lag=0.2; ENUMERATION -- INPUTS: 2=Warp mouseY :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen -- | Sum of uniform distributions. -- -- NRand [InitialisationRate] lo=0 hi=1 n=0; NONDET nRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of NRand. nRandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of NRand. nRand :: Ugen -> Ugen -> Ugen -> Ugen -- | (Undocumented class) -- -- NodeID [InitialisationRate] nodeID :: Rate -> Ugen -- | Flattens dynamics. -- -- Normalizer [AudioRate] in=0 level=1 dur=0.01; FILTER: TRUE normalizer :: Ugen -> Ugen -> Ugen -> Ugen -- | Number of audio busses. -- -- NumAudioBuses [InitialisationRate] numAudioBuses :: Ugen -- | Number of open buffers. -- -- NumBuffers [InitialisationRate] numBuffers :: Ugen -- | Number of control busses. -- -- NumControlBuses [InitialisationRate] numControlBuses :: Ugen -- | Number of input busses. -- -- NumInputBuses [InitialisationRate] numInputBuses :: Ugen -- | Number of output busses. -- -- NumOutputBuses [InitialisationRate] numOutputBuses :: Ugen -- | Number of currently running synths. -- -- NumRunningSynths [InitialisationRate,ControlRate] numRunningSynths :: Ugen -- | Write a signal to a bus with sample accurate timing. -- -- OffsetOut [ControlRate,AudioRate] bus=0 *channelsArray=0; MCE=1, -- FILTER: TRUE offsetOut :: Ugen -> Ugen -> Ugen -- | One pole filter. -- -- OnePole [ControlRate,AudioRate] in=0 coef=0.5; FILTER: TRUE onePole :: Ugen -> Ugen -> Ugen -- | One zero filter. -- -- OneZero [ControlRate,AudioRate] in=0 coef=0.5; FILTER: TRUE oneZero :: Ugen -> Ugen -> Ugen -- | Onset detector -- -- Onsets [ControlRate] chain=0 threshold=0.5 odftype=3 relaxtime=1 -- floor=0.1 mingap=10 medianspan=11 whtype=1 rawodf=0 onsets :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Interpolating wavetable oscillator. -- -- Osc [ControlRate,AudioRate] bufnum=0 freq=440 phase=0 osc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Noninterpolating wavetable oscillator. -- -- OscN [ControlRate,AudioRate] bufnum=0 freq=440 phase=0 oscN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Write a signal to a bus. -- -- Out [ControlRate,AudioRate] bus=0 *channelsArray=0; MCE=1, FILTER: -- TRUE out :: Ugen -> Ugen -> Ugen -- | Very fast sine grain with a parabolic envelope -- -- PSinGrain [AudioRate] freq=440 dur=0.2 amp=0.1 pSinGrain :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Complex addition. -- -- PV_Add [ControlRate] bufferA=0 bufferB=0 pv_Add :: Ugen -> Ugen -> Ugen -- | Scramble bins. -- -- PV_BinScramble [ControlRate] buffer=0 wipe=0 width=0.2 trig=0; NONDET pv_BinScrambleId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of PV_BinScramble. pv_BinScrambleM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of PV_BinScramble. pv_BinScramble :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Shift and stretch bin position. -- -- PV_BinShift [ControlRate] buffer=0 stretch=1 shift=0 interp=0 pv_BinShift :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Combine low and high bins from two inputs. -- -- PV_BinWipe [ControlRate] bufferA=0 bufferB=0 wipe=0 pv_BinWipe :: Ugen -> Ugen -> Ugen -> Ugen -- | Zero bins. -- -- PV_BrickWall [ControlRate] buffer=0 wipe=0 pv_BrickWall :: Ugen -> Ugen -> Ugen -- | Complex plane attack. -- -- PV_ConformalMap [ControlRate] buffer=0 areal=0 aimag=0 pv_ConformalMap :: Ugen -> Ugen -> Ugen -> Ugen -- | Complex conjugate -- -- PV_Conj [ControlRate] buffer=0 pv_Conj :: Ugen -> Ugen -- | Copy an FFT buffer -- -- PV_Copy [ControlRate] bufferA=0 bufferB=0 pv_Copy :: Ugen -> Ugen -> Ugen -- | Copy magnitudes and phases. -- -- PV_CopyPhase [ControlRate] bufferA=0 bufferB=0 pv_CopyPhase :: Ugen -> Ugen -> Ugen -- | Random phase shifting. -- -- PV_Diffuser [ControlRate] buffer=0 trig=0 pv_Diffuser :: Ugen -> Ugen -> Ugen -- | Complex division -- -- PV_Div [ControlRate] bufferA=0 bufferB=0 pv_Div :: Ugen -> Ugen -> Ugen -- | Pass bins which are a local maximum. -- -- PV_LocalMax [ControlRate] buffer=0 threshold=0 pv_LocalMax :: Ugen -> Ugen -> Ugen -- | Pass bins above a threshold. -- -- PV_MagAbove [ControlRate] buffer=0 threshold=0 pv_MagAbove :: Ugen -> Ugen -> Ugen -- | Pass bins below a threshold. -- -- PV_MagBelow [ControlRate] buffer=0 threshold=0 pv_MagBelow :: Ugen -> Ugen -> Ugen -- | Clip bins to a threshold. -- -- PV_MagClip [ControlRate] buffer=0 threshold=0 pv_MagClip :: Ugen -> Ugen -> Ugen -- | Division of magnitudes -- -- PV_MagDiv [ControlRate] bufferA=0 bufferB=0 zeroed=0.0001 pv_MagDiv :: Ugen -> Ugen -> Ugen -> Ugen -- | Freeze magnitudes. -- -- PV_MagFreeze [ControlRate] buffer=0 freeze=0 pv_MagFreeze :: Ugen -> Ugen -> Ugen -- | Multiply magnitudes. -- -- PV_MagMul [ControlRate] bufferA=0 bufferB=0 pv_MagMul :: Ugen -> Ugen -> Ugen -- | Multiply magnitudes by noise. -- -- PV_MagNoise [ControlRate] buffer=0 pv_MagNoise :: Ugen -> Ugen -- | shift and stretch magnitude bin position. -- -- PV_MagShift [ControlRate] buffer=0 stretch=1 shift=0 pv_MagShift :: Ugen -> Ugen -> Ugen -> Ugen -- | Average magnitudes across bins. -- -- PV_MagSmear [ControlRate] buffer=0 bins=0 pv_MagSmear :: Ugen -> Ugen -> Ugen -- | Square magnitudes. -- -- PV_MagSquared [ControlRate] buffer=0 pv_MagSquared :: Ugen -> Ugen -- | Maximum magnitude. -- -- PV_Max [ControlRate] bufferA=0 bufferB=0 pv_Max :: Ugen -> Ugen -> Ugen -- | Minimum magnitude. -- -- PV_Min [ControlRate] bufferA=0 bufferB=0 pv_Min :: Ugen -> Ugen -> Ugen -- | Complex multiply. -- -- PV_Mul [ControlRate] bufferA=0 bufferB=0 pv_Mul :: Ugen -> Ugen -> Ugen -- | Shift phase. -- -- PV_PhaseShift [ControlRate] buffer=0 shift=0 integrate=0 pv_PhaseShift :: Ugen -> Ugen -> Ugen -> Ugen -- | Shift phase by 270 degrees. -- -- PV_PhaseShift270 [ControlRate] buffer=0 pv_PhaseShift270 :: Ugen -> Ugen -- | Shift phase by 90 degrees. -- -- PV_PhaseShift90 [ControlRate] buffer=0 pv_PhaseShift90 :: Ugen -> Ugen -- | Pass random bins. -- -- PV_RandComb [ControlRate] buffer=0 wipe=0 trig=0; NONDET pv_RandCombId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of PV_RandComb. pv_RandCombM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of PV_RandComb. pv_RandComb :: Ugen -> Ugen -> Ugen -> Ugen -- | Crossfade in random bin order. -- -- PV_RandWipe [ControlRate] bufferA=0 bufferB=0 wipe=0 trig=0; NONDET pv_RandWipeId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of PV_RandWipe. pv_RandWipeM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of PV_RandWipe. pv_RandWipe :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Make gaps in spectrum. -- -- PV_RectComb [ControlRate] buffer=0 numTeeth=0 phase=0 width=0.5 pv_RectComb :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Make gaps in spectrum. -- -- PV_RectComb2 [ControlRate] bufferA=0 bufferB=0 numTeeth=0 phase=0 -- width=0.5 pv_RectComb2 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Two channel equal power pan. -- -- Pan2 [ControlRate,AudioRate] in=0 pos=0 level=1; FILTER: TRUE pan2 :: Ugen -> Ugen -> Ugen -> Ugen -- | Four channel equal power pan. -- -- Pan4 [ControlRate,AudioRate] in=0 xpos=0 ypos=0 level=1 pan4 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Azimuth panner -- -- PanAz [ControlRate,AudioRate] in=0 pos=0 level=1 width=2 -- orientation=0.5; NC INPUT: True, FILTER: TRUE panAz :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Ambisonic B-format panner. -- -- PanB [ControlRate,AudioRate] in=0 azimuth=0 elevation=0 gain=1 panB :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | 2D Ambisonic B-format panner. -- -- PanB2 [ControlRate,AudioRate] in=0 azimuth=0 gain=1; FILTER: TRUE panB2 :: Ugen -> Ugen -> Ugen -> Ugen -- | Real-time partitioned convolution -- -- PartConv [AudioRate] in=0 fftsize=0 irbufnum=0 partConv :: Ugen -> Ugen -> Ugen -> Ugen -- | When triggered, pauses a node. -- -- Pause [ControlRate] gate=0 id=0 pause :: Ugen -> Ugen -> Ugen -- | When triggered, pause enclosing synth. -- -- PauseSelf [ControlRate] in=0 pauseSelf :: Ugen -> Ugen -- | FIXME: PauseSelfWhenDone purpose. -- -- PauseSelfWhenDone [ControlRate] src=0 pauseSelfWhenDone :: Ugen -> Ugen -- | Track peak signal amplitude. -- -- Peak [ControlRate,AudioRate] in=0 trig=0; FILTER: TRUE peak :: Ugen -> Ugen -> Ugen -- | Track peak signal amplitude. -- -- PeakFollower [ControlRate,AudioRate] in=0 decay=0.999; FILTER: TRUE peakFollower :: Ugen -> Ugen -> Ugen -- | A resettable linear ramp between two levels. -- -- Phasor [ControlRate,AudioRate] trig=0 rate=1 start=0 end=1 resetPos=0 phasor :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Pink Noise. -- -- PinkNoise [ControlRate,AudioRate] ; NONDET pinkNoiseId :: ID a => a -> Rate -> Ugen -- | Monad variant of PinkNoise. pinkNoiseM :: Uid m => Rate -> m Ugen -- | Unsafe variant of PinkNoise. pinkNoise :: Rate -> Ugen -- | Autocorrelation pitch follower -- -- Pitch [ControlRate] in=0 initFreq=440 minFreq=60 maxFreq=4000 -- execFreq=100 maxBinsPerOctave=16 median=1 ampThreshold=0.01 -- peakThreshold=0.5 downSample=1 clar=0 pitch :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Time domain pitch shifter. -- -- PitchShift [AudioRate] in=0 windowSize=0.2 pitchRatio=1 -- pitchDispersion=0 timeDispersion=0; FILTER: TRUE pitchShift :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Sample playback oscillator. -- -- PlayBuf [ControlRate,AudioRate] bufnum=0 rate=1 trigger=1 startPos=0 -- loop=0 doneAction=0; NC INPUT: True, ENUMERATION INPUTS: 4=Loop, -- 5=DoneAction playBuf :: Int -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Loop Ugen -> DoneAction Ugen -> Ugen -- | A Karplus-Strong Ugen -- -- Pluck [AudioRate] in=0 trig=1 maxdelaytime=0.2 delaytime=0.2 -- decaytime=1 coef=0.5; FILTER: TRUE pluck :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Band limited pulse wave. -- -- Pulse [ControlRate,AudioRate] freq=440 width=0.5 pulse :: Rate -> Ugen -> Ugen -> Ugen -- | Pulse counter. -- -- PulseCount [ControlRate,AudioRate] trig=0 reset=0; FILTER: TRUE pulseCount :: Ugen -> Ugen -> Ugen -- | Pulse divider. -- -- PulseDivider [ControlRate,AudioRate] trig=0 div=2 start=0; FILTER: -- TRUE pulseDivider :: Ugen -> Ugen -> Ugen -> Ugen -- | General quadratic map chaotic generator -- -- QuadC [AudioRate] freq=22050 a=1 b=-1 c=-0.75 xi=0 quadC :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | General quadratic map chaotic generator -- -- QuadL [AudioRate] freq=22050 a=1 b=-1 c=-0.75 xi=0 quadL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | General quadratic map chaotic generator -- -- QuadN [AudioRate] freq=22050 a=1 b=-1 c=-0.75 xi=0 quadN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | A resonant high pass filter. -- -- RHPF [ControlRate,AudioRate] in=0 freq=440 rq=1; FILTER: TRUE rhpf :: Ugen -> Ugen -> Ugen -> Ugen -- | A resonant low pass filter. -- -- RLPF [ControlRate,AudioRate] in=0 freq=440 rq=1; FILTER: TRUE rlpf :: Ugen -> Ugen -> Ugen -> Ugen -- | Number of radians per sample. -- -- RadiansPerSample [InitialisationRate] radiansPerSample :: Ugen -- | Break a continuous signal into line segments -- -- Ramp [ControlRate,AudioRate] in=0 lagTime=0.1; FILTER: TRUE ramp :: Ugen -> Ugen -> Ugen -- | Single random number generator. -- -- Rand [InitialisationRate] lo=0 hi=1; NONDET randId :: ID a => a -> Ugen -> Ugen -> Ugen -- | Monad variant of Rand. randM :: Uid m => Ugen -> Ugen -> m Ugen -- | Unsafe variant of Rand. rand :: Ugen -> Ugen -> Ugen -- | Set the synth's random generator ID. -- -- RandID [InitialisationRate,ControlRate] id=0 randID :: Rate -> Ugen -> Ugen -- | Sets the synth's random generator seed. -- -- RandSeed [InitialisationRate,ControlRate,AudioRate] trig=0 seed=56789 randSeed :: Rate -> Ugen -> Ugen -> Ugen -- | Record or overdub into a Buffer. -- -- RecordBuf [ControlRate,AudioRate] bufnum=0 offset=0 recLevel=1 -- preLevel=0 run=1 loop=1 trigger=1 doneAction=0 *inputArray=0; MCE=1, -- REORDERS INPUTS: [8,0,1,2,3,4,5,6,7], ENUMERATION INPUTS: 5=Loop, -- 7=DoneAction recordBuf :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Loop Ugen -> Ugen -> DoneAction Ugen -> Ugen -> Ugen -- | Send signal to a bus, overwriting previous contents. -- -- ReplaceOut [ControlRate,AudioRate] bus=0 *channelsArray=0; MCE=1, -- FILTER: TRUE replaceOut :: Ugen -> Ugen -> Ugen -- | Resonant filter. -- -- Resonz [ControlRate,AudioRate] in=0 freq=440 bwr=1; FILTER: TRUE resonz :: Ugen -> Ugen -> Ugen -> Ugen -- | Ringing filter. -- -- Ringz [ControlRate,AudioRate] in=0 freq=440 decaytime=1; FILTER: TRUE ringz :: Ugen -> Ugen -> Ugen -> Ugen -- | Rotate a sound field. -- -- Rotate2 [ControlRate,AudioRate] x=0 y=0 pos=0; FILTER: TRUE rotate2 :: Ugen -> Ugen -> Ugen -> Ugen -- | Track maximum level. -- -- RunningMax [ControlRate,AudioRate] in=0 trig=0; FILTER: TRUE runningMax :: Ugen -> Ugen -> Ugen -- | Track minimum level. -- -- RunningMin [ControlRate,AudioRate] in=0 trig=0; FILTER: TRUE runningMin :: Ugen -> Ugen -> Ugen -- | Running sum over n frames -- -- RunningSum [ControlRate,AudioRate] in=0 numsamp=40; FILTER: TRUE runningSum :: Ugen -> Ugen -> Ugen -- | Second order filter section (biquad). -- -- SOS [ControlRate,AudioRate] in=0 a0=0 a1=0 a2=0 b1=0 b2=0; FILTER: -- TRUE sos :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Duration of one sample. -- -- SampleDur [InitialisationRate] sampleDur :: Ugen -- | Server sample rate. -- -- SampleRate [InitialisationRate] sampleRate :: Ugen -- | Remove infinity, NaN, and denormals -- -- Sanitize [ControlRate,AudioRate] in=0 replace=0; FILTER: TRUE sanitize :: Ugen -> Ugen -> Ugen -- | Band limited sawtooth. -- -- Saw [ControlRate,AudioRate] freq=440 saw :: Rate -> Ugen -> Ugen -- | Schmidt trigger. -- -- Schmidt [InitialisationRate,ControlRate,AudioRate] in=0 lo=0 hi=1; -- FILTER: TRUE schmidt :: Ugen -> Ugen -> Ugen -> Ugen -- | Select output from an array of inputs. -- -- Select [InitialisationRate,ControlRate,AudioRate] which=0 *array=0; -- MCE=1, FILTER: TRUE select :: Ugen -> Ugen -> Ugen -- | Send a trigger message from the server back to the client. -- -- SendTrig [ControlRate,AudioRate] in=0 id=0 value=0; FILTER: TRUE sendTrig :: Ugen -> Ugen -> Ugen -> Ugen -- | Set-reset flip flop. -- -- SetResetFF [ControlRate,AudioRate] trig=0 reset=0; FILTER: TRUE setResetFF :: Ugen -> Ugen -> Ugen -- | Wave shaper. -- -- Shaper [ControlRate,AudioRate] bufnum=0 in=0; FILTER: TRUE shaper :: Ugen -> Ugen -> Ugen -- | Interpolating sine wavetable oscillator. -- -- SinOsc [ControlRate,AudioRate] freq=440 phase=0 sinOsc :: Rate -> Ugen -> Ugen -> Ugen -- | Feedback FM oscillator -- -- SinOscFB [ControlRate,AudioRate] freq=440 feedback=0 sinOscFB :: Rate -> Ugen -> Ugen -> Ugen -- | Slew rate limiter. -- -- Slew [ControlRate,AudioRate] in=0 up=1 dn=1; FILTER: TRUE slew :: Ugen -> Ugen -> Ugen -> Ugen -- | Slope of signal -- -- Slope [ControlRate,AudioRate] in=0; FILTER: TRUE slope :: Ugen -> Ugen -- | Spectral centroid -- -- SpecCentroid [ControlRate] buffer=0 specCentroid :: Rate -> Ugen -> Ugen -- | Spectral Flatness measure -- -- SpecFlatness [ControlRate] buffer=0 specFlatness :: Rate -> Ugen -> Ugen -- | Find a percentile of FFT magnitude spectrum -- -- SpecPcile [ControlRate] buffer=0 fraction=0.5 interpolate=0 specPcile :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | physical model of resonating spring -- -- Spring [ControlRate,AudioRate] in=0 spring=1 damp=0 spring :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Standard map chaotic generator -- -- StandardL [AudioRate] freq=22050 k=1 xi=0.5 yi=0 standardL :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Standard map chaotic generator -- -- StandardN [AudioRate] freq=22050 k=1 xi=0.5 yi=0 standardN :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Pulse counter. -- -- Stepper [ControlRate,AudioRate] trig=0 reset=0 min=0 max=7 step=1 -- resetval=0; FILTER: TRUE stepper :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Stereo real-time convolver with linear interpolation -- -- StereoConvolution2L [AudioRate] in=0 kernelL=0 kernelR=0 trigger=0 -- framesize=2048 crossfade=1 stereoConvolution2L :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Offset from synth start within one sample. -- -- SubsampleOffset [InitialisationRate] subsampleOffset :: Ugen -- | Sum three signals -- -- Sum3 [] in0=0 in1=0 in2=0; FILTER: TRUE sum3 :: Ugen -> Ugen -> Ugen -> Ugen -- | Sum four signals -- -- Sum4 [] in0=0 in1=0 in2=0 in3=0; FILTER: TRUE sum4 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Triggered linear ramp -- -- Sweep [ControlRate,AudioRate] trig=0 rate=1; FILTER: TRUE sweep :: Rate -> Ugen -> Ugen -> Ugen -- | Hard sync sawtooth wave. -- -- SyncSaw [ControlRate,AudioRate] syncFreq=440 sawFreq=440 syncSaw :: Rate -> Ugen -> Ugen -> Ugen -- | Control rate trigger to audio rate trigger converter -- -- T2A [AudioRate] in=0 offset=0 t2a :: Ugen -> Ugen -> Ugen -- | Audio rate trigger to control rate trigger converter -- -- T2K [ControlRate] in=0 t2k :: Ugen -> Ugen -- | physical model of bouncing object -- -- TBall [ControlRate,AudioRate] in=0 g=10 damp=0 friction=0.01 tBall :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Trigger delay. -- -- TDelay [ControlRate,AudioRate] in=0 dur=0.1; FILTER: TRUE tDelay :: Ugen -> Ugen -> Ugen -- | Demand results as trigger from demand rate Ugens. -- -- TDuty [ControlRate,AudioRate] dur=1 reset=0 doneAction=0 level=1 -- gapFirst=0; REORDERS INPUTS: [0,1,3,2,4], ENUMERATION INPUTS: -- 2=DoneAction tDuty :: Rate -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -> Ugen -> Ugen -- | Triggered exponential random number generator. -- -- TExpRand [ControlRate,AudioRate] lo=0.01 hi=1 trig=0; FILTER: TRUE, -- NONDET tExpRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TExpRand. tExpRandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TExpRand. tExpRand :: Ugen -> Ugen -> Ugen -> Ugen -- | Buffer granulator. -- -- TGrains [AudioRate] trigger=0 bufnum=0 rate=1 centerPos=0 dur=0.1 -- pan=0 amp=0.1 interp=4; NC INPUT: True tGrains :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Triggered integer random number generator. -- -- TIRand [ControlRate,AudioRate] lo=0 hi=127 trig=0; FILTER: TRUE, -- NONDET tiRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Tirand. tiRandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Tirand. tiRand :: Ugen -> Ugen -> Ugen -> Ugen -- | Triggered random number generator. -- -- TRand [ControlRate,AudioRate] lo=0 hi=1 trig=0; FILTER: TRUE, NONDET tRandId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TRand. tRandM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TRand. tRand :: Ugen -> Ugen -> Ugen -> Ugen -- | Triggered windex. -- -- TWindex [ControlRate,AudioRate] in=0 normalize=0 *array=0; MCE=1, -- FILTER: TRUE, REORDERS INPUTS: [0,2,1], NONDET tWindexId :: ID a => a -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of TWindex. tWindexM :: Uid m => Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of TWindex. tWindex :: Ugen -> Ugen -> Ugen -> Ugen -- | Returns time since last triggered. -- -- Timer [ControlRate,AudioRate] trig=0; FILTER: TRUE timer :: Ugen -> Ugen -- | Toggle flip flop. -- -- ToggleFF [ControlRate,AudioRate] trig=0; FILTER: TRUE toggleFF :: Ugen -> Ugen -- | Timed trigger. -- -- Trig [ControlRate,AudioRate] in=0 dur=0.1; FILTER: TRUE trig :: Ugen -> Ugen -> Ugen -- | Timed trigger. -- -- Trig1 [ControlRate,AudioRate] in=0 dur=0.1; FILTER: TRUE trig1 :: Ugen -> Ugen -> Ugen -- | Two pole filter. -- -- TwoPole [ControlRate,AudioRate] in=0 freq=440 radius=0.8; FILTER: TRUE twoPole :: Ugen -> Ugen -> Ugen -> Ugen -- | Two zero filter. -- -- TwoZero [ControlRate,AudioRate] in=0 freq=440 radius=0.8; FILTER: TRUE twoZero :: Ugen -> Ugen -> Ugen -> Ugen -- | Stream in audio from a file, with variable rate -- -- VDiskIn [AudioRate] bufnum=0 rate=1 loop=0 sendID=0; NC INPUT: True, -- ENUMERATION INPUTS: 2=Loop vDiskIn :: Int -> Ugen -> Ugen -> Loop Ugen -> Ugen -> Ugen -- | Variable wavetable oscillator. -- -- VOsc [ControlRate,AudioRate] bufpos=0 freq=440 phase=0 vOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Three variable wavetable oscillators. -- -- VOsc3 [ControlRate,AudioRate] bufpos=0 freq1=110 freq2=220 freq3=440 vOsc3 :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Variable shaped lag -- -- VarLag [ControlRate,AudioRate] in=0 time=0.1 curvature=0 warp=5 -- start=0; FILTER: TRUE varLag :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Variable duty saw -- -- VarSaw [ControlRate,AudioRate] freq=440 iphase=0 width=0.5 varSaw :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | The Vibrato oscillator models a slow frequency modulation. -- -- Vibrato [ControlRate,AudioRate] freq=440 rate=6 depth=0.02 delay=0 -- onset=0 rateVariation=0.04 depthVariation=0.1 iphase=0 trig=0; NONDET vibratoId :: ID a => a -> Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Monad variant of Vibrato. vibratoM :: Uid m => Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen -- | Unsafe variant of Vibrato. vibrato :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Warp a buffer with a time pointer -- -- Warp1 [AudioRate] bufnum=0 pointer=0 freqScale=1 windowSize=0.2 -- envbufnum=-1 overlaps=8 windowRandRatio=0 interp=1; NC INPUT: True warp1 :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | White noise. -- -- WhiteNoise [ControlRate,AudioRate] ; NONDET whiteNoiseId :: ID a => a -> Rate -> Ugen -- | Monad variant of WhiteNoise. whiteNoiseM :: Uid m => Rate -> m Ugen -- | Unsafe variant of WhiteNoise. whiteNoise :: Rate -> Ugen -- | Wrap a signal outside given thresholds. -- -- Wrap [InitialisationRate,ControlRate,AudioRate] in=0 lo=0 hi=1; -- FILTER: TRUE wrap :: Ugen -> Ugen -> Ugen -> Ugen -- | Index into a table with a signal. -- -- WrapIndex [ControlRate,AudioRate] bufnum=0 in=0; FILTER: TRUE wrapIndex :: Ugen -> Ugen -> Ugen -- | Equal power two channel cross fade. -- -- XFade2 [ControlRate,AudioRate] inA=0 inB=0 pan=0 level=1; FILTER: TRUE xFade2 :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Exponential line generator. -- -- XLine [ControlRate,AudioRate] start=1 end=2 dur=1 doneAction=0; -- ENUMERATION INPUTS: 3=DoneAction xLine :: Rate -> Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Ugen -- | Send signal to a bus, crossfading with previous contents. -- -- XOut [ControlRate,AudioRate] bus=0 xfade=0 *channelsArray=0; MCE=1, -- FILTER: TRUE xOut :: Ugen -> Ugen -> Ugen -> Ugen -- | Zero crossing frequency follower -- -- ZeroCrossing [ControlRate,AudioRate] in=0; FILTER: TRUE zeroCrossing :: Ugen -> Ugen -- | LocalBuf count -- -- MaxLocalBufs [InitialisationRate,ControlRate] count=0 maxLocalBufs :: Ugen -> Ugen -- | Multiply add -- -- MulAdd [InitialisationRate,ControlRate,AudioRate] in=0 mul=0 add=0; -- FILTER: TRUE mulAdd :: Ugen -> Ugen -> Ugen -> Ugen -- | Set local buffer -- -- SetBuf [InitialisationRate] buf=0 offset=0 length=0 *array=0; MCE=1, -- REORDERS INPUTS: [0,1,2,3] setBuf :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Optimisations of Ugen graphs. module Sound.Sc3.Ugen.Optimise -- | Constant form of rand Ugen. c_rand :: Random a => Int -> a -> a -> a -- | Constant form of iRand Ugen. c_irand :: (Num b, RealFrac a, Random a) => Int -> a -> a -> b -- | Optimise Ugen graph by re-writing rand and -- iRand Ugens that have Constant inputs. This, of -- course, changes the nature of the graph, it is no longer randomised at -- the server. It's a useful transformation for very large graphs which -- are being constructed and sent each time the graph is played. -- --
-- import Sound.Sc3.Ugen.Dot {\- hsc3-dot -\}
--
--
-- -- let u = sinOsc ar (randId 'a' 220 440) 0 * 0.1 -- draw (u + ugen_optimise_ir_rand u) --ugen_optimise_ir_rand :: Ugen -> Ugen -- | Optimise Ugen graph by re-writing binary operators with -- Constant inputs. The standard graph constructors already do -- this, however subsequent optimisations, ie. -- ugen_optimise_ir_rand can re-introduce these sub-graphs, and -- the Plain graph constructors are un-optimised. -- --
-- >>> let u = constant -- -- >>> u 5 * u 10 == u 50 -- True ---- --
-- >>> u 5 ==** u 5 == u 1 -- True ---- --
-- >>> u 5 >** u 4 == u 1 -- True ---- --
-- >>> u 5 <=** u 5 == u 1 -- True ---- --
-- >>> abs (u (-1)) == u 1 -- True ---- --
-- >>> u 5 / u 2 == u 2.5 -- True ---- --
-- >>> min (u 2) (u 3) == u 2 -- True ---- --
-- >>> max (u 1) (u 3) == u 3 -- True ---- --
-- let u = lfPulse ar (2 ** randId 'α' (-9) 1) 0 0.5 -- let u' = ugen_optimise_ir_rand u -- draw (mix (mce [u,u',ugen_optimise_const_operator u'])) ---- --
-- ugen_optimise_const_operator (Bindings.mulAdd 3 1 0) == 3 --ugen_optimise_const_operator :: Ugen -> Ugen -- | u_constant of ugen_optimise_ir_rand. constant_opt :: Ugen -> Maybe Sample -- | Constant optimising MulAdd. -- --
-- mulAddOptimised (sinOsc ar 440 0) 1 0 == sinOsc ar 440 0 -- mulAddOptimised (sinOsc ar 440 0) 0.1 0 == sinOsc ar 440 0 * 0.1 -- mulAddOptimised (sinOsc ar 440 0) 1 1 == sinOsc ar 440 0 + 1 -- mulAddOptimised (sinOsc ar 440 0) 0.1 1 == mulAdd (sinOsc ar 440 0) 0.1 1 --mulAddOptimised :: Ugen -> Ugen -> Ugen -> Ugen -- | Ugen math module Sound.Sc3.Ugen.Math -- | Pseudo-infinite constant Ugen. dinf :: Ugen -- | Ugen form of ceilingE. ceil :: Ugen -> Ugen -- | Midi note number and velocity data is in (0, 127). This maps (0,1) to -- (0,100), i.e. is it (* 100). unitMidi :: Num t => t -> t -- | midiCps of (0,1) scaled to (0,100). To make control signal data -- uniform, all control signals are in (0, 1). unitCps :: UnaryOp t => t -> t -- | Optimised Ugen sum function. sum_opt :: [Ugen] -> Ugen -- | Apply the Ugen processor f k times in sequence to -- i, ie. for k=4 f (f (f (f i))). useqId :: (ID z, Enum z) => z -> Int -> (z -> Ugen -> Ugen) -> Ugen -> Ugen -- | Multiple channel expansion module Sound.Sc3.Ugen.Mce -- | Construct a list of Ugens by applying f to consecutive identifiers -- (from z) and indices (from 0). listFillId :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> Ugen) -> [Ugen] -- | Construct a list of Ugens by applying f at consecutive indices (from -- 0). listFillM :: (Uid m, Integral n) => Int -> (n -> m Ugen) -> m [Ugen] -- | Construct a list of Ugens by applying f at consecutive indices (from -- 0). listFill :: Integral n => Int -> (n -> Ugen) -> [Ugen] -- | mce of replicate mceConst :: Int -> Ugen -> Ugen -- | mce of map f of id_seq n. mceGenId :: ID z => (Id -> Ugen) -> Int -> z -> Ugen -- | Applicative variant of mceGenId. mceGenM :: Applicative f => f Ugen -> Int -> f Ugen -- | Count mce channels. mceSize :: Ugen -> Ugen -- | Mix divided by number of inputs. mceMean :: Ugen -> Ugen -- | Construct an Mce array of Ugens. mceFill :: Integral n => Int -> (n -> Ugen) -> Ugen -- | mce of listFillId mceFillId :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> Ugen) -> Ugen -- | Type specialised mceFill mceFillInt :: Int -> (Int -> Ugen) -> Ugen -- | Collapse possible mce by summing. mix :: Ugen -> Ugen -- | Mix variant, sum to n channels. mixTo :: Int -> Ugen -> Ugen -- | mix of mceFill mixFill :: Integral n => Int -> (n -> Ugen) -> Ugen -- | Type specialised mixFill mixFillInt :: Int -> (Int -> Ugen) -> Ugen -- | Type specialised mixFill mixFillUgen :: Int -> (Ugen -> Ugen) -> Ugen -- | mix of mceFillId mixFillId :: (Integral n, ID z, Enum z) => z -> Int -> (z -> n -> Ugen) -> Ugen -- | Monad variant on mixFill. mixFillM :: (Integral n, Monad m) => Int -> (n -> m Ugen) -> m Ugen -- | Ugen analysis module Sound.Sc3.Ugen.Analysis -- | Ugen primitive set. Sees through Proxy and Mrg, possible multiple -- primitives for Mce. ugen_primitive_set :: Ugen -> [Primitive Ugen] -- | Heuristic based on primitive name (FFT, PV_...). Note that IFFT is at -- control rate, not PV_... rate. primitive_is_pv_rate :: String -> Bool -- | Variant on primitive_is_pv_rate. ugen_is_pv_rate :: Ugen -> Bool -- | Traverse input graph until an FFT or PV_Split node is encountered, and -- then locate the buffer input. Biases left at Mce nodes. -- --
-- import Sound.Sc3 -- let z = soundIn 4 -- let f1 = fft 10 z 0.5 0 1 0 -- let f2 = ffta 'a' 1024 z 0.5 0 1 0 -- pv_track_buffer (pv_BrickWall f1 0.5) == Right 10 -- pv_track_buffer (pv_BrickWall f2 0.5) == Right (localBuf 'a' 1024 1) --pv_track_buffer :: Ugen -> Either String Ugen -- | Buffer node number of frames. Biases left at Mce nodes. Sees through -- LocalBuf, otherwise uses bufFrames. -- --
-- buffer_nframes 10 == bufFrames IR 10 -- buffer_nframes (control KR "b" 0) == bufFrames KR (control KR "b" 0) -- buffer_nframes (localBuf 'α' 2048 1) == 2048 --buffer_nframes :: Ugen -> Ugen -- | pv_track_buffer then buffer_nframes. pv_track_nframes :: Ugen -> Either String Ugen -- | Ugen is required to be the root node of complete graph. This function -- returns the name of the output Ugen (ie. Out or an allowed -- variant) and the input to that Ugen. It allows multiple-root graphs. -- It is in some sense the inverse of wrapOut. ugen_remove_out_node :: Ugen -> (String, Ugen) -- | U_Graph and related types. -- -- The Ugen type is recursive, inputs to Ugens are Ugens. -- -- This makes writing Ugen graphs simple, but manipulating them awkward. -- -- Ugen equality is structural, and can be slow to determine for some -- Ugen graph structures. -- -- A U_Node is a non-recursive notation for a Ugen, all U_Nodes have -- unique identifiers. -- -- A U_Graph is constructed by a stateful traversal of a Ugen. -- -- A U_Graph is represented as a partioned (by type) set of U_Nodes, -- edges are implicit. module Sound.Sc3.Ugen.Graph -- | Port index. type Port_Index = Int -- | Type to represent the left hand side of an edge in a unit generator -- graph. C = constant, K = control, U = ugen. data From_Port From_Port_C :: Id -> From_Port [from_port_nid] :: From_Port -> Id From_Port_K :: Id -> K_Type -> From_Port [from_port_nid] :: From_Port -> Id [from_port_kt] :: From_Port -> K_Type From_Port_U :: Id -> Maybe Port_Index -> From_Port [from_port_nid] :: From_Port -> Id [from_port_idx] :: From_Port -> Maybe Port_Index -- | A destination port. data To_Port To_Port :: Id -> Port_Index -> To_Port [to_port_nid] :: To_Port -> Id [to_port_idx] :: To_Port -> Port_Index -- | A connection from From_Port to To_Port. type U_Edge = (From_Port, To_Port) -- | Sum-type to represent nodes in unit generator graph. _C = constant, _K -- = control, _U = ugen, _P = proxy. data U_Node U_Node_C :: Id -> Sample -> U_Node [u_node_id] :: U_Node -> Id [u_node_c_value] :: U_Node -> Sample U_Node_K :: Id -> Rate -> Maybe Int -> String -> Sample -> K_Type -> Maybe (Control_Meta Sample) -> U_Node [u_node_id] :: U_Node -> Id [u_node_k_rate] :: U_Node -> Rate [u_node_k_index] :: U_Node -> Maybe Int [u_node_k_name] :: U_Node -> String [u_node_k_default] :: U_Node -> Sample [u_node_k_type] :: U_Node -> K_Type [u_node_k_meta] :: U_Node -> Maybe (Control_Meta Sample) U_Node_U :: Id -> Rate -> String -> [From_Port] -> [Output] -> Special -> UgenId -> U_Node [u_node_id] :: U_Node -> Id [u_node_u_rate] :: U_Node -> Rate [u_node_u_name] :: U_Node -> String [u_node_u_inputs] :: U_Node -> [From_Port] [u_node_u_outputs] :: U_Node -> [Output] [u_node_u_special] :: U_Node -> Special [u_node_u_ugenid] :: U_Node -> UgenId U_Node_P :: Id -> Id -> Port_Index -> Rate -> U_Node [u_node_id] :: U_Node -> Id [u_node_p_id] :: U_Node -> Id [u_node_p_index] :: U_Node -> Port_Index [u_node_p_rate] :: U_Node -> Rate u_node_is_c :: U_Node -> Bool u_node_is_k :: U_Node -> Bool u_node_is_u :: U_Node -> Bool -- | Convert from U_Node_K to Control (ie. discard index). u_node_k_to_control :: U_Node -> Control -- | Derive "user" name for U_Node u_node_user_name :: U_Node -> String -- | Type to represent a unit generator graph. data U_Graph U_Graph :: Id -> [U_Node] -> [U_Node] -> [U_Node] -> U_Graph [ug_next_id] :: U_Graph -> Id [ug_constants] :: U_Graph -> [U_Node] [ug_controls] :: U_Graph -> [U_Node] [ug_ugens] :: U_Graph -> [U_Node] -- | Get port_idx for From_Port_U, else 0. port_idx_or_zero :: From_Port -> Port_Index -- | Is From_Port From_Port_U. is_from_port_u :: From_Port -> Bool -- | Is U_Node a constant. is_u_node_c :: U_Node -> Bool -- | Predicate to determine if U_Node is a constant with indicated -- value. is_u_node_c_of :: Sample -> U_Node -> Bool -- | Is U_Node a control. is_u_node_k :: U_Node -> Bool -- | Predicate to determine if U_Node is a control with indicated -- name. Names must be unique. is_u_node_k_of :: String -> U_Node -> Bool -- | Is U_Node a Ugen. is_u_node_u :: U_Node -> Bool -- | Compare U_Node_K values on u_node_k_type. u_node_k_cmp :: U_Node -> U_Node -> Ordering -- | Sort by u_node_id. u_node_sort :: [U_Node] -> [U_Node] -- | Equality test, error if not U_Node_K. u_node_k_eq :: U_Node -> U_Node -> Bool -- | Rate of U_Node, ie. InitialisationRate for -- constants. See through U_Node_P. Not used at hsc3 but used by -- hsc3-dot &etc. u_node_rate :: U_Node -> Rate -- | Generate a label for U_Node using the type and the -- u_node_id. u_node_label :: U_Node -> String -- | Calculate all in edges for a U_Node_U. u_node_in_edges :: U_Node -> [U_Edge] -- | Transform U_Node to From_Port. u_node_from_port :: U_Node -> From_Port -- | If controls have been given indices they must be coherent. u_node_sort_controls :: [U_Node] -> [U_Node] -- | Determine K_Type of a control Ugen at U_Node_U, -- or not. u_node_ktype :: U_Node -> Maybe K_Type -- | Is U_Node a control Ugen? u_node_is_control :: U_Node -> Bool -- | Is U_Node an implicit control Ugen? u_node_is_implicit_control :: U_Node -> Bool -- | Is U_Node implicit? u_node_is_implicit :: U_Node -> Bool -- | Zero if no local buffers, or if maxLocalBufs is given. u_node_localbuf_count :: [U_Node] -> Int -- | Controls are a special case. We need to know not the overall index but -- the index in relation to controls of the same type. u_node_fetch_k :: Id -> K_Type -> [U_Node] -> Int -- | All the elements of a U_Node_U, except the u_node_id. type U_Node_NoId = (Rate, String, [From_Port], [Output], Special, UgenId) -- | Predicate to locate primitive, names must be unique. u_node_eq_noid :: U_Node_NoId -> U_Node -> Bool -- | Make map associating K_Type with Ugen index. u_node_mk_ktype_map :: [U_Node] -> [(K_Type, Int)] -- | 4-tuple to count K_Types, ie. -- (InitialisationRate,ControlRate,TriggerRate,AudioRate). type U_NODE_KS_COUNT = (Int, Int, Int, Int) -- | Count the number of controls of each K_Type. u_node_ks_count :: [U_Node] -> U_NODE_KS_COUNT -- | Construct implicit control unit generator U_Nodes. -- Unit generators are only constructed for instances of control types -- that are present. The special-index holds the accumulated offset where -- multiple Control Ugens (at different rates) are present. u_node_mk_implicit_ctl :: [U_Node] -> [U_Node] -- | List of From_Port_U at e with multiple out edges. u_edge_multiple_out_edges :: [U_Edge] -> [From_Port] -- | Calculate all edges of a U_Graph. ug_edges :: U_Graph -> [U_Edge] -- | The empty U_Graph. ug_empty_graph :: U_Graph -- | Find the maximum Id used at U_Graph. It is an error if -- this is not ug_next_id. ug_maximum_id :: U_Graph -> Id -- | Find U_Node with indicated Id. ug_find_node :: U_Graph -> Id -> Maybe U_Node -- | Locate U_Node of From_Port in U_Graph. ug_from_port_node :: U_Graph -> From_Port -> Maybe U_Node -- | Erroring variant. ug_from_port_node_err :: U_Graph -> From_Port -> U_Node -- | Insert a constant U_Node into the U_Graph. ug_push_c :: Sample -> U_Graph -> (U_Node, U_Graph) -- | Either find existing Constant U_Node, or insert a new -- U_Node. Brackets are discarded. ug_mk_node_c :: Constant -> U_Graph -> (U_Node, U_Graph) -- | Insert a control node into the U_Graph. ug_push_k :: Control -> U_Graph -> (U_Node, U_Graph) -- | Either find existing Control U_Node, or insert a new -- U_Node. ug_mk_node_k :: Control -> U_Graph -> (U_Node, U_Graph) -- | Insert a primitive U_Node_U into the U_Graph. ug_push_u :: U_Node_NoId -> U_Graph -> (U_Node, U_Graph) -- | Recursively traverse set of Ugen calling ug_mk_node. ug_mk_node_rec :: [Ugen] -> [U_Node] -> U_Graph -> ([U_Node], U_Graph) -- | Run ug_mk_node_rec at inputs and either find existing primitive -- node or insert a new one. Brackets are discarded. ug_mk_node_u :: Primitive Ugen -> U_Graph -> (U_Node, U_Graph) -- | Proxies do not get stored in the graph. Proxies are always of U nodes. ug_mk_node_p :: U_Node -> Port_Index -> U_Graph -> (U_Node, U_Graph) -- | Transform Ugen into U_Graph, appending to existing -- U_Graph. Allow rhs of Mrg node to be Mce (splice all nodes into -- graph). ug_mk_node :: Ugen -> U_Graph -> (U_Node, U_Graph) -- | Add implicit control Ugens to U_Graph. ug_add_implicit_ctl :: U_Graph -> U_Graph -- | Add implicit maxLocalBufs if not present. ug_add_implicit_buf :: U_Graph -> U_Graph -- | ug_add_implicit_buf and ug_add_implicit_ctl. ug_add_implicit :: U_Graph -> U_Graph -- | Remove implicit Ugens from U_Graph ug_remove_implicit :: U_Graph -> U_Graph -- | Descendents at U_Graph of U_Node. u_node_descendents :: U_Graph -> U_Node -> [U_Node] -- | List PV U_Nodes at U_Graph with multiple out -- edges. ug_pv_multiple_out_edges :: U_Graph -> [U_Node] -- | Error string if graph has an invalid PV subgraph, ie. -- multiple out edges at PV node not connecting to -- Unpack1FFT & PackFFT, else Nothing. ug_pv_check :: U_Graph -> Maybe String -- | Variant that runs error as required. ug_pv_validate :: U_Graph -> U_Graph -- | Transform a unit generator into a graph. ug_mk_node begins with -- an empty graph, then reverses the resulting Ugen list and sorts -- the Control list, and finally adds implicit nodes and validates -- PV sub-graphs. -- --
-- import Sound.Sc3 {\- hsc3 -\}
-- ugen_to_graph (out 0 (pan2 (sinOsc ar 440 0) 0.5 0.1))
--
ugen_to_graph_direct :: Ugen -> U_Graph
ugen_to_graph :: Ugen -> U_Graph
-- | Simple statistical analysis of a unit generator graph.
ug_stat_ln :: U_Graph -> [String]
-- | unlines of ug_stat_ln.
ug_stat :: U_Graph -> String
-- | Find indices of all instances of the named Ugen at Graph. The
-- index is required when using u_cmd.
ug_ugen_indices :: (Num n, Enum n) => String -> U_Graph -> [n]
instance GHC.Show.Show Sound.Sc3.Ugen.Graph.From_Port
instance GHC.Classes.Eq Sound.Sc3.Ugen.Graph.From_Port
instance GHC.Show.Show Sound.Sc3.Ugen.Graph.To_Port
instance GHC.Classes.Eq Sound.Sc3.Ugen.Graph.To_Port
instance GHC.Show.Show Sound.Sc3.Ugen.Graph.U_Node
instance GHC.Classes.Eq Sound.Sc3.Ugen.Graph.U_Node
instance GHC.Show.Show Sound.Sc3.Ugen.Graph.U_Graph
-- | Transformations over Graph structure.
module Sound.Sc3.Ugen.Graph.Transform
-- | Transform U_Node_C to U_Node_K, id for other
-- U_Node types.
--
-- -- let k = U_Node_K 8 ControlRate Nothing "k_8" 0.1 K_ControlRate Nothing -- node_k_eq k (snd (constant_to_control 8 (U_Node_C 0 0.1))) --constant_to_control :: Id -> U_Node -> (Id, U_Node) -- | If the From_Port is a constant generate a control -- U_Node, else retain From_Port. c_lift_from_port :: U_Graph -> Id -> From_Port -> (Id, Either From_Port U_Node) -- | Lift a set of U_NodeU inputs from constants to -- controls. The result triple gives the incremented Id, the -- transformed From_Port list, and the list of newly minted -- control U_Nodes. c_lift_inputs :: U_Graph -> Id -> [From_Port] -> (Id, [From_Port], [U_Node]) -- | Lift inputs at U_Node_U as required. c_lift_ugen :: U_Graph -> Id -> U_Node -> (Id, U_Node, [U_Node]) -- | c_lift_ugen at list of U_Node_U. c_lift_ugens :: U_Graph -> Id -> [U_Node] -> (Id, [U_Node], [U_Node]) -- | Lift constants to controls. -- --
-- import Sound.Sc3 {\- hsc3 -\}
-- import Sound.Sc3.Ugen.Dot {\- hsc3-dot -\}
--
--
-- -- let u = out 0 (sinOsc AR 440 0 * 0.1) -- let g = ugen_to_graph u -- draw g -- draw (lift_constants g) --lift_constants :: U_Graph -> U_Graph -- | A disassembler for Ugen graphs. module Sound.Sc3.Ugen.Graph.Reconstruct -- | Generate label for From_Port from_port_label :: Char -> From_Port -> String -- | Any name that does not begin with a letter is considered an operator. is_operator_name :: String -> Bool parenthesise_operator :: String -> String reconstruct_graph :: U_Graph -> ([String], String) reconstruct_graph_module :: String -> U_Graph -> [String] -- | Generate a reconstruction of a Graph. -- --
-- import Sound.Sc3 -- import Sound.Sc3.Ugen.Graph -- import Sound.Sc3.Ugen.Graph.Reconstruct ---- --
-- let k = control kr "bus" 0 -- let o = sinOsc ar 440 0 + whiteNoiseId 'α' ar -- let u = out k (pan2 (o * 0.1) 0 1) -- let m = mrg [u,out 1 (impulse ar 1 0 * 0.1)] -- putStrLn (reconstruct_graph_str "anon" (ugen_to_graph m)) --reconstruct_graph_str :: String -> U_Graph -> String reconstruct_c_str :: U_Node -> String reconstruct_c_ugen :: U_Node -> Ugen -- | Discards index. reconstruct_k_rnd :: U_Node -> (Rate, String, Sample) reconstruct_k_str :: U_Node -> String reconstruct_k_ugen :: U_Node -> Ugen ugen_qname :: String -> Special -> (String, String) reconstruct_mce_str :: U_Node -> String reconstruct_u_str :: U_Node -> [String] reconstruct_mrg_str :: [U_Node] -> String -- | Decode (read) a Graphdef into a Graph. module Sound.Sc3.Server.Graphdef.Read control_to_node :: Graphdef -> Id -> (Control, Sample) -> U_Node -- | Note: Graphs with multiple Control Ugens are not accounted for. input_to_from_port :: Graphdef -> Input -> From_Port ugen_to_node :: Graphdef -> Id -> Ugen -> U_Node graphdef_to_graph :: Graphdef -> (String, U_Graph) -- | Read graphdef file and translate to graph. read_graph :: FilePath -> IO U_Graph -- | Read graphdef file, translate to graph, and run ug_stat_ln. scsyndef_ug_stat :: FilePath -> IO String -- | Transform U_Graph to Graphdef. module Sound.Sc3.Server.Graphdef.Graph -- | (Int,Int) map. type Int_Map = IntMap Int -- | (constants-map,controls,controls-map,ugen-map,ktype-map) type Encoding_Maps = (Int_Map, [U_Node], Int_Map, Int_Map, [(K_Type, Int)]) -- | Generate Encoding_Maps translating node identifiers to synthdef -- indexes. mk_encoding_maps :: U_Graph -> Encoding_Maps -- | Locate index in map given node identifer UID_t. uid_lookup :: Id -> Int_Map -> Int -- | Lookup K_Type index from map (erroring variant of -- lookup). ktype_map_lookup :: K_Type -> [(K_Type, Int)] -> Int -- | Byte-encode From_Port primitive node. make_input :: Encoding_Maps -> From_Port -> Input -- | Byte-encode U_Node_K primitive node. make_control :: Encoding_Maps -> U_Node -> Control -- | Byte-encode U_Node_U primitive node. make_ugen :: Encoding_Maps -> U_Node -> Ugen -- | Construct instrument definition bytecode. graph_to_graphdef :: String -> U_Graph -> Graphdef -- | Common unit generator graphs. module Sound.Sc3.Ugen.Bindings.Composite.External -- | FM7 variant where input matrices are not in Mce form. fm7_mx :: [[Ugen]] -> [[Ugen]] -> Ugen -- | greyhole re-orders parameters as well as unpacking the input signal. -- -- in1=0.0 in2=0.0 damping=0.0 delayTime=2.0 diffusion=0.5 feedback=0.9 -- moddepth=0.1 modfreq=2.0 size=1.0 in delayTime=2.0 damping=0.0 -- size=1.0 diffusion=0.7 feedback=0.9 modDepth=0.1 modFreq=2.0 greyhole :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Association list giving names for MiBraids modes. miBraids_mode_dict :: Num n => [(n, String)] -- | Reverse lookup of miBraids_mode_dict. miBraids_mode_maybe :: Num n => String -> Maybe n -- | error of miBraids_mode_maybe miBraids_mode :: Num n => String -> n -- | Association list giving names for MiClouds modes. miClouds_mode_dict :: Num n => [(n, String)] -- | Reverse lookup of miClouds_mode_dict. miClouds_mode_maybe :: Num n => String -> Maybe n -- | error of miClouds_mode_maybe miClouds_mode :: Num n => String -> n -- | Association list giving names for MiPlaits modes. miPlaits_mode_dict :: Num n => [(n, String)] -- | Reverse lookup of miPlaits_mode_dict. miPlaits_mode_maybe :: Num n => String -> Maybe n -- | error of miPlaits_mode_maybe miPlaits_mode :: Num n => String -> n -- | Association list giving names for MiPlaits modes. miRings_mode_dict :: Num n => [(n, String)] -- | Reverse lookup of miRings_mode_dict. miRings_mode_maybe :: Num n => String -> Maybe n -- | error of miRings_mode_maybe miRings_mode :: Num n => String -> n -- | pulse signal as difference of two sawDPW signals. pulseDPW :: Rate -> Ugen -> Ugen -> Ugen -- | Variant that unpacks the output mce node. pv_SplitUnpack :: Ugen -> Ugen -> (Ugen, Ugen) -- | A pv_Split variant, like ffta, that allocates a -- localBuf by tracing the input graph to locate the parent -- FFT or PV_Split node. pv_SplitAllocId :: ID i => i -> Ugen -> Ugen pv_SplitAllocM :: Uid m => Ugen -> m Ugen pv_SplitAlloc :: Ugen -> Ugen -- | Variant that unpacks the output mce node. pv_SplitAllocUnpackId :: ID i => i -> Ugen -> (Ugen, Ugen) -- | Common unit generator graphs. module Sound.Sc3.Ugen.Bindings.Composite -- | Generate a localBuf and use setBuf to initialise it. asLocalBufId :: ID i => i -> [Ugen] -> Ugen asLocalBufM :: Uid m => [Ugen] -> m Ugen asLocalBuf :: [Ugen] -> Ugen -- | balance2 with Mce input. balanceStereo :: Ugen -> Ugen -> Ugen -> Ugen -- | 24db/oct rolloff - 4th order resonant Low Pass Filter bLowPass4 :: Ugen -> Ugen -> Ugen -> Ugen -- | 24db/oct rolloff - 4th order resonant Hi Pass Filter bHiPass4 :: Ugen -> Ugen -> Ugen -> Ugen -- | Buffer reader (no interpolation). bufRdN :: Int -> Rate -> Ugen -> Ugen -> Loop Ugen -> Ugen -- | Buffer reader (linear interpolation). bufRdL :: Int -> Rate -> Ugen -> Ugen -> Loop Ugen -> Ugen -- | Buffer reader (cubic interpolation). bufRdC :: Int -> Rate -> Ugen -> Ugen -> Loop Ugen -> Ugen -- | Triggers when a value changes changed :: Ugen -> Ugen -> Ugen -- | mce variant of lchoose. chooseId :: ID m => m -> Ugen -> Ugen -- | liftUid of choose. chooseM :: Uid m => Ugen -> m Ugen choose :: Ugen -> Ugen -- | clearBuf of localBuf. clearLocalBufId :: ID a => a -> Ugen -> Ugen -> Ugen clearLocalBufM :: Uid m => Ugen -> Ugen -> m Ugen clearLocalBuf :: Ugen -> Ugen -> Ugen -- | Demand rate (:) function. dconsId :: ID m => (m, m, m) -> Ugen -> Ugen -> Ugen -- | Demand rate (:) function. dconsM :: Uid m => Ugen -> Ugen -> m Ugen dcons :: Ugen -> Ugen -> Ugen -- | Dynamic klang, dynamic sine oscillator bank dynKlang :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Dynamic klank, set of non-fixed resonating filters. dynKlank :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Pan2 without (k-rate only) level input eqPan2 :: Ugen -> Ugen -> Ugen -- | linExp with input range of (-1,1). exprange :: Ugen -> Ugen -> Ugen -> Ugen -- | Variant of exprange with arguments to make writing post-fix -- nicer. in_exprange :: Ugen -> (Ugen, Ugen) -> Ugen -- | Variant FFT constructor with default values for hop size (0.5), window -- type (0), active status (1) and window size (0). fft' :: Ugen -> Ugen -> Ugen -- | fft variant that allocates localBuf. -- --
-- let c = ffta 'α' 2048 (soundIn 0) 0.5 0 1 0 -- in audition (out 0 (ifft c 0 0)) --fftAllocId :: ID i => i -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen fftAllocM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> m Ugen fftAlloc :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Sum of numInputBuses and numOutputBuses. firstPrivateBus :: Ugen -- | Frequency shifter, in terms of hilbert (see also -- freqShift). freqShift_hilbert :: Ugen -> Ugen -> Ugen -> Ugen -- | Ugen function to re-trigger an EnvGen envelope. Inputs are gate -- (as set at EnvGen) and reset. The four state logic is: -- (1,0)->1 (1,1)->-1 (0,1)->0 (0,0)->0. If the gate input to -- EnvGen.kr is -1 the envelope ramps to zero in one control period. The -- reset input sequence 0,1,0 when the gate is open produces (1,-1,1), -- which resets the envelope. -- --
-- >>> map (uncurry gateReset) [(1,0),(1,1),(0,1),(0,0)] -- [1,-1,0,0] --gateReset :: Num a => a -> a -> a -- | Variant of hilbert using FFT (with a delay) for better results. -- Buffer should be 2048 or 1024. 2048 = better results, more delay. 1024 -- = less delay, little choppier results. hilbertFIR :: Ugen -> Ugen -> Ugen -- | Variant ifft with default value for window type. ifft' :: Ugen -> Ugen -- | Generalised Klan(kg) specification rule. f unwraps inputs, -- g/ wraps output. -- --
-- let r = [220,0.2,0,219,0.1,1,221,0.1,2] -- in klanx_spec_f id id [220,219,221] [0.2,0.1,0.1] [0,1,2] == r --klanx_spec_f :: (a -> [b]) -> ([b] -> c) -> a -> a -> a -> c -- | Format frequency, amplitude and decay time data as required for klank. klangSpec :: [Ugen] -> [Ugen] -> [Ugen] -> Ugen -- | Variant of klangSpec for non-Ugen inputs. klangSpec_k :: Real n => [n] -> [n] -> [n] -> Ugen -- | Variant of klangSpec for Mce inputs. klangSpec_mce :: Ugen -> Ugen -> Ugen -> Ugen -- | Format frequency, amplitude and decay time data as required for klank. klankSpec :: [Ugen] -> [Ugen] -> [Ugen] -> Ugen -- | Variant for non-Ugen inputs. klankSpec_k :: Real n => [n] -> [n] -> [n] -> Ugen -- | Variant of klankSpec for Mce inputs. klankSpec_mce :: Ugen -> Ugen -> Ugen -> Ugen -- | Randomly select one of a list of Ugens (initialisation rate). lchooseId :: ID m => m -> [Ugen] -> Ugen -- | liftUid of lchoose. lchooseM :: Uid m => [Ugen] -> m Ugen lchoose :: [Ugen] -> Ugen -- | linExp of (-1,1). linExp_b :: Ugen -> Ugen -> Ugen -> Ugen -- | linExp of (0,1). linExp_u :: Ugen -> Ugen -> Ugen -> Ugen -- | Map from one linear range to another linear range. linLin :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | linLin where source is (0,1). linLin_u :: Ugen -> Ugen -> Ugen -> Ugen -- | linLin where source is (-1,1). linLin_b :: Ugen -> Ugen -> Ugen -> Ugen -- | Variant with defaults of zero. localIn' :: Int -> Rate -> Ugen -- | Generate an envGen Ugen with fadeTime and -- gate controls. -- --
-- import Sound.Sc3 -- audition (out 0 (makeFadeEnv 1 * sinOsc ar 440 0 * 0.1)) -- withSc3 (send (n_set1 (-1) "gate" 0)) --makeFadeEnv :: Double -> Ugen -- | Variant that is randomly pressed. mouseButtonRand :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -- | Randomised mouse Ugen (see also mouseX' and -- mouseY'). mouseRandId :: ID a => a -> Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen mouseRandM :: Uid m => Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> m Ugen mouseRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen -- | Variant that randomly traverses the mouseX space. mouseXRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen -- | Variant that randomly traverses the mouseY space. mouseYRand :: Rate -> Ugen -> Ugen -> Warp Ugen -> Ugen -> Ugen -- | Translate onset type string to constant Ugen value. onsetType :: Num a => String -> a -- | Onset detector with default values for minor parameters. onsetsDefault :: Ugen -> Ugen -> Ugen -> Ugen -- | Format magnitude and phase data data as required for packFFT. packFFTSpec :: [Ugen] -> [Ugen] -> Ugen -- | Calculate size of accumulation buffer given FFT and IR sizes. partConv_calcAccumSize :: Int -> Int -> Int -- | PM oscillator. cf = carrier frequency, mf = modulation frequency, pm = -- pm-index = 0.0, mp = mod-phase = 0.0 pmOsc :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Variant of poll that generates an mrg value with the -- input signal at left, and that allows a constant frequency -- input in place of a trigger. pollExt :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Variant of in' offset so zero if the first private bus. privateIn :: Int -> Rate -> Ugen -> Ugen -- | Variant of out offset so zero if the first private bus. privateOut :: Ugen -> Ugen -> Ugen -- | Apply function f to each bin of an FFT chain, f -- receives magnitude, phase and index and returns a (magnitude,phase). pvcollect :: Ugen -> Int -> (Ugen -> Ugen -> Int -> (Ugen, Ugen)) -> Int -> Int -> Ugen -> Ugen -- | dur and hop are in seconds, frameSize and -- sampleRate in frames, though the latter maybe fractional. -- --
-- pv_calcPVRecSize 4.2832879818594 1024 0.25 48000.0 == 823299 --pv_calcPVRecSize :: Double -> Int -> Double -> Double -> Int -- | rand with left edge set to zero. rand0Id :: ID a => a -> Ugen -> Ugen -- | UgenId form of rand0. rand0M :: Uid m => Ugen -> m Ugen rand0 :: Ugen -> Ugen -- | rand with left edge set to negative n. Note rand2 is -- also a UnaryOp Ugen, however hsc3 does not store Ids for operators. rand2Id :: ID a => a -> Ugen -> Ugen -- | UgenId form of rand2. rand2M :: Uid m => Ugen -> m Ugen rand2 :: Ugen -> Ugen -- | rotate2 with Mce input. rotateStereo :: Ugen -> Ugen -> Ugen -- | RMS variant of runningSum. runningSumRMS :: Ugen -> Ugen -> Ugen -- | Mix one output from many sources selectX :: Ugen -> Ugen -> Ugen -- | Set local buffer values. setBuf' :: Ugen -> [Ugen] -> Ugen -> Ugen -- | Silence. silent :: Int -> Ugen -- | Zero indexed audio input buses. Optimises case of consecutive Ugens. -- --
-- >>> soundIn (mce2 0 1) == in' 2 ar numOutputBuses -- True ---- --
-- >>> soundIn (mce2 0 2) == in' 1 ar (numOutputBuses + mce2 0 2) -- True --soundIn :: Ugen -> Ugen -- | Pan a set of channels across the stereo field. -- -- input, spread:1, level:1, center:0, levelComp:true splay :: Ugen -> Ugen -> Ugen -> Ugen -> Bool -> Ugen -- | Single tap into a delayline. ar only. tap :: Int -> Rate -> Ugen -> Ugen -> Ugen -- | Randomly select one of several inputs on trigger. tChooseId :: ID m => m -> Ugen -> Ugen -> Ugen -- | Randomly select one of several inputs. tChooseM :: Uid m => Ugen -> Ugen -> m Ugen tChoose :: Ugen -> Ugen -> Ugen -- | Triggered Line, implemented in terms of EnvGen. tLine :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Triggered xLine, implemented in terms of EnvGen. tXLine :: Rate -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Triangle wave as sum of n sines. For partial n, amplitude is (1 -- / square n) and phase is pi at every other odd partial. triAS :: Int -> Ugen -> Ugen -- | Randomly select one of several inputs on trigger (weighted). tWChooseId :: ID m => m -> Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Randomly select one of several inputs (weighted). tWChooseM :: Uid m => Ugen -> Ugen -> Ugen -> Ugen -> m Ugen tWChoose :: Ugen -> Ugen -> Ugen -> Ugen -> Ugen -- | Unpack an FFT chain into separate demand-rate FFT bin streams. unpackFFT :: Ugen -> Int -> Int -> Int -> Ugen -> [Ugen] -- | VarLag in terms of envGen. Note: in SC3 curvature and warp are -- separate arguments. varLag_env :: Ugen -> Ugen -> Envelope_Curve Ugen -> Maybe Ugen -> Ugen -- | k channel white noise. -- --
-- whiteNoiseN 2 ar * 0.1 --whiteNoiseMN :: Uid m => Int -> Rate -> m Ugen whiteNoiseN :: Int -> Rate -> Ugen -- | If z isn't a sink node route to an out node writing -- to bus. If fadeTime is given multiply by -- makeFadeEnv. -- --
-- import Sound.Sc3 {\- hsc3 -\}
-- audition (wrapOut (Just 1) (sinOsc ar 440 0 * 0.1))
--
--
--
-- import Sound.Osc {\- hosc -\}
-- withSc3 (sendMessage (n_set1 (-1) "gate" 0))
--
wrapOut :: Maybe Double -> Ugen -> Ugen
-- | Cross-fading version of playBuf.
playBufCF :: Int -> Ugen -> Ugen -> Ugen -> Ugen -> Loop Ugen -> Ugen -> Int -> Ugen
-- | An oscillator that reads through a table once.
osc1 :: Rate -> Ugen -> Ugen -> DoneAction Ugen -> Ugen
-- | Continous controller event and Ctl systems for external control
-- interfaces.
module Sound.Sc3.Ugen.Event
-- | (v, w, x, y, z, o, rx, ry, p, px, _)
--
-- v = voice, w = gate, z = force/pressure, o = orientation/angle, r =
-- radius, p = pitch
type CcEvent t = (Int, t, t, t, t, t, t, t, t, t, t)
-- | Translate list to Event.
cc_event_from_list :: Num t => Int -> [t] -> CcEvent t
-- | (ccEventAddr, ccEventIncr, ccEventZero)
--
-- ccEventAddr = k0 = index of control bus zero for event system,
-- ccEventIncr = stp = voice index increment, ccEventZero = c0 = offset
-- for event voices at current server
type CcEventMeta t = (t, t, t)
ccEventMetaDefault :: Num n => CcEventMeta n
ccEventMetaControls :: CcEventMeta Int -> CcEventMeta Ugen
-- | c = event number (zero indexed)
ccEventAddr :: (Ugen, Ugen, Ugen) -> Int -> CcEvent Ugen
-- | c0 = index of voice (channel) zero for event set, n = number of voices
-- (channels)
ccEventVoicerAddr :: CcEventMeta Ugen -> Int -> (CcEvent Ugen -> Ugen) -> Ugen
-- | eventVoicerAddr with default (addr, inct, zero).
ccEventVoicer :: Int -> (CcEvent Ugen -> Ugen) -> Ugen
-- | Synonym for ccEventVoicer.
voicer :: Int -> (CcEvent Ugen -> Ugen) -> Ugen
-- | eventVoicerAddr with control inputs for
-- eventAddr, eventIncr and eventZero.
ccEventVoicerParam :: Int -> (CcEvent Ugen -> Ugen) -> Ugen
-- | Given w|g and p fields of an CcEvent derive a
-- gateReset from g and a trigger derived from monitoring
-- w|g and p for changed values.
ccEventGateReset :: Ugen -> Ugen -> (Ugen, Ugen)
-- | Sequence of 8 continous controller inputs in range (0-1).
type Ctl8 = (Ugen, Ugen, Ugen, Ugen, Ugen, Ugen, Ugen, Ugen)
-- | k0 = index of control bus zero
ctl8At :: Int -> Ctl8
-- | ctlVoicerAddr with control inputs for CtlAddr
-- and CtlZero.
ctl8Voicer :: Int -> (Int -> Ctl8 -> Ugen) -> Ugen
-- | Sequence of 16 continous controller inputs arranged as two Ctl8
-- sequences.
type Ctl16 = (Ctl8, Ctl8)
-- | ctl16VoicerAddr with control inputs for CtlAddr
-- and CtlZero.
ctl16Voicer :: Int -> (Int -> Ctl16 -> Ugen) -> Ugen
-- | Control Specificier. (name,default,(minValue,maxValue,warpName))
type ControlSpec t = (String, t, (t, t, String))
control_spec_name :: ControlSpec t -> String
-- | Comma separated, no spaces.
control_spec_parse :: String -> ControlSpec Double
-- | Semicolon separated, no spaces.
--
--
-- >>> control_spec_seq_parse "freq:220,110,440,exp;amp:0.1,0,1,amp;pan:0,-1,1,lin"
-- [("freq",220.0,(110.0,440.0,"exp")),("amp",0.1,(0.0,1.0,"amp")),("pan",0.0,(-1.0,1.0,"lin"))]
--
control_spec_seq_parse :: String -> [ControlSpec Double]
-- | Comma separated, 6 decimal places, no spaces.
control_spec_print :: ControlSpec Double -> String
-- | Semicolon separated, no spaces.
--
-- -- >>> control_spec_seq_print (control_spec_seq_parse "freq:220,220,440,exp;amp:0.1,0,1,amp;pan:0,-1,1,lin") -- "freq:220.0,220.0,440.0,exp;amp:0.1,0.0,1.0,amp;pan:0.0,-1.0,1.0,lin" --control_spec_seq_print :: [ControlSpec Double] -> String control_spec_to_control :: ControlSpec Double -> Control -- | See SCClassLibraryCommonControl/Spec:ControlSpec.initClass -- -- "ControlSpec defines the range and curve of a control" -- -- This list adds default values. sc3_control_spec :: Fractional t => [ControlSpec t] -- | See Kyma X Revealed, p.403 -- -- "The following EventValue names are associated with initial ranges -- other than (0,1). EventValue names are not case-sensitive." -- -- This list adds curve specifiers as strings and default values. -- --
-- >>> Data.List.intersect (map control_spec_name sc3_control_spec) (map control_spec_name kyma_event_value_ranges) -- ["beats","boostcut","freq","rate"] ---- --
-- >>> let f i = filter ((== i) . control_spec_name)
--
-- >>> let c (p,q) = (f p sc3_control_spec, f q kyma_event_value_ranges)
--
-- >>> c ("lofreq","freqlow")
-- ([("lofreq",20.0,(0.1,100.0,"exp"))],[("freqlow",120.0,(0.0,1000.0,"exp"))])
--
--
--
-- >>> c ("midfreq","freqmid")
-- ([("midfreq",440.0,(25.0,4200.0,"exp"))],[("freqmid",1200.0,(1000.0,8000.0,"exp"))])
--
--
--
-- >>> find ((==) "freqhigh" . control_spec_name) kyma_event_value_ranges
-- Just ("freqhigh",12000.0,(8000.0,24000.0,"exp"))
--
kyma_event_value_ranges :: Fractional t => [ControlSpec t]
-- | SC3 Ugen bindings (composite module).
module Sound.Sc3.Ugen.Bindings
-- | Standard SC3 graphs, referenced in documentation.
module Sound.Sc3.Ugen.Help.Graph
-- | The SC3 default instrument Ugen graph.
default_ugen_graph :: Ugen
-- | A Gabor grain, envelope is by lfGauss.
gabor_grain_ugen_graph :: Ugen
-- | A sine grain, envelope is by envGen of envSine.
sine_grain_ugen_graph :: Ugen
-- | Trivial file playback instrument.
--
-- If use_gate is True there is a gate parameter and
-- the synth ends either when the sound file ends or the gate closes,
-- else there is a sustain parameter to indicate the duration. In
-- both cases a linear envelope with a decay time of decay is
-- applied.
--
-- The rdelay parameter sets the maximum pre-delay time (in
-- seconds), each instance is randomly pre-delayed between zero and the
-- indicated time. The ramplitude parameter sets the maximum
-- amplitude offset of the amp parameter, each instance is
-- randomly amplified between zero and the indicated value.
default_sampler_ugen_graph :: Bool -> Ugen
-- | The unit-generator graph structure implemented by the SuperCollider
-- synthesis server.
module Sound.Sc3.Server.Synthdef
-- | A named unit generator graph.
data Synthdef
Synthdef :: String -> Ugen -> Synthdef
[synthdefName] :: Synthdef -> String
[synthdefUgen] :: Synthdef -> Ugen
-- | Alias for Synthdef.
synthdef :: String -> Ugen -> Synthdef
-- | The Sc3 default instrument Synthdef, see
-- default_ugen_graph.
--
--
-- import Sound.Osc {\- hosc -\}
-- import Sound.Sc3 {\- hsc3 -\}
-- withSc3 (sendMessage (d_recv defaultSynthdef))
-- audition defaultSynthdef
--
defaultSynthdef :: Synthdef
-- | The Sc3 default sample (buffer) playback instrument
-- Synthdef, see default_sampler_ugen_graph.
--
-- -- withSc3 (sendMessage (d_recv (defaultSampler False))) -- audition (defaultSampler False) --defaultSampler :: Bool -> Synthdef -- | ugen_to_graph of synthdefUgen. synthdefGraph :: Synthdef -> U_Graph -- | Parameter names at Synthdef. -- --
-- >>> synthdefParam defaultSynthdef
-- [("amp",0.1),("pan",0.0),("gate",1.0),("freq",440.0),("out",0.0)]
--
synthdefParam :: Synthdef -> Param
-- | graph_to_graphdef at Synthdef.
synthdef_to_graphdef :: Synthdef -> Graphdef
-- | graph_to_graphdef at Synthdef.
ugen_to_graphdef :: Ugen -> Graphdef
-- | Encode Synthdef as a binary data stream.
synthdefData :: Synthdef -> ByteString
-- | Write Synthdef to indicated file.
synthdefWrite :: FilePath -> Synthdef -> IO ()
-- | Write Synthdef to indicated directory. The filename is the
-- synthdefName with the appropriate extension
-- (scsyndef).
synthdefWrite_dir :: FilePath -> Synthdef -> IO ()
-- | graph_stat_ln of synth.
synthstat_ln :: Ugen -> [String]
-- | unlines of synthstat_ln.
synthstat :: Ugen -> String
-- | putStrLn of synthstat.
--
-- -- synthstat_wr Sound.Sc3.Ugen.Help.Graph.default_ugen_graph --synthstat_wr :: Ugen -> IO () -- | Variant without Ugen sequence. -- --
-- putStrLn $ synthstat_concise (default_sampler_ugen_graph True) --synthstat_concise :: Ugen -> String -- | graphdef_dump_ugens of ugen_to_graphdef ugen_dump_ugens :: Ugen -> IO () instance GHC.Show.Show Sound.Sc3.Server.Synthdef.Synthdef instance GHC.Classes.Eq Sound.Sc3.Server.Synthdef.Synthdef -- | This module provides variations of the asynchronous server commands -- that expect a completion packet as the first argument. The -- completion packet is executed by the server when the asynchronous -- command has finished. Note that this mechanism is for synchronizing -- server side processes only, for client side synchronization use -- /done message notification or the /sync barrier. module Sound.Sc3.Server.Command.Plain.Completion -- | Encode an Osc packet as an Osc blob. encode_blob :: PacketOf Message -> Datum -- | Install a bytecode instrument definition. (Asynchronous) d_recv :: PacketOf Message -> Synthdef -> Message -- | Load an instrument definition from a named file. (Asynchronous) d_load :: PacketOf Message -> String -> Message -- | Load a directory of instrument definitions files. (Asynchronous) d_loadDir :: PacketOf Message -> String -> Message -- | Allocates zero filled buffer to number of channels and samples. -- (Asynchronous) b_alloc :: PacketOf Message -> Int -> Int -> Int -> Message -- | Allocate buffer space and read a sound file. (Asynchronous) b_allocRead :: PacketOf Message -> Int -> String -> Int -> Int -> Message -- | Allocate buffer space and read a sound file, picking specific -- channels. (Asynchronous) b_allocReadChannel :: PacketOf Message -> Int -> String -> Int -> Int -> [Int] -> Message -- | Free buffer data. (Asynchronous) b_free :: PacketOf Message -> Int -> Message -- | Close attached soundfile and write header information. (Asynchronous) b_close :: PacketOf Message -> Int -> Message -- | Read sound file data into an existing buffer. (Asynchronous) b_read :: PacketOf Message -> Int -> String -> Int -> Int -> Int -> Bool -> Message -- | Read sound file data into an existing buffer. (Asynchronous) b_readChannel :: PacketOf Message -> Int -> String -> Int -> Int -> Int -> Bool -> [Int] -> Message -- | Write sound file data. (Asynchronous) b_write :: PacketOf Message -> Int -> String -> SoundFileFormat -> SampleFormat -> Int -> Int -> Bool -> Message -- | Zero sample data. (Asynchronous) b_zero :: PacketOf Message -> Int -> Message -- | Generic constructors for the command set implemented by the -- SuperCollider synthesis server. module Sound.Sc3.Server.Command.Generic cmd_check_arg :: String -> (t -> Bool) -> t -> t -- | Buf-Num must be >= 0 b_bufnum :: Integral t => t -> Datum -- | Buf-Frame-Ix must be >= 0 b_ix :: Integral t => t -> Datum -- | Buf-Channel must be >= 0 b_ch :: Integral t => t -> Datum -- | Buf-Frame-Cnt must be >= 0 b_size :: Integral t => t -> Datum -- | Allocates zero filled buffer to number of channels and samples. -- (Asynchronous) b_alloc :: Integral i => i -> i -> i -> Message -- | Allocate buffer space and read a sound file. (Asynchronous) b_allocRead :: Integral i => i -> String -> i -> i -> Message -- | Allocate buffer space and read a sound file, picking specific -- channels. (Asynchronous) b_allocReadChannel :: Integral i => i -> String -> i -> i -> [i] -> Message -- | Close attached soundfile and write header information. (Asynchronous) b_close :: Integral i => i -> Message -- | Fill ranges of sample values. b_fill :: (Integral i, Real n) => i -> [(i, i, n)] -> Message -- | Free buffer data. (Asynchronous) b_free :: Integral i => i -> Message -- | Call a command to fill a buffer. (Asynchronous) b_gen :: Integral i => i -> String -> [Datum] -> Message -- | Call sine1 b_gen command. b_gen_sine1 :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> Message -- | Call sine2 b_gen command. b_gen_sine2 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n)] -> Message -- | Call sine3 b_gen command. b_gen_sine3 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n, n)] -> Message -- | Call cheby b_gen command. b_gen_cheby :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> Message -- | Call copy b_gen command. b_gen_copy :: Integral i => i -> i -> i -> i -> Maybe i -> Message -- | Get sample values. b_get :: Integral i => i -> [i] -> Message -- | Get ranges of sample values. b_getn :: Integral i => i -> [(i, i)] -> Message -- | Request /b_info messages. b_query :: Integral i => [i] -> Message -- | Read sound file data into an existing buffer. (Asynchronous) Param: -- bufId pathName startFrame numFrames bufFrame leaveOpen b_read :: Integral i => i -> String -> i -> i -> i -> Bool -> Message -- | Read sound file data into an existing buffer, picking specific -- channels. (Asynchronous) b_readChannel :: Integral i => i -> String -> i -> i -> i -> Bool -> [i] -> Message -- | Set sample values. b_set :: (Integral i, Real n) => i -> [(i, n)] -> Message -- | Set ranges of sample values. b_setn :: (Integral i, Real n) => i -> [(i, [n])] -> Message -- | Write sound file data. (Asynchronous) b_write :: Integral i => i -> String -> SoundFileFormat -> SampleFormat -> i -> i -> Bool -> Message -- | Zero sample data. (Asynchronous) b_zero :: Integral i => i -> Message -- | Fill ranges of bus values. c_fill :: (Integral i, Real n) => [(i, i, n)] -> Message -- | Get bus values. c_get :: Integral i => [i] -> Message -- | Get ranges of bus values. c_getn :: Integral i => [(i, i)] -> Message -- | Set bus values. c_set :: (Integral i, Real n) => [(i, n)] -> Message -- | Set ranges of bus values. c_setn :: (Integral i, Real n) => [(i, [n])] -> Message -- | Install a bytecode instrument definition. (Asynchronous) d_recv_bytes :: Blob -> Message -- | Graphdef encoding variant. d_recv_gr :: Graphdef -> Message -- | Synthdef encoding variant. d_recv :: Synthdef -> Message -- | Load an instrument definition from a named file. (Asynchronous) d_load :: String -> Message -- | Load a directory of instrument definitions files. (Asynchronous) d_loadDir :: String -> Message -- | Remove definition once all nodes using it have ended. d_free :: [String] -> Message -- | Free all synths in this group and all its sub-groups. g_deepFree :: Integral i => [i] -> Message -- | Delete all nodes in a group. g_freeAll :: Integral i => [i] -> Message -- | Add node to head of group. g_head :: Integral i => [(i, i)] -> Message -- | Create a new group. g_new :: Integral i => [(i, AddAction, i)] -> Message -- | Add node to tail of group. g_tail :: Integral i => [(i, i)] -> Message -- | Post a representation of a group's node subtree, optionally including -- the current control values for synths. g_dumpTree :: Integral i => [(i, Bool)] -> Message -- | Request a representation of a group's node subtree, optionally -- including the current control values for synths. -- -- Replies to the sender with a /g_queryTree.reply message -- listing all of the nodes contained within the group in the following -- format: -- --
-- int32 - if synth control values are included 1, else 0 -- int32 - node ID of the requested group -- int32 - number of child nodes contained within the requested group -- -- For each node in the subtree: -- [ -- int32 - node ID -- int32 - number of child nodes contained within this node. If -1 this is a synth, if >= 0 it's a group. -- -- If this node is a synth: -- symbol - the SynthDef name for this node. -- -- If flag (see above) is true: -- int32 - numControls for this synth (M) -- [ -- symbol or int: control name or index -- float or symbol: value or control bus mapping symbol (e.g. c1) -- ] * M -- ] * the number of nodes in the subtree ---- -- N.b. The order of nodes corresponds to their execution order on the -- server. Thus child nodes (those contained within a group) are listed -- immediately following their parent. g_queryTree :: Integral i => [(i, Bool)] -> Message -- | Node-Id must be >= -1 n_id :: Integral t => t -> Datum -- | Place a node after another. n_after :: Integral i => [(i, i)] -> Message -- | Place a node before another. n_before :: Integral i => [(i, i)] -> Message -- | Fill ranges of a node's control values. n_fill :: (Integral i, Real f) => i -> [(String, i, f)] -> Message -- | Delete a node. n_free :: Integral i => [i] -> Message n_map :: Integral i => i -> [(String, i)] -> Message -- | Map a node's controls to read from buses. n_mapn only works if the -- control is given as an index and not as a name (3.8.0). n_mapn :: Integral i => i -> [(i, i, i)] -> Message -- | Map a node's controls to read from an audio bus. n_mapa :: Integral i => i -> [(String, i)] -> Message -- | Map a node's controls to read from audio buses. n_mapan :: Integral i => i -> [(String, i, i)] -> Message -- | Get info about a node. n_query :: Integral i => [i] -> Message -- | Turn node on or off. n_run :: Integral i => [(i, Bool)] -> Message -- | Set a node's control values. n_set :: (Integral i, Real n) => i -> [(String, n)] -> Message -- | Set ranges of a node's control values. n_mapn and n_setn only work if -- the control is given as an index and not as a name. n_setn :: (Integral i, Real n) => i -> [(i, [n])] -> Message -- | Trace a node. n_trace :: Integral i => [i] -> Message -- | Move an ordered sequence of nodes. n_order :: Integral i => AddAction -> i -> [i] -> Message -- | Create a new parallel group (supernova specific). p_new :: Integral i => [(i, AddAction, i)] -> Message -- | Get control values. s_get :: Integral i => i -> [String] -> Message -- | Get ranges of control values. s_getn :: Integral i => i -> [(String, i)] -> Message -- | Create a new synth. s_new :: (Integral i, Real n) => String -> i -> AddAction -> i -> [(String, n)] -> Message -- | Auto-reassign synth's ID to a reserved value. s_noid :: Integral i => [i] -> Message -- | Send a command to a unit generator. u_cmd :: Integral i => i -> i -> String -> [Datum] -> Message -- | Send a plugin command. cmd :: String -> [Datum] -> Message -- | Remove all bundles from the scheduling queue. clearSched :: Message -- | Select printing of incoming Open Sound Control messages. dumpOsc :: PrintLevel -> Message -- | Set error posting scope and mode. errorMode :: ErrorScope -> ErrorMode -> Message -- | Select reception of notification messages. (Asynchronous) notify :: Bool -> Message -- | End real time mode, close file (un-implemented). nrt_end :: Message -- | Stop synthesis server. quit :: Message -- | Request /status.reply message. status :: Message -- | Request /synced message when all current asynchronous commands -- complete. sync :: Integral i => i -> Message -- | Pre-allocate for b_setn1, values preceding offset are zeroed. b_alloc_setn1 :: (Integral i, Real n) => i -> i -> [n] -> Message -- | Get ranges of sample values. b_getn1 :: Integral i => i -> (i, i) -> Message -- | Variant on b_query. b_query1 :: Integral i => i -> Message -- | Set single sample value. b_set1 :: (Integral i, Real n) => i -> i -> n -> Message -- | Set a range of sample values. b_setn1 :: (Integral i, Real n) => i -> i -> [n] -> Message -- | Segmented variant of b_setn1. b_setn1_segmented :: (Integral i, Real n) => i -> i -> i -> [n] -> [Message] -- | Get ranges of sample values. c_getn1 :: Integral i => (i, i) -> Message -- | Set single bus values. c_set1 :: (Integral i, Real n) => i -> n -> Message -- | Set single range of bus values. c_setn1 :: (Integral i, Real n) => (i, [n]) -> Message -- | Turn a single node on or off. n_run1 :: Integral i => i -> Bool -> Message -- | Set a single node control value. n_set1 :: (Integral i, Real n) => i -> String -> n -> Message -- | s_new with no parameters. s_new0 :: Integral i => String -> i -> AddAction -> i -> Message -- | Segment a request for m places into sets of at most n. -- --
-- >>> b_segment 1024 2056 -- [8,1024,1024] ---- --
-- >>> b_segment 1 5 == replicate 5 1 -- True --b_segment :: Integral i => i -> i -> [i] -- | Variant of b_segment that takes a starting index and returns -- (index,size) duples. -- --
-- >>> b_indices 1 5 0 == zip [0..4] (replicate 5 1) -- True ---- --
-- >>> b_indices 1024 2056 16 -- [(16,8),(24,1024),(1048,1024)] --b_indices :: Integral i => i -> i -> i -> [(i, i)] -- | Generate accumulation buffer given time-domain IR buffer and FFT size. partConv_preparePartConv :: Integral i => i -> i -> i -> Message -- | Result is null for non-conforming data, or has five or seven elements. unpack_n_info_datum_plain :: Num i => [Datum] -> [i] unpack_n_info_plain :: Num i => Message -> [i] -- | Unpack n_info message. unpack_n_info :: Num i => Message -> Maybe (i, i, i, i, i, Maybe (i, i)) unpack_n_info_err :: Num i => Message -> (i, i, i, i, i, Maybe (i, i)) -- | Unpack the '/tr' messages sent by sendTrig. unpack_tr :: (Num i, Fractional f) => Message -> Maybe (i, i, f) unpack_tr_err :: (Num i, Fractional f) => Message -> (i, i, f) unpack_b_setn :: (Num i, Fractional f) => Message -> Maybe (i, i, i, [f]) unpack_b_setn_err :: (Num i, Fractional f) => Message -> (i, i, i, [f]) -- | Unpack b_info message, fields are (id,frames,channels,sample-rate). unpack_b_info :: (Num i, Fractional f) => Message -> Maybe (i, i, i, f) -- | Variant generating error. unpack_b_info_err :: (Num i, Fractional f) => Message -> (i, i, i, f) -- | Functions from Sound.Sc3.Server.Command.Generic specialised to -- Int and Double. module Sound.Sc3.Server.Command.Plain -- | Buffer identifier (buffer number). type Buffer_Id = Int -- | Buffer index (frame index). type Buffer_Ix = Int -- | File connection flag. type Buffer_Leave_File_Open = Bool -- | Audio/control bus identifier (number). type Bus_Id = Int -- | Node identifier (number). type Node_Id = Int -- | Group-node identifier (number). type Group_Id = Int -- | Synth-node identifier (number). type Synth_Id = Int -- | Allocates zero filled buffer to number of channels and samples. -- (Asynchronous) b_alloc :: Buffer_Id -> Int -> Int -> Message -- | Allocate buffer space and read a sound file. (Asynchronous) b_allocRead :: Buffer_Id -> String -> Int -> Int -> Message -- | Allocate buffer space and read a sound file, picking specific -- channels. (Asynchronous) b_allocReadChannel :: Buffer_Id -> String -> Int -> Int -> [Int] -> Message -- | Close attached soundfile and write header information. (Asynchronous) b_close :: Buffer_Id -> Message -- | Fill ranges of sample values. b_fill :: Buffer_Id -> [(Buffer_Ix, Int, Double)] -> Message -- | Free buffer data. (Asynchronous) b_free :: Buffer_Id -> Message -- | Call a command to fill a buffer. (Asynchronous) b_gen :: Buffer_Id -> String -> [Datum] -> Message -- | Get sample values. b_get :: Buffer_Id -> [Buffer_Ix] -> Message -- | Get ranges of sample values. b_getn :: Buffer_Id -> [(Buffer_Ix, Int)] -> Message -- | Request /b_info messages. b_query :: [Buffer_Id] -> Message -- | Read sound file data into an existing buffer. (Asynchronous) b_read :: Buffer_Id -> String -> Int -> Int -> Buffer_Ix -> Buffer_Leave_File_Open -> Message -- | Read sound file data into an existing buffer, picking specific -- channels. (Asynchronous) b_readChannel :: Buffer_Id -> String -> Int -> Int -> Buffer_Ix -> Buffer_Leave_File_Open -> [Int] -> Message -- | Set sample values. b_set :: Buffer_Id -> [(Buffer_Ix, Double)] -> Message -- | Set ranges of sample values. b_setn :: Buffer_Id -> [(Buffer_Ix, [Double])] -> Message -- | Write sound file data. (Asynchronous) b_write :: Buffer_Id -> String -> SoundFileFormat -> SampleFormat -> Int -> Buffer_Ix -> Buffer_Leave_File_Open -> Message -- | Zero sample data. (Asynchronous) b_zero :: Buffer_Id -> Message -- | Fill ranges of bus values. c_fill :: [(Bus_Id, Int, Double)] -> Message -- | Get bus values. c_get :: [Bus_Id] -> Message -- | Get ranges of bus values. c_getn :: [(Bus_Id, Int)] -> Message -- | Set bus values. c_set :: [(Bus_Id, Double)] -> Message -- | Set ranges of bus values. c_setn :: [(Bus_Id, [Double])] -> Message -- | Install a bytecode instrument definition. (Asynchronous) d_recv_bytes :: Blob -> Message -- | Graphdef encoding variant. d_recv_gr :: Graphdef -> Message -- | Synthdef encoding variant. d_recv :: Synthdef -> Message -- | Load an instrument definition from a named file. (Asynchronous) d_load :: String -> Message -- | Load a directory of instrument definitions files. (Asynchronous) d_loadDir :: String -> Message -- | Remove definition once all nodes using it have ended. d_free :: [String] -> Message -- | Free all synths in this group and all its sub-groups. g_deepFree :: [Group_Id] -> Message -- | Delete all nodes in a set of groups. g_freeAll :: [Group_Id] -> Message -- | Add node to head of group. g_head :: [(Group_Id, Node_Id)] -> Message -- | Create a new group. g_new :: [(Group_Id, AddAction, Node_Id)] -> Message -- | Add node to tail of group. g_tail :: [(Group_Id, Node_Id)] -> Message -- | Post a representation of a group's node subtree, optionally including -- the current control values for synths. g_dumpTree :: [(Group_Id, Bool)] -> Message -- | Request a representation of a group's node subtree, optionally -- including the current control values for synths. g_queryTree :: [(Group_Id, Bool)] -> Message -- | Place a node after another. n_after :: [(Node_Id, Node_Id)] -> Message -- | Place a node before another. n_before :: [(Node_Id, Node_Id)] -> Message -- | Fill ranges of a node's control values. n_fill :: Node_Id -> [(String, Int, Double)] -> Message -- | Delete a node. n_free :: [Node_Id] -> Message n_map :: Node_Id -> [(String, Bus_Id)] -> Message -- | Map a node's controls to read from buses. n_mapn only works if the -- control is given as an index and not as a name (3.8.0). n_mapn :: Node_Id -> [(Int, Bus_Id, Int)] -> Message -- | Map a node's controls to read from an audio bus. n_mapa :: Node_Id -> [(String, Bus_Id)] -> Message -- | Map a node's controls to read from audio buses. n_mapan :: Node_Id -> [(String, Bus_Id, Int)] -> Message -- | Get info about a node. n_query :: [Node_Id] -> Message -- | Turn node on or off. n_run :: [(Node_Id, Bool)] -> Message -- | Set a node's control values. n_set :: Node_Id -> [(String, Double)] -> Message -- | Set ranges of a node's control values. n_setn :: Node_Id -> [(Int, [Double])] -> Message -- | Trace a node. n_trace :: [Node_Id] -> Message -- | Move and order a sequence of nodes. n_order :: AddAction -> Node_Id -> [Node_Id] -> Message -- | Create a new parallel group (supernova specific). p_new :: [(Group_Id, AddAction, Node_Id)] -> Message -- | Get control values. s_get :: Synth_Id -> [String] -> Message -- | Get ranges of control values. s_getn :: Synth_Id -> [(String, Int)] -> Message -- | Create a new synth. s_new :: String -> Synth_Id -> AddAction -> Node_Id -> [(String, Double)] -> Message -- | Auto-reassign synth's ID to a reserved value. s_noid :: [Synth_Id] -> Message -- | Send a command to a unit generator. u_cmd :: Int -> Int -> String -> [Datum] -> Message -- | Send a plugin command. cmd :: String -> [Datum] -> Message -- | Remove all bundles from the scheduling queue. clearSched :: Message -- | Select printing of incoming Open Sound Control messages. dumpOsc :: PrintLevel -> Message -- | Set error posting scope and mode. errorMode :: ErrorScope -> ErrorMode -> Message -- | Select reception of notification messages. (Asynchronous) notify :: Bool -> Message -- | End real time mode, close file (un-implemented). nrt_end :: Message -- | Stop synthesis server. quit :: Message -- | Request /status.reply message. status :: Message -- | Request /synced message when all current asynchronous commands -- complete. sync :: Int -> Message -- | Get ranges of sample values. b_getn1 :: Buffer_Id -> (Buffer_Ix, Int) -> Message -- | Variant on b_query. b_query1 :: Buffer_Id -> Message -- | Get ranges of sample values. c_getn1 :: (Bus_Id, Int) -> Message -- | Set single bus values. c_set1 :: Bus_Id -> Double -> Message -- | Set single range of bus values. c_setn1 :: (Bus_Id, [Double]) -> Message -- | Turn a single node on or off. n_run1 :: Node_Id -> Bool -> Message -- | Set a single node control value. n_set1 :: Node_Id -> String -> Double -> Message -- | s_new with no parameters. s_new0 :: String -> Synth_Id -> AddAction -> Node_Id -> Message -- | Segment a request for m places into sets of at most n. -- --
-- >>> b_segment 1024 2056 -- [8,1024,1024] ---- --
-- >>> b_segment 1 5 == replicate 5 1 -- True --b_segment :: Int -> Int -> [Int] -- | Variant of b_segment that takes a starting index and returns -- (index,size) duples. -- --
-- >>> b_indices 1 5 0 == zip [0..4] (replicate 5 1) -- True ---- --
-- >>> b_indices 1024 2056 16 -- [(16,8),(24,1024),(1048,1024)] --b_indices :: Int -> Int -> Int -> [(Int, Int)] -- | Call copy b_gen command. b_gen_copy :: Buffer_Id -> Int -> Buffer_Id -> Int -> Maybe Int -> Message -- | Call sine1 b_gen command. b_gen_sine1 :: Buffer_Id -> [B_Gen] -> [Double] -> Message -- | Call sine2 b_gen command. b_gen_sine2 :: Buffer_Id -> [B_Gen] -> [(Double, Double)] -> Message -- | Call sine3 b_gen command. b_gen_sine3 :: Buffer_Id -> [B_Gen] -> [(Double, Double, Double)] -> Message -- | Call cheby b_gen command. b_gen_cheby :: Buffer_Id -> [B_Gen] -> [Double] -> Message -- | Pre-allocate for b_setn1, values preceding offset are zeroed. b_alloc_setn1 :: Buffer_Id -> Buffer_Ix -> [Double] -> Message -- | Set single sample value. b_set1 :: Buffer_Id -> Buffer_Ix -> Double -> Message -- | Set a range of sample values. b_setn1 :: Buffer_Id -> Buffer_Ix -> [Double] -> Message -- | Segmented variant of b_setn1. b_setn1_segmented :: Int -> Buffer_Id -> Buffer_Ix -> [Double] -> [Message] -- | Generate accumulation buffer given time-domain IR buffer and FFT size. partConv_preparePartConv :: Int -> Int -> Int -> Message unpack_n_info_plain :: Message -> [Int] unpack_n_info :: Message -> Maybe (Int, Int, Int, Int, Int, Maybe (Int, Int)) unpack_n_info_err :: Message -> (Int, Int, Int, Int, Int, Maybe (Int, Int)) unpack_tr :: Message -> Maybe (Int, Int, Double) unpack_tr_err :: Message -> (Int, Int, Double) unpack_b_setn :: Message -> Maybe (Int, Int, Int, [Double]) unpack_b_setn_err :: Message -> (Int, Int, Int, [Double]) unpack_b_info :: Message -> Maybe (Int, Int, Int, Double) unpack_b_info_err :: Message -> (Int, Int, Int, Double) -- | Bracketed Ugens. -- -- ScSynth is controlled by sending instructions in the form of Open -- Sound Control (Osc) messages. One family of messages allocate, set and -- free Buffers. Ugen graphs that utilise Buffers don't contain the -- messages to manage them. These messages are ordinarily written and -- sent outside of the graph context. -- -- The bracketUgen function attaches a pair of Osc message sequences to a -- Ugen value. The first sequence is to be sent before the graph the Ugen -- belongs to is started, the other after it has ended. The messages are -- stored in the Ugen type, but are not written to the SynthDef file -- representing the Ugen graph. The scsynthPlayAt function reads and -- sends Ugen bracket messages, in addition to the Ugen graph itself. -- -- The functions defined here return Ugen values with brackets attached -- to them. module Sound.Sc3.Ugen.Bracketed -- | sfNc is the number of channels at a sound file. readChan is a list of -- channels indexed to read. Returns a channel count, either sfNc or the -- length of readChan. If readChan in empty returns sfNc, else returns -- the length of readChan. This function checks that requested channels -- are in range. readChanToNc :: Int -> [Int] -> Int -- | diskIn or vDiskIn with brackets to 1. allocate and read and then 2. -- close and free buffer. If ctlName is empty the buffer is returned as a -- constant, else as a control with the given name. Ignoring the -- brackets, this is equivalent to writing a diskIn or vDiskIn Ugen, with -- the number of channels given by readChan or derived from the named -- file. If readChan is empty all channels are read. sndfileDiskIn :: (String, Buffer_Id, [Int]) -> FilePath -> Maybe Ugen -> Loop Ugen -> Ugen -- | diskIn form of sndfileDiskIn sndfileIn :: (String, Buffer_Id, [Int]) -> FilePath -> Loop Ugen -> Ugen -- | vDiskIn form of sndfileDiskIn sndfileVarIn :: (String, Buffer_Id, [Int]) -> FilePath -> Ugen -> Loop Ugen -> Ugen -- | Returns Buffer_Id as a bracketed buffer identifier Ugen, along with -- basic sound file information: numberOfChannels, sampleRate, -- numberOfFrames. If ctlName is empty the buffer is returned as a -- constant, else as a control with the given name. The brackets will 1. -- allocate and read and then 2. free the buffer. Ignoring the brackets, -- and the sample rate and frame count, this is equivalent to declaring a -- buffer identifier. If readChan is empty all channels are read. sndfileRead :: (String, Buffer_Id, [Int]) -> FilePath -> (Ugen, Int, Ugen, Ugen) -- | Bracketed b_gen sine1 If ctlName is empty the buffer is returned as a -- constant, else as a control with the given name. bGenSine1 :: (String, Buffer_Id, Int) -> [B_Gen] -> [Double] -> Ugen -- | bGenSine1 with standard wavetable flags (normalise and wavetable and -- clear). bGenSine1Tbl :: (String, Buffer_Id, Int) -> [Double] -> Ugen -- | Bracketed b_gen sine1 If ctlName is empty the buffer is returned as a -- constant, else as a control with the given name. bGenCheby :: (String, Buffer_Id, Int) -> [B_Gen] -> [Double] -> Ugen -- | bGenCheby with standard wavetable flags (normalise and wavetable and -- clear). bGenChebyTbl :: (String, Buffer_Id, Int) -> [Double] -> Ugen -- | Request and display status information from the synthesis server. -- -- /status messages receive /status.reply messages. -- -- /g_queryTree messages recieve /g_queryTree.reply messages. module Sound.Sc3.Server.Status -- | Get nth field of /status.reply message as Floating. extractStatusField :: Floating n => Int -> [Datum] -> n -- | Names of status.reply fields sent in reply to status request. statusFields :: [String] -- | Status pretty printer. statusFormat :: [Datum] -> [String] -- | Concise pretty printer, one line, omits Peak-Cpu and Nominal-Sr. status_format_concise :: [Datum] -> String -- | Name or index and value or bus mapping. type Query_Ctl = (Either String Int, Either Double Int) -- | Nodes are either groups of synths. data Query_Node Query_Group :: Group_Id -> [Query_Node] -> Query_Node Query_Synth :: Synth_Id -> String -> Maybe [Query_Ctl] -> Query_Node -- | Pretty-print Query_Ctl query_ctl_pp :: Query_Ctl -> String -- | Pretty-print Query_Node query_node_pp :: Query_Node -> String -- | Control (parameter) data may be given as names or indices and as -- values or bus mappings. -- --
-- queryTree_ctl (string "freq",float 440) == (Left "freq",Left 440.0) -- queryTree_ctl (int32 1,string "c0") == (Right 1,Right 0) --queryTree_ctl :: (Datum, Datum) -> Query_Ctl -- | If rc is True then Query_Ctl data is expected -- (ie. flag was set at /g_queryTree). k is the synth-id, -- and nm the name. -- --
-- let d = [int32 1,string "freq",float 440] -- in queryTree_synth True 1000 "saw" d --queryTree_synth :: Bool -> Synth_Id -> String -> [Datum] -> (Query_Node, [Datum]) -- | Generate Query_Node for indicated Group_Id. queryTree_group :: Bool -> Group_Id -> Int -> [Datum] -> (Query_Node, [Datum]) -- | Either queryTree_synth or queryTree_group. queryTree_child :: Bool -> [Datum] -> (Query_Node, [Datum]) -- | Parse result of ' g_queryTree '. queryTree :: [Datum] -> Query_Node -- | Extact sequence of Group_Ids from Query_Node. queryNode_to_group_seq :: Query_Node -> [Group_Id] -- | Transform Query_Node to Tree. queryTree_rt :: Query_Node -> Tree Query_Node instance GHC.Show.Show Sound.Sc3.Server.Status.Query_Node instance GHC.Classes.Eq Sound.Sc3.Server.Status.Query_Node -- | Nrt from Ugen module Sound.Sc3.Server.Nrt.Ugen nrt_encoded_graphdef_rec :: Time -> Blob -> Nrt nrt_graphdef_rec :: Time -> Graphdef -> Nrt nrt_syndef_rec :: Time -> Synthdef -> Nrt -- | Make Nrt score that runs Ugen for Time seconds to output bus zero. If -- Ugen is at ControlRate insert k2a Ugen. nrt_ugen_rec :: Time -> Ugen -> Nrt -- | (osc-file, sound-file, sample-rate, sample-format, scsynth-options) type Nrt_Opt = (FilePath, FilePath, Int, SampleFormat, [String]) nrt_encoded_graphdef_render :: Nrt_Opt -> Time -> Int -> Blob -> IO () nrt_syndef_render :: Nrt_Opt -> Time -> Int -> Synthdef -> IO () -- | nrt_render_plain of ugen_rec_nrt. The number of -- channels is equal to the degree of the Ugen. nrt_ugen_render :: Nrt_Opt -> Time -> Ugen -> IO () -- | Collection of standard command modules. module Sound.Sc3.Server.Command -- | Fd variant of interaction with the scsynth server. -- -- This duplicates functions at Monad and at some point at least -- part of the duplication will be removed. module Sound.Sc3.Server.Transport.Fd -- | Send a Message and waitReply for a /done reply. async :: Transport t => t -> Message -> IO Message -- | If isAsync then void async else -- sendMessage. maybe_async :: Transport t => t -> Message -> IO () -- | Variant that timestamps synchronous messages. maybe_async_at :: Transport t => t -> Time -> Message -> IO () -- | Read ScTransport, ScHostname and ScPort environment variables. Default -- values are: Tcp, 127.0.0.1 and 57110. defaultSc3OscSocketAddress :: IO OscSocketAddress -- | Bracket Sc3 communication. withSc3 :: (OscSocket -> IO a) -> IO a -- | Free all nodes (g_freeAll) at group 1. stop :: Transport t => t -> IO () -- | Free all nodes (g_freeAll) at and re-create groups 1 -- and 2. reset :: Transport t => t -> IO () -- | Send d_recv and s_new messages to scsynth. playGraphdef :: Transport t => Int -> t -> Graphdef -> IO () -- | playGraphdef of synthdef_to_graphdef. playSynthdef :: Transport t => Int -> t -> Synthdef -> IO () -- | Send an anonymous instrument definition using -- playSynthdef. playUgen :: Transport t => Int -> t -> Ugen -> IO () -- | Wait (pauseThreadUntil) until bundle is due to be sent relative -- to initial Time, then send each message, asynchronously if -- required. run_bundle :: Transport t => t -> Time -> BundleOf Message -> IO () -- | Perform an Nrt score (as would be rendered by -- writeNrt). In particular note that all timestamps must -- be in NTPr form. nrt_play :: Transport t => t -> Nrt -> IO () -- | withSc3 of nrt_play nrt_audition :: Nrt -> IO () -- | Class for values that can be encoded and sent to scsynth for -- audition. class Audible e play_id :: (Audible e, Transport t) => Int -> t -> e -> IO () play :: (Audible e, Transport t) => t -> e -> IO () -- | withSc3 of play_id audition_id :: Audible e => Int -> e -> IO () -- | audition_id of -1. audition :: Audible e => e -> IO () -- | Turn on notifications, run f, turn off notifications, return -- result. withNotifications :: Transport t => t -> (t -> IO a) -> IO a -- | Variant of b_getn1 that waits for return message and unpacks -- it. -- --
-- withSc3 (\fd -> b_getn1_data fd 0 (0,5)) --b_getn1_data :: Transport t => t -> Int -> (Int, Int) -> IO [Double] -- | Variant of b_getn1_data that segments individual b_getn -- messages to n elements. -- --
-- withSc3 (\fd -> b_getn1_data_segment fd 1 0 (0,5)) --b_getn1_data_segment :: Transport t => t -> Int -> Int -> (Int, Int) -> IO [Double] -- | Variant of b_getn1_data_segment that gets the entire buffer. b_fetch :: Transport t => t -> Int -> Int -> IO [[Double]] -- | head of b_fetch. b_fetch1 :: Transport t => t -> Int -> Int -> IO [Double] -- | Collect server status information. serverStatus :: Transport t => t -> IO [String] -- | Read nominal sample rate of server. serverSampleRateNominal :: Transport t => t -> IO Double -- | Read actual sample rate of server. serverSampleRateActual :: Transport t => t -> IO Double -- | Retrieve status data from server. serverStatusData :: Transport t => t -> IO [Datum] instance Sound.Sc3.Server.Transport.Fd.Audible Sound.Sc3.Server.Graphdef.Graphdef instance Sound.Sc3.Server.Transport.Fd.Audible Sound.Sc3.Server.Synthdef.Synthdef instance Sound.Sc3.Server.Transport.Fd.Audible Sound.Sc3.Ugen.Ugen.Ugen -- | Nrt editing module Sound.Sc3.Server.Nrt.Edit -- | Merge two Nrt scores. Retains internal nrt_end messages. nrt_merge :: Nrt -> Nrt -> Nrt -- | Merge a set of Nrt. Retains internal nrt_end messages. nrt_merge_set :: [Nrt] -> Nrt -- | The empty Nrt. nrt_empty :: Nrt -- | Add bundle at first permissable location of Nrt. nrt_insert_pre :: BundleOf Message -> Nrt -> Nrt -- | Add bundle at last permissable location of Nrt. nrt_insert_post :: BundleOf Message -> Nrt -> Nrt -- | bundleTime of last of nrt_bundles. nrt_end_time :: Nrt -> Time -- | Delete any internal nrt_end messages, and require one at the final -- bundle. nrt_close :: Nrt -> Nrt -- | Append q to p, assumes last timestamp at p -- precedes first at q. nrt_append :: Nrt -> Nrt -> Nrt -- | Envelope / Ugen. module Sound.Sc3.Ugen.Envelope -- | Trapezoidal envelope generator. -- --
-- import Sound.Sc3.Plot -- plotEnvelope [envTrapezoid 0.99 0.5 1 1,envTrapezoid 0.5 0.75 0.65 0.35] --envTrapezoid :: OrdE t => t -> t -> t -> t -> Envelope t -- | latch 1 of impulse 0. first_zero_then_one :: Rate -> Ugen -- | env_circle_z of k-rate first_zero_thereafter_one. env_circle_u :: Ugen -> Envelope_Curve Ugen -> Envelope Ugen -> Envelope Ugen -- | Singleton fade envelope. envGate :: Ugen -> Ugen -> Ugen -> DoneAction Ugen -> Envelope_Curve Ugen -> Ugen -- | Variant with default values for all inputs. gate and -- fadeTime are controls, doneAction is -- RemoveSynth, curve is EnvSin. envGate_def :: Ugen -- | Monad variant of interaction with the scsynth server. module Sound.Sc3.Server.Transport.Monad -- | sendMessage and waitReply for a /done reply. async :: DuplexOsc m => Message -> m Message -- | void of async. async_ :: DuplexOsc m => Message -> m () -- | If isAsync then async_ else sendMessage. maybe_async :: DuplexOsc m => Message -> m () -- | Variant that timestamps synchronous messages. maybe_async_at :: DuplexOsc m => Time -> Message -> m () -- | Hostname and port number. By default Tcp, 127.0.0.1 and 57110. type Sc3_Address = OscSocketAddress -- | Sc3 default address. -- --
-- >>> sc3_default_address -- (Tcp,"127.0.0.1",57110) --sc3_default_address :: Sc3_Address -- | Lookup ScSynth address at ScHostname and ScPort. If either is no set -- default values are used. -- --
-- >>> import System.Environment -- -- >>> setEnv "ScHostname" "192.168.1.53" -- -- >>> sc3_env_or_default_address -- (Udp,"192.168.1.53",57110) --sc3_env_or_default_address :: IO Sc3_Address -- | Maximum packet size, in bytes, that can be sent over Udp. However, see -- also https://tools.ietf.org/html/rfc2675. Tcp is now the -- default transport mechanism for Hsc3. sc3_udp_limit :: Num n => n -- | Bracket Sc3 communication at indicated host and port. withSc3At :: Sc3_Address -> Connection OscSocket a -> IO a -- | Bracket Sc3 communication, ie. withSc3At -- sc3_env_or_default_address. -- --
-- import Sound.Sc3.Server.Command ---- --
-- withSc3 (sendMessage status >> waitReply "/status.reply") --withSc3 :: Connection OscSocket a -> IO a -- | void of withSc3. withSc3_ :: Connection OscSocket a -> IO () -- | timeout_r of withSc3 withSc3_tm :: Double -> Connection OscSocket a -> IO (Maybe a) -- | Run f at k scsynth servers with sequential port numbers -- starting at sc3_port_def. -- --
-- withSc3AtSeq sc3_default_address 2 (sendMessage status >> waitReply "/status.reply") --withSc3AtSeq :: Sc3_Address -> Int -> Connection OscSocket a -> IO [a] -- | void of withSc3AtSeq. withSc3AtSeq_ :: Sc3_Address -> Int -> Connection OscSocket a -> IO () -- | Free all nodes (g_freeAll) at group 1. stop :: SendOsc m => m () -- | Runs clearSched and then frees and re-creates groups -- 1 and 2. reset :: SendOsc m => m () -- | (node-id,add-action,group-id,parameters) type Play_Opt = (Node_Id, AddAction, Group_Id, [(String, Double)]) -- | Make s_new message to play Graphdef. play_graphdef_msg :: Play_Opt -> Graphdef -> Message -- | If the graph size is less than sc3_udp_limit encode and send -- using d_recv_bytes, else write to temporary directory and -- read using d_load. recv_or_load_graphdef :: Transport m => Graphdef -> m Message -- | Send d_recv and s_new messages to scsynth. playGraphdef :: Transport m => Play_Opt -> Graphdef -> m () -- | Send d_recv and s_new messages to scsynth. playSynthdef :: Transport m => Play_Opt -> Synthdef -> m () -- | Send an anonymous instrument definition using -- playSynthdef. playUgen :: Transport m => Play_Opt -> Ugen -> m () -- | Read latency from environment, defaulting to 0.1 seconds. sc_latency :: IO Double -- | Wait (pauseThreadUntil) until bundle is due to be sent relative -- to the initial Time, then send each message, asynchronously if -- required. run_bundle :: Transport m => Double -> Time -> BundleOf Message -> m () -- | Play an Nrt score (as would be rendered by -- writeNrt). -- --
-- let sc = Nrt [bundle 1 [s_new0 "default" (-1) AddToHead 1] -- ,bundle 2 [n_set1 (-1) "gate" 0]] -- in withSc3 (nrt_play sc) --nrt_play :: Transport m => Nrt -> m () -- | Variant where asynchronous commands at time 0 are separated -- out and run before the initial time-stamp is taken. This re-orders -- synchronous commands in relation to asynchronous at time 0. nrt_play_reorder :: Transport m => Nrt -> m () -- | withSc3 of nrt_play. nrt_audition :: Nrt -> IO () -- | Class for values that can be encoded and send to scsynth for -- audition. class Audible e playAt :: (Audible e, Transport m) => Play_Opt -> e -> m () -- | Variant where id is -1. play :: (Audible e, Transport m) => e -> m () -- | withSc3At of playAt. auditionAt :: Audible e => Sc3_Address -> Play_Opt -> e -> IO () -- | withSc3AtSeq of playAt. auditionAtSeq :: Audible e => Sc3_Address -> Play_Opt -> Int -> e -> IO () -- | Default Play_Opt, ie. (-1,addToHead,1,[]) def_play_opt :: Play_Opt -- | auditionAt sc3_env_or_default_address auditionOpt :: Audible e => Play_Opt -> e -> IO () -- | auditionOpt def_play_opt audition :: Audible e => e -> IO () -- | auditionAtSeq def_play_opt auditionSeq :: Audible e => Int -> e -> IO () -- | Turn on notifications, run f, turn off notifications, return -- result. withNotifications :: DuplexOsc m => m a -> m a -- | Variant of b_getn1 that waits for return message and unpacks -- it. -- --
-- withSc3_tm 1.0 (b_getn1_data 0 (0,5)) --b_getn1_data :: DuplexOsc m => Int -> (Int, Int) -> m [Double] -- | Variant of b_getn1_data that segments individual -- b_getn messages to n elements. -- --
-- withSc3_tm 1.0 (b_getn1_data_segment 1 0 (0,5)) --b_getn1_data_segment :: DuplexOsc m => Int -> Int -> (Int, Int) -> m [Double] -- | Variant of b_getn1_data_segment that gets the entire buffer. b_fetch :: DuplexOsc m => Int -> Int -> m [[Double]] -- | First channel of b_fetch, errors if there is no data. -- --
-- withSc3 (b_fetch1 512 123456789) --b_fetch1 :: DuplexOsc m => Int -> Int -> m [Double] -- | Combination of b_query1_unpack and b_fetch. b_fetch_hdr :: Transport m => Int -> Int -> m ((Int, Int, Int, Double), [[Double]]) -- | b_info_unpack_err of b_query1. b_query1_unpack_generic :: (DuplexOsc m, Num n, Fractional r) => Int -> m (n, n, n, r) -- | Type specialised b_query1_unpack_generic. -- --
-- withSc3 (b_query1_unpack 0) --b_query1_unpack :: DuplexOsc m => Buffer_Id -> m (Int, Int, Int, Double) -- | Variant of c_getn1 that waits for the reply and unpacks the -- data. c_getn1_data :: (DuplexOsc m, Floating t) => (Int, Int) -> m [t] -- | Apply f to result of n_query. n_query1_unpack_f :: DuplexOsc m => (Message -> t) -> Node_Id -> m t -- | Variant of n_query that waits for and unpacks the reply. n_query1_unpack :: DuplexOsc m => Node_Id -> m (Maybe (Int, Int, Int, Int, Int, Maybe (Int, Int))) -- | Variant of n_query1_unpack that returns plain (un-lifted) -- result. n_query1_unpack_plain :: DuplexOsc m => Node_Id -> m [Int] -- | Variant of g_queryTree that waits for and unpacks the reply. g_queryTree1_unpack :: DuplexOsc m => Group_Id -> m Query_Node -- | Collect server status information. -- --
-- withSc3 serverStatus >>= mapM putStrLn --serverStatus :: DuplexOsc m => m [String] -- | Collect server status information. -- --
-- withSc3 server_status_concise >>= putStrLn --server_status_concise :: DuplexOsc m => m String -- | Read nominal sample rate of server. -- --
-- withSc3 serverSampleRateNominal --serverSampleRateNominal :: DuplexOsc m => m Double -- | Read actual sample rate of server. -- --
-- withSc3 serverSampleRateActual --serverSampleRateActual :: DuplexOsc m => m Double -- | Retrieve status data from server. serverStatusData :: DuplexOsc m => m [Datum] -- | Collect server node tree information. -- --
-- withSc3 serverTree >>= mapM_ putStrLn --serverTree :: DuplexOsc m => m [String] instance Sound.Sc3.Server.Transport.Monad.Audible Sound.Sc3.Server.Graphdef.Graphdef instance Sound.Sc3.Server.Transport.Monad.Audible Sound.Sc3.Server.Synthdef.Synthdef instance Sound.Sc3.Server.Transport.Monad.Audible Sound.Sc3.Ugen.Ugen.Ugen -- | Collection of modules for writing unit-generator graphs. module Sound.Sc3.Ugen -- | Module to provide a stateful connection to scsynth. -- -- The purpose is to store Osc Messages that should be sent when -- resetting the synthesiser. -- -- This should, but does not: -- --
-- scsynth <- newScsynth -- scsynthOnReset scsynth [b_free 100] -- scsynthPrint scsynth --scsynthOnReset :: Scsynth -> [Message] -> IO () -- | reset scsynth, send all stored onReset messages, clear the onReset -- message store. scsynthReset :: Scsynth -> IO () -- | Play Ugen at Scsynth. Send any required initialisation messages and -- stores and onReset messages. scsynthPlayAt :: Scsynth -> Play_Opt -> Ugen -> IO () -- | scsynthPlayAt with default options. scsynthPlay :: Scsynth -> Ugen -> IO () -- | Recording scsynth. module Sound.Sc3.Server.Recorder -- | Parameters for recording scsynth. data SC3_Recorder SC3_Recorder :: SoundFileFormat -> SampleFormat -> FilePath -> Int -> Int -> Int -> Int -> Int -> Int -> Maybe Time -> SC3_Recorder -- | Sound file format. [rec_sftype] :: SC3_Recorder -> SoundFileFormat -- | Sample format. [rec_coding] :: SC3_Recorder -> SampleFormat -- | File name. [rec_fname] :: SC3_Recorder -> FilePath -- | Number of channels. [rec_nc] :: SC3_Recorder -> Int -- | Bus number. [rec_bus] :: SC3_Recorder -> Int -- | ID of buffer to allocate. [rec_buf_id] :: SC3_Recorder -> Int -- | Number of frames at buffer. [rec_buf_frames] :: SC3_Recorder -> Int -- | ID to allocate for node. [rec_node_id] :: SC3_Recorder -> Int -- | Group to allocate node within. [rec_group_id] :: SC3_Recorder -> Int -- | Recoring duration if fixed. [rec_dur] :: SC3_Recorder -> Maybe Time -- | Default recording structure. default_SC3_Recorder :: SC3_Recorder -- | The name indicates the number of channels. rec_synthdef_nm :: Int -> String -- | Generate Synthdef with required number of channels. -- --
-- Sound.Sc3.Ugen.Dot.draw (rec_synthdef 2) --rec_synthdef :: Int -> Synthdef -- | Asyncronous initialisation Messages (d_recv, -- b_alloc and b_write). -- --
-- withSc3 (sendBundle (bundle immediately (rec_init_m def))) --rec_init_m :: SC3_Recorder -> [Message] -- | Begin recording Message (s_new). -- --
-- withSc3 (sendMessage (rec_begin_m def)) --rec_begin_m :: SC3_Recorder -> Message -- | End recording Messages (n_free, b_close and -- b_free). -- --
-- withSc3 (sendBundle (bundle immediately (rec_end_m def))) --rec_end_m :: SC3_Recorder -> [Message] -- | Nrt score for recorder, if rec_dur is given schedule -- rec_end_m. -- --
-- import Sound.Sc3
-- withSc3 (Sound.Osc.sendMessage (dumpOSC TextPrinter))
-- audition (out 0 (sinOsc ar (mce2 440 441) 0 * 0.1))
-- let rc = default_SC3_Recorder {rec_dur = Just 5.0}
-- nrt_audition (sc3_recorder rc)
--
sc3_recorder :: SC3_Recorder -> Nrt
-- | Collection of modules for communicating with the SuperCollider
-- synthesis server, see also Sound.Sc3.Server.FD and
-- Sound.Sc3.Server.Monad.
module Sound.Sc3.Server
-- | Composite of Sound.Sc3.Server and Monad transport.
module Sound.Sc3.Server.Monad
-- | Composite of Sound.Sc3.Common, Sound.Sc3.Server.Monad,
-- Sound.Sc3.Ugen and Sound.Sc3.Ugen.Bindings.
module Sound.Sc3
-- | Composite of Sound.Sc3.Server and Fd transport.
module Sound.Sc3.Server.Fd
-- | Composite of Sound.Sc3.Common, Sound.Sc3.Server.Fd,
-- Sound.Sc3.Ugen and Sound.Sc3.Ugen.Bindings.
module Sound.Sc3.Fd