packages feed

csound-expression-opcodes (empty) → 0.0.0

raw patch · 27 files changed

+14038/−0 lines, 27 filesdep +basedep +csound-expression-dynamicdep +csound-expression-typedsetup-changed

Dependencies added: base, csound-expression-dynamic, csound-expression-typed, transformers

Files

+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Anton Kholomiov 2013++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Anton Kholomiov nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+import Distribution.Simple+main = defaultMain
+ csound-expression-opcodes.cabal view
@@ -0,0 +1,45 @@+Name:          csound-expression-opcodes+Version:       0.0.0+Cabal-Version: >= 1.6+License:       BSD3+License-file:  LICENSE+Author:	       Anton Kholomiov+Synopsis:      opcodes for the library csound-expression+Stability:     Experimental+Tested-With:   GHC==7.6+Build-Type:    Simple+Category:      Music, Sound+Maintainer:    <anton.kholomiov@gmail.com>++Description:   opcodes for the library csound-expression++Library+  Ghc-Options:    -Wall+  Build-Depends:+        base >= 4, base < 5, transformers, csound-expression-typed, csound-expression-dynamic+  Hs-Source-Dirs:      src/+  Exposed-Modules:+    Csound.Typed.Opcode+    Csound.Typed.Opcode.SignalGenerators+    Csound.Typed.Opcode.SignalIO+    Csound.Typed.Opcode.SignalModifiers+    Csound.Typed.Opcode.InstrumentControl+    Csound.Typed.Opcode.JackoOpcodes+    Csound.Typed.Opcode.SerialIO+    Csound.Typed.Opcode.TableControl+    Csound.Typed.Opcode.FLTK+    Csound.Typed.Opcode.MathematicalOperations+    Csound.Typed.Opcode.PitchConverters+    Csound.Typed.Opcode.RealtimeMIDI+    Csound.Typed.Opcode.SignalFlowGraphOpcodes+    Csound.Typed.Opcode.SpectralProcessing+    Csound.Typed.Opcode.Strings+    Csound.Typed.Opcode.Vectorial+    Csound.Typed.Opcode.ZakPatchSystem+    Csound.Typed.Opcode.PluginHosting+    Csound.Typed.Opcode.OSC+    Csound.Typed.Opcode.Network+    Csound.Typed.Opcode.RemoteOpcodes+    Csound.Typed.Opcode.MixerOpcodes+    Csound.Typed.Opcode.ImageProcessingOpcodes+    Csound.Typed.Opcode.Miscellaneous
+ src/Csound/Typed/Opcode.hs view
@@ -0,0 +1,47 @@+module Csound.Typed.Opcode (module Csound.Typed.Opcode.SignalGenerators,+    module Csound.Typed.Opcode.SignalIO,+    module Csound.Typed.Opcode.SignalModifiers,+    module Csound.Typed.Opcode.InstrumentControl,+    module Csound.Typed.Opcode.JackoOpcodes,+    module Csound.Typed.Opcode.SerialIO,+    module Csound.Typed.Opcode.TableControl,+    module Csound.Typed.Opcode.FLTK,+    module Csound.Typed.Opcode.MathematicalOperations,+    module Csound.Typed.Opcode.PitchConverters,+    module Csound.Typed.Opcode.RealtimeMIDI,+    module Csound.Typed.Opcode.SignalFlowGraphOpcodes,+    module Csound.Typed.Opcode.SpectralProcessing,+    module Csound.Typed.Opcode.Strings,+    module Csound.Typed.Opcode.Vectorial,+    module Csound.Typed.Opcode.ZakPatchSystem,+    module Csound.Typed.Opcode.PluginHosting,+    module Csound.Typed.Opcode.OSC,+    module Csound.Typed.Opcode.Network,+    module Csound.Typed.Opcode.RemoteOpcodes,+    module Csound.Typed.Opcode.MixerOpcodes,+    module Csound.Typed.Opcode.ImageProcessingOpcodes,+    module Csound.Typed.Opcode.Miscellaneous) where++import Csound.Typed.Opcode.SignalGenerators+import Csound.Typed.Opcode.SignalIO+import Csound.Typed.Opcode.SignalModifiers+import Csound.Typed.Opcode.InstrumentControl+import Csound.Typed.Opcode.JackoOpcodes+import Csound.Typed.Opcode.SerialIO+import Csound.Typed.Opcode.TableControl+import Csound.Typed.Opcode.FLTK+import Csound.Typed.Opcode.MathematicalOperations+import Csound.Typed.Opcode.PitchConverters+import Csound.Typed.Opcode.RealtimeMIDI+import Csound.Typed.Opcode.SignalFlowGraphOpcodes+import Csound.Typed.Opcode.SpectralProcessing+import Csound.Typed.Opcode.Strings+import Csound.Typed.Opcode.Vectorial+import Csound.Typed.Opcode.ZakPatchSystem+import Csound.Typed.Opcode.PluginHosting+import Csound.Typed.Opcode.OSC+import Csound.Typed.Opcode.Network+import Csound.Typed.Opcode.RemoteOpcodes+import Csound.Typed.Opcode.MixerOpcodes+import Csound.Typed.Opcode.ImageProcessingOpcodes+import Csound.Typed.Opcode.Miscellaneous
+ src/Csound/Typed/Opcode/FLTK.hs view
@@ -0,0 +1,827 @@+module Csound.Typed.Opcode.FLTK (+    +    +    -- * Containers.+    flGroup, flGroupEnd, flPack, flPackEnd, flPanel, flPanelEnd, flScroll, flScrollEnd, flTabs, flTabsEnd,+    +    -- * Valuators.+    flCount, flJoy, flKnob, flRoller, flSlider, flText,+    +    -- * Other.+    flBox, flButBank, flButton, flCloseButton, flExecButton, flGetsnap, flHvsBox, flHvsBoxSetValue, flKeyIn, flLoadsnap, flMouse, flPrintk, flPrintk2, flRun, flSavesnap, flSetsnap, flSetSnapGroup, flSetVal, flSetVal_i, flSlidBnk, flSlidBnk2, flSlidBnk2Set, flSlidBnk2Setk, flSlidBnkGetHandle, flSlidBnkSet, flSlidBnkSetk, flUpdate, flValue, flVkeybd, flVslidBnk, flVslidBnk2, flXyin, vphaseseg,+    +    -- * Appearance.+    flColor, flColor2, flHide, flLabel, flSetAlign, flSetBox, flSetColor, flSetColor2, flSetFont, flSetPosition, flSetSize, flSetText, flSetTextColor, flSetTextSize, flSetTextType, flShow) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Containers.++-- | +-- A FLTK container opcode that groups child widgets.+--+-- >  FLgroup  "label", iwidth, iheight, ix, iy [, iborder] [, image]+--+-- csound doc: <http://www.csounds.com/manual/html/FLgroup.html>+flGroup ::  Str -> D -> D -> D -> D -> SE ()+flGroup b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "FLgroup" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Marks the end of a group of FLTK child widgets.+--+-- >  FLgroupEnd  +--+-- csound doc: <http://www.csounds.com/manual/html/FLgroupEnd.html>+flGroupEnd ::   SE ()+flGroupEnd  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLgroupEnd" [(Xr,[])] []++-- | +-- Provides the functionality of compressing and aligning FLTK widgets.+--+-- FLpack provides the functionality of compressing and aligning widgets.+--+-- >  FLpack  iwidth, iheight, ix, iy, itype, ispace, iborder+--+-- csound doc: <http://www.csounds.com/manual/html/FLpack.html>+flPack ::  D -> D -> D -> D -> D -> D -> D -> SE ()+flPack b1 b2 b3 b4 b5 b6 b7 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "FLpack" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                               ,a2+                                                                               ,a3+                                                                               ,a4+                                                                               ,a5+                                                                               ,a6+                                                                               ,a7]++-- | +-- Marks the end of a group of compressed or aligned FLTK widgets.+--+-- >  FLpackEnd  +--+-- csound doc: <http://www.csounds.com/manual/html/FLpackEnd.html>+flPackEnd ::   SE ()+flPackEnd  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLpackEnd" [(Xr,[])] []++-- | +-- Creates a window that contains FLTK widgets.+--+-- >  FLpanel  "label", iwidth, iheight [, ix] [, iy] [, iborder] [, ikbdcapture] [, iclose]+--+-- csound doc: <http://www.csounds.com/manual/html/FLpanel.html>+flPanel ::  Str -> D -> D -> SE ()+flPanel b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLpanel" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Marks the end of a group of FLTK widgets contained inside of a window (panel).+--+-- >  FLpanelEnd  +--+-- csound doc: <http://www.csounds.com/manual/html/FLpanelEnd.html>+flPanelEnd ::   SE ()+flPanelEnd  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLpanelEnd" [(Xr,[])] []++-- | +-- A FLTK opcode that adds scroll bars to an area.+--+-- FLscroll adds scroll bars to an area.+--+-- >  FLscroll  iwidth, iheight [, ix] [, iy]+--+-- csound doc: <http://www.csounds.com/manual/html/FLscroll.html>+flScroll ::  D -> D -> SE ()+flScroll b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLscroll" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- A FLTK opcode that marks the end of an area with scrollbars.+--+-- >  FLscrollEnd  +--+-- csound doc: <http://www.csounds.com/manual/html/FLscrollEnd.html>+flScrollEnd ::   SE ()+flScrollEnd  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLscrollEnd" [(Xr,[])] []++-- | +-- Creates a tabbed FLTK interface.+--+-- FLtabs is a “file card tabs” interface that is useful to display several areas containing widgets in the same windows, alternatively. It must be used together with FLgroup, another container that groups child widgets.+--+-- >  FLtabs  iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLtabs.html>+flTabs ::  D -> D -> D -> D -> SE ()+flTabs b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "FLtabs" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Marks the end of a tabbed FLTK interface.+--+-- >  FLtabsEnd  +--+-- csound doc: <http://www.csounds.com/manual/html/FLtabsEnd.html>+flTabsEnd ::   SE ()+flTabsEnd  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLtabsEnd" [(Xr,[])] []++-- Valuators.++-- | +-- A FLTK widget opcode that creates a counter.+--+-- Allows the user to increase/decrease a value with mouse clicks on a corresponding arrow button.+--+-- > kout, ihandle  FLcount  "label", imin, imax, istep1, istep2, itype, \+-- >           iwidth, iheight, ix, iy, iopcode [, kp1] [, kp2] [, kp3] [...] [, kpN]+--+-- csound doc: <http://www.csounds.com/manual/html/FLcount.html>+flCount :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flCount b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10 <*> unD b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = mopcs "FLcount" ([Kr,Ir]+                                                                 ,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir] ++ (repeat Kr)) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- A FLTK opcode that acts like a joystick.+--+-- FLjoy is a squared area that allows the user to modify two output values at the same time. It acts like a joystick.+--+-- > koutx, kouty, ihandlex, ihandley  FLjoy  "label", iminx, imaxx, iminy, \+-- >           imaxy, iexpx, iexpy, idispx, idispy, iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLjoy.html>+flJoy :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flJoy b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10 <*> unD b11 <*> unD b12 <*> unD b13+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 = mopcs "FLjoy" ([Kr,Kr,Ir,Ir]+                                                                       ,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13]++-- | +-- A FLTK widget opcode that creates a knob.+--+-- > kout, ihandle  FLknob  "label", imin, imax, iexp, itype, idisp, iwidth, \+-- >           ix, iy [, icursorsize]+--+-- csound doc: <http://www.csounds.com/manual/html/FLknob.html>+flKnob :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flKnob b1 b2 b3 b4 b5 b6 b7 b8 b9 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = mopcs "FLknob" ([Kr,Ir]+                                                        ,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- A FLTK widget that creates a transversal knob.+--+-- FLroller is a sort of knob, but put transversally.+--+-- > kout, ihandle  FLroller  "label", imin, imax, istep, iexp, itype, idisp, \+-- >           iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLroller.html>+flRoller :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flRoller b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10 <*> unD b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = mopcs "FLroller" ([Kr,Ir]+                                                                  ,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- Puts a slider into the corresponding FLTK container.+--+-- FLslider puts a slider into the corresponding container.+--+-- > kout, ihandle  FLslider  "label", imin, imax, iexp, itype, idisp, iwidth, \+-- >           iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLslider.html>+flSlider :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flSlider b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = mopcs "FLslider" ([Kr,Ir]+                                                              ,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- A FLTK widget opcode that creates a textbox.+--+-- FLtext allows the user to modify a parameter value by directly typing it into a text field.+--+-- > kout, ihandle  FLtext  "label", imin, imax, istep, itype, iwidth, \+-- >           iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLtext.html>+flText :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flText b1 b2 b3 b4 b5 b6 b7 b8 b9 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = mopcs "FLtext" ([Kr,Ir],[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                               ,a2+                                                                                               ,a3+                                                                                               ,a4+                                                                                               ,a5+                                                                                               ,a6+                                                                                               ,a7+                                                                                               ,a8+                                                                                               ,a9]++-- Other.++-- | +-- A FLTK widget that displays text inside of a box.+--+-- > ihandle  FLbox  "label", itype, ifont, isize, iwidth, iheight, ix, iy [, image]+--+-- csound doc: <http://www.csounds.com/manual/html/FLbox.html>+flBox ::  Str -> D -> D -> D -> D -> D -> D -> D -> SE D+flBox b1 b2 b3 b4 b5 b6 b7 b8 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "FLbox" [(Ir,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5+                                                                                       ,a6+                                                                                       ,a7+                                                                                       ,a8]++-- | +-- A FLTK widget opcode that creates a bank of buttons.+--+-- > kout, ihandle  FLbutBank  itype, inumx, inumy, iwidth, iheight, ix, iy, \+-- >           iopcode [, kp1] [, kp2] [, kp3] [, kp4] [, kp5] [....] [, kpN]+--+-- csound doc: <http://www.csounds.com/manual/html/FLbutBank.html>+flButBank :: Tuple a => D -> D -> D -> D -> D -> D -> D -> D -> SE a+flButBank b1 b2 b3 b4 b5 b6 b7 b8 = dirtyTuple $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = mopcs "FLbutBank" ([Kr,Ir]+                                                        ,[Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir] ++ (repeat Kr)) [a1,a2,a3,a4,a5,a6,a7,a8]++-- | +-- A FLTK widget opcode that creates a button.+--+-- > kout, ihandle  FLbutton  "label", ion, ioff, itype, iwidth, iheight, ix, \+-- >           iy, iopcode [, kp1] [, kp2] [, kp3] [, kp4] [, kp5] [....] [, kpN]+--+-- csound doc: <http://www.csounds.com/manual/html/FLbutton.html>+flButton :: Tuple a => Str -> D -> D -> D -> D -> D -> D -> D -> D -> SE a+flButton b1 b2 b3 b4 b5 b6 b7 b8 b9 = dirtyTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = mopcs "FLbutton" ([Kr,Ir]+                                                          ,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir] ++ (repeat Kr)) [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- A FLTK widget opcode that creates a button that will close the panel+--       window it is a part of.+--+-- > ihandle  FLcloseButton  "label", iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLcloseButton.html>+flCloseButton ::  Str -> D -> D -> D -> D -> SE D+flCloseButton b1 b2 b3 b4 b5 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "FLcloseButton" [(Ir,[Sr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- A FLTK widget opcode that creates a button that executes a command.+--+-- A FLTK widget opcode that creates a button that executes a command. Useful+--       for opening up HTML documentation as About text or to start a separate+--       program from an FLTK widget interface.+--+-- > ihandle  FLexecButton  "command", iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLexecButton.html>+flExecButton ::  Str -> D -> D -> D -> D -> SE D+flExecButton b1 b2 b3 b4 b5 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "FLexecButton" [(Ir,[Sr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Retrieves a previously stored FLTK snapshot.+--+-- Retrieves a previously stored snapshot (in memory), i.e. sets all valuator to the corresponding values stored in that snaphot.+--+-- > inumsnap  FLgetsnap  index [, igroup]+--+-- csound doc: <http://www.csounds.com/manual/html/FLgetsnap.html>+flGetsnap ::  D -> SE D+flGetsnap b1 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "FLgetsnap" [(Ir,[Ir,Ir])] [a1]++-- | +-- Displays a box with a grid useful for visualizing two-dimensional Hyper Vectorial Synthesis.+--+-- FLhvsBox displays a box with a grid useful for visualizing two-dimensional Hyper Vectorial Synthesis.+--+-- > ihandle  FLhvsBox  inumlinesX, inumlinesY, iwidth, iheight, ix, iy [, image]+--+-- csound doc: <http://www.csounds.com/manual/html/FLhvsBox.html>+flHvsBox ::  D -> D -> D -> D -> D -> D -> SE D+flHvsBox b1 b2 b3 b4 b5 b6 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "FLhvsBox" [(Ir,[Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Sets the cursor position of a previously-declared FLhvsBox widget.+--+-- FLhvsBoxSetValue sets the cursor position of a previously-declared FLhvsBox widget.+--+-- >  FLhvsBoxSetValue  kx, ky, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLhvsBoxSetValue.html>+flHvsBoxSetValue ::  Sig -> Sig -> D -> SE ()+flHvsBoxSetValue b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLhvsBoxSetValue" [(Xr,[Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Reports keys pressed (on alphanumeric keyboard) when an FLTK panel has focus.+--+-- FLkeyIn informs about the status of a key pressed by the user on the alphanumeric keyboard when an FLTK panel has got the focus.+--+-- > kascii  FLkeyIn  [ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/FLkeyIn.html>+flKeyIn ::   SE Sig+flKeyIn  = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ return $ f +    where f  = opcs "FLkeyIn" [(Kr,[Ir])] []++-- | +-- Loads all snapshots into the memory bank of the current orchestra.+--+-- FLloadsnap loads all the snapshots contained in a file into the memory bank of the current orchestra.+--+-- >  FLloadsnap  "filename" [, igroup]+--+-- csound doc: <http://www.csounds.com/manual/html/FLloadsnap.html>+flLoadsnap ::  Str -> SE ()+flLoadsnap b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "FLloadsnap" [(Xr,[Sr,Ir])] [a1]++-- | +-- Returns the mouse position and the state of the three mouse buttons.+--+-- FLmouse returns the coordinates of the mouse position within an FLTK panel and the state of the three mouse buttons.+--+-- > kx, ky, kb1, kb2, kb3  FLmouse  [imode]+--+-- csound doc: <http://www.csounds.com/manual/html/FLmouse.html>+flMouse :: Tuple a =>  SE a+flMouse  = dirtyTuple $ return $ f +    where f  = mopcs "FLmouse" ([Kr,Kr,Kr,Kr,Kr],[Ir]) []++-- | +-- A FLTK opcode that prints a k-rate value at specified intervals.+--+-- FLprintk is similar to printk but shows values of a k-rate signal in a text field instead of on the console.+--+-- >  FLprintk  itime, kval, idisp+--+-- csound doc: <http://www.csounds.com/manual/html/FLprintk.html>+flPrintk ::  D -> Sig -> D -> SE ()+flPrintk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLprintk" [(Xr,[Ir,Kr,Ir])] [a1,a2,a3]++-- | +-- A FLTK opcode that prints a new value every time a control-rate variable changes.+--+-- FLprintk2 is similar to FLprintk but shows a k-rate variable's value only when it changes.+--+-- >  FLprintk2  kval, idisp+--+-- csound doc: <http://www.csounds.com/manual/html/FLprintk2.html>+flPrintk2 ::  Sig -> D -> SE ()+flPrintk2 b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "FLprintk2" [(Xr,[Kr,Ir])] [a1,a2]++-- | +-- Starts the FLTK widget thread.+--+-- >  FLrun  +--+-- csound doc: <http://www.csounds.com/manual/html/FLrun.html>+flRun ::   SE ()+flRun  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLrun" [(Xr,[])] []++-- | +-- Saves all snapshots currently created into a file.+--+-- FLsavesnap saves all snapshots currently created (i.e. the entire memory bank) into a file.+--+-- >  FLsavesnap  "filename" [, igroup]+--+-- csound doc: <http://www.csounds.com/manual/html/FLsavesnap.html>+flSavesnap ::  Str -> SE ()+flSavesnap b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "FLsavesnap" [(Xr,[Sr,Ir])] [a1]++-- | +-- Stores the current status of all FLTK valuators into a snapshot location.+--+-- FLsetsnap stores the current status of all valuators present in the orchestra into a snapshot location (in memory).+--+-- > inumsnap, inumval  FLsetsnap  index [, ifn, igroup]+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetsnap.html>+flSetsnap :: Tuple a => D -> SE a+flSetsnap b1 = dirtyTuple $ f <$> unD b1+    where f a1 = mopcs "FLsetsnap" ([Ir,Ir],[Ir,Ir,Ir]) [a1]++-- | +-- Determines the snapshot group for FL valuators.+--+-- FLsetSnapGroup determines the snapshot group of valuators declared after it.+--+-- >  FLsetSnapGroup  igroup+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetSnapGroup.html>+flSetSnapGroup ::  D -> SE ()+flSetSnapGroup b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "FLsetSnapGroup" [(Xr,[Ir])] [a1]++-- | +-- Sets the value of a FLTK valuator at control-rate.+--+-- FLsetVal is almost identical to FLsetVal_i. Except it operates at k-rate and it affects the target valuator only when ktrig is set to a non-zero value.+--+-- >  FLsetVal  ktrig, kvalue, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetVal.html>+flSetVal ::  Sig -> Sig -> D -> SE ()+flSetVal b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLsetVal" [(Xr,[Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Sets the value of a FLTK valuator to a number provided by the user.+--+-- FLsetVal_i forces the value of a valuator to a number provided by the user.+--+-- >  FLsetVal_i  ivalue, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetVal_i.html>+flSetVal_i ::  D -> D -> SE ()+flSetVal_i b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLsetVal_i" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- A FLTK widget containing a bank of horizontal sliders.+--+-- FLslidBnk is a widget containing a bank of horizontal sliders.+--+-- >  FLslidBnk  "names", inumsliders [, ioutable] [, iwidth] [, iheight] [, ix] \+-- >           [, iy] [, itypetable] [, iexptable] [, istart_index] [, iminmaxtable]+--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnk.html>+flSlidBnk ::  Str -> D -> SE ()+flSlidBnk b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "FLslidBnk" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- A FLTK widget containing a bank of horizontal sliders.+--+-- FLslidBnk2 is a widget containing a bank of horizontal sliders.+--+-- >  FLslidBnk2  "names", inumsliders, ioutable, iconfigtable [,iwidth, iheight, ix, iy, istart_index] +--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnk2.html>+flSlidBnk2 ::  Str -> D -> D -> D -> SE ()+flSlidBnk2 b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "FLslidBnk2" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- modify the values of a slider bank.+--+-- FLslidBnk2Set modifies the values of a slider bank according to an array of values stored in a table.+--+-- >  FLslidBnk2Set  ihandle, ifn [, istartIndex, istartSlid, inumSlid]+--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnk2Set.html>+flSlidBnk2Set ::  D -> Tab -> SE ()+flSlidBnk2Set b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2+    where f a1 a2 = opcs "FLslidBnk2Set" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- modify the values of a slider bank.+--+-- FLslidBnk2Setk modifies the values of a slider bank according to an array of values stored in a table.+--+-- >  FLslidBnk2Setk   ktrig, ihandle, ifn [, istartIndex, istartSlid, inumSlid]+--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnk2Setk.html>+flSlidBnk2Setk ::  Sig -> D -> Tab -> SE ()+flSlidBnk2Setk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "FLslidBnk2Setk" [(Xr,[Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- gets the handle of last slider bank created.+--+-- FLslidBnkGetHandle gets the handle of last slider bank created.+--+-- > ihandle  FLslidBnkGetHandle  +--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnkGetHandle.html>+flSlidBnkGetHandle ::   SE D+flSlidBnkGetHandle  = fmap ( D . return) $ SE $ (depT =<<) $ lift $ return $ f +    where f  = opcs "FLslidBnkGetHandle" [(Ir,[])] []++-- | +-- modify the values of a slider bank.+--+-- FLslidBnkSet modifies the values of a slider bank according to an array of values stored in a table.+--+-- >  FLslidBnkSet  ihandle, ifn [, istartIndex, istartSlid, inumSlid]+--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnkSet.html>+flSlidBnkSet ::  D -> Tab -> SE ()+flSlidBnkSet b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2+    where f a1 a2 = opcs "FLslidBnkSet" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- modify the values of a slider bank.+--+-- FLslidBnkSetk modifies the values of a slider bank according to an array of values stored in a table.+--+-- >  FLslidBnkSetk   ktrig, ihandle, ifn [, istartIndex, istartSlid, inumSlid]+--+-- csound doc: <http://www.csounds.com/manual/html/FLslidBnkSetk.html>+flSlidBnkSetk ::  Sig -> D -> Tab -> SE ()+flSlidBnkSetk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "FLslidBnkSetk" [(Xr,[Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Same as the FLrun opcode.+--+-- >  FLupdate  +--+-- csound doc: <http://www.csounds.com/manual/html/FLupdate.html>+flUpdate ::   SE ()+flUpdate  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "FLupdate" [(Xr,[])] []++-- | +-- Shows the current value of a FLTK valuator.+--+-- FLvalue shows current the value of a valuator in a text field.+--+-- > ihandle  FLvalue  "label", iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLvalue.html>+flValue ::  Str -> D -> D -> D -> D -> SE D+flValue b1 b2 b3 b4 b5 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "FLvalue" [(Ir,[Sr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- An FLTK widget opcode that creates a virtual keyboard widget.+--+-- An FLTK widget opcode that creates a virtual keyboard widget. This must+--       be used in conjunction with the virtual midi keyboard driver for this to+--       operate correctly.  The purpose of this opcode is for making demo versions+--       of MIDI orchestras with the virtual keyboard embedded within the main+--       window.+--+-- >  FLvkeybd  "keyboard.map", iwidth, iheight, ix, iy+--+-- csound doc: <http://www.csounds.com/manual/html/FLvkeybd.html>+flVkeybd ::  Str -> D -> D -> D -> D -> SE ()+flVkeybd b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "FLvkeybd" [(Xr,[Sr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- A FLTK widget containing a bank of vertical sliders.+--+-- FLvslidBnk is a widget containing a bank of vertical sliders.+--+-- >  FLvslidBnk  "names", inumsliders [, ioutable] [, iwidth] [, iheight] [, ix] \+-- >           [, iy] [, itypetable] [, iexptable] [, istart_index] [, iminmaxtable]+--+-- csound doc: <http://www.csounds.com/manual/html/FLvslidBnk.html>+flVslidBnk ::  Str -> D -> SE ()+flVslidBnk b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "FLvslidBnk" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- A FLTK widget containing a bank of vertical sliders.+--+-- FLvslidBnk2 is a widget containing a bank of vertical sliders.+--+-- >  FLvslidBnk2  "names", inumsliders, ioutable, iconfigtable [,iwidth, iheight, ix, iy, istart_index]+--+-- csound doc: <http://www.csounds.com/manual/html/FLvslidBnk2.html>+flVslidBnk2 ::  Str -> D -> D -> D -> SE ()+flVslidBnk2 b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "FLvslidBnk2" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Senses the mouse cursor position in a user-defined area inside an FLpanel.+--+-- Similar to xyin, sense the mouse cursor position in a user-defined area inside an FLpanel.+--+-- > koutx, kouty, kinside   FLxyin  ioutx_min, ioutx_max, iouty_min, iouty_max, \+-- >           iwindx_min, iwindx_max, iwindy_min, iwindy_max [, iexpx, iexpy, ioutx, iouty]+--+-- csound doc: <http://www.csounds.com/manual/html/FLxyin.html>+flXyin :: Tuple a => D -> D -> D -> D -> D -> D -> D -> D -> SE a+flXyin b1 b2 b3 b4 b5 b6 b7 b8 = dirtyTuple $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = mopcs "FLxyin" ([Kr,Kr,Kr]+                                                     ,[Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8]++-- | +-- Allows one-dimensional HVS (Hyper-Vectorial Synthesis).+--+-- vphaseseg allows one-dimensional HVS (Hyper-Vectorial Synthesis).+--+-- >  vphaseseg  kphase, ioutab, ielems, itab1,idist1,itab2 \+-- >           [,idist2,itab3, ... ,idistN-1,itabN]+--+-- csound doc: <http://www.csounds.com/manual/html/vphaseseg.html>+vphaseseg ::  Sig -> D -> D -> [D] -> SE ()+vphaseseg b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> mapM unD b4+    where f a1 a2 a3 a4 = opcs "vphaseseg" [(Xr,[Kr] ++ (repeat Ir))] ([a1,a2,a3] ++ a4)++-- Appearance.++-- | +-- A FLTK opcode that sets the primary colors.+--+-- Sets the primary colors to RGB values given by the user.+--+-- >  FLcolor  ired, igreen, iblue [, ired2, igreen2, iblue2]+--+-- csound doc: <http://www.csounds.com/manual/html/FLcolor.html>+flColor ::  D -> D -> D -> SE ()+flColor b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLcolor" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- A FLTK opcode that sets the secondary (selection) color.+--+-- FLcolor2 is the same of FLcolor except it affects the secondary (selection) color.+--+-- >  FLcolor2  ired, igreen, iblue+--+-- csound doc: <http://www.csounds.com/manual/html/FLcolor2.html>+flColor2 ::  D -> D -> D -> SE ()+flColor2 b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLcolor2" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Hides the target FLTK widget.+--+-- Hides the target FLTK widget, making it invisible.+--+-- >  FLhide  ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLhide.html>+flHide ::  D -> SE ()+flHide b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "FLhide" [(Xr,[Ir])] [a1]++-- | +-- A FLTK opcode that modifies the appearance of a text label.+--+-- Modifies a set of parameters related to the text label appearence of a widget (i.e. size, font, alignment and color of corresponding text).+--+-- >  FLlabel  isize, ifont, ialign, ired, igreen, iblue+--+-- csound doc: <http://www.csounds.com/manual/html/FLlabel.html>+flLabel ::  D -> D -> D -> D -> D -> D -> SE ()+flLabel b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "FLlabel" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Sets the text alignment of a label of a FLTK widget.+--+-- FLsetAlign sets the text alignment of the label of the target widget.+--+-- >  FLsetAlign  ialign, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetAlign.html>+flSetAlign ::  D -> D -> SE ()+flSetAlign b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLsetAlign" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Sets the appearance of a box surrounding a FLTK widget.+--+-- FLsetBox sets the appearance of a box surrounding the target widget.+--+-- >  FLsetBox  itype, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetBox.html>+flSetBox ::  D -> D -> SE ()+flSetBox b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLsetBox" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Sets the primary color of a FLTK widget.+--+-- FLsetColor sets the primary color of the target widget.+--+-- >  FLsetColor  ired, igreen, iblue, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetColor.html>+flSetColor ::  D -> D -> D -> D -> SE ()+flSetColor b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "FLsetColor" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sets the secondary (or selection) color of a FLTK widget.+--+-- FLsetColor2 sets the secondary (or selection) color of the target widget.+--+-- >  FLsetColor2  ired, igreen, iblue, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetColor2.html>+flSetColor2 ::  D -> D -> D -> D -> SE ()+flSetColor2 b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "FLsetColor2" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sets the font type of a FLTK widget.+--+-- FLsetFont sets the font type of the target widget.+--+-- >  FLsetFont  ifont, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetFont.html>+flSetFont ::  D -> D -> SE ()+flSetFont b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLsetFont" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Sets the position of a FLTK widget.+--+-- FLsetPosition sets the position of the target widget according to the ix and iy arguments.+--+-- >  FLsetPosition  ix, iy, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetPosition.html>+flSetPosition ::  D -> D -> D -> SE ()+flSetPosition b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLsetPosition" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Resizes a FLTK widget.+--+-- FLsetSize resizes the target widget (not the size of its text) according to the iwidth and iheight arguments.+--+-- >  FLsetSize  iwidth, iheight, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetSize.html>+flSetSize ::  D -> D -> D -> SE ()+flSetSize b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "FLsetSize" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Sets the label of a FLTK widget.+--+-- FLsetText sets the label of the target widget to the double-quoted text string provided with the itext argument.+--+-- >  FLsetText  "itext", ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetText.html>+flSetText ::  Str -> D -> SE ()+flSetText b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "FLsetText" [(Xr,[Sr,Ir])] [a1,a2]++-- | +-- Sets the color of the text label of a FLTK widget.+--+-- FLsetTextColor sets the color of the text label of the target widget.+--+-- >  FLsetTextColor  ired, iblue, igreen, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetTextColor.html>+flSetTextColor ::  D -> D -> D -> D -> SE ()+flSetTextColor b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "FLsetTextColor" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sets the size of the text label of a FLTK widget.+--+-- FLsetTextSize sets the size of the text label of the target widget.+--+-- >  FLsetTextSize  isize, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetTextSize.html>+flSetTextSize ::  D -> D -> SE ()+flSetTextSize b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLsetTextSize" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Sets some font attributes of the text label of a FLTK widget.+--+-- FLsetTextType sets some attributes related to the fonts of the text label of the target widget.+--+-- >  FLsetTextType  itype, ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLsetTextType.html>+flSetTextType ::  D -> D -> SE ()+flSetTextType b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "FLsetTextType" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Restores the visibility of a previously hidden FLTK widget.+--+-- FLshow restores the visibility of a previously hidden widget.+--+-- >  FLshow  ihandle+--+-- csound doc: <http://www.csounds.com/manual/html/FLshow.html>+flShow ::  D -> SE ()+flShow b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "FLshow" [(Xr,[Ir])] [a1]
+ src/Csound/Typed/Opcode/ImageProcessingOpcodes.hs view
@@ -0,0 +1,96 @@+module Csound.Typed.Opcode.ImageProcessingOpcodes (+    +    +    +    imagecreate, imagefree, imagegetpixel, imageload, imagesave, imagesetpixel, imagesize) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Create an empty image of a given size.+--+-- Create an empty image of a given size. Individual pixel values can then be set with. imagegetpixel.+--+-- > iimagenum  imagecreate  iwidth, iheight+--+-- csound doc: <http://www.csounds.com/manual/html/imagecreate.html>+imagecreate ::  D -> D -> SE D+imagecreate b1 b2 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "imagecreate" [(Ir,[Ir,Ir])] [a1,a2]++-- | +-- Frees memory allocated for a previously loaded or created image.+--+-- >  imagefree  iimagenum+--+-- csound doc: <http://www.csounds.com/manual/html/imagefree.html>+imagefree ::  D -> SE ()+imagefree b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "imagefree" [(Xr,[Ir])] [a1]++-- | +-- Return the RGB pixel values of a previously opened or created image.+--+-- Return the RGB pixel values of a previously opened or created image. An image can be loaded with imageload. An empty image can be created with imagecreate.+--+-- > ared, agreen, ablue  imagegetpixel  iimagenum, ax, ay+-- > kred, kgreen, kblue  imagegetpixel  iimagenum, kx, ky+--+-- csound doc: <http://www.csounds.com/manual/html/imagegetpixel.html>+imagegetpixel :: Tuple a => D -> Sig -> Sig -> a+imagegetpixel b1 b2 b3 = pureTuple $ f <$> unD b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = mopcs "imagegetpixel" ([Kr,Kr,Kr],[Ir,Kr,Kr]) [a1,a2,a3]++-- | +-- Load an image.+--+-- Load an image and return a reference to it. Individual pixel values can then be accessed with imagegetpixel.+--+-- > iimagenum  imageload  filename+--+-- csound doc: <http://www.csounds.com/manual/html/imageload.html>+imageload ::  Spec -> SE D+imageload b1 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unSpec b1+    where f a1 = opcs "imageload" [(Ir,[Fr])] [a1]++-- | +-- Save a previously created image.+--+-- Save a previously created image. An empty image can be created with imagecreate and its pixel RGB values can be set with imagesetpixel. The image will be saved in PNG format.+--+-- >  imagesave  iimagenum, filename+--+-- csound doc: <http://www.csounds.com/manual/html/imagesave.html>+imagesave ::  D -> Spec -> SE ()+imagesave b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSpec b2+    where f a1 a2 = opcs "imagesave" [(Xr,[Ir,Fr])] [a1,a2]++-- | +-- Set the RGB value of a pixel inside a previously opened or created image.+--+-- Set the RGB value of a pixel inside a previously opened or created image. An image can be loaded with imageload. An empty image can be created with imagecreate and saved with imagesave.+--+-- >  imagesetpixel  iimagenum, ax, ay, ared, agreen, ablue+-- >  imagesetpixel  iimagenum, kx, ky, kred, kgreen, kblue+--+-- csound doc: <http://www.csounds.com/manual/html/imagesetpixel.html>+imagesetpixel ::  D -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+imagesetpixel b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "imagesetpixel" [(Xr,[Ir,Ar,Ar,Ar,Ar,Ar])] [a1,a2,a3,a4,a5,a6]++-- | +-- Return the width and height of a previously opened or created image.+--+-- Return the width and height of a previously opened or created image. An image can be loaded with imageload. An empty image can be created with imagecreate.+--+-- > iwidth, iheight  imagesize  iimagenum+--+-- csound doc: <http://www.csounds.com/manual/html/imagesize.html>+imagesize :: Tuple a => D -> a+imagesize b1 = pureTuple $ f <$> unD b1+    where f a1 = mopcs "imagesize" ([Ir,Ir],[Ir]) [a1]
+ src/Csound/Typed/Opcode/InstrumentControl.hs view
@@ -0,0 +1,934 @@+module Csound.Typed.Opcode.InstrumentControl (+    +    +    -- * Clock Control.+    clockoff, clockon,+    +    -- * Duration Control.+    ihold, turnoff, turnoff2, turnon,+    +    -- * Invocation.+    event, event_i, mute, readscore, remove, schedkwhen, schedkwhennamed, schedule, schedwhen, scoreline, scoreline_i,+    +    -- * Realtime Performance Control.+    active, cpuprc, exitnow, jacktransport, maxalloc, prealloc,+    +    -- * Sensing and Control.+    button, changed, checkbox, control, follow, follow2, getcfg, joystick, metro, miditempo, p5gconnect, p5gdata, pcount, peak, pindex, pitch, pitchamdf, plltrack, ptrack, rewindscore, rms, sensekey, seqtime, seqtime2, setctrl, splitrig, tempest, tempo, tempoval, timedseq, trigger, trigseq, wiiconnect, wiidata, wiirange, wiisend, xyin,+    +    -- * Stacks.+    pop, pop_f, push, push_f, stack,+    +    -- * Subinstrument Control.+    subinstr, subinstrinit,+    +    -- * Time Reading.+    date, dates, readclock, rtclock, timeinstk, timeinsts, timek, times) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Clock Control.++-- | +-- Stops one of a number of internal clocks.+--+-- >  clockoff  inum+--+-- csound doc: <http://www.csounds.com/manual/html/clockoff.html>+clockoff ::  D -> SE ()+clockoff b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "clockoff" [(Xr,[Ir])] [a1]++-- | +-- Starts one of a number of internal clocks.+--+-- >  clockon  inum+--+-- csound doc: <http://www.csounds.com/manual/html/clockon.html>+clockon ::  D -> SE ()+clockon b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "clockon" [(Xr,[Ir])] [a1]++-- Duration Control.++-- | +-- Creates a held note.+--+-- Causes a finite-duration note to become a “held” note+--+-- >  ihold  +--+-- csound doc: <http://www.csounds.com/manual/html/ihold.html>+ihold ::   SE ()+ihold  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "ihold" [(Xr,[])] []++-- | +-- Enables an instrument to turn itself off.+--+-- >  turnoff  +--+-- csound doc: <http://www.csounds.com/manual/html/turnoff.html>+turnoff ::   SE ()+turnoff  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "turnoff" [(Xr,[])] []++-- | +-- Turn off instance(s) of other instruments at performance time.+--+-- >  turnoff2  kinsno, kmode, krelease+-- >         +--+-- csound doc: <http://www.csounds.com/manual/html/turnoff2.html>+turnoff2 ::  Sig -> Sig -> Sig -> SE ()+turnoff2 b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "turnoff2" [(Xr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Activate an instrument for an indefinite time.+--+-- >  turnon  insnum [, itime]+--+-- csound doc: <http://www.csounds.com/manual/html/turnon.html>+turnon ::  D -> SE ()+turnon b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "turnon" [(Xr,[Ir,Ir])] [a1]++-- Invocation.++-- | +-- Generates a score event from an instrument.+--+-- >  event  "scorechar", kinsnum, kdelay, kdur, [, kp4] [, kp5] [, ...]+-- >  event  "scorechar", "insname", kdelay, kdur, [, kp4] [, kp5] [, ...]+--+-- csound doc: <http://www.csounds.com/manual/html/event.html>+event ::  Str -> Sig -> Sig -> Sig -> [Sig] -> SE ()+event b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> mapM unSig b5+    where f a1 a2 a3 a4 a5 = opcs "event" [(Xr,[Sr] ++ (repeat Kr))] ([a1,a2,a3,a4] ++ a5)++-- | +-- Generates a score event from an instrument.+--+-- >  event_i  "scorechar", iinsnum, idelay, idur, [, ip4] [, ip5] [, ...]+-- >  event_i  "scorechar", "insname", idelay, idur, [, ip4] [, ip5] [, ...]+--+-- csound doc: <http://www.csounds.com/manual/html/event_i.html>+event_i ::  Str -> D -> D -> D -> [D] -> SE ()+event_i b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> mapM unD b5+    where f a1 a2 a3 a4 a5 = opcs "event_i" [(Xr,[Sr] ++ (repeat Ir))] ([a1,a2,a3,a4] ++ a5)++-- | +-- Mutes/unmutes new instances of a given instrument.+--+-- >  mute  insnum [, iswitch]+-- >  mute  "insname" [, iswitch]+--+-- csound doc: <http://www.csounds.com/manual/html/mute.html>+mute ::  D -> SE ()+mute b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "mute" [(Xr,[Ir,Ir])] [a1]++-- | +-- Read, preprocess and schedule a score from an input string.+--+-- Readscore will issue one or more score events. +-- 	  It can handle strings in the same conditions as+-- 	  the standard score, including preprocessing (carry, sort, ramp, etc). +-- Multi-line strings are accepted, using {{  }} to enclose the string.+--+-- >  readscore  Sin +--+-- csound doc: <http://www.csounds.com/manual/html/readscore.html>+readscore ::  Str -> SE ()+readscore b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "readscore" [(Xr,[Sr])] [a1]++-- | +-- Removes the definition of an instrument.+--+-- Removes the definition of an instrument as long as it is not in use.+--+-- >  remove  insnum+--+-- csound doc: <http://www.csounds.com/manual/html/remove.html>+remove ::  D -> SE ()+remove b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "remove" [(Xr,[Ir])] [a1]++-- | +-- Adds a new score event generated by a k-rate trigger.+--+-- >  schedkwhen  ktrigger, kmintim, kmaxnum, kinsnum, kwhen, kdur \+-- >           [, ip4] [, ip5] [...]+-- >  schedkwhen  ktrigger, kmintim, kmaxnum, "insname", kwhen, kdur \+-- >           [, ip4] [, ip5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/schedkwhen.html>+schedkwhen ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+schedkwhen b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "schedkwhen" [(Xr,[Kr,Kr,Kr,Kr,Kr,Kr] ++ (repeat Ir))] [a1+                                                                                            ,a2+                                                                                            ,a3+                                                                                            ,a4+                                                                                            ,a5+                                                                                            ,a6]++-- | +-- Similar to schedkwhen but uses a named instrument at init-time.+--+-- >  schedkwhennamed  ktrigger, kmintim, kmaxnum, "name", kwhen, kdur \+-- >           [, ip4] [, ip5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/schedkwhennamed.html>+schedkwhennamed ::  Sig -> Sig -> Sig -> Str -> Sig -> Sig -> SE ()+schedkwhennamed b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unStr b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "schedkwhennamed" [(Xr,[Kr,Kr,Kr,Sr,Kr,Kr] ++ (repeat Ir))] [a1+                                                                                                 ,a2+                                                                                                 ,a3+                                                                                                 ,a4+                                                                                                 ,a5+                                                                                                 ,a6]++-- | +-- Adds a new score event.+--+-- >  schedule  insnum, iwhen, idur [, ip4] [, ip5] [...]+-- >  schedule  "insname", iwhen, idur [, ip4] [, ip5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/schedule.html>+schedule ::  D -> D -> D -> SE ()+schedule b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "schedule" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- Adds a new score event.+--+-- >  schedwhen  ktrigger, kinsnum, kwhen, kdur [, ip4] [, ip5] [...]+-- >  schedwhen  ktrigger, "insname", kwhen, kdur [, ip4] [, ip5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/schedwhen.html>+schedwhen ::  Sig -> Sig -> Sig -> Sig -> SE ()+schedwhen b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "schedwhen" [(Xr,[Kr,Kr,Kr,Kr] ++ (repeat Ir))] [a1,a2,a3,a4]++-- | +-- Issues one or more score line events from an instrument.+--+-- Scoreline will issue one or more score events, if ktrig is 1 every k-period. +-- 	  It can handle strings in the same conditions as+-- 	  the standard score. Multi-line strings are accepted, using {{  }} to enclose the string.+--+-- >  scoreline  Sin, ktrig+--+-- csound doc: <http://www.csounds.com/manual/html/scoreline.html>+scoreline ::  Str -> Sig -> SE ()+scoreline b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "scoreline" [(Xr,[Sr,Kr])] [a1,a2]++-- | +-- Issues one or more score line events from an instrument at i-time.+--+-- scoreline_i will issue score events at i-time.  It can handle strings in the same conditions as the standard score. Multi-line strings are accepted, using {{  }} to enclose the string.+--+-- >  scoreline_i  Sin+--+-- csound doc: <http://www.csounds.com/manual/html/scoreline_i.html>+scoreline_i ::  Str -> SE ()+scoreline_i b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "scoreline_i" [(Xr,[Sr])] [a1]++-- Realtime Performance Control.++-- | +-- Returns the number of active instances of an instrument.+--+-- > ir  active  insnum [,iopt]+-- > ir  active  Sinsname [,iopt]+-- > kres  active  kinsnum [,iopt]+--+-- csound doc: <http://www.csounds.com/manual/html/active.html>+active ::  D -> Sig+active b1 = Sig $ f <$> unD b1+    where f a1 = opcs "active" [(Ir,[Ir,Ir]),(Ir,[Sr,Ir]),(Kr,[Kr,Ir])] [a1]++-- | +-- Control allocation of cpu resources on a per-instrument basis, to optimize realtime output.+--+-- >  cpuprc  insnum, ipercent+-- >  cpuprc  Sinsname, ipercent+--+-- csound doc: <http://www.csounds.com/manual/html/cpuprc.html>+cpuprc ::  D -> D -> SE ()+cpuprc b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "cpuprc" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Exit Csound as fast as possible, with no cleaning up.+--+-- In Csound4 calls an exit function to leave Csound as fast as+--     possible. On Csound5 exits back to the driving code.+--+-- >  exitnow  +--+-- csound doc: <http://www.csounds.com/manual/html/exitnow.html>+exitnow ::   SE ()+exitnow  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "exitnow" [(Xr,[])] []++-- | +-- Start/stop jack_transport and can optionally relocate the playback head.+--+-- >  jacktransport  icommand [, ilocation]+--+-- csound doc: <http://www.csounds.com/manual/html/jacktransport.html>+jacktransport ::  D -> SE ()+jacktransport b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "jacktransport" [(Xr,[Ir,Ir])] [a1]++-- | +-- Limits the number of allocations of an instrument.+--+-- >  maxalloc  insnum, icount+-- >  maxalloc  Sinsname, icount+--+-- csound doc: <http://www.csounds.com/manual/html/maxalloc.html>+maxalloc ::  D -> D -> SE ()+maxalloc b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "maxalloc" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Creates space for instruments but does not run them.+--+-- >  prealloc  insnum, icount+-- >  prealloc  "insname", icount+--+-- csound doc: <http://www.csounds.com/manual/html/prealloc.html>+prealloc ::  D -> D -> SE ()+prealloc b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "prealloc" [(Xr,[Ir,Ir])] [a1,a2]++-- Sensing and Control.++-- | +-- Sense on-screen controls.+--+-- Sense on-screen controls. Requires Winsound or TCL/TK.+--+-- > kres  button  knum+--+-- csound doc: <http://www.csounds.com/manual/html/button.html>+button ::  Sig -> Sig+button b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "button" [(Kr,[Kr])] [a1]++-- | +-- k-rate signal change detector.+--+-- This opcode outputs a trigger signal that informs when any one of its k-rate arguments has changed. Useful with valuator widgets or MIDI controllers.+--+-- > ktrig  changed  kvar1 [, kvar2,..., kvarN]+--+-- csound doc: <http://www.csounds.com/manual/html/changed.html>+changed ::  [Sig] -> Sig+changed b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "changed" [(Kr,(repeat Kr))] a1++-- | +-- Sense on-screen controls.+--+-- Sense on-screen controls. Requires Winsound or TCL/TK.+--+-- > kres  checkbox  knum+--+-- csound doc: <http://www.csounds.com/manual/html/checkbox.html>+checkbox ::  Sig -> Sig+checkbox b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "checkbox" [(Kr,[Kr])] [a1]++-- | +-- Configurable slider controls for realtime user input.+--+-- Configurable slider controls for realtime user input. Requires Winsound or TCL/TK. control reads a slider's value.+--+-- > kres  control  knum+--+-- csound doc: <http://www.csounds.com/manual/html/control.html>+control ::  Sig -> Sig+control b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "control" [(Kr,[Kr])] [a1]++-- | +-- Envelope follower unit generator.+--+-- > ares  follow  asig, idt+--+-- csound doc: <http://www.csounds.com/manual/html/follow.html>+follow ::  Sig -> D -> Sig+follow b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "follow" [(Ar,[Ar,Ir])] [a1,a2]++-- | +-- Another controllable envelope extractor.+--+-- A controllable envelope extractor using the algorithm attributed to Jean-Marc Jot.+--+-- > ares  follow2  asig, katt, krel+--+-- csound doc: <http://www.csounds.com/manual/html/follow2.html>+follow2 ::  Sig -> Sig -> Sig -> Sig+follow2 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "follow2" [(Ar,[Ar,Kr,Kr])] [a1,a2,a3]++-- | +-- Return Csound settings.+--+-- Return various configuration settings in Svalue as a string at init time.+--+-- > Svalue  getcfg  iopt+--+-- csound doc: <http://www.csounds.com/manual/html/getcfg.html>+getcfg ::  D -> Str+getcfg b1 = Str $ f <$> unD b1+    where f a1 = opcs "getcfg" [(Sr,[Ir])] [a1]++-- | +-- Reads data from a joystick controller.+--+-- Reads data from a Linux joystick controller+--+-- > kres  joystick  kdevice ktab+--+-- csound doc: <http://www.csounds.com/manual/html/joystick.html>+joystick ::  Sig -> Sig -> Sig+joystick b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "joystick" [(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Trigger Metronome+--+-- Generate a metronomic signal to be used in any circumstance an isochronous trigger is needed.+--+-- > ktrig   metro   kfreq [, initphase]+--+-- csound doc: <http://www.csounds.com/manual/html/metro.html>+metro ::  Sig -> Sig+metro b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "metro" [(Kr,[Kr,Ir])] [a1]++-- | +-- Returns the current tempo at k-rate, of either the MIDI file (if available) or the score+--+-- > ksig   miditempo  +--+-- csound doc: <http://www.csounds.com/manual/html/miditempo.html>+miditempo ::   Sig+miditempo  = Sig $ return $ f +    where f  = opcs "miditempo" [(Kr,[])] []++-- | +-- Reads data from a P5 Glove controller.+--+-- Opens and at control-rate polls a P5 Glove controller.+--+-- >  p5gconnect  +--+-- csound doc: <http://www.csounds.com/manual/html/p5gconnect.html>+p5gconnect ::   SE ()+p5gconnect  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "p5gconnect" [(Xr,[])] []++-- | +-- Reads data fields from an external P5 Glove.+--+-- Reads data fields from a P5 Glove controller.+--+-- > kres  p5gdata  kcontrol+--+-- csound doc: <http://www.csounds.com/manual/html/p5gdata.html>+p5gdata ::  Sig -> Sig+p5gdata b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "p5gdata" [(Kr,[Kr])] [a1]++-- | +-- Returns the number of pfields belonging to a note event.+--+-- pcount returns the number of pfields belonging to a note event.+--+-- > icount  pcount  +--+-- csound doc: <http://www.csounds.com/manual/html/pcount.html>+pcount ::   D+pcount  = D $ return $ f +    where f  = opcs "pcount" [(Ir,[])] []++-- | +-- Maintains the output equal to the highest absolute value received.+--+-- These opcodes maintain the output k-rate variable as the peak absolute level so far received.+--+-- > kres  peak  asig+-- > kres  peak  ksig+--+-- csound doc: <http://www.csounds.com/manual/html/peak.html>+peak ::  Sig -> Sig+peak b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "peak" [(Kr,[Ar]),(Kr,[Kr])] [a1]++-- | +-- Returns the value of a specified pfield.+--+-- pindex returns the value of a specified pfield.+--+-- > ivalue  pindex  ipfieldIndex+--+-- csound doc: <http://www.csounds.com/manual/html/pindex.html>+pindex ::  D -> D+pindex b1 = D $ f <$> unD b1+    where f a1 = opcs "pindex" [(Ir,[Ir])] [a1]++-- | +-- Tracks the pitch of a signal.+--+-- Using the same techniques as spectrum and specptrk, pitch tracks the pitch of the signal in octave point decimal form, and amplitude in dB.+--+-- > koct, kamp  pitch  asig, iupdte, ilo, ihi, idbthresh [, ifrqs] [, iconf] \+-- >           [, istrt] [, iocts] [, iq] [, inptls] [, irolloff] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/pitch.html>+pitch :: Tuple a => Sig -> D -> D -> D -> D -> a+pitch b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "pitch" ([Kr,Kr],[Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                              ,a2+                                                                                              ,a3+                                                                                              ,a4+                                                                                              ,a5]++-- | +-- Follows the pitch of a signal based on the AMDF method.+--+-- Follows the pitch of a signal based on the AMDF method (Average Magnitude Difference Function). Outputs pitch and amplitude tracking signals. The method is quite fast and should run in realtime. This technique usually works best for monophonic signals.+--+-- > kcps, krms  pitchamdf  asig, imincps, imaxcps [, icps] [, imedi] \+-- >           [, idowns] [, iexcps] [, irmsmedi]+--+-- csound doc: <http://www.csounds.com/manual/html/pitchamdf.html>+pitchamdf :: Tuple a => Sig -> D -> D -> a+pitchamdf b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = mopcs "pitchamdf" ([Kr,Kr],[Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3]++-- | +-- Tracks the pitch of a signal.+--+-- plltrack, a pitch tracker based on a phase-locked loop algorithm, described in Zolzer, U, Sankarababu, S.V. and Moller, S, "PLL-based Pitch Detection and Tracking for Audio Signals. Proc. of IIH-MSP 2012".+--+-- > acps, alock  plltrack  asig, kd [, kloopf, kloopq, klf, khf, kthresh]+--+-- csound doc: <http://www.csounds.com/manual/html/plltrack.html>+plltrack :: Tuple a => Sig -> Sig -> a+plltrack b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "plltrack" ([Ar,Ar],[Ar,Kr,Kr,Kr,Kr,Kr,Kr]) [a1,a2]++-- | +-- Tracks the pitch of a signal.+--+-- ptrack takes an input signal, splits it into ihopsize blocks and using a STFT method, extracts an estimated pitch for its fundamental frequency as well as estimating the total amplitude of the signal in dB, relative to full-scale (0dB). The method implies an analysis window size of 2*ihopsize samples (overlaping by 1/2 window), which has to be a power-of-two, between 128 and 8192 (hopsizes between 64 and 4096). Smaller windows will give better time precision, but worse frequency accuracy (esp. in low fundamentals).This opcode is based on an original algorithm by M. Puckette.+--+-- > kcps, kamp  ptrack  asig, ihopsize[,ipeaks]+--+-- csound doc: <http://www.csounds.com/manual/html/ptrack.html>+ptrack :: Tuple a => Sig -> D -> a+ptrack b1 b2 = pureTuple $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = mopcs "ptrack" ([Kr,Kr],[Ar,Ir,Ir]) [a1,a2]++-- | +-- Rewinds the playback position of the current score performance.+--+-- Rewinds the playback position of the current score performance..+--+-- >   rewindscore  +--+-- csound doc: <http://www.csounds.com/manual/html/rewindscore.html>+rewindscore ::   SE ()+rewindscore  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "rewindscore" [(Xr,[])] []++-- | +-- Determines the root-mean-square amplitude of an audio signal.+--+-- Determines the root-mean-square amplitude of an audio signal. It low-pass filters the actual value, to average in the manner of a VU meter.+--+-- > kres  rms  asig [, ihp] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/rms.html>+rms ::  Sig -> Sig+rms b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "rms" [(Kr,[Ar,Ir,Ir])] [a1]++-- | +-- Returns the ASCII code of a key that has been pressed.+--+-- Returns the ASCII code of a key that has been pressed, or -1 if no key has been pressed.+--+-- > kres[, kkeydown]  sensekey  +--+-- csound doc: <http://www.csounds.com/manual/html/sensekey.html>+sensekey :: Tuple a =>  a+sensekey  = pureTuple $ return $ f +    where f  = mopcs "sensekey" ([Kr,Kr],[]) []++-- | +-- Generates a trigger signal according to the values stored in a table.+--+-- > ktrig_out  seqtime  ktime_unit, kstart, kloop, kinitndx, kfn_times+--+-- csound doc: <http://www.csounds.com/manual/html/seqtime.html>+seqtime ::  Sig -> Sig -> Sig -> Sig -> Tab -> Sig+seqtime b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "seqtime" [(Kr,[Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Generates a trigger signal according to the values stored in a table.+--+-- > ktrig_out  seqtime2  ktrig_in, ktime_unit, kstart, kloop, kinitndx, kfn_times+--+-- csound doc: <http://www.csounds.com/manual/html/seqtime2.html>+seqtime2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+seqtime2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "seqtime2" [(Kr,[Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5,a6]++-- | +-- Configurable slider controls for realtime user input.+--+-- Configurable slider controls for realtime user input. Requires Winsound or TCL/TK. setctrl sets a slider to a specific value, or sets a minimum or maximum range.+--+-- >  setctrl  inum, ival, itype+--+-- csound doc: <http://www.csounds.com/manual/html/setctrl.html>+setctrl ::  D -> D -> D -> SE ()+setctrl b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "setctrl" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Split a trigger signal+--+-- splitrig splits a trigger signal (i.e. a timed sequence of control-rate impulses) into several channels following a structure designed by the user.+--+-- >  splitrig  ktrig, kndx, imaxtics, ifn, kout1 [,kout2,...,koutN]+--+-- csound doc: <http://www.csounds.com/manual/html/splitrig.html>+splitrig ::  Sig -> Sig -> D -> Tab -> [Sig] -> SE ()+splitrig b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unTab b4 <*> mapM unSig b5+    where f a1 a2 a3 a4 a5 = opcs "splitrig" [(Xr,[Kr,Kr,Ir,Ir] ++ (repeat Kr))] ([a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4] ++ a5)++-- | +-- Estimate the tempo of beat patterns in a control signal.+--+-- > ktemp  tempest  kin, iprd, imindur, imemdur, ihp, ithresh, ihtim, ixfdbak, \+-- >           istartempo, ifn [, idisprd] [, itweek]+--+-- csound doc: <http://www.csounds.com/manual/html/tempest.html>+tempest ::  Sig -> D -> D -> D -> D -> D -> D -> D -> D -> Tab -> Sig+tempest b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unTab b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = opcs "tempest" [(Kr+                                                             ,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- Apply tempo control to an uninterpreted score.+--+-- >  tempo  ktempo, istartempo+--+-- csound doc: <http://www.csounds.com/manual/html/tempo.html>+tempo ::  Sig -> D -> SE ()+tempo b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "tempo" [(Xr,[Kr,Ir])] [a1,a2]++-- | +-- Reads the current value of the tempo.+--+-- > kres  tempoval  +--+-- csound doc: <http://www.csounds.com/manual/html/tempoval.html>+tempoval ::   Sig+tempoval  = Sig $ return $ f +    where f  = opcs "tempoval" [(Kr,[])] []++-- | +-- Time Variant Sequencer+--+-- An event-sequencer in which time can be controlled by a+--     time-pointer. Sequence data are stored into a table.+--+-- > ktrig   timedseq   ktimpnt, ifn, kp1 [,kp2, kp3, ...,kpN]+--+-- csound doc: <http://www.csounds.com/manual/html/timedseq.html>+timedseq ::  Sig -> Tab -> [Sig] -> Sig+timedseq b1 b2 b3 = Sig $ f <$> unSig b1 <*> unTab b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "timedseq" [(Kr,[Kr,Ir] ++ (repeat Kr))] ([a1,a2] ++ a3)++-- | +-- Informs when a krate signal crosses a threshold.+--+-- > kout  trigger  ksig, kthreshold, kmode+--+-- csound doc: <http://www.csounds.com/manual/html/trigger.html>+trigger ::  Sig -> Sig -> Sig -> Sig+trigger b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "trigger" [(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Accepts a trigger signal as input and outputs a group of values.+--+-- >  trigseq  ktrig_in, kstart, kloop, kinitndx, kfn_values, kout1 [, kout2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/trigseq.html>+trigseq ::  Sig -> Sig -> Sig -> Sig -> Tab -> [Sig] -> SE ()+trigseq b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unTab b5 <*> mapM unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "trigseq" [(Xr,(repeat Kr))] ([a1,a2,a3,a4,a5] ++ a6)++-- | +-- Reads data from a number of external Nintendo Wiimote controllers.+--+-- Opens and at control-rate polls up to four external Nintendo Wiimote controllers.+--+-- > ires  wiiconnect  [itimeout, imaxnum]+--+-- csound doc: <http://www.csounds.com/manual/html/wiiconnect.html>+wiiconnect ::   D+wiiconnect  = D $ return $ f +    where f  = opcs "wiiconnect" [(Ir,[Ir,Ir])] []++-- | +-- Reads data fields from a number of external Nintendo Wiimote controllers.+--+-- Reads data fields from upto four external Nintendo Wiimote controllers.+--+-- > kres  wiidata  kcontrol[, knum]+--+-- csound doc: <http://www.csounds.com/manual/html/wiidata.html>+wiidata ::  Sig -> Sig+wiidata b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "wiidata" [(Kr,[Kr,Kr])] [a1]++-- | +-- Sets scaling and range limits for certain Wiimote fields.+--+-- >   wiirange  icontrol, iminimum, imaximum[, inum]+--+-- csound doc: <http://www.csounds.com/manual/html/wiirange.html>+wiirange ::  D -> D -> D -> SE ()+wiirange b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "wiirange" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Sends data to one of a number of external Nintendo Wiimote controllers.+--+-- > kres  wiisend  kcontrol, kvalue[, knum]+--+-- csound doc: <http://www.csounds.com/manual/html/wiisend.html>+wiisend ::  Sig -> Sig -> Sig+wiisend b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "wiisend" [(Kr,[Kr,Kr,Kr])] [a1,a2]++-- | +-- Sense the cursor position in an output window+--+-- Sense the cursor position in an output window. When xyin is called the position of the mouse within the output window is used to reply to the request.  This simple mechanism does mean that only one xyin can be used accurately at once.  The position of the mouse is reported in the output window.+--+-- > kx, ky  xyin  iprd, ixmin, ixmax, iymin, iymax [, ixinit] [, iyinit]+--+-- csound doc: <http://www.csounds.com/manual/html/xyin.html>+xyin :: Tuple a => D -> D -> D -> D -> D -> a+xyin b1 b2 b3 b4 b5 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "xyin" ([Kr,Kr],[Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- Stacks.++-- | +-- Pops values from the global stack.+--+-- > xval1, [xval2, ... , xval31]  pop  +-- > ival1, [ival2, ... , ival31]  pop  +--+-- csound doc: <http://www.csounds.com/manual/html/pop.html>+pop :: Tuple a =>  a+pop  = pureTuple $ return $ f +    where f  = mopcs "pop" ((repeat Ir),[]) []++-- | +-- Pops an f-sig frame from the global stack.+--+-- > fsig  pop_f  +--+-- csound doc: <http://www.csounds.com/manual/html/pop_f.html>+pop_f ::   Spec+pop_f  = Spec $ return $ f +    where f  = opcs "pop_f" [(Fr,[])] []++-- | +-- Pushes a value into the global stack.+--+-- >  push   xval1, [xval2, ... , xval31]+-- >  push   ival1, [ival2, ... , ival31]+--+-- csound doc: <http://www.csounds.com/manual/html/push.html>+push ::  [Sig] -> SE ()+push b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unSig b1+    where f a1 = opcs "push" [(Xr,(repeat Xr))] a1++-- | +-- Pushes an f-sig frame into the global stack.+--+-- >  push_f   fsig+--+-- csound doc: <http://www.csounds.com/manual/html/push_f.html>+push_f ::  Spec -> SE ()+push_f b1 = SE $ (depT_ =<<) $ lift $ f <$> unSpec b1+    where f a1 = opcs "push_f" [(Xr,[Fr])] [a1]++-- | +-- Initializes the stack.+--+-- Initializes and sets the size of the global stack.+--+-- >  stack   iStackSize+--+-- csound doc: <http://www.csounds.com/manual/html/stack.html>+stack ::  D -> SE ()+stack b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "stack" [(Xr,[Ir])] [a1]++-- Subinstrument Control.++-- | +-- Creates and runs a numbered instrument instance.+--+-- Creates an instance of another instrument and is used as if it were an opcode.+--+-- > a1, [...] [, a8]  subinstr  instrnum [, p4] [, p5] [...]+-- > a1, [...] [, a8]  subinstr  "insname" [, p4] [, p5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/subinstr.html>+subinstr :: Tuple a => D -> [D] -> a+subinstr b1 b2 = pureTuple $ f <$> unD b1 <*> mapM unD b2+    where f a1 a2 = mopcs "subinstr" ((repeat Ar),[Sr] ++ (repeat Ir)) ([a1] ++ a2)++-- | +-- Creates and runs a numbered instrument instance at init-time.+--+-- Same as subinstr, but init-time only and has no output arguments.+--+-- >  subinstrinit  instrnum [, p4] [, p5] [...]+-- >  subinstrinit  "insname" [, p4] [, p5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/subinstrinit.html>+subinstrinit ::  D -> [D] -> SE ()+subinstrinit b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> mapM unD b2+    where f a1 a2 = opcs "subinstrinit" [(Xr,(repeat Ir))] ([a1] ++ a2)++-- Time Reading.++-- | +-- Returns the number seconds since a base date.+--+-- Returns the number seconds since a base date, using the+--       operating system's clock.  The base is 1 January 1970 for Csound+--       using doubles, and 1 January 2010 for versions using floats.+--+-- > ir  date  +--+-- csound doc: <http://www.csounds.com/manual/html/date.html>+date ::   D+date  = D $ return $ f +    where f  = opcs "date" [(Ir,[])] []++-- | +-- Returns as a string the date and time specified.+--+-- > Sir  dates  [ itime]+--+-- csound doc: <http://www.csounds.com/manual/html/dates.html>+dates ::   Str+dates  = Str $ return $ f +    where f  = opcs "dates" [(Sr,[Ir])] []++-- | +-- Reads the value of an internal clock.+--+-- > ir  readclock  inum+--+-- csound doc: <http://www.csounds.com/manual/html/readclock.html>+readclock ::  D -> D+readclock b1 = D $ f <$> unD b1+    where f a1 = opcs "readclock" [(Ir,[Ir])] [a1]++-- | +-- Read the real time clock from the operating system.+--+-- Read the real-time clock from the operating system.+--+-- > ires  rtclock  +-- > kres  rtclock  +--+-- csound doc: <http://www.csounds.com/manual/html/rtclock.html>+rtclock ::   Sig+rtclock  = Sig $ return $ f +    where f  = opcs "rtclock" [(Ir,[]),(Kr,[])] []++-- | +-- Read absolute time in k-rate cycles.+--+-- Read absolute time, in k-rate cycles, since the start of an+--     	instance of an instrument. Called at both i-time as well as+--     	k-time.+--+-- > kres  timeinstk  +--+-- csound doc: <http://www.csounds.com/manual/html/timeinstk.html>+timeinstk ::   Sig+timeinstk  = Sig $ return $ f +    where f  = opcs "timeinstk" [(Kr,[])] []++-- | +-- Read absolute time in seconds.+--+-- Read absolute time, in seconds, since the start of an instance of an instrument.+--+-- > kres  timeinsts  +--+-- csound doc: <http://www.csounds.com/manual/html/timeinsts.html>+timeinsts ::   Sig+timeinsts  = Sig $ return $ f +    where f  = opcs "timeinsts" [(Kr,[])] []++-- | +-- Read absolute time in k-rate cycles.+--+-- Read absolute time, in k-rate cycles, since the start of the performance.+--+-- > ires  timek  +-- > kres  timek  +--+-- csound doc: <http://www.csounds.com/manual/html/timek.html>+timek ::   Sig+timek  = Sig $ return $ f +    where f  = opcs "timek" [(Ir,[]),(Kr,[])] []++-- | +-- Read absolute time in seconds.+--+-- Read absolute time, in seconds, since the start of the performance.+--+-- > ires  times  +-- > kres  times  +--+-- csound doc: <http://www.csounds.com/manual/html/times.html>+times ::   Sig+times  = Sig $ return $ f +    where f  = opcs "times" [(Ir,[]),(Kr,[])] []
+ src/Csound/Typed/Opcode/JackoOpcodes.hs view
@@ -0,0 +1,189 @@+module Csound.Typed.Opcode.JackoOpcodes (+    +    +    +    jackoAudioIn, jackoAudioInConnect, jackoAudioOut, jackoAudioOutConnect, jackoFreewheel, jackoInfo, jackoInit, jackoMidiInConnect, jackoMidiOut, jackoMidiOutConnect, jackoNoteOut, jackoOn, jackoTransport) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Receives an audio signal from a Jack port.+--+-- Receives an audio signal from a Jack audio input port +--       inside this instance of Csound, which in turn has +--       received the signal from its connected external Jack +--       audio output port.+--+-- > asignal  JackoAudioIn ScsoundPortName+--+-- csound doc: <http://www.csounds.com/manual/html/JackoAudioIn.html>+jackoAudioIn ::  Str -> SE Sig+jackoAudioIn b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "JackoAudioIn" [(Ar,[Sr])] [a1]++-- | +-- Creates an audio connection from a Jack port to Csound.+--+-- In the orchestra header, creates an audio connection +--       from an external Jack audio output port to a +--       Jack audio input port inside this instance of Csound.+--+-- >  JackoAudioInConnect SexternalPortName, ScsoundPortName+--+-- csound doc: <http://www.csounds.com/manual/html/JackoAudioInConnect.html>+jackoAudioInConnect ::  Str -> Str -> SE ()+jackoAudioInConnect b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "JackoAudioInConnect" [(Xr,[Sr,Sr])] [a1,a2]++-- | +-- Sends an audio signal to a Jack port.+--+-- Sends an audio signal to an internal Jack audio +--       output port, and in turn to its connected external +--       Jack audio input port.+--+-- >  JackoAudioOut  ScsoundPortName, asignal+--+-- csound doc: <http://www.csounds.com/manual/html/JackoAudioOut.html>+jackoAudioOut ::  Str -> Sig -> SE ()+jackoAudioOut b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "JackoAudioOut" [(Xr,[Sr,Ar])] [a1,a2]++-- | +-- Creates an audio connection from Csound to a Jack port.+--+-- In the orchestra header, creates an audio connection +--       from a Jack audio output port inside this instance +--       of Csound to an external Jack audio input port.+--+-- >  JackoAudioOutConnect ScsoundPortName, SexternalPortName+--+-- csound doc: <http://www.csounds.com/manual/html/JackoAudioOutConnect.html>+jackoAudioOutConnect ::  Str -> Str -> SE ()+jackoAudioOutConnect b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "JackoAudioOutConnect" [(Xr,[Sr,Sr])] [a1,a2]++-- | +-- Turns Jack's freewheeling mode on or off.+--+-- >  JackoFreewheel [ienabled]+--+-- csound doc: <http://www.csounds.com/manual/html/JackoFreewheel.html>+jackoFreewheel ::   SE ()+jackoFreewheel  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "JackoFreewheel" [(Xr,[Ir])] []++-- | +-- Prints information about the Jack system.+--+-- Prints the Jack daemon and client names, the+--       sampling rate and frames per period, +--       and all active Jack port names, +--       types, states, and connections.+--+-- >  JackoInfo  +--+-- csound doc: <http://www.csounds.com/manual/html/JackoInfo.html>+jackoInfo ::   SE ()+jackoInfo  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "JackoInfo" [(Xr,[])] []++-- | +-- Initializes Csound as a Jack client.+--+-- Initializes this instance of Csound as a Jack client.+--+-- >  JackoInit SclientName, ServerName+--+-- csound doc: <http://www.csounds.com/manual/html/JackoInit.html>+jackoInit ::  Str -> Str -> SE ()+jackoInit b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "JackoInit" [(Xr,[Sr,Sr])] [a1,a2]++-- | +-- Creates a MIDI  connection from a Jack port to Csound.+--+-- In the orchestra header, creates a MIDI connection +--       from an external Jack MIDI output port to this instance of Csound.+--+-- >  JackoMidiInConnect SexternalPortName, ScsoundPortName+--+-- csound doc: <http://www.csounds.com/manual/html/JackoMidiInConnect.html>+jackoMidiInConnect ::  Str -> Str -> SE ()+jackoMidiInConnect b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "JackoMidiInConnect" [(Xr,[Sr,Sr])] [a1,a2]++-- | +-- Sends a MIDI channel message to a Jack port.+--+-- Sends a MIDI channel message to a Jack MIDI output port+--       inside this instance of Csound, and in turn to its +--       connected external Jack MIDI input port.+--+-- >  JackoMidiOut  ScsoundPortName, kstatus, kchannel, kdata1[, kdata2]+--+-- csound doc: <http://www.csounds.com/manual/html/JackoMidiOut.html>+jackoMidiOut ::  Str -> Sig -> Sig -> Sig -> SE ()+jackoMidiOut b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "JackoMidiOut" [(Xr,[Sr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Creates a MIDI connection from Csound to a Jack port.+--+-- In the orchestra header, creates a connection +--       from a Jack MIDI output port inside this instance +--       of Csound to an external Jack MIDI input port.+--+-- >  JackoMidiOutConnect ScsoundPortName, SexternalPortName+--+-- csound doc: <http://www.csounds.com/manual/html/JackoMidiOutConnect.html>+jackoMidiOutConnect ::  Str -> Str -> SE ()+jackoMidiOutConnect b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "JackoMidiOutConnect" [(Xr,[Sr,Sr])] [a1,a2]++-- | +-- Sends a MIDI channel message to a Jack port.+--+-- Sends a MIDI channel message to a Jack MIDI output port+--       inside this instance of Csound, and in turn to its +--       connected external Jack MIDI input port.+--+-- >  JackoNoteOut  ScsoundPortName, kstatus, kchannel, kdata1[, kdata2]+--+-- csound doc: <http://www.csounds.com/manual/html/JackoNoteOut.html>+jackoNoteOut ::  Str -> Sig -> Sig -> Sig -> SE ()+jackoNoteOut b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "JackoNoteOut" [(Xr,[Sr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Enables or disables all Jack ports.+--+-- In the orchestra header, after all Jack connections have been created, enables+--       or disables all Jack input and output opcodes +--       inside this instance of Csound to read or write data.+--+-- >  JackoOn [iactive] +--+-- csound doc: <http://www.csounds.com/manual/html/JackoOn.html>+jackoOn ::   SE ()+jackoOn  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "JackoOn" [(Xr,[Ir])] []++-- | +-- Control the Jack transport.+--+-- Starts, stops, or repositions the Jack transport.+--       This is useful, e.g., for starting an external sequencer+--       playing to send MIDI messages to Csound.+--+-- >  JackoTransport  kcommand, [kposition]+--+-- csound doc: <http://www.csounds.com/manual/html/JackoTransport.html>+jackoTransport ::  Sig -> SE ()+jackoTransport b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "JackoTransport" [(Xr,[Kr,Kr])] [a1]
+ src/Csound/Typed/Opcode/MathematicalOperations.hs view
@@ -0,0 +1,211 @@+module Csound.Typed.Opcode.MathematicalOperations (+    +    +    -- * Comparators and Accumulators.+    clear, vincr,+    +    -- * Amplitude Functions.+    ampdb, ampdbfs, dbamp, dbfsamp,+    +    -- * Random Functions.+    birnd, rnd,+    +    -- * Opcode Equivalents of Functions.+    divz, mac, maca, polynomial, pow, product', sum', taninv2) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Comparators and Accumulators.++-- | +-- Zeroes a list of audio signals.+--+-- clear zeroes a list of audio signals.+--+-- >  clear  avar1 [, avar2] [, avar3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/clear.html>+clear ::  [Sig] -> SE ()+clear b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unSig b1+    where f a1 = opcs "clear" [(Xr,(repeat Ar))] a1++-- | +-- Accumulates audio signals.+--+-- vincr increments one audio variable with another signal, i.e. it accumulates output.+--+-- >  vincr  accum, aincr+--+-- csound doc: <http://www.csounds.com/manual/html/vincr.html>+vincr ::  Sig -> Sig -> SE ()+vincr b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "vincr" [(Xr,[Ar,Ar])] [a1,a2]++-- Amplitude Functions.++-- | +-- Returns the amplitude equivalent of the decibel value x.+--+-- Returns the amplitude equivalent of the decibel value x. Thus:+--+-- >  ampdb (x)  (no rate restriction)+--+-- csound doc: <http://www.csounds.com/manual/html/ampdb.html>+ampdb :: SigOrD a => a -> a+ampdb b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1 "ampdb" a1++-- | +-- Returns the amplitude equivalent (in 16-bit signed integer scale) of the full scale decibel (dB FS) value x.+--+-- Returns the amplitude equivalent of the full scale decibel (dB FS) value x. The logarithmic full scale decibel values will be converted to linear 16-bit signed integer values from −32,768 to +32,767.+--+-- >  ampdbfs (x)  (no rate restriction)+--+-- csound doc: <http://www.csounds.com/manual/html/ampdbfs.html>+ampdbfs :: SigOrD a => a -> a+ampdbfs b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1 "ampdbfs" a1++-- | +-- Returns the decibel equivalent of the raw amplitude x.+--+-- >  dbamp (x)  (init-rate or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/dbamp.html>+dbamp :: SigOrD a => a -> a+dbamp b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "dbamp" a1++-- | +-- Returns the decibel equivalent of the raw amplitude x, relative to full scale amplitude.+--+-- Returns the decibel equivalent of the raw amplitude x, relative to full scale amplitude. Full scale is assumed to be 16 bit. New is Csound version 4.10.+--+-- >  dbfsamp (x)  (init-rate or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/dbfsamp.html>+dbfsamp :: SigOrD a => a -> a+dbfsamp b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "dbfsamp" a1++-- Random Functions.++-- | +-- Returns a random number in a bi-polar range.+--+-- >  birnd (x) (init- or control-rate only)+--+-- csound doc: <http://www.csounds.com/manual/html/birnd.html>+birnd :: SigOrD a => a -> a+birnd b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "birnd" a1++-- | +-- Returns a random number in a unipolar range at the rate given by the input argument.+--+-- >  rnd (x) (init- or control-rate only)+--+-- csound doc: <http://www.csounds.com/manual/html/rnd.html>+rnd :: SigOrD a => a -> a+rnd b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "rnd" a1++-- Opcode Equivalents of Functions.++-- | +-- Safely divides two numbers.+--+-- > ares  divz  xa, xb, ksubst+-- > ires  divz  ia, ib, isubst+-- > kres  divz  ka, kb, ksubst+-- > ... divz (ka, kb, ksubst)... (no rate restriction)+--+-- csound doc: <http://www.csounds.com/manual/html/divz.html>+divz :: SigOrD a => a -> a -> a+divz b1 b2 = fromGE $ f <$> toGE b1 <*> toGE b2+    where f a1 a2 = opcs "divz" [(Ar,[Xr,Xr]),(Kr,[Kr,Kr]),(Ir,[Ir,Ir])] [a1,a2]++-- | +-- Multiplies and accumulates a- and k-rate signals.+--+-- > ares  mac  ksig1, asig1 [, ksig2] [, asig2] [, ksig3] [, asig3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/mac.html>+mac ::  [Sig] -> Sig+mac b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "mac" [(Ar,[Kr,Ar,Kr,Ar,Kr] ++ (repeat Ar))] a1++-- | +-- Multiply and accumulate a-rate signals only.+--+-- > ares  maca  asig1 , asig2 [, asig3] [, asig4] [, asig5] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/maca.html>+maca ::  [Sig] -> Sig+maca b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "maca" [(Ar,(repeat Ar))] a1++-- | +-- Efficiently evaluates a polynomial of arbitrary order.+--+-- The polynomial opcode calculates a polynomial with a single a-rate input variable.  The polynomial is a sum of any number of terms in the form kn*x^n where kn is the nth coefficient of the expression.  These coefficients are k-rate values.+--+-- > aout  polynomial  ain, k0 [, k1 [, k2 [...]]]+--+-- csound doc: <http://www.csounds.com/manual/html/polynomial.html>+polynomial ::  Sig -> [Sig] -> Sig+polynomial b1 b2 = Sig $ f <$> unSig b1 <*> mapM unSig b2+    where f a1 a2 = opcs "polynomial" [(Ar,[Ar] ++ (repeat Kr))] ([a1] ++ a2)++-- | +-- Computes one argument to the power of another argument.+--+-- Computes xarg to the power of kpow (or ipow) and scales the result by inorm.+--+-- > ares  pow  aarg, kpow [, inorm]+-- > ires  pow  iarg, ipow [, inorm]+-- > kres  pow  karg, kpow [, inorm]+--+-- csound doc: <http://www.csounds.com/manual/html/pow.html>+pow ::  Sig -> Sig -> Sig+pow b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "pow" [(Ar,[Ar,Kr,Ir]),(Ir,[Ir,Ir,Ir]),(Kr,[Kr,Kr,Ir])] [a1,a2]++-- | +-- Multiplies any number of a-rate signals.+--+-- > ares  product  asig1, asig2 [, asig3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/product.html>+product' ::  [Sig] -> Sig+product' b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "product" [(Ar,(repeat Ar))] a1++-- | +-- Sums any number of a-rate signals.+--+-- > ares  sum  asig1 [, asig2] [, asig3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/sum.html>+sum' ::  [Sig] -> Sig+sum' b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "sum" [(Ar,(repeat Ar))] a1++-- | +-- Returns an arctangent.+--+-- Returns the arctangent of iy/ix, ky/kx, or ay/ax.+--+-- > ares  taninv2  ay, ax+-- > ires  taninv2  iy, ix+-- > kres  taninv2  ky, kx+-- > ... taninv2 (ky, kx)... (no rate restriction)+--+-- csound doc: <http://www.csounds.com/manual/html/taninv2.html>+taninv2 :: SigOrD a => a -> a -> a+taninv2 b1 b2 = fromGE $ f <$> toGE b1 <*> toGE b2+    where f a1 a2 = opcs "taninv2" [(Ar,[Ar,Ar]),(Kr,[Kr,Kr]),(Ir,[Ir,Ir])] [a1,a2]
+ src/Csound/Typed/Opcode/Miscellaneous.hs view
@@ -0,0 +1,151 @@+module Csound.Typed.Opcode.Miscellaneous (+    +    +    +    fareylen, fareyleni, modmatrix, pwd, system_i, system, tableshuffle, tableshufflei) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- returns the length of a Farey Sequence.+--+-- This opcode can be used in conjunction with GENfarey.+-- It calculates the length of Farey Sequence Fn. Its length is given by:+-- |Fn| = 1 + SUM over n phi(m) +-- where phi(m) is Euler's totient function, which gives the number of integers ≤ m that are coprime to m.+--+-- > kfl  fareylen  kfn+--+-- csound doc: <http://www.csounds.com/manual/html/fareylen.html>+fareylen ::  Tab -> Sig+fareylen b1 = Sig $ f <$> unTab b1+    where f a1 = opcs "fareylen" [(Kr,[Kr])] [a1]++-- | +-- returns the length of a Farey Sequence.+--+-- This opcode can be used in conjunction with GENfarey.+-- It calculates the length of Farey Sequence Fn. Its length is given by:+-- |Fn| = 1 + SUM over n phi(m) +-- where phi(m) is Euler's totient function, which gives the number of integers ≤ m that are coprime to m.+--+-- > ifl  fareyleni  ifn+--+-- csound doc: <http://www.csounds.com/manual/html/fareyleni.html>+fareyleni ::  Tab -> D+fareyleni b1 = D $ f <$> unTab b1+    where f a1 = opcs "fareyleni" [(Ir,[Ir])] [a1]++-- | +-- Modulation matrix opcode with optimizations for sparse matrices.+--+-- The opcode can be used to let a large number of k-rate modulator+--       variables modulate a large number of k-rate parameter variables,+--       with arbitrary scaling of each modulator-to-parameter+--       connection.  Csound ftables are used to hold both the input+--       (parameter)  variables, the modulator variables, and the scaling+--       coefficients. Output variables are written to another Csound ftable.+--+-- >  modmatrix  iresfn, isrcmodfn, isrcparmfn, imodscale, inum_mod, \\+-- >     inum_parm, kupdate+--+-- csound doc: <http://www.csounds.com/manual/html/modmatrix.html>+modmatrix ::  Tab -> Tab -> Tab -> D -> D -> D -> Sig -> SE ()+modmatrix b1 b2 b3 b4 b5 b6 b7 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unTab b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "modmatrix" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir,Kr])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6+                                                                                  ,a7]++-- | +-- Asks the underlying operating system for the current directory+--       name as a string.+--+-- pwd call the operating system to determine+--       the current directory (folder).  pwd runs+--       at i-time only.+--+-- > Sres  pwd  +--+-- csound doc: <http://www.csounds.com/manual/html/pwd.html>+pwd ::   Str+pwd  = Str $ return $ f +    where f  = opcs "pwd" [(Sr,[])] []++-- | +-- Call an external program via the system call+--+-- system and system_i call+--     any external command understood by the operating system, similarly+--     to the C function     system(). system_i runs+--     at i-time only, while +--       system runs both at initialization and+--       performance time.+--+-- > ires  system_i  itrig, Scmd, [inowait]+--+-- csound doc: <http://www.csounds.com/manual/html/system.html>+system_i ::  D -> Str -> D+system_i b1 b2 = D $ f <$> unD b1 <*> unStr b2+    where f a1 a2 = opcs "system_i" [(Ir,[Ir,Sr,Ir])] [a1,a2]++-- | +-- Call an external program via the system call+--+-- system and system_i call+--     any external command understood by the operating system, similarly+--     to the C function     system(). system_i runs+--     at i-time only, while +--       system runs both at initialization and+--       performance time.+--+-- > kres  system  ktrig, Scmd, [knowait]+--+-- csound doc: <http://www.csounds.com/manual/html/system.html>+system ::  Sig -> Str -> Sig+system b1 b2 = Sig $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = opcs "system" [(Kr,[Kr,Sr,Kr])] [a1,a2]++-- | +-- shuffles the content of a function table so that each element of the source+--       table is put into a different random position.+--+-- This opcode can be used in order to shuffle the content of+--       function tables into a random order but without loosing any of+--       the elements. Imagine shuffling a deck of cards. Each element of+--       the table is copied to a different random position. If that+--       position was already chosen before then the next free position+--       is chosen. The length of the table remains the same.+--+-- >  tableshuffle  ktablenum+--+-- csound doc: <http://www.csounds.com/manual/html/tableshuffle.html>+tableshuffle ::  Sig -> SE ()+tableshuffle b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "tableshuffle" [(Xr,[Kr])] [a1]++-- | +-- shuffles the content of a function table so that each element of the source+--       table is put into a different random position.+--+-- This opcode can be used in order to shuffle the content of+--       function tables into a random order but without loosing any of+--       the elements. Imagine shuffling a deck of cards. Each element of+--       the table is copied to a different random position. If that+--       position was already chosen before then the next free position+--       is chosen. The length of the table remains the same.+--+-- >  tableshufflei  itablenum+--+-- csound doc: <http://www.csounds.com/manual/html/tableshuffle.html>+tableshufflei ::  D -> SE ()+tableshufflei b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "tableshufflei" [(Xr,[Ir])] [a1]
+ src/Csound/Typed/Opcode/MixerOpcodes.hs view
@@ -0,0 +1,84 @@+module Csound.Typed.Opcode.MixerOpcodes (+    +    +    +    mixerClear, mixerGetLevel, mixerReceive, mixerSend, mixerSetLevel, mixerSetLevel_i) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Resets all channels of a buss to 0.+--+-- >  MixerClear  +--+-- csound doc: <http://www.csounds.com/manual/html/MixerClear.html>+mixerClear ::   SE ()+mixerClear  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "MixerClear" [(Xr,[])] []++-- | +-- Gets the level of a send to a buss.+--+-- Gets the level at which signals from the send are being added to the buss. The actual sending of the signal to the buss +-- is performed by the MixerSend opcode.+--+-- > kgain  MixerGetLevel  isend, ibuss+--+-- csound doc: <http://www.csounds.com/manual/html/MixerGetLevel.html>+mixerGetLevel ::  D -> D -> SE Sig+mixerGetLevel b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "MixerGetLevel" [(Kr,[Ir,Ir])] [a1,a2]++-- | +-- Receives an arate signal from a channel of a buss.+--+-- Receives an arate signal that has been mixed onto a channel of a buss.+--+-- > asignal  MixerReceive  ibuss, ichannel+--+-- csound doc: <http://www.csounds.com/manual/html/MixerReceive.html>+mixerReceive ::  D -> D -> SE Sig+mixerReceive b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "MixerReceive" [(Ar,[Ir,Ir])] [a1,a2]++-- | +-- Mixes an arate signal into a channel of a buss.+--+-- >  MixerSend  asignal, isend, ibuss, ichannel+--+-- csound doc: <http://www.csounds.com/manual/html/MixerSend.html>+mixerSend ::  Sig -> D -> D -> D -> SE ()+mixerSend b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "MixerSend" [(Xr,[Ar,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sets the level of a send to a buss.+--+-- Sets the level at which signals from the send are added to the buss. The actual sending of the signal to the buss +-- is performed by the MixerSend opcode.+--+-- >  MixerSetLevel  isend, ibuss, kgain+--+-- csound doc: <http://www.csounds.com/manual/html/MixerSetLevel.html>+mixerSetLevel ::  D -> D -> Sig -> SE ()+mixerSetLevel b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unSig b3+    where f a1 a2 a3 = opcs "MixerSetLevel" [(Xr,[Ir,Ir,Kr])] [a1,a2,a3]++-- | +-- Sets the level of a send to a buss.+--+-- Sets the level at which signals from the send are added to the buss. This opcode, because all parameters are irate, may +--       be used in the orchestra header. The actual sending of the signal to the buss +--       is performed by the MixerSend opcode.+--+-- >  MixerSetLevel_i  isend, ibuss, igain+--+-- csound doc: <http://www.csounds.com/manual/html/MixerSetLevel_i.html>+mixerSetLevel_i ::  D -> D -> D -> SE ()+mixerSetLevel_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "MixerSetLevel_i" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]
+ src/Csound/Typed/Opcode/Network.hs view
@@ -0,0 +1,120 @@+module Csound.Typed.Opcode.Network (+    +    +    +    remoteport, sockrecv, sockrecvs, strecv, socksend, socksends, stsend) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Defines the port for use with the remote system.+--+-- Defines the port for use with the insremot, +--       midremot, insglobal+--       and midglobal opcodes.+--+-- >  remoteport  iportnum+--+-- csound doc: <http://www.csounds.com/manual/html/remoteport.html>+remoteport ::  D -> SE ()+remoteport b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "remoteport" [(Xr,[Ir])] [a1]++-- | +-- Receives data from other processes using the low-level UDP or TCP protocols+--+-- Receives directly using the UDP (sockrecv and+--       sockrecvs) or TCP (strecv)+--       protocol onto a network. The data is not subject to any encoding or special+--       routing. The sockrecvs opcode receives a stereo signal+--       interleaved.+--+-- > asig  sockrecv  iport, ilength+--+-- csound doc: <http://www.csounds.com/manual/html/sockrecv.html>+sockrecv ::  D -> D -> Sig+sockrecv b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "sockrecv" [(Ar,[Ir,Ir])] [a1,a2]++-- | +-- Receives data from other processes using the low-level UDP or TCP protocols+--+-- Receives directly using the UDP (sockrecv and+--       sockrecvs) or TCP (strecv)+--       protocol onto a network. The data is not subject to any encoding or special+--       routing. The sockrecvs opcode receives a stereo signal+--       interleaved.+--+-- > asigl, asigr  sockrecvs  iport, ilength+--+-- csound doc: <http://www.csounds.com/manual/html/sockrecv.html>+sockrecvs :: Tuple a => D -> D -> a+sockrecvs b1 b2 = pureTuple $ f <$> unD b1 <*> unD b2+    where f a1 a2 = mopcs "sockrecvs" ([Ar,Ar],[Ir,Ir]) [a1,a2]++-- | +-- Receives data from other processes using the low-level UDP or TCP protocols+--+-- Receives directly using the UDP (sockrecv and+--       sockrecvs) or TCP (strecv)+--       protocol onto a network. The data is not subject to any encoding or special+--       routing. The sockrecvs opcode receives a stereo signal+--       interleaved.+--+-- > asig  strecv  Sipaddr, iport+--+-- csound doc: <http://www.csounds.com/manual/html/sockrecv.html>+strecv ::  Str -> D -> Sig+strecv b1 b2 = Sig $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "strecv" [(Ar,[Sr,Ir])] [a1,a2]++-- | +-- Sends data to other processes using the low-level UDP or TCP protocols+--+-- Transmits data directly using the UDP (socksend and+--       socksends) or TCP (stsend)+--       protocol onto a network. The data is not subject to any encoding or special+--       routing. The socksends opcode send a stereo signal interleaved.+--+-- >  socksend  asig, Sipaddr, iport, ilength+--+-- csound doc: <http://www.csounds.com/manual/html/socksend.html>+socksend ::  Sig -> Str -> D -> D -> SE ()+socksend b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "socksend" [(Xr,[Ar,Sr,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sends data to other processes using the low-level UDP or TCP protocols+--+-- Transmits data directly using the UDP (socksend and+--       socksends) or TCP (stsend)+--       protocol onto a network. The data is not subject to any encoding or special+--       routing. The socksends opcode send a stereo signal interleaved.+--+-- >  socksends  asigl, asigr, Sipaddr, iport,+-- >         ilength+--+-- csound doc: <http://www.csounds.com/manual/html/socksend.html>+socksends ::  Sig -> Sig -> Str -> D -> D -> SE ()+socksends b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unStr b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "socksends" [(Xr,[Ar,Ar,Sr,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Sends data to other processes using the low-level UDP or TCP protocols+--+-- Transmits data directly using the UDP (socksend and+--       socksends) or TCP (stsend)+--       protocol onto a network. The data is not subject to any encoding or special+--       routing. The socksends opcode send a stereo signal interleaved.+--+-- >  stsend  asig, Sipaddr, iport+--+-- csound doc: <http://www.csounds.com/manual/html/socksend.html>+stsend ::  Sig -> Str -> D -> SE ()+stsend b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2 <*> unD b3+    where f a1 a2 a3 = opcs "stsend" [(Xr,[Ar,Sr,Ir])] [a1,a2,a3]
+ src/Csound/Typed/Opcode/OSC.hs view
@@ -0,0 +1,53 @@+module Csound.Typed.Opcode.OSC (+    +    +    +    oscInit, oscListen, oscSend) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Start a listening process for OSC messages to a particular port.+--+-- Starts a listening process, which can be used by OSClisten.+--+-- > ihandle  OSCinit  iport+--+-- csound doc: <http://www.csounds.com/manual/html/OSCinit.html>+oscInit ::  D -> SE D+oscInit b1 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "OSCinit" [(Ir,[Ir])] [a1]++-- | +-- Listen for OSC messages to a particular path.+--+-- On each k-cycle looks to see if an OSC message has been send to+--       a given path of a given type.+--+-- > kans  OSClisten  ihandle, idest, itype [, xdata1, xdata2, ...]+--+-- csound doc: <http://www.csounds.com/manual/html/OSClisten.html>+oscListen ::  D -> D -> D -> [Sig] -> SE Sig+oscListen b1 b2 b3 b4 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> mapM unSig b4+    where f a1 a2 a3 a4 = opcs "OSClisten" [(Kr,[Ir,Ir,Ir] ++ (repeat Xr))] ([a1,a2,a3] ++ a4)++-- | +-- Sends data to other processes using the OSC protocol+--+-- Uses the OSC protocol to send message to other OSC listening processes.+--+-- >  OSCsend  kwhen, ihost, iport, idestination, itype [, kdata1, kdata2, ...]+--+-- csound doc: <http://www.csounds.com/manual/html/OSCsend.html>+oscSend ::  Sig -> D -> D -> D -> D -> [Sig] -> SE ()+oscSend b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> mapM unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "OSCsend" [(Xr,[Kr,Ir,Ir,Ir,Ir] ++ (repeat Kr))] ([a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5] ++ a6)
+ src/Csound/Typed/Opcode/PitchConverters.hs view
@@ -0,0 +1,169 @@+module Csound.Typed.Opcode.PitchConverters (+    +    +    -- * Functions.+    cent, cpsmidinn, cpsoct, cpspch, octave, octcps, octmidinn, octpch, pchmidinn, pchoct, semitone,+    +    -- * Tuning Opcodes.+    cps2pch, cpstun, cpstuni, cpsxpch) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Functions.++-- | +-- Calculates a factor to raise/lower a frequency by a given amount of cents.+--+-- >  cent (x) +--+-- csound doc: <http://www.csounds.com/manual/html/cent.html>+cent :: SigOrD a => a -> a+cent b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1 "cent" a1++-- | +-- Converts a Midi note number value to cycles-per-second.+--+-- >  cpsmidinn  (MidiNoteNumber)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/cpsmidinn.html>+cpsmidinn :: SigOrD a => a -> a+cpsmidinn b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "cpsmidinn" a1++-- | +-- Converts an octave-point-decimal value to cycles-per-second.+--+-- >  cpsoct  (oct)  (no rate restriction)+--+-- csound doc: <http://www.csounds.com/manual/html/cpsoct.html>+cpsoct :: SigOrD a => a -> a+cpsoct b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1 "cpsoct" a1++-- | +-- Converts a pitch-class value to cycles-per-second.+--+-- >  cpspch  (pch)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/cpspch.html>+cpspch :: SigOrD a => a -> a+cpspch b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "cpspch" a1++-- | +-- Calculates a factor to raise/lower a frequency by a given amount of octaves.+--+-- >  octave (x)+--+-- csound doc: <http://www.csounds.com/manual/html/octave.html>+octave :: SigOrD a => a -> a+octave b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1 "octave" a1++-- | +-- Converts a cycles-per-second value to octave-point-decimal.+--+-- >  octcps  (cps)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/octcps.html>+octcps :: SigOrD a => a -> a+octcps b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "octcps" a1++-- | +-- Converts a Midi note number value to octave-point-decimal.+--+-- >  octmidinn  (MidiNoteNumber)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/octmidinn.html>+octmidinn :: SigOrD a => a -> a+octmidinn b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "octmidinn" a1++-- | +-- Converts a pitch-class value to octave-point-decimal.+--+-- >  octpch  (pch)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/octpch.html>+octpch :: SigOrD a => a -> a+octpch b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "octpch" a1++-- | +-- Converts a Midi note number value to octave point pitch-class units.+--+-- >  pchmidinn  (MidiNoteNumber)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/pchmidinn.html>+pchmidinn :: SigOrD a => a -> a+pchmidinn b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "pchmidinn" a1++-- | +-- Converts an octave-point-decimal value to pitch-class.+--+-- >  pchoct  (oct)  (init- or control-rate args only)+--+-- csound doc: <http://www.csounds.com/manual/html/pchoct.html>+pchoct :: SigOrD a => a -> a+pchoct b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1k "pchoct" a1++-- | +-- Calculates a factor to raise/lower a frequency by a given amount of semitones.+--+-- >  semitone (x)+--+-- csound doc: <http://www.csounds.com/manual/html/semitone.html>+semitone :: SigOrD a => a -> a+semitone b1 = fromGE $ f <$> toGE b1+    where f a1 = opr1 "semitone" a1++-- Tuning Opcodes.++-- | +-- Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of the octave.+--+-- > icps  cps2pch  ipch, iequal+--+-- csound doc: <http://www.csounds.com/manual/html/cps2pch.html>+cps2pch ::  D -> D -> D+cps2pch b1 b2 = D $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "cps2pch" [(Ir,[Ir,Ir])] [a1,a2]++-- | +-- Returns micro-tuning values at k-rate.+--+-- > kcps  cpstun  ktrig, kindex, kfn+--+-- csound doc: <http://www.csounds.com/manual/html/cpstun.html>+cpstun ::  Sig -> Sig -> Tab -> Sig+cpstun b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "cpstun" [(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Returns micro-tuning values at init-rate.+--+-- > icps  cpstuni  index, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/cpstuni.html>+cpstuni ::  D -> Tab -> D+cpstuni b1 b2 = D $ f <$> unD b1 <*> unTab b2+    where f a1 a2 = opcs "cpstuni" [(Ir,[Ir,Ir])] [a1,a2]++-- | +-- Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of any interval.+--+-- Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of any interval. There is a restriction of no more than 100 equal divisions.+--+-- > icps  cpsxpch  ipch, iequal, irepeat, ibase+--+-- csound doc: <http://www.csounds.com/manual/html/cpsxpch.html>+cpsxpch ::  D -> D -> D -> D -> D+cpsxpch b1 b2 b3 b4 = D $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "cpsxpch" [(Ir,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]
+ src/Csound/Typed/Opcode/PluginHosting.hs view
@@ -0,0 +1,221 @@+module Csound.Typed.Opcode.PluginHosting (+    +    +    -- * DSSI and LADSPA.+    dssiactivate, dssiaudio, dssictls, dssiinit, dssilist,+    +    -- * VST.+    vstaudio, vstaudiog, vstbankload, vstedit, vstinfo, vstinit, vstmidiout, vstnote, vstparamset, vstparamget, vstprogset) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- DSSI and LADSPA.++-- | +-- Activates or deactivates a DSSI or LADSPA plugin.+--+-- dssiactivate is used to activate or deactivate a DSSI or LADSPA plugin. It calles the plugin's activate() and deactivate() functions if they are provided.+--+-- >  dssiactivate  ihandle, ktoggle +--+-- csound doc: <http://www.csounds.com/manual/html/dssiactivate.html>+dssiactivate ::  D -> Sig -> SE ()+dssiactivate b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2+    where f a1 a2 = opcs "dssiactivate" [(Xr,[Ir,Kr])] [a1,a2]++-- | +-- Processes audio using a LADSPA or DSSI plugin.+--+-- dssiaudio generates audio by processing an input signal through a LADSPA plugin.+--+-- > [aout1, aout2, ..., aout9]  dssiaudio  ihandle, [ain1, ain2, ..., ain9]+--+-- csound doc: <http://www.csounds.com/manual/html/dssiaudio.html>+dssiaudio :: Tuple a => D -> [Sig] -> a+dssiaudio b1 b2 = pureTuple $ f <$> unD b1 <*> mapM unSig b2+    where f a1 a2 = mopcs "dssiaudio" ((repeat Ar),[Ir] ++ (repeat Ar)) ([a1] ++ a2)++-- | +-- Send control information to a LADSPA or DSSI plugin.+--+-- dssictls sends control values to a plugin's control port+--+-- >  dssictls  ihandle, iport, kvalue, ktrigger +--+-- csound doc: <http://www.csounds.com/manual/html/dssictls.html>+dssictls ::  D -> D -> Sig -> Sig -> SE ()+dssictls b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "dssictls" [(Xr,[Ir,Ir,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Loads a DSSI or LADSPA plugin.+--+-- dssiinit is used to load a DSSI or LADSPA plugin into memory for use with+--       the other dssi4cs opcodes. Both LADSPA effects and DSSI instruments can be used.+--+-- > ihandle  dssiinit  ilibraryname, iplugindex [, iverbose] +--+-- csound doc: <http://www.csounds.com/manual/html/dssiinit.html>+dssiinit ::  D -> D -> SE D+dssiinit b1 b2 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "dssiinit" [(Ir,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Lists all available DSSI and LADSPA plugins.+--+-- dssilist checks the variables DSSI_PATH and LADSPA_PATH and lists all plugins available in all plugin libraries there.+--+-- >  dssilist  +--+-- csound doc: <http://www.csounds.com/manual/html/dssilist.html>+dssilist ::   SE ()+dssilist  = SE $ (depT_ =<<) $ lift $ return $ f +    where f  = opcs "dssilist" [(Xr,[])] []++-- VST.++-- | ++--+-- vstaudio and vstaudiog+--       are used for sending and receiving audio from a VST plugin.+--+-- > aout1,aout2  vstaudio  instance, [ain1, ain2]+--+-- csound doc: <http://www.csounds.com/manual/html/vstaudio.html>+vstaudio :: Tuple a => D -> a+vstaudio b1 = pureTuple $ f <$> unD b1+    where f a1 = mopcs "vstaudio" ([Ar,Ar],[Ir,Ar,Ar]) [a1]++-- | ++--+-- vstaudio and vstaudiog+--       are used for sending and receiving audio from a VST plugin.+--+-- > aout1,aout2  vstaudiog  instance, [ain1, ain2]+--+-- csound doc: <http://www.csounds.com/manual/html/vstaudio.html>+vstaudiog :: Tuple a => D -> a+vstaudiog b1 = pureTuple $ f <$> unD b1+    where f a1 = mopcs "vstaudiog" ([Ar,Ar],[Ir,Ar,Ar]) [a1]++-- | +-- Loads parameter banks to a VST plugin.+--+-- vstbankload is used for loading parameter+--       banks to a VST plugin.+--+-- >  vstbankload  instance, ipath+--+-- csound doc: <http://www.csounds.com/manual/html/vstbankload.html>+vstbankload ::  D -> D -> SE ()+vstbankload b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "vstbankload" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Opens the GUI editor window for a VST plugin.+--+-- vstedit opens the custom GUI editor window for a VST+--       plugin. Note that not all VST plugins have custom GUI editors. It may+--       be necessary to use the --displays command-line option to ensure that+--       Csound handles events from the editor window and displays it properly.+--+-- >  vstedit  instance+--+-- csound doc: <http://www.csounds.com/manual/html/vstedit.html>+vstedit ::  D -> SE ()+vstedit b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "vstedit" [(Xr,[Ir])] [a1]++-- | +-- Displays the parameters and the programs of a VST plugin.+--+-- vstinfo displays the parameters and the programs of a+--       VST plugin.+--+-- >  vstinfo  instance+--+-- csound doc: <http://www.csounds.com/manual/html/vstinfo.html>+vstinfo ::  D -> SE ()+vstinfo b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "vstinfo" [(Xr,[Ir])] [a1]++-- | +-- Load a VST plugin into memory for use with the other vst4cs opcodes.+--+-- vstinit is used to load a VST plugin into memory for use with+--       the other vst4cs opcodes. Both VST effects and instruments+--       (synthesizers) can be used.+--+-- > instance  vstinit  ilibrarypath [,iverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vstinit.html>+vstinit ::  D -> SE D+vstinit b1 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "vstinit" [(Ir,[Ir,Ir])] [a1]++-- | +-- Sends MIDI information to a VST plugin.+--+-- vstmidiout is used for sending MIDI information to a VST plugin.+--+-- >  vstmidiout  instance, kstatus, kchan, kdata1, kdata2+--+-- csound doc: <http://www.csounds.com/manual/html/vstmidiout.html>+vstmidiout ::  D -> Sig -> Sig -> Sig -> Sig -> SE ()+vstmidiout b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "vstmidiout" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Sends a MIDI note with definite duration to a VST plugin.+--+-- vstnote sends a MIDI note with definite duration to a VST plugin.+--+-- >  vstnote  instance, kchan, knote, kveloc, kdur+-- >         +--+-- csound doc: <http://www.csounds.com/manual/html/vstnote.html>+vstnote ::  D -> Sig -> Sig -> Sig -> Sig -> SE ()+vstnote b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "vstnote" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | ++--+-- vstparamset and vstparamget are used for parameter comunication to and from a VST plugin.+--+-- >  vstparamset instance, kparam, kvalue+--+-- csound doc: <http://www.csounds.com/manual/html/vstparamset.html>+vstparamset ::  D -> Sig -> Sig -> SE ()+vstparamset b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vstparamset" [(Xr,[Ir,Kr,Kr])] [a1,a2,a3]++-- | ++--+-- vstparamset and vstparamget are used for parameter comunication to and from a VST plugin.+--+-- > kvalue  vstparamget instance, kparam+--+-- csound doc: <http://www.csounds.com/manual/html/vstparamset.html>+vstparamget ::  D -> Sig -> Sig+vstparamget b1 b2 = Sig $ f <$> unD b1 <*> unSig b2+    where f a1 a2 = opcs "vstparamget" [(Kr,[Ir,Kr])] [a1,a2]++-- | +-- Loads parameter banks to a VST plugin.+--+-- vstprogset sets one of the programs in an+--       .fxb bank.+--+-- >  vstprogset  instance, kprogram+--+-- csound doc: <http://www.csounds.com/manual/html/vstprogset.html>+vstprogset ::  D -> Sig -> SE ()+vstprogset b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2+    where f a1 a2 = opcs "vstprogset" [(Xr,[Ir,Kr])] [a1,a2]
+ src/Csound/Typed/Opcode/RealtimeMIDI.hs view
@@ -0,0 +1,780 @@+module Csound.Typed.Opcode.RealtimeMIDI (+    +    +    -- * Input.+    aftouch, chanctrl, ctrl14, ctrl21, ctrl7, ctrlinit, initc14, initc21, initc7, massign, midic14, midic21, midic7, midictrl, notnum, pchbend, pgmassign, polyaft, veloc,+    +    -- * Output.+    nrpn, outiat, outic, outic14, outipat, outipb, outipc, outkat, outkc, outkc14, outkpat, outkpb, outkpc,+    +    -- * Converters.+    ampmidi, ampmidid, cpsmidi, cpsmidib, cpstmid, octmidi, octmidib, pchmidi, pchmidib,+    +    -- * Generic I/O.+    midiin, midiout,+    +    -- * Event Extenders.+    release, xtratim,+    +    -- * Note Output.+    midion, midion2, moscil, noteoff, noteon, noteondur, noteondur2,+    +    -- * MIDI/Score Interoperability.+    midichannelaftertouch, midichn, midicontrolchange, mididefault, midinoteoff, midinoteoncps, midinoteonkey, midinoteonoct, midinoteonpch, midipitchbend, midipolyaftertouch, midiprogramchange,+    +    -- * System Realtime.+    mclock, mrtmsg) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Input.++-- | +-- Get the current after-touch value for this channel.+--+-- > kaft  aftouch  [imin] [, imax]+--+-- csound doc: <http://www.csounds.com/manual/html/aftouch.html>+aftouch ::   Sig+aftouch  = Sig $ return $ f +    where f  = opcs "aftouch" [(Kr,[Ir,Ir])] []++-- | +-- Get the current value of a MIDI channel controller.+--+-- Get the current value of a controller and optionally map it onto specified range.+--+-- > ival  chanctrl  ichnl, ictlno [, ilow] [, ihigh]+-- > kval  chanctrl  ichnl, ictlno [, ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/chanctrl.html>+chanctrl ::  D -> D -> Sig+chanctrl b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "chanctrl" [(Ir,[Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Allows a floating-point 14-bit MIDI signal scaled with a minimum and a maximum range.+--+-- > idest  ctrl14  ichan, ictlno1, ictlno2, imin, imax [, ifn]+-- > kdest  ctrl14  ichan, ictlno1, ictlno2, kmin, kmax [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/ctrl14.html>+ctrl14 ::  D -> D -> D -> D -> D -> Sig+ctrl14 b1 b2 b3 b4 b5 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "ctrl14" [(Ir,[Ir,Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Kr,Kr,Ir])] [a1+                                                                                               ,a2+                                                                                               ,a3+                                                                                               ,a4+                                                                                               ,a5]++-- | +-- Allows a floating-point 21-bit MIDI signal scaled with a minimum and a maximum range.+--+-- > idest  ctrl21  ichan, ictlno1, ictlno2, ictlno3, imin, imax [, ifn]+-- > kdest  ctrl21  ichan, ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/ctrl21.html>+ctrl21 ::  D -> D -> D -> D -> D -> D -> Sig+ctrl21 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "ctrl21" [(Ir,[Ir,Ir,Ir,Ir,Ir,Ir,Ir])+                                              ,(Kr,[Ir,Ir,Ir,Ir,Kr,Kr,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range.+--+-- > idest  ctrl7  ichan, ictlno, imin, imax [, ifn]+-- > kdest  ctrl7  ichan, ictlno, kmin, kmax [, ifn]+-- > adest  ctrl7  ichan, ictlno, kmin, kmax [, ifn] [, icutoff]+--+-- csound doc: <http://www.csounds.com/manual/html/ctrl7.html>+ctrl7 ::  D -> D -> D -> D -> Sig+ctrl7 b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "ctrl7" [(Ir,[Ir,Ir,Ir,Ir,Ir])+                                       ,(Kr,[Ir,Ir,Kr,Kr,Ir])+                                       ,(Ar,[Ir,Ir,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sets the initial values for a set of MIDI controllers.+--+-- >  ctrlinit  ichnl, ictlno1, ival1 [, ictlno2] [, ival2] [, ictlno3] \+-- >           [, ival3] [,...ival32]+--+-- csound doc: <http://www.csounds.com/manual/html/ctrlinit.html>+ctrlinit ::  [D] -> SE ()+ctrlinit b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unD b1+    where f a1 = opcs "ctrlinit" [(Xr,(repeat Ir))] a1++-- | +-- Initializes the controllers used to create a 14-bit MIDI value.+--+-- >  initc14  ichan, ictlno1, ictlno2, ivalue+--+-- csound doc: <http://www.csounds.com/manual/html/initc14.html>+initc14 ::  D -> D -> D -> D -> SE ()+initc14 b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "initc14" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Initializes the controllers used to create a 21-bit MIDI value.+--+-- >  initc21  ichan, ictlno1, ictlno2, ictlno3, ivalue+--+-- csound doc: <http://www.csounds.com/manual/html/initc21.html>+initc21 ::  D -> D -> D -> D -> D -> SE ()+initc21 b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "initc21" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Initializes the controller used to create a 7-bit MIDI value.+--+-- Initializes MIDI controller ictlno with ivalue+--+-- >  initc7  ichan, ictlno, ivalue+--+-- csound doc: <http://www.csounds.com/manual/html/initc7.html>+initc7 ::  D -> D -> D -> SE ()+initc7 b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "initc7" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Assigns a MIDI channel number to a Csound instrument.+--+-- >  massign  ichnl, insnum[, ireset]+-- >  massign  ichnl, "insname"[, ireset]+--+-- csound doc: <http://www.csounds.com/manual/html/massign.html>+massign ::  D -> D -> SE ()+massign b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "massign" [(Xr,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Allows a floating-point 14-bit MIDI signal scaled with a minimum and a maximum range.+--+-- > idest  midic14  ictlno1, ictlno2, imin, imax [, ifn]+-- > kdest  midic14  ictlno1, ictlno2, kmin, kmax [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/midic14.html>+midic14 ::  D -> D -> D -> D -> Sig+midic14 b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "midic14" [(Ir,[Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Allows a floating-point 21-bit MIDI signal scaled with a minimum and a maximum range.+--+-- > idest  midic21  ictlno1, ictlno2, ictlno3, imin, imax [, ifn]+-- > kdest  midic21  ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/midic21.html>+midic21 ::  D -> D -> D -> D -> D -> Sig+midic21 b1 b2 b3 b4 b5 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "midic21" [(Ir,[Ir,Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Kr,Kr,Ir])] [a1+                                                                                                ,a2+                                                                                                ,a3+                                                                                                ,a4+                                                                                                ,a5]++-- | +-- Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range.+--+-- > idest  midic7  ictlno, imin, imax [, ifn]+-- > kdest  midic7  ictlno, kmin, kmax [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/midic7.html>+midic7 ::  D -> D -> D -> Sig+midic7 b1 b2 b3 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "midic7" [(Ir,[Ir,Ir,Ir,Ir]),(Kr,[Ir,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Get the current value (0-127) of a specified MIDI controller.+--+-- > ival  midictrl  inum [, imin] [, imax]+-- > kval  midictrl  inum [, imin] [, imax]+--+-- csound doc: <http://www.csounds.com/manual/html/midictrl.html>+midictrl ::  D -> Sig+midictrl b1 = Sig $ f <$> unD b1+    where f a1 = opcs "midictrl" [(Ir,[Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir])] [a1]++-- | +-- Get a note number from a MIDI event.+--+-- > ival  notnum  +--+-- csound doc: <http://www.csounds.com/manual/html/notnum.html>+notnum ::  Msg -> D+notnum _  = D $ return $ f +    where f  = opcs "notnum" [(Ir,[])] []++-- | +-- Get the current pitch-bend value for this channel.+--+-- > ibend  pchbend  [imin] [, imax]+-- > kbend  pchbend  [imin] [, imax]+--+-- csound doc: <http://www.csounds.com/manual/html/pchbend.html>+pchbend ::  Msg -> Sig+pchbend _  = Sig $ return $ f +    where f  = opcs "pchbend" [(Ir,[Ir,Ir]),(Kr,[Ir,Ir])] []++-- | +-- Assigns an instrument number to a specified MIDI program.+--+-- Assigns an instrument number to a specified (or all) MIDI program(s).+--+-- >  pgmassign  ipgm, inst[, ichn]+-- >  pgmassign  ipgm, "insname"[, ichn]+--+-- csound doc: <http://www.csounds.com/manual/html/pgmassign.html>+pgmassign ::  D -> D -> SE ()+pgmassign b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "pgmassign" [(Xr,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Returns the polyphonic after-touch pressure of the selected note number.+--+-- polyaft returns the polyphonic pressure of the selected note number, optionally mapped to an user-specified range.+--+-- > ires  polyaft  inote [, ilow] [, ihigh]+-- > kres  polyaft  inote [, ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/polyaft.html>+polyaft ::  D -> Sig+polyaft b1 = Sig $ f <$> unD b1+    where f a1 = opcs "polyaft" [(Ir,[Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir])] [a1]++-- | +-- Get the velocity from a MIDI event.+--+-- > ival  veloc  [ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/veloc.html>+veloc ::   D+veloc  = D $ return $ f +    where f  = opcs "veloc" [(Ir,[Ir,Ir])] []++-- Output.++-- | +-- Sends a Non-Registered Parameter Number to the MIDI OUT port.+--+-- Sends a NPRN (Non-Registered Parameter Number) message to the MIDI OUT port each time one of the input arguments changes.+--+-- >  nrpn  kchan, kparmnum, kparmvalue+--+-- csound doc: <http://www.csounds.com/manual/html/nrpn.html>+nrpn ::  Sig -> Sig -> Sig -> SE ()+nrpn b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "nrpn" [(Xr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Sends MIDI aftertouch messages at i-rate.+--+-- >  outiat  ichn, ivalue, imin, imax+--+-- csound doc: <http://www.csounds.com/manual/html/outiat.html>+outiat ::  D -> D -> D -> D -> SE ()+outiat b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "outiat" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sends MIDI controller output at i-rate.+--+-- >  outic  ichn, inum, ivalue, imin, imax+--+-- csound doc: <http://www.csounds.com/manual/html/outic.html>+outic ::  D -> D -> D -> D -> D -> SE ()+outic b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "outic" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Sends 14-bit MIDI controller output at i-rate.+--+-- >  outic14  ichn, imsb, ilsb, ivalue, imin, imax+--+-- csound doc: <http://www.csounds.com/manual/html/outic14.html>+outic14 ::  D -> D -> D -> D -> D -> D -> SE ()+outic14 b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "outic14" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Sends polyphonic MIDI aftertouch messages at i-rate.+--+-- >  outipat  ichn, inotenum, ivalue, imin, imax+--+-- csound doc: <http://www.csounds.com/manual/html/outipat.html>+outipat ::  D -> D -> D -> D -> D -> SE ()+outipat b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "outipat" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Sends MIDI pitch-bend messages at i-rate.+--+-- >  outipb  ichn, ivalue, imin, imax+--+-- csound doc: <http://www.csounds.com/manual/html/outipb.html>+outipb ::  D -> D -> D -> D -> SE ()+outipb b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "outipb" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sends MIDI program change messages at i-rate+--+-- >  outipc  ichn, iprog, imin, imax+--+-- csound doc: <http://www.csounds.com/manual/html/outipc.html>+outipc ::  D -> D -> D -> D -> SE ()+outipc b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "outipc" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sends MIDI aftertouch messages at k-rate.+--+-- >  outkat  kchn, kvalue, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/outkat.html>+outkat ::  Sig -> Sig -> Sig -> Sig -> SE ()+outkat b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "outkat" [(Xr,[Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Sends MIDI controller messages at k-rate.+--+-- >  outkc  kchn, knum, kvalue, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/outkc.html>+outkc ::  Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+outkc b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "outkc" [(Xr,[Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Sends 14-bit MIDI controller output at k-rate.+--+-- >  outkc14  kchn, kmsb, klsb, kvalue, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/outkc14.html>+outkc14 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+outkc14 b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "outkc14" [(Xr,[Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5,a6]++-- | +-- Sends polyphonic MIDI aftertouch messages at k-rate.+--+-- >  outkpat  kchn, knotenum, kvalue, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/outkpat.html>+outkpat ::  Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+outkpat b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "outkpat" [(Xr,[Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Sends MIDI pitch-bend messages at k-rate.+--+-- >  outkpb  kchn, kvalue, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/outkpb.html>+outkpb ::  Sig -> Sig -> Sig -> Sig -> SE ()+outkpb b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "outkpb" [(Xr,[Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Sends MIDI program change messages at k-rate.+--+-- >  outkpc  kchn, kprog, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/outkpc.html>+outkpc ::  Sig -> Sig -> Sig -> Sig -> SE ()+outkpc b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "outkpc" [(Xr,[Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- Converters.++-- | +-- Get the velocity of the current MIDI event.+--+-- > iamp  ampmidi  iscal [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/ampmidi.html>+ampmidi ::  Msg -> D -> D+ampmidi _ b1 = D $ f <$> unD b1+    where f a1 = opcs "ampmidi" [(Ir,[Ir,Ir])] [a1]++-- | +-- Musically map MIDI velocity to peak amplitude within a specified dynamic range in decibels.+--+-- > iamplitude  ampmidid  ivelocity, idecibels+-- > kamplitude  ampmidid  kvelocity, idecibels+--+-- csound doc: <http://www.csounds.com/manual/html/ampmidid.html>+ampmidid ::  Msg -> D -> D -> Sig+ampmidid _ b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "ampmidid" [(Ir,[Ir,Ir]),(Kr,[Kr,Ir])] [a1,a2]++-- | +-- Get the note number of the current MIDI event, expressed in cycles-per-second.+--+-- > icps  cpsmidi  +--+-- csound doc: <http://www.csounds.com/manual/html/cpsmidi.html>+cpsmidi ::  Msg -> D+cpsmidi _  = D $ return $ f +    where f  = opcs "cpsmidi" [(Ir,[])] []++-- | +-- Get the note number of the current MIDI event and modify it by the current pitch-bend value, express it in cycles-per-second.+--+-- > icps  cpsmidib  [irange]+-- > kcps  cpsmidib  [irange]+--+-- csound doc: <http://www.csounds.com/manual/html/cpsmidib.html>+cpsmidib ::  Msg -> Sig+cpsmidib _  = Sig $ return $ f +    where f  = opcs "cpsmidib" [(Ir,[Ir]),(Kr,[Ir])] []++-- | +-- Get a MIDI note number (allows customized micro-tuning scales).+--+-- This unit is similar to cpsmidi, but allows fully customized micro-tuning scales.+--+-- > icps  cpstmid  ifn+--+-- csound doc: <http://www.csounds.com/manual/html/cpstmid.html>+cpstmid ::  Msg -> Tab -> D+cpstmid _ b1 = D $ f <$> unTab b1+    where f a1 = opcs "cpstmid" [(Ir,[Ir])] [a1]++-- | +-- Get the note number, in octave-point-decimal units, of the current MIDI event.+--+-- > ioct  octmidi  +--+-- csound doc: <http://www.csounds.com/manual/html/octmidi.html>+octmidi ::  Msg -> D+octmidi _  = D $ return $ f +    where f  = opcs "octmidi" [(Ir,[])] []++-- | +-- Get the note number of the current MIDI event and modify it by the current pitch-bend value, express it in octave-point-decimal.+--+-- > ioct  octmidib  [irange]+-- > koct  octmidib  [irange]+--+-- csound doc: <http://www.csounds.com/manual/html/octmidib.html>+octmidib ::  Msg -> Sig+octmidib _  = Sig $ return $ f +    where f  = opcs "octmidib" [(Ir,[Ir]),(Kr,[Ir])] []++-- | +-- Get the note number of the current MIDI event, expressed in pitch-class units.+--+-- > ipch  pchmidi  +--+-- csound doc: <http://www.csounds.com/manual/html/pchmidi.html>+pchmidi ::  Msg -> D+pchmidi _  = D $ return $ f +    where f  = opcs "pchmidi" [(Ir,[])] []++-- | +-- Get the note number of the current MIDI event and modify it by the current pitch-bend value, express it in pitch-class units.+--+-- > ipch  pchmidib  [irange]+-- > kpch  pchmidib  [irange]+--+-- csound doc: <http://www.csounds.com/manual/html/pchmidib.html>+pchmidib ::  Msg -> Sig+pchmidib _  = Sig $ return $ f +    where f  = opcs "pchmidib" [(Ir,[Ir]),(Kr,[Ir])] []++-- Generic I/O.++-- | +-- Returns a generic MIDI message received by the MIDI IN port.+--+-- Returns a generic MIDI message received by the MIDI IN port+--+-- > kstatus, kchan, kdata1, kdata2  midiin  +--+-- csound doc: <http://www.csounds.com/manual/html/midiin.html>+midiin :: Tuple a =>  a+midiin  = pureTuple $ return $ f +    where f  = mopcs "midiin" ([Kr,Kr,Kr,Kr],[]) []++-- | +-- Sends a generic MIDI message to the MIDI OUT port.+--+-- >  midiout  kstatus, kchan, kdata1, kdata2+--+-- csound doc: <http://www.csounds.com/manual/html/midiout.html>+midiout ::  Sig -> Sig -> Sig -> Sig -> SE ()+midiout b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "midiout" [(Xr,[Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- Event Extenders.++-- | +-- Indicates whether a note is in its “release” stage.+--+-- Provides a way of knowing when a note off message for the current note is received. Only a noteoff message with the same MIDI note number as the one which triggered the note will be reported by release.+--+-- > kflag  release  +--+-- csound doc: <http://www.csounds.com/manual/html/release.html>+release ::   Sig+release  = Sig $ return $ f +    where f  = opcs "release" [(Kr,[])] []++-- | +-- Extend the duration of real-time generated events.+--+-- Extend the duration of real-time generated events and handle their extra life (Usually for usage along with release instead of linenr, linsegr, etc).+--+-- >  xtratim  iextradur+--+-- csound doc: <http://www.csounds.com/manual/html/xtratim.html>+xtratim ::  D -> SE ()+xtratim b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "xtratim" [(Xr,[Ir])] [a1]++-- Note Output.++-- | +-- Generates MIDI note messages at k-rate.+--+-- >  midion  kchn, knum, kvel+--+-- csound doc: <http://www.csounds.com/manual/html/midion.html>+midion ::  Sig -> Sig -> Sig -> SE ()+midion b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "midion" [(Xr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Sends noteon and noteoff messages to the MIDI OUT port.+--+-- Sends noteon and noteoff messages to the MIDI OUT port when triggered by a value different than zero.+--+-- >  midion2  kchn, knum, kvel, ktrig+--+-- csound doc: <http://www.csounds.com/manual/html/midion2.html>+midion2 ::  Sig -> Sig -> Sig -> Sig -> SE ()+midion2 b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "midion2" [(Xr,[Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Sends a stream of the MIDI notes.+--+-- >  moscil  kchn, knum, kvel, kdur, kpause+--+-- csound doc: <http://www.csounds.com/manual/html/moscil.html>+moscil ::  Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+moscil b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "moscil" [(Xr,[Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Send a noteoff message to the MIDI OUT port.+--+-- >  noteoff  ichn, inum, ivel+--+-- csound doc: <http://www.csounds.com/manual/html/noteoff.html>+noteoff ::  D -> D -> D -> SE ()+noteoff b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "noteoff" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Send a noteon message to the MIDI OUT port.+--+-- >  noteon  ichn, inum, ivel+--+-- csound doc: <http://www.csounds.com/manual/html/noteon.html>+noteon ::  D -> D -> D -> SE ()+noteon b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "noteon" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Sends a noteon and a noteoff MIDI message both with the same channel, number and velocity.+--+-- >  noteondur  ichn, inum, ivel, idur+--+-- csound doc: <http://www.csounds.com/manual/html/noteondur.html>+noteondur ::  D -> D -> D -> D -> SE ()+noteondur b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "noteondur" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sends a noteon and a noteoff MIDI message both with the same channel, number and velocity.+--+-- >  noteondur2  ichn, inum, ivel, idur+--+-- csound doc: <http://www.csounds.com/manual/html/noteondur2.html>+noteondur2 ::  D -> D -> D -> D -> SE ()+noteondur2 b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "noteondur2" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- MIDI/Score Interoperability.++-- | +-- Gets a MIDI channel's aftertouch value.+--+-- midichannelaftertouch is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midichannelaftertouch  xchannelaftertouch [, ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/midichannelaftertouch.html>+midichannelaftertouch ::  Sig -> SE ()+midichannelaftertouch b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "midichannelaftertouch" [(Xr,[Xr,Ir,Ir])] [a1]++-- | +-- Returns the MIDI channel number from which the note was activated.+--+-- midichn returns the MIDI channel number (1 - 16) from which the note was activated. In the case of score notes, it returns 0.+--+-- > ichn  midichn  +--+-- csound doc: <http://www.csounds.com/manual/html/midichn.html>+midichn ::   D+midichn  = D $ return $ f +    where f  = opcs "midichn" [(Ir,[])] []++-- | +-- Gets a MIDI control change value.+--+-- midicontrolchange is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midicontrolchange  xcontroller, xcontrollervalue [, ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/midicontrolchange.html>+midicontrolchange ::  Sig -> Sig -> SE ()+midicontrolchange b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midicontrolchange" [(Xr,[Xr,Xr,Ir,Ir])] [a1,a2]++-- | +-- Changes values, depending on MIDI activation.+--+-- mididefault is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  mididefault  xdefault, xvalue+--+-- csound doc: <http://www.csounds.com/manual/html/mididefault.html>+mididefault ::  Sig -> Sig -> SE ()+mididefault b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "mididefault" [(Xr,[Xr,Xr])] [a1,a2]++-- | +-- Gets a MIDI noteoff value.+--+-- midinoteoff is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midinoteoff  xkey, xvelocity+--+-- csound doc: <http://www.csounds.com/manual/html/midinoteoff.html>+midinoteoff ::  Sig -> Sig -> SE ()+midinoteoff b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midinoteoff" [(Xr,[Xr,Xr])] [a1,a2]++-- | +-- Gets a MIDI note number as a cycles-per-second frequency.+--+-- midinoteoncps is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midinoteoncps  xcps, xvelocity+--+-- csound doc: <http://www.csounds.com/manual/html/midinoteoncps.html>+midinoteoncps ::  Sig -> Sig -> SE ()+midinoteoncps b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midinoteoncps" [(Xr,[Xr,Xr])] [a1,a2]++-- | +-- Gets a MIDI note number value.+--+-- midinoteonkey is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midinoteonkey  xkey, xvelocity+--+-- csound doc: <http://www.csounds.com/manual/html/midinoteonkey.html>+midinoteonkey ::  Sig -> Sig -> SE ()+midinoteonkey b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midinoteonkey" [(Xr,[Xr,Xr])] [a1,a2]++-- | +-- Gets a MIDI note number value as octave-point-decimal value.+--+-- midinoteonoct is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midinoteonoct  xoct, xvelocity+--+-- csound doc: <http://www.csounds.com/manual/html/midinoteonoct.html>+midinoteonoct ::  Sig -> Sig -> SE ()+midinoteonoct b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midinoteonoct" [(Xr,[Xr,Xr])] [a1,a2]++-- | +-- Gets a MIDI note number as a pitch-class value.+--+-- midinoteonpch is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midinoteonpch  xpch, xvelocity+--+-- csound doc: <http://www.csounds.com/manual/html/midinoteonpch.html>+midinoteonpch ::  Sig -> Sig -> SE ()+midinoteonpch b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midinoteonpch" [(Xr,[Xr,Xr])] [a1,a2]++-- | +-- Gets a MIDI pitchbend value.+--+-- midipitchbend is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midipitchbend  xpitchbend [, ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/midipitchbend.html>+midipitchbend ::  Sig -> SE ()+midipitchbend b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "midipitchbend" [(Xr,[Xr,Ir,Ir])] [a1]++-- | +-- Gets a MIDI polyphonic aftertouch value.+--+-- midipolyaftertouch is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midipolyaftertouch  xpolyaftertouch, xcontrollervalue [, ilow] [, ihigh]+--+-- csound doc: <http://www.csounds.com/manual/html/midipolyaftertouch.html>+midipolyaftertouch ::  Sig -> Sig -> SE ()+midipolyaftertouch b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "midipolyaftertouch" [(Xr,[Xr,Xr,Ir,Ir])] [a1,a2]++-- | +-- Gets a MIDI program change value.+--+-- midiprogramchange is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.+--+-- >  midiprogramchange  xprogram+--+-- csound doc: <http://www.csounds.com/manual/html/midiprogramchange.html>+midiprogramchange ::  Sig -> SE ()+midiprogramchange b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "midiprogramchange" [(Xr,[Xr])] [a1]++-- System Realtime.++-- | +-- Sends a MIDI CLOCK message.+--+-- >  mclock  ifreq+--+-- csound doc: <http://www.csounds.com/manual/html/mclock.html>+mclock ::  D -> SE ()+mclock b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "mclock" [(Xr,[Ir])] [a1]++-- | +-- Send system real-time messages to the MIDI OUT port.+--+-- >  mrtmsg  imsgtype+--+-- csound doc: <http://www.csounds.com/manual/html/mrtmsg.html>+mrtmsg ::  D -> SE ()+mrtmsg b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "mrtmsg" [(Xr,[Ir])] [a1]
+ src/Csound/Typed/Opcode/RemoteOpcodes.hs view
@@ -0,0 +1,86 @@+module Csound.Typed.Opcode.RemoteOpcodes (+    +    +    +    insglobal, insremot, midglobal, midremot) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- An opcode which can be used to implement a remote+--       orchestra. This opcode will send note events from a source+--       machine to many destinations.+--+-- With the insremot and+--       insglobal opcodes you are able to perform+--       instruments on remote machines and control them from a master+--       machine. The remote opcodes are implemented using the+--       master/client model. All the machines involved contain the same+--       orchestra but only the master machine contains the information+--       of the score. During the performance the master machine sends+--       the note events to the clients. The+--       insglobal opcode sends the events to all+--       the machines involved in the remote concert. These machines are+--       determined by the insremot+--       definitions made above the insglobal+--       command. To send events to only one machine use insremot.+--+-- >  insglobal  isource, instrnum [,instrnum...] +--+-- csound doc: <http://www.csounds.com/manual/html/insglobal.html>+insglobal ::  D -> D -> SE ()+insglobal b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "insglobal" [(Xr,(repeat Ir))] [a1,a2]++-- | +-- An opcode which can be used to implement a remote+--       orchestra. This opcode will send note events from a source+--       machine to one destination.+--+-- With the insremot and insglobal+--       opcodes you are able to perform instruments on remote machines+--       and control them from a master machine. The remote opcodes are+--       implemented using the master/client model. All the machines+--       involved contain the same orchestra but only the master machine+--       contains the information of the score. During the performance+--       the master machine sends the note events to the clients. The+--       insremot opcode will send events from a+--       source machine to one destination if you want to send events to+--       many destinations (broadcast) use the insglobal+--       opcode instead. These two opcodes can be used in combination.+--+-- >  insremot  idestination, isource, instrnum [,instrnum...] +--+-- csound doc: <http://www.csounds.com/manual/html/insremot.html>+insremot ::  D -> D -> D -> SE ()+insremot b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "insremot" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- An opcode which can be used to implement a remote midi orchestra. This opcode will broadcast the midi events to all the machines involved in the remote concert.+--+-- With the midremot and midglobal opcodes you are able to perform instruments on remote machines and control them from a master machine. The remote opcodes are implemented using the master/client model. All the machines involved contain the same orchestra but only the master machine contains the information of the midi score. During the performance the master machine sends the midi events to the clients. The midglobal opcode sends the events to all the machines involved in the remote concert. These machines are determined by the midremot definitions made above the midglobal command. To send events to only one machine use midremot.+--+-- >  midglobal  isource, instrnum [,instrnum...] +--+-- csound doc: <http://www.csounds.com/manual/html/midglobal.html>+midglobal ::  D -> D -> SE ()+midglobal b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "midglobal" [(Xr,(repeat Ir))] [a1,a2]++-- | +-- An opcode which can be used to implement a remote midi orchestra. This opcode will send midi events from a source machine to one destination.+--+-- With the midremot and midglobal opcodes you are able to perform instruments on remote machines and control them from a master machine. The remote opcodes are implemented using the master/client model. All the machines involved contain the same orchestra but only the master machine contains the information of the midi score. During the performance the master machine sends the midi events to the clients. The midremot opcode will send events from a source machine to one destination if you want to send events to many destinations (broadcast) use the midglobal opcode instead. These two opcodes can be used in combination.+--+-- >  midremot  idestination, isource, instrnum [,instrnum...] +--+-- csound doc: <http://www.csounds.com/manual/html/midremot.html>+midremot ::  D -> D -> D -> SE ()+midremot b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "midremot" [(Xr,(repeat Ir))] [a1,a2,a3]
+ src/Csound/Typed/Opcode/SerialIO.hs view
@@ -0,0 +1,109 @@+module Csound.Typed.Opcode.SerialIO (+    +    +    +    serialBegin, serialEnd, serialFlush, serialPrint, serialRead, serialWrite, serialWrite_i) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Open a serial port.+--+-- Open a serial port for arduino.+--+-- > iPort  serialBegin  SPortName [, ibaudRate]+--+-- csound doc: <http://www.csounds.com/manual/html/serialBegin.html>+serialBegin ::  Str -> SE D+serialBegin b1 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "serialBegin" [(Ir,[Sr,Ir])] [a1]++-- | +-- Close a serial port.+--+-- Close a serial port for arduino.+--+-- >   serialEnd  iPort+--+-- csound doc: <http://www.csounds.com/manual/html/serialEnd.html>+serialEnd ::  D -> SE ()+serialEnd b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "serialEnd" [(Xr,[Ir])] [a1]++-- | +-- Flush data from a serial port.+--+-- Flush to the screen any bytes (up to 32k) in the input buffer.  +-- Note that these bytes will be cleared from the buffer.+-- use this opcode mainly for debugging messages.+-- If you want to mix debugging and other communication +-- messages over the same port, you will need to manually+-- parse the data with the serialRead opcode.+--+-- >   serialFlush  iPort+--+-- csound doc: <http://www.csounds.com/manual/html/serialFlush.html>+serialFlush ::  D -> SE ()+serialFlush b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "serialFlush" [(Xr,[Ir])] [a1]++-- | +-- Print data from a serial port.+--+-- Print to the screen any bytes (up to 32k) in the input buffer.  +-- Note that these bytes will be cleared from the buffer.+-- use this opcode mainly for debugging messages.+-- If you want to mix debugging and other communication +-- messages over the same port, you will need to manually+-- parse the data with the serialRead opcode.+--+-- >   serialPrint  iPort+--+-- csound doc: <http://www.csounds.com/manual/html/serialPrint.html>+serialPrint ::  D -> SE ()+serialPrint b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "serialPrint" [(Xr,[Ir])] [a1]++-- | +-- Read data from a serial port.+--+-- Read data from a serial port for arduino.+--+-- > kByte  serialRead  iPort+--+-- csound doc: <http://www.csounds.com/manual/html/serialRead.html>+serialRead ::  D -> Sig+serialRead b1 = Sig $ f <$> unD b1+    where f a1 = opcs "serialRead" [(Kr,[Ir])] [a1]++-- | +-- Write data to a serial port.+--+-- Write data to a serial port for arduino.+--+-- >   serialWrite  iPort, iByte+-- >   serialWrite  iPort, kByte+-- >   serialWrite  iPort, SBytes+--+-- csound doc: <http://www.csounds.com/manual/html/serialWrite.html>+serialWrite ::  D -> D -> SE ()+serialWrite b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "serialWrite" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Write data to a serial port.+--+-- Write data to a serial port for arduino.+--+-- >   serialWrite_i  iPort, iByte+-- >   serialWrite_i  iPort, SBytes+--+-- csound doc: <http://www.csounds.com/manual/html/serialWrite_i.html>+serialWrite_i ::  D -> D -> SE ()+serialWrite_i b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "serialWrite_i" [(Xr,[Ir,Ir])] [a1,a2]
+ src/Csound/Typed/Opcode/SignalFlowGraphOpcodes.hs view
@@ -0,0 +1,105 @@+module Csound.Typed.Opcode.SignalFlowGraphOpcodes (+    +    +    +    ftgenonce, inleta, inletf, inletk, inletkid, outleta, outletf, outletk, outletkid) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Generate a function table from within an instrument definition, without duplication of data.+--+-- Enables the creation of function tables entirely inside +--       instrument definitions, without any duplication of data.+--+-- > ifno  ftgenonce  ip1, ip2dummy, isize, igen, iarga, iargb, ...+--+-- csound doc: <http://www.csounds.com/manual/html/ftgenonce.html>+ftgenonce ::  D -> D -> D -> D -> D -> [D] -> Tab+ftgenonce b1 b2 b3 b4 b5 b6 = Tab $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> mapM unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "ftgenonce" [(Ir,(repeat Ir))] ([a1,a2,a3,a4,a5] ++ a6)++-- | +-- Receives an arate signal into an instrument through a named port.+--+-- > asignal  inleta Sname+--+-- csound doc: <http://www.csounds.com/manual/html/inleta.html>+inleta ::  Str -> Sig+inleta b1 = Sig $ f <$> unStr b1+    where f a1 = opcs "inleta" [(Ar,[Sr])] [a1]++-- | +-- Receives an frate signal (fsig) into an instrument from a named port.+--+-- > fsignal  inletf Sname+--+-- csound doc: <http://www.csounds.com/manual/html/inletf.html>+inletf ::  Str -> Spec+inletf b1 = Spec $ f <$> unStr b1+    where f a1 = opcs "inletf" [(Fr,[Sr])] [a1]++-- | +-- Receives a krate signal into an instrument from a named port.+--+-- > ksignal  inletk Sname+--+-- csound doc: <http://www.csounds.com/manual/html/inletk.html>+inletk ::  Str -> Sig+inletk b1 = Sig $ f <$> unStr b1+    where f a1 = opcs "inletk" [(Kr,[Sr])] [a1]++-- | +-- Receives a krate signal into an instrument from a named port.+--+-- > ksignal  inletkid Sname, SinstanceID+--+-- csound doc: <http://www.csounds.com/manual/html/inletkid.html>+inletkid ::  Str -> Str -> Sig+inletkid b1 b2 = Sig $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "inletkid" [(Kr,[Sr,Sr])] [a1,a2]++-- | +-- Sends an arate signal out from an instrument to a named port.+--+-- >  outleta Sname, asignal+--+-- csound doc: <http://www.csounds.com/manual/html/outleta.html>+outleta ::  Str -> Sig -> SE ()+outleta b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "outleta" [(Xr,[Sr,Ar])] [a1,a2]++-- | +-- Sends a frate signal (fsig) out from an instrument to a named port.+--+-- >  outletf Sname, fsignal+--+-- csound doc: <http://www.csounds.com/manual/html/outletf.html>+outletf ::  Str -> Spec -> SE ()+outletf b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSpec b2+    where f a1 a2 = opcs "outletf" [(Xr,[Sr,Fr])] [a1,a2]++-- | +-- Sends a krate signal out from an instrument to a named port.+--+-- >  outletk Sname, ksignal+--+-- csound doc: <http://www.csounds.com/manual/html/outletk.html>+outletk ::  Str -> Sig -> SE ()+outletk b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "outletk" [(Xr,[Sr,Kr])] [a1,a2]++-- | +-- Sends a krate signal out from an instrument to a named port.+--+-- >  outletkid Sname, SinstanceID, ksignal+--+-- csound doc: <http://www.csounds.com/manual/html/outletkid.html>+outletkid ::  Str -> Str -> Sig -> SE ()+outletkid b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2 <*> unSig b3+    where f a1 a2 a3 = opcs "outletkid" [(Xr,[Sr,Sr,Kr])] [a1,a2,a3]
+ src/Csound/Typed/Opcode/SignalGenerators.hs view
@@ -0,0 +1,3817 @@+module Csound.Typed.Opcode.SignalGenerators (+    +    +    -- * Additive Synthesis/Resynthesis.+    adsyn, adsynt, adsynt2, hsboscil,+    +    -- * Basic Oscillators.+    lfo, oscbnk, oscil, oscil3, oscili, oscilikt, osciliktp, oscilikts, osciln, oscils, poscil, poscil3, vibr, vibrato,+    +    -- * Dynamic Spectrum Oscillators.+    buzz, gbuzz, mpulse, vco, vco2, vco2ft, vco2ift, vco2init,+    +    -- * FM Synthesis.+    crossfm, crossfmi, crosspm, crosspmi, crossfmpm, crossfmpmi, fmb3, fmbell, fmmetal, fmpercfl, fmrhode, fmvoice, fmwurlie, foscil, foscili,+    +    -- * Granular Synthesis.+    diskgrain, fof, fof2, fog, grain, grain2, grain3, granule, partikkel, partikkelsync, sndwarp, sndwarpst, syncgrain, syncloop, vosim,+    +    -- * Hyper Vectorial Synthesis.+    hvs1, hvs2, hvs3,+    +    -- * Linear and Exponential Generators.+    cosseg, cossegb, cossegr, expcurve, expon, expseg, expsega, expsegb, expsegba, expsegr, gainslider, jspline, line, linseg, linsegb, linsegr, logcurve, loopseg, loopsegp, looptseg, loopxseg, lpshold, lpsholdp, rspline, scale, transeg, transegb, transegr,+    +    -- * Envelope Generators.+    adsr, envlpx, envlpxr, linen, linenr, madsr, mxadsr, xadsr,+    +    -- * Models and Emulations.+    bamboo, barmodel, cabasa, chuap, crunch, dripwater, gendy, gendyc, gendyx, gogobel, guiro, lorenz, mandel, mandol, marimba, moog, planet, prepiano, sandpaper, sekere, shaker, sleighbells, stix, tambourine, vibes, voice,+    +    -- * Phasors.+    phasor, phasorbnk, syncphasor,+    +    -- * Random (Noise) Generators.+    betarand, bexprnd, cauchy, cauchyi, cuserrnd, duserrnd, dust, dust2, exprand, exprandi, fractalnoise, gauss, gaussi, gausstrig, jitter, jitter2, linrand, noise, pcauchy, pinkish, poisson, rand, randh, randi, random, randomh, randomi, rnd31, seed, trandom, trirand, unirand, urandom, urd, weibull,+    +    -- * Sample Playback.+    bbcutm, bbcuts, flooper, flooper2, fluidAllOut, fluidCCi, fluidCCk, fluidControl, fluidEngine, fluidLoad, fluidNote, fluidOut, fluidProgramSelect, fluidSetInterpMethod, loscil, loscil3, loscilx, lphasor, lposcil, lposcil3, lposcila, lposcilsa, lposcilsa2, sfilist, sfinstr, sfinstr3, sfinstr3m, sfinstrm, sfload, sflooper, sfpassign, sfplay, sfplay3, sfplay3m, sfplaym, sfplist, sfpreset, sndloop, waveset,+    +    -- * Scanned Synthesis.+    scanhammer, scans, scantable, scanu, xscanmap, xscans, xscansmap, xscanu,+    +    -- * STK Opcodes.+    stkBandedWG, stkBeeThree, stkBlowBotl, stkBlowHole, stkBowed, stkBrass, stkClarinet, stkDrummer, stkFMVoices, stkFlute, stkHevyMetl, stkMandolin, stkModalBar, stkMoog, stkPercFlut, stkPlucked, stkResonate, stkRhodey, stkSaxofony, stkShakers, stkSimple, stkSitar, stkStifKarp, stkTubeBell, stkVoicForm, stkWhistle, stkWurley,+    +    -- * Table Access.+    oscil1, oscil1i, ptable, ptable3, ptablei, tab_i, tab, tabw_i, tabw, table, table3, tablei,+    +    -- * Wave Terrain Synthesis.+    wterrain,+    +    -- * Waveguide Physical Modeling.+    pluck, repluck, streson, wgbow, wgbowedbar, wgbrass, wgclar, wgflute, wgpluck, wgpluck2) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Additive Synthesis/Resynthesis.++-- | +-- Output is an additive set of individually controlled sinusoids, using an oscillator bank.+--+-- > ares  adsyn  kamod, kfmod, ksmod, ifilcod+--+-- csound doc: <http://www.csounds.com/manual/html/adsyn.html>+adsyn ::  Sig -> Sig -> Sig -> Str -> Sig+adsyn b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unStr b4+    where f a1 a2 a3 a4 = opcs "adsyn" [(Ar,[Kr,Kr,Kr,Sr])] [a1,a2,a3,a4]++-- | +-- Performs additive synthesis with an arbitrary number of partials, not necessarily harmonic.+--+-- > ares  adsynt  kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/adsynt.html>+adsynt ::  Sig -> Sig -> Tab -> Tab -> Tab -> D -> Sig+adsynt b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3 <*> unTab b4 <*> unTab b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "adsynt" [(Ar,[Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Performs additive synthesis with an arbitrary number of partials -not necessarily harmonic- with interpolation.+--+-- Performs additive synthesis with an arbitrary number of partials, not necessarily harmonic. (see adsynt for detailed manual)+--+-- > ar  adsynt2  kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/adsynt2.html>+adsynt2 ::  Sig -> Sig -> Tab -> Tab -> Tab -> D -> Sig+adsynt2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3 <*> unTab b4 <*> unTab b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "adsynt2" [(Ar,[Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- An oscillator which takes tonality and brightness as arguments.+--+-- An oscillator which takes tonality and brightness as arguments, relative to a base frequency.+--+-- > ares  hsboscil  kamp, ktone, kbrite, ibasfreq, iwfn, ioctfn \+-- >                    [, ioctcnt] [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/hsboscil.html>+hsboscil ::  Sig -> Sig -> Sig -> D -> Tab -> Tab -> Sig+hsboscil b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unTab b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "hsboscil" [(Ar,[Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- Basic Oscillators.++-- | +-- A low frequency oscillator of various shapes.+--+-- > kres  lfo  kamp, kcps [, itype]+-- > ares  lfo  kamp, kcps [, itype]+--+-- csound doc: <http://www.csounds.com/manual/html/lfo.html>+lfo ::  Sig -> Sig -> Sig+lfo b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "lfo" [(Kr,[Kr,Kr,Ir]),(Ar,[Kr,Kr,Ir])] [a1,a2]++-- | +-- Mixes the output of any number of oscillators.+--+-- This unit generator mixes the output of any number of oscillators. The frequency, phase, and amplitude of each oscillator can be modulated by two LFOs (all oscillators have a separate set of LFOs, with different phase and frequency); additionally, the output of each oscillator can be filtered through an optional parametric equalizer (also controlled by the LFOs).  This opcode is most useful for rendering ensemble (strings, choir, etc.) instruments.+--+-- > ares  oscbnk   kcps, kamd, kfmd, kpmd, iovrlap, iseed, kl1minf, kl1maxf, \+-- >           kl2minf, kl2maxf, ilfomode, keqminf, keqmaxf, keqminl, keqmaxl, \+-- >           keqminq, keqmaxq, ieqmode, kfn [, il1fn] [, il2fn] [, ieqffn]   \+-- >           [, ieqlfn] [, ieqqfn] [, itabl] [, ioutfn]+--+-- csound doc: <http://www.csounds.com/manual/html/oscbnk.html>+oscbnk ::  Sig -> Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> Sig -> D -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Tab -> Sig+oscbnk b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 b17 b18 b19 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unD b6 <*> unSig b7 <*> unSig b8 <*> unSig b9 <*> unSig b10 <*> unD b11 <*> unSig b12 <*> unSig b13 <*> unSig b14 <*> unSig b15 <*> unSig b16 <*> unSig b17 <*> unD b18 <*> unTab b19+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 = opcs "oscbnk" [(Ar+                                                                                                ,[Kr,Kr,Kr,Kr,Ir,Ir,Kr,Kr,Kr,Kr,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                                                                                                                   ,a2+                                                                                                                                                                                   ,a3+                                                                                                                                                                                   ,a4+                                                                                                                                                                                   ,a5+                                                                                                                                                                                   ,a6+                                                                                                                                                                                   ,a7+                                                                                                                                                                                   ,a8+                                                                                                                                                                                   ,a9+                                                                                                                                                                                   ,a10+                                                                                                                                                                                   ,a11+                                                                                                                                                                                   ,a12+                                                                                                                                                                                   ,a13+                                                                                                                                                                                   ,a14+                                                                                                                                                                                   ,a15+                                                                                                                                                                                   ,a16+                                                                                                                                                                                   ,a17+                                                                                                                                                                                   ,a18+                                                                                                                                                                                   ,a19]++-- | +-- A simple oscillator.+--+-- oscil reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp.+--+-- > ares  oscil  xamp, xcps [, ifn, iphs]+-- > kres  oscil  kamp, kcps [, ifn, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/oscil.html>+oscil ::  Sig -> Sig -> Tab -> Sig+oscil b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "oscil" [(Ar,[Xr,Xr,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A simple oscillator with cubic interpolation.+--+-- oscil3 reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp. Cubic interpolation is applied for table look up from internal phase values.+--+-- > ares  oscil3  xamp, xcps [, ifn, iphs]+-- > kres  oscil3  kamp, kcps [, ifn, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/oscil3.html>+oscil3 ::  Sig -> Sig -> Tab -> Sig+oscil3 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "oscil3" [(Ar,[Xr,Xr,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A simple oscillator with linear interpolation.+--+-- oscili reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp. Linear interpolation is applied for table look up from internal phase values.+--+-- > ares  oscili  xamp, xcps, ifn [, iphs]+-- > kres  oscili  kamp, kcps, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/oscili.html>+oscili ::  Sig -> Sig -> Tab -> Sig+oscili b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "oscili" [(Ar,[Xr,Xr,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A linearly interpolated oscillator that allows changing the table number at k-rate.+--+-- oscilikt is very similar to oscili, but allows changing the table number at k-rate. It is slightly slower than oscili (especially with high control rate), although also more accurate as it uses a 31-bit phase accumulator, as opposed to the 24-bit one used by oscili.+--+-- > ares  oscilikt  xamp, xcps, kfn [, iphs] [, istor]+-- > kres  oscilikt  kamp, kcps, kfn [, iphs] [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/oscilikt.html>+oscilikt ::  Sig -> Sig -> Tab -> Sig+oscilikt b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "oscilikt" [(Ar,[Xr,Xr,Kr,Ir,Ir]),(Kr,[Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A linearly interpolated oscillator that allows allows phase modulation.+--+-- osciliktp allows phase modulation (which is actually implemented as k-rate frequency modulation, by differentiating phase input). The disadvantage is that there is no amplitude control, and frequency can be varied only at the control-rate. This opcode can be faster or slower than oscilikt, depending on the control-rate.+--+-- > ares  osciliktp  kcps, kfn, kphs [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/osciliktp.html>+osciliktp ::  Sig -> Tab -> Sig -> Sig+osciliktp b1 b2 b3 = Sig $ f <$> unSig b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "osciliktp" [(Ar,[Kr,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- A linearly interpolated oscillator with sync status that allows changing the table number at k-rate.+--+-- oscilikts is the same as oscilikt. Except it has a sync input that can be used to re-initialize the oscillator to a k-rate phase value. It is slower than oscilikt and osciliktp.+--+-- > ares  oscilikts  xamp, xcps, kfn, async, kphs [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/oscilikts.html>+oscilikts ::  Sig -> Sig -> Tab -> Sig -> Sig -> Sig+oscilikts b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "oscilikts" [(Ar,[Xr,Xr,Kr,Ar,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Accesses table values at a user-defined frequency.+--+-- Accesses table values at a user-defined frequency. This opcode can also be written as oscilx.+--+-- > ares  osciln  kamp, ifrq, ifn, itimes+--+-- csound doc: <http://www.csounds.com/manual/html/osciln.html>+osciln ::  Sig -> D -> Tab -> D -> Sig+osciln b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unD b2 <*> unTab b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "osciln" [(Ar,[Kr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- A simple, fast sine oscillator+--+-- Simple, fast sine oscillator, that uses only one multiply, and two add operations to generate one sample of output, and does not require a function table.+--+-- > ares  oscils  iamp, icps, iphs [, iflg]+--+-- csound doc: <http://www.csounds.com/manual/html/oscils.html>+oscils ::  D -> D -> D -> Sig+oscils b1 b2 b3 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "oscils" [(Ar,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- High precision oscillator.+--+-- > ares  poscil  aamp, acps [, ifn, iphs]+-- > ares  poscil  aamp, kcps [, ifn, iphs]+-- > ares  poscil  kamp, acps [, ifn, iphs]+-- > ares  poscil  kamp, kcps [, ifn, iphs]+-- > ires  poscil  kamp, kcps [, ifn, iphs]+-- > kres  poscil  kamp, kcps [, ifn, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/poscil.html>+poscil ::  Sig -> Sig -> Tab -> Sig+poscil b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "poscil" [(Ar,[Ar,Ar,Ir,Ir])+                                     ,(Ar,[Ar,Kr,Ir,Ir])+                                     ,(Ar,[Kr,Ar,Ir,Ir])+                                     ,(Ar,[Kr,Kr,Ir,Ir])+                                     ,(Ir,[Kr,Kr,Ir,Ir])+                                     ,(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- High precision oscillator with cubic interpolation.+--+-- > ares  poscil3  aamp, acps [, ifn, iphs]+-- > ares  poscil3  aamp, kcps [, ifn, iphs]+-- > ares  poscil3  kamp, acps [, ifn, iphs]+-- > ares  poscil3  kamp, kcps [, ifn, iphs]+-- > ires  poscil3  kamp, kcps [, ifn, iphs]+-- > kres  poscil3  kamp, kcps [, ifn, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/poscil3.html>+poscil3 ::  Sig -> Sig -> Tab -> Sig+poscil3 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "poscil3" [(Ar,[Ar,Ar,Ir,Ir])+                                      ,(Ar,[Ar,Kr,Ir,Ir])+                                      ,(Ar,[Kr,Ar,Ir,Ir])+                                      ,(Ar,[Kr,Kr,Ir,Ir])+                                      ,(Ir,[Kr,Kr,Ir,Ir])+                                      ,(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Easier-to-use user-controllable vibrato.+--+-- > kout  vibr  kAverageAmp, kAverageFreq, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/vibr.html>+vibr ::  Sig -> Sig -> Tab -> Sig+vibr b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "vibr" [(Kr,[Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Generates a natural-sounding user-controllable vibrato.+--+-- > kout  vibrato  kAverageAmp, kAverageFreq, kRandAmountAmp, kRandAmountFreq, kAmpMinRate, kAmpMaxRate, kcpsMinRate, kcpsMaxRate, ifn [, iphs+--+-- csound doc: <http://www.csounds.com/manual/html/vibrato.html>+vibrato ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+vibrato b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unTab b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "vibrato" [(Kr,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                               ,a2+                                                                                               ,a3+                                                                                               ,a4+                                                                                               ,a5+                                                                                               ,a6+                                                                                               ,a7+                                                                                               ,a8+                                                                                               ,a9]++-- Dynamic Spectrum Oscillators.++-- | +-- Output is a set of harmonically related sine partials.+--+-- > ares  buzz  xamp, xcps, knh, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/buzz.html>+buzz ::  Sig -> Sig -> Sig -> Tab -> Sig+buzz b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unTab b4+    where f a1 a2 a3 a4 = opcs "buzz" [(Ar,[Xr,Xr,Kr,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Output is a set of harmonically related cosine partials.+--+-- > ares  gbuzz  xamp, xcps, knh, klh, kmul, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/gbuzz.html>+gbuzz ::  Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+gbuzz b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "gbuzz" [(Ar,[Xr,Xr,Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Generates a set of impulses.+--+-- Generates a set of impulses of amplitude kamp separated by kintvl seconds (or samples if kintvl is negative).  The first impulse is generated after a delay of ioffset seconds.+--+-- > ares  mpulse  kamp, kintvl [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/mpulse.html>+mpulse ::  Sig -> Sig -> Sig+mpulse b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "mpulse" [(Ar,[Kr,Kr,Ir])] [a1,a2]++-- | +-- Implementation of a band limited, analog modeled oscillator.+--+-- Implementation of a band limited, analog modeled oscillator, based on integration of band limited impulses. vco can be used to simulate a variety of analog wave forms.+--+-- > ares  vco  xamp, xcps, iwave, kpw [, ifn] [, imaxd] [, ileak] [, inyx] \+-- >           [, iphs] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/vco.html>+vco ::  Sig -> Sig -> D -> Sig -> Sig+vco b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "vco" [(Ar,[Xr,Xr,Ir,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Implementation of a band-limited oscillator using pre-calculated tables.+--+-- vco2 is similar to vco. But the implementation uses pre-calculated tables of band-limited waveforms (see also GEN30) rather than integrating impulses. This opcode can be faster than vco (especially if a low control-rate is used) and also allows better sound quality. Additionally, there are more waveforms and oscillator phase can be modulated at k-rate. The disadvantage is increased memory usage. For more details about vco2 tables, see also vco2init and vco2ft.+--+-- > ares  vco2  kamp, kcps [, imode] [, kpw] [, kphs] [, inyx]+--+-- csound doc: <http://www.csounds.com/manual/html/vco2.html>+vco2 ::  Sig -> Sig -> Sig+vco2 b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "vco2" [(Ar,[Kr,Kr,Ir,Kr,Kr,Ir])] [a1,a2]++-- | +-- Returns a table number at k-time for a given oscillator frequency and wavform.+--+-- vco2ft returns the function table number to be used for generating the specified waveform at a given frequency. This function table number can be used by any Csound opcode that generates a signal by reading function tables (like oscilikt). The tables must be calculated by vco2init before vco2ft is called and shared as Csound ftables (ibasfn).+--+-- > kfn  vco2ft  kcps, iwave [, inyx]+--+-- csound doc: <http://www.csounds.com/manual/html/vco2ft.html>+vco2ft ::  Sig -> D -> Tab+vco2ft b1 b2 = Tab $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "vco2ft" [(Kr,[Kr,Ir,Ir])] [a1,a2]++-- | +-- Returns a table number at i-time for a given oscillator frequency and wavform.+--+-- vco2ift is the same as vco2ft, but works at i-time. It is suitable for use with opcodes that expect an i-rate table number (for example, oscili).+--+-- > ifn  vco2ift  icps, iwave [, inyx]+--+-- csound doc: <http://www.csounds.com/manual/html/vco2ift.html>+vco2ift ::  D -> D -> Tab+vco2ift b1 b2 = Tab $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "vco2ift" [(Ir,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Calculates tables for use by vco2 opcode.+--+-- vco2init calculates tables for use by vco2 opcode. Optionally, it is also possible to access these tables as standard Csound function tables. In this case, vco2ft can be used to find the correct table number for a given oscillator frequency.+--+-- > ifn  vco2init  iwave [, ibasfn] [, ipmul] [, iminsiz] [, imaxsiz] [, isrcft]+--+-- csound doc: <http://www.csounds.com/manual/html/vco2init.html>+vco2init ::  D -> SE Tab+vco2init b1 = fmap ( Tab . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "vco2init" [(Ir,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1]++-- FM Synthesis.++-- | +-- Two mutually frequency and/or phase modulated oscillators.+--+-- Two oscillators, mutually frequency and/or phase modulated by each other.+--+-- > a1, a2  crossfm  xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- csound doc: <http://www.csounds.com/manual/html/crossfm.html>+crossfm :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> a+crossfm b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "crossfm" ([Ar,Ar],[Xr,Xr,Xr,Xr,Kr,Ir,Ir,Ir,Ir]) [a1+                                                                                          ,a2+                                                                                          ,a3+                                                                                          ,a4+                                                                                          ,a5+                                                                                          ,a6+                                                                                          ,a7]++-- | +-- Two mutually frequency and/or phase modulated oscillators.+--+-- Two oscillators, mutually frequency and/or phase modulated by each other.+--+-- > a1, a2  crossfmi  xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- csound doc: <http://www.csounds.com/manual/html/crossfm.html>+crossfmi :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> a+crossfmi b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "crossfmi" ([Ar,Ar],[Xr,Xr,Xr,Xr,Kr,Ir,Ir,Ir,Ir]) [a1+                                                                                           ,a2+                                                                                           ,a3+                                                                                           ,a4+                                                                                           ,a5+                                                                                           ,a6+                                                                                           ,a7]++-- | +-- Two mutually frequency and/or phase modulated oscillators.+--+-- Two oscillators, mutually frequency and/or phase modulated by each other.+--+-- > a1, a2  crosspm  xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- csound doc: <http://www.csounds.com/manual/html/crossfm.html>+crosspm :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> a+crosspm b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "crosspm" ([Ar,Ar],[Xr,Xr,Xr,Xr,Kr,Ir,Ir,Ir,Ir]) [a1+                                                                                          ,a2+                                                                                          ,a3+                                                                                          ,a4+                                                                                          ,a5+                                                                                          ,a6+                                                                                          ,a7]++-- | +-- Two mutually frequency and/or phase modulated oscillators.+--+-- Two oscillators, mutually frequency and/or phase modulated by each other.+--+-- > a1, a2  crosspmi  xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- csound doc: <http://www.csounds.com/manual/html/crossfm.html>+crosspmi :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> a+crosspmi b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "crosspmi" ([Ar,Ar],[Xr,Xr,Xr,Xr,Kr,Ir,Ir,Ir,Ir]) [a1+                                                                                           ,a2+                                                                                           ,a3+                                                                                           ,a4+                                                                                           ,a5+                                                                                           ,a6+                                                                                           ,a7]++-- | +-- Two mutually frequency and/or phase modulated oscillators.+--+-- Two oscillators, mutually frequency and/or phase modulated by each other.+--+-- > a1, a2  crossfmpm  xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- csound doc: <http://www.csounds.com/manual/html/crossfm.html>+crossfmpm :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> a+crossfmpm b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "crossfmpm" ([Ar,Ar],[Xr,Xr,Xr,Xr,Kr,Ir,Ir,Ir,Ir]) [a1+                                                                                            ,a2+                                                                                            ,a3+                                                                                            ,a4+                                                                                            ,a5+                                                                                            ,a6+                                                                                            ,a7]++-- | +-- Two mutually frequency and/or phase modulated oscillators.+--+-- Two oscillators, mutually frequency and/or phase modulated by each other.+--+-- > a1, a2  crossfmpmi  xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- csound doc: <http://www.csounds.com/manual/html/crossfm.html>+crossfmpmi :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> a+crossfmpmi b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "crossfmpmi" ([Ar,Ar],[Xr,Xr,Xr,Xr,Kr,Ir,Ir,Ir,Ir]) [a1+                                                                                             ,a2+                                                                                             ,a3+                                                                                             ,a4+                                                                                             ,a5+                                                                                             ,a6+                                                                                             ,a7]++-- | +-- Uses FM synthesis to create a Hammond B3 organ sound.+--+-- Uses FM synthesis to create a Hammond B3 organ sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.+--+-- > ares  fmb3  kamp, kfreq, kc1, kc2, kvdepth, kvrate[, ifn1, ifn2, ifn3, \+-- >           ifn4, ivfn]+--+-- csound doc: <http://www.csounds.com/manual/html/fmb3.html>+fmb3 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+fmb3 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "fmb3" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                      ,a2+                                                                                      ,a3+                                                                                      ,a4+                                                                                      ,a5+                                                                                      ,a6]++-- | +-- Uses FM synthesis to create a tublar bell sound.+--+-- Uses FM synthesis to create a tublar bell sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.+--+-- > ares  fmbell  kamp, kfreq, kc1, kc2, kvdepth, kvrate[, ifn1, ifn2, ifn3, \+-- >           ifn4, ivfn, isus]+--+-- csound doc: <http://www.csounds.com/manual/html/fmbell.html>+fmbell ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+fmbell b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "fmbell" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                           ,a2+                                                                                           ,a3+                                                                                           ,a4+                                                                                           ,a5+                                                                                           ,a6]++-- | +-- Uses FM synthesis to create a “Heavy Metal” sound.+--+-- Uses FM synthesis to create a “Heavy Metal” sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.+--+-- > ares  fmmetal  kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, \+-- >           ifn4, ivfn+--+-- csound doc: <http://www.csounds.com/manual/html/fmmetal.html>+fmmetal ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+fmmetal b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7 <*> unTab b8 <*> unTab b9 <*> unTab b10 <*> unTab b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = opcs "fmmetal" [(Ar+                                                                 ,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- Uses FM synthesis to create a percussive flute sound.+--+-- Uses FM synthesis to create a percussive flute sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.+--+-- > ares  fmpercfl  kamp, kfreq, kc1, kc2, kvdepth, kvrate[, ifn1, ifn2, \+-- >           ifn3, ifn4, ivfn]+--+-- csound doc: <http://www.csounds.com/manual/html/fmpercfl.html>+fmpercfl ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+fmpercfl b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "fmpercfl" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                          ,a2+                                                                                          ,a3+                                                                                          ,a4+                                                                                          ,a5+                                                                                          ,a6]++-- | +-- Uses FM synthesis to create a Fender Rhodes electric piano sound.+--+-- Uses FM synthesis to create a Fender Rhodes electric piano sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.+--+-- > ares  fmrhode  kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, \+-- >           ifn3, ifn4, ivfn+--+-- csound doc: <http://www.csounds.com/manual/html/fmrhode.html>+fmrhode ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+fmrhode b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7 <*> unTab b8 <*> unTab b9 <*> unTab b10 <*> unTab b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = opcs "fmrhode" [(Ar+                                                                 ,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- FM Singing Voice Synthesis+--+-- > ares  fmvoice  kamp, kfreq, kvowel, ktilt, kvibamt, kvibrate[, ifn1, \+-- >           ifn2, ifn3, ifn4, ivibfn]+--+-- csound doc: <http://www.csounds.com/manual/html/fmvoice.html>+fmvoice ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+fmvoice b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "fmvoice" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                         ,a2+                                                                                         ,a3+                                                                                         ,a4+                                                                                         ,a5+                                                                                         ,a6]++-- | +-- Uses FM synthesis to create a Wurlitzer electric piano sound.+--+-- Uses FM synthesis to create a Wurlitzer electric piano sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer.+--+-- > ares  fmwurlie  kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, \+-- >           ifn4, ivfn+--+-- csound doc: <http://www.csounds.com/manual/html/fmwurlie.html>+fmwurlie ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+fmwurlie b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7 <*> unTab b8 <*> unTab b9 <*> unTab b10 <*> unTab b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = opcs "fmwurlie" [(Ar+                                                                  ,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- A basic frequency modulated oscillator.+--+-- > ares  foscil  xamp, kcps, xcar, xmod, kndx, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/foscil.html>+foscil ::  Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+foscil b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "foscil" [(Ar,[Xr,Kr,Xr,Xr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Basic frequency modulated oscillator with linear interpolation.+--+-- > ares  foscili  xamp, kcps, xcar, xmod, kndx, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/foscili.html>+foscili ::  Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+foscili b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "foscili" [(Ar,[Xr,Kr,Xr,Xr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- Granular Synthesis.++-- | +-- Synchronous granular synthesis, using a soundfile as source.+--+-- diskgrain implements synchronous granular synthesis. The source sound for the grains is obtained by reading a soundfile containing the samples of the source waveform.+--+-- > asig  diskgrain  Sfname, kamp, kfreq, kpitch, kgrsize, kprate, \+-- >           ifun, iolaps [,imaxgrsize , ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/diskgrain.html>+diskgrain ::  Str -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> Sig+diskgrain b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unStr b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "diskgrain" [(Ar,[Sr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir])] [a1+                                                                                              ,a2+                                                                                              ,a3+                                                                                              ,a4+                                                                                              ,a5+                                                                                              ,a6+                                                                                              ,a7+                                                                                              ,a8]++-- | +-- Produces sinusoid bursts useful for formant and granular synthesis.+--+-- Audio output is a succession of sinusoid bursts initiated at frequency xfund with a spectral peak at xform. For xfund above 25 Hz these bursts produce a speech-like formant with spectral characteristics determined by the k-input parameters. For lower fundamentals this generator provides a special form of granular synthesis.+--+-- > ares  fof  xamp, xfund, xform, koct, kband, kris, kdur, kdec, iolaps, \+-- >           ifna, ifnb, itotdur [, iphs] [, ifmode] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/fof.html>+fof ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Tab -> Tab -> D -> Sig+fof b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unD b9 <*> unTab b10 <*> unTab b11 <*> unD b12+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 = opcs "fof" [(Ar+                                                                 ,[Xr,Xr,Xr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12]++-- | +-- Produces sinusoid bursts including k-rate incremental indexing with each successive burst.+--+-- Audio output is a succession of sinusoid bursts initiated at frequency xfund with a spectral peak at xform. For xfund above 25 Hz these bursts produce a speech-like formant with spectral characteristics determined by the k-input parameters. For lower fundamentals this generator provides a special form of granular synthesis.+--+-- > ares  fof2  xamp, xfund, xform, koct, kband, kris, kdur, kdec, iolaps, \+-- >           ifna, ifnb, itotdur, kphs, kgliss [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/fof2.html>+fof2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Tab -> Tab -> D -> Sig -> Sig -> Sig+fof2 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unD b9 <*> unTab b10 <*> unTab b11 <*> unD b12 <*> unSig b13 <*> unSig b14+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 = opcs "fof2" [(Ar+                                                                          ,[Xr,Xr,Xr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Kr,Kr,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14]++-- | +-- Audio output is a succession of grains derived from data in a stored function table+--+-- Audio output is a succession of grains derived from data in a stored function table ifna. The local envelope of these grains and their timing is based on the model of fof synthesis and permits detailed control of the granular synthesis.+--+-- > ares  fog  xamp, xdens, xtrans, aspd, koct, kband, kris, kdur, kdec, \+-- >           iolaps, ifna, ifnb, itotdur [, iphs] [, itmode] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/fog.html>+fog ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Tab -> Tab -> D -> Sig+fog b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9 <*> unD b10 <*> unTab b11 <*> unTab b12 <*> unD b13+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 = opcs "fog" [(Ar+                                                                     ,[Xr,Xr,Xr,Ar,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13]++-- | +-- Generates granular synthesis textures.+--+-- > ares  grain  xamp, xpitch, xdens, kampoff, kpitchoff, kgdur, igfn, \+-- >           iwfn, imgdur [, igrnd]+--+-- csound doc: <http://www.csounds.com/manual/html/grain.html>+grain ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> D -> Sig+grain b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7 <*> unTab b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "grain" [(Ar,[Xr,Xr,Xr,Kr,Kr,Kr,Ir,Ir,Ir,Ir])] [a1+                                                                                             ,a2+                                                                                             ,a3+                                                                                             ,a4+                                                                                             ,a5+                                                                                             ,a6+                                                                                             ,a7+                                                                                             ,a8+                                                                                             ,a9]++-- | +-- Easy-to-use granular synthesis texture generator.+--+-- Generate granular synthesis textures. grain2 is simpler to use, but grain3 offers more control.+--+-- > ares  grain2  kcps, kfmd, kgdur, iovrlp, kfn, iwfn [, irpow] \+-- >           [, iseed] [, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/grain2.html>+grain2 ::  Sig -> Sig -> Sig -> D -> Tab -> Tab -> Sig+grain2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unTab b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "grain2" [(Ar,[Kr,Kr,Kr,Ir,Kr,Ir,Ir,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6]++-- | +-- Generate granular synthesis textures with more user control.+--+-- Generate granular synthesis textures. grain2 is simpler to use but grain3 offers more control.+--+-- > ares  grain3  kcps, kphs, kfmd, kpmd, kgdur, kdens, imaxovr, kfn, iwfn, \+-- >           kfrpow, kprpow [, iseed] [, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/grain3.html>+grain3 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Tab -> Tab -> Sig -> Sig -> Sig+grain3 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unD b7 <*> unTab b8 <*> unTab b9 <*> unSig b10 <*> unSig b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = opcs "grain3" [(Ar+                                                                ,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr,Ir,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- A more complex granular synthesis texture generator.+--+-- The granule unit generator is more complex than grain, but does add new possibilities.+--+-- > ares  granule  xamp, ivoice, iratio, imode, ithd, ifn, ipshift, igskip, \+-- >           igskip_os, ilength, kgap, igap_os, kgsize, igsize_os, iatt, idec \+-- >           [, iseed] [, ipitch1] [, ipitch2] [, ipitch3] [, ipitch4] [, ifnenv]+--+-- csound doc: <http://www.csounds.com/manual/html/granule.html>+granule ::  Sig -> D -> D -> D -> D -> Tab -> D -> D -> D -> D -> Sig -> D -> Sig -> D -> D -> D -> Sig+granule b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unTab b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10 <*> unSig b11 <*> unD b12 <*> unSig b13 <*> unD b14 <*> unD b15 <*> unD b16+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 = opcs "granule" [(Ar+                                                                                     ,[Xr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Kr,Ir,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                                                                                            ,a2+                                                                                                                                                            ,a3+                                                                                                                                                            ,a4+                                                                                                                                                            ,a5+                                                                                                                                                            ,a6+                                                                                                                                                            ,a7+                                                                                                                                                            ,a8+                                                                                                                                                            ,a9+                                                                                                                                                            ,a10+                                                                                                                                                            ,a11+                                                                                                                                                            ,a12+                                                                                                                                                            ,a13+                                                                                                                                                            ,a14+                                                                                                                                                            ,a15+                                                                                                                                                            ,a16]++-- | +-- Granular synthesizer with "per grain" control+--       over many of its parameters.  Has a sync input to+--       sychronize its internal grain scheduler clock to an external+--       clock source.+--+-- partikkel was conceived after reading Curtis Roads' book+--       "Microsound", and the goal was to create an opcode that was+--       capable of all time-domain varieties of granular synthesis+--       described in this book. The idea being that most of the+--       techniques only differ in parameter values, and by having a+--       single opcode that can do all varieties of granular synthesis+--       makes it possible to interpolate between techniques. Granular synthesis is sometimes dubbed particle+--       synthesis, and it was thought apt to name the opcode partikkel+--       to distinguish it from other granular opcodes.+--+-- > a1 [, a2, a3, a4, a5, a6, a7, a8]  partikkel  agrainfreq, \+-- >                   kdistribution, idisttab, async, kenv2amt, ienv2tab, ienv_attack, \+-- >                   ienv_decay, ksustain_amount, ka_d_ratio, kduration, kamp, igainmasks, \+-- >                   kwavfreq, ksweepshape, iwavfreqstarttab, iwavfreqendtab, awavfm, \+-- >                   ifmamptab, kfmenv, icosine, ktraincps, knumpartials, kchroma, \+-- >                   ichannelmasks, krandommask, kwaveform1, kwaveform2, kwaveform3, \+-- >                   kwaveform4, iwaveamptab, asamplepos1, asamplepos2, asamplepos3, \+-- >                   asamplepos4, kwavekey1, kwavekey2, kwavekey3, kwavekey4, imax_grains \+-- >                   [, iopcode_id]+--+-- csound doc: <http://www.csounds.com/manual/html/partikkel.html>+partikkel :: Tuple a => Sig -> Sig -> D -> Sig -> Sig -> D -> D -> D -> Sig -> Sig -> Sig -> Sig -> D -> Sig -> Sig -> D -> D -> Sig -> D -> Sig -> D -> Sig -> Sig -> Sig -> D -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> a+partikkel b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 b17 b18 b19 b20 b21 b22 b23 b24 b25 b26 b27 b28 b29 b30 b31 b32 b33 b34 b35 b36 b37 b38 b39 b40 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unSig b4 <*> unSig b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unSig b9 <*> unSig b10 <*> unSig b11 <*> unSig b12 <*> unD b13 <*> unSig b14 <*> unSig b15 <*> unD b16 <*> unD b17 <*> unSig b18 <*> unD b19 <*> unSig b20 <*> unD b21 <*> unSig b22 <*> unSig b23 <*> unSig b24 <*> unD b25 <*> unSig b26 <*> unSig b27 <*> unSig b28 <*> unSig b29 <*> unSig b30 <*> unD b31 <*> unSig b32 <*> unSig b33 <*> unSig b34 <*> unSig b35 <*> unSig b36 <*> unSig b37 <*> unSig b38 <*> unSig b39 <*> unD b40+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 = mopcs "partikkel" ([Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar]+                                                                                                                                                                                       ,[Ar+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Ar+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Kr+                                                                                                                                                                                        ,Ir+                                                                                                                                                                                        ,Ir]) [a1+                                                                                                                                                                                              ,a2+                                                                                                                                                                                              ,a3+                                                                                                                                                                                              ,a4+                                                                                                                                                                                              ,a5+                                                                                                                                                                                              ,a6+                                                                                                                                                                                              ,a7+                                                                                                                                                                                              ,a8+                                                                                                                                                                                              ,a9+                                                                                                                                                                                              ,a10+                                                                                                                                                                                              ,a11+                                                                                                                                                                                              ,a12+                                                                                                                                                                                              ,a13+                                                                                                                                                                                              ,a14+                                                                                                                                                                                              ,a15+                                                                                                                                                                                              ,a16+                                                                                                                                                                                              ,a17+                                                                                                                                                                                              ,a18+                                                                                                                                                                                              ,a19+                                                                                                                                                                                              ,a20+                                                                                                                                                                                              ,a21+                                                                                                                                                                                              ,a22+                                                                                                                                                                                              ,a23+                                                                                                                                                                                              ,a24+                                                                                                                                                                                              ,a25+                                                                                                                                                                                              ,a26+                                                                                                                                                                                              ,a27+                                                                                                                                                                                              ,a28+                                                                                                                                                                                              ,a29+                                                                                                                                                                                              ,a30+                                                                                                                                                                                              ,a31+                                                                                                                                                                                              ,a32+                                                                                                                                                                                              ,a33+                                                                                                                                                                                              ,a34+                                                                                                                                                                                              ,a35+                                                                                                                                                                                              ,a36+                                                                                                                                                                                              ,a37+                                                                                                                                                                                              ,a38+                                                                                                                                                                                              ,a39+                                                                                                                                                                                              ,a40]++-- | +-- Outputs partikkel's grain+--       scheduler clock pulse and phase to synchronize several instances of the partikkel+--       opcode to the same clock source.+--+-- partikkelsync is an opcode for outputting partikkel's grain scheduler clock pulse and phase. partikkelsync's output can be used to synchronize other instances of the partikkel opcode to the same clock.+--+-- > async [,aphase]  partikkelsync  iopcode_id+--+-- csound doc: <http://www.csounds.com/manual/html/partikkelsync.html>+partikkelsync :: Tuple a => D -> a+partikkelsync b1 = pureTuple $ f <$> unD b1+    where f a1 = mopcs "partikkelsync" ([Ar,Ar],[Ir]) [a1]++-- | +-- Reads a mono sound sample from a table and applies time-stretching and/or pitch modification.+--+-- sndwarp reads sound samples from a table and applies time-stretching and/or pitch modification. Time and frequency modification are independent from one another. For example, a sound can be stretched in time while raising the pitch!+--+-- > ares [, ac]  sndwarp  xamp, xtimewarp, xresample, ifn1, ibeg, iwsize, \+-- >           irandw, ioverlap, ifn2, itimemode+--+-- csound doc: <http://www.csounds.com/manual/html/sndwarp.html>+sndwarp :: Tuple a => Sig -> Sig -> Sig -> Tab -> D -> D -> D -> D -> Tab -> D -> a+sndwarp b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unTab b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unTab b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = mopcs "sndwarp" ([Ar,Ar]+                                                             ,[Xr,Xr,Xr,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- Reads a stereo sound sample from a table and applies time-stretching and/or pitch modification.+--+-- sndwarpst reads stereo sound samples from a table and applies time-stretching and/or pitch modification. Time and frequency modification are independent from one another. For example, a sound can be stretched in time while raising the pitch!+--+-- > ar1, ar2 [,ac1] [, ac2]  sndwarpst  xamp, xtimewarp, xresample, ifn1, \+-- >           ibeg, iwsize, irandw, ioverlap, ifn2, itimemode+--+-- csound doc: <http://www.csounds.com/manual/html/sndwarpst.html>+sndwarpst :: Tuple a => Sig -> Sig -> Sig -> Tab -> D -> D -> D -> D -> Tab -> D -> a+sndwarpst b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unTab b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unTab b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = mopcs "sndwarpst" ([Ar,Ar,Ar,Ar]+                                                               ,[Xr,Xr,Xr,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- Synchronous granular synthesis.+--+-- syncgrain implements synchronous granular synthesis. The source sound for the+-- grains is obtained by reading a function table containing the samples of the source waveform. +-- For sampled-sound sources, GEN01 is used.+-- syncgrain will accept deferred allocation tables.+--+-- > asig  syncgrain  kamp, kfreq, kpitch, kgrsize, kprate, ifun1, \+-- >           ifun2, iolaps+--+-- csound doc: <http://www.csounds.com/manual/html/syncgrain.html>+syncgrain ::  Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> D -> Sig+syncgrain b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "syncgrain" [(Ar,[Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir])] [a1+                                                                                        ,a2+                                                                                        ,a3+                                                                                        ,a4+                                                                                        ,a5+                                                                                        ,a6+                                                                                        ,a7+                                                                                        ,a8]++-- | +-- Synchronous granular synthesis.+--+-- syncloop is a variation on syncgrain,+-- which implements synchronous granular synthesis. +-- syncloop adds loop start and end points and an optional start position. Loop start+-- and end control grain start positions, so the actual grains can go beyond the loop+-- points (if the loop points are not at the extremes of the table), enabling+-- seamless crossfading. For more information on the granular synthesis process,+-- check the syncgrain manual page.+--+-- > asig  syncloop  kamp, kfreq, kpitch, kgrsize, kprate, klstart, \+-- >           klend, ifun1, ifun2, iolaps[,istart, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/syncloop.html>+syncloop ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> D -> Sig+syncloop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unD b8 <*> unD b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = opcs "syncloop" [(Ar+                                                              ,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- Simple vocal simulation based on glottal pulses with formant characteristics.+--+-- This opcode produces a simple vocal simulation based on glottal pulses with formant characteristics.+-- Output is a series of sound events, where each event is composed of a burst of squared sine pulses followed by silence.+-- The VOSIM (VOcal SIMulation) synthesis method was developed by Kaegi and Tempelaars in the 1970's.+--+-- > ar  vosim  kamp, kFund, kForm, kDecay, kPulseCount, kPulseFactor, ifn [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/vosim.html>+vosim ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+vosim b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "vosim" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                 ,a2+                                                                                 ,a3+                                                                                 ,a4+                                                                                 ,a5+                                                                                 ,a6+                                                                                 ,a7]++-- Hyper Vectorial Synthesis.++-- | +-- Allows one-dimensional Hyper Vectorial Synthesis (HVS) controlled by externally-updated k-variables.+--+-- hvs1 allows one-dimensional Hyper Vectorial Synthesis (HVS) controlled by externally-updated k-variables.+--+-- >  hvs1  kx, inumParms, inumPointsX, iOutTab, iPositionsTab, iSnapTab [, iConfigTab]+--+-- csound doc: <http://www.csounds.com/manual/html/hvs1.html>+hvs1 ::  Sig -> D -> D -> D -> D -> D -> SE ()+hvs1 b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "hvs1" [(Xr,[Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Allows two-dimensional Hyper Vectorial Synthesis (HVS) controlled by externally-updated k-variables.+--+-- hvs2 allows two-dimensional Hyper Vectorial Synthesis (HVS) controlled by externally-updated k-variables.+--+-- >  hvs2  kx, ky, inumParms, inumPointsX, inumPointsY, iOutTab, iPositionsTab, iSnapTab [, iConfigTab]+--+-- csound doc: <http://www.csounds.com/manual/html/hvs2.html>+hvs2 ::  Sig -> Sig -> D -> D -> D -> D -> D -> D -> SE ()+hvs2 b1 b2 b3 b4 b5 b6 b7 b8 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "hvs2" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                      ,a2+                                                                                      ,a3+                                                                                      ,a4+                                                                                      ,a5+                                                                                      ,a6+                                                                                      ,a7+                                                                                      ,a8]++-- | +-- Allows three-dimensional Hyper Vectorial Synthesis (HVS) controlled by externally-updated k-variables.+--+-- hvs3 allows three-dimensional Hyper Vectorial Synthesis (HVS) controlled by externally-updated k-variables.+--+-- >  hvs3  kx, ky, kz, inumParms, inumPointsX, inumPointsY, inumPointsZ, iOutTab, iPositionsTab, iSnapTab [, iConfigTab]+--+-- csound doc: <http://www.csounds.com/manual/html/hvs3.html>+hvs3 ::  Sig -> Sig -> Sig -> D -> D -> D -> D -> D -> D -> D -> SE ()+hvs3 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = opcs "hvs3" [(Xr+                                                          ,[Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- Linear and Exponential Generators.++-- | +-- Trace a series of line segments between specified points with+--       cosine interpolation.+--+-- > ares  cosseg  ia, idur1, ib [, idur2] [, ic] [...]+-- > kres  cosseg  ia, idur1, ib [, idur2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/cosseg.html>+cosseg ::  [D] -> Sig+cosseg b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "cosseg" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- Trace a series of line segments between specified absolute points with+--       cosine interpolation.+--+-- > ares  cossegb  ia, itim1, ib [, itim2] [, ic] [...]+-- > kres  cossegb  ia, itim1, ib [, itim2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/cossegb.html>+cossegb ::  [D] -> Sig+cossegb b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "cossegb" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- Trace a series of line segments between specified points with+--       cosine interpolation, including a release segment.+--+-- > ares  cossegr  ia, idur1, ib [, idur2] [, ic] [...], irel, iz+-- > kres  cossegr  ia, idur1, ib [, idur2] [, ic] [...], irel, iz+--+-- csound doc: <http://www.csounds.com/manual/html/cossegr.html>+cossegr ::  [D] -> D -> D -> Sig+cossegr b1 b2 b3 = Sig $ f <$> mapM unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = setRate Kr $ opcs "cossegr" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1, a2, a3])++-- | +-- This opcode implements a formula for generating a normalised exponential curve in range 0 - 1. It is based on the Max / MSP work of Eric Singer (c) 1994.+--+-- Generates an exponential curve in range 0 to 1 of arbitrary steepness.+--       Steepness index equal to or lower than 1.0 will result in Not-a-Number+--       errors and cause unstable behavior.+--+-- > kout  expcurve  kindex, ksteepness+--+-- csound doc: <http://www.csounds.com/manual/html/expcurve.html>+expcurve ::  Sig -> Sig -> Sig+expcurve b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "expcurve" [(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Trace an exponential curve between specified points.+--+-- > ares  expon  ia, idur, ib+-- > kres  expon  ia, idur, ib+--+-- csound doc: <http://www.csounds.com/manual/html/expon.html>+expon ::  D -> D -> D -> Sig+expon b1 b2 b3 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "expon" [(Ar,[Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Trace a series of exponential segments between specified points.+--+-- > ares  expseg  ia, idur1, ib [, idur2] [, ic] [...]+-- > kres  expseg  ia, idur1, ib [, idur2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/expseg.html>+expseg ::  [D] -> Sig+expseg b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "expseg" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- An exponential segment generator operating at a-rate.+--+-- An exponential segment generator operating at a-rate. This unit is almost identical to expseg, but more precise when defining segments with very short durations (i.e., in a percussive attack phase) at audio rate.+--+-- > ares  expsega  ia, idur1, ib [, idur2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/expsega.html>+expsega ::  [D] -> Sig+expsega b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "expsega" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- Trace a series of exponential segments between specified+--       absolute points.+--+-- > ares  expsegb  ia, itim1, ib [, itim2] [, ic] [...]+-- > kres  expsegb  ia, itim1, ib [, itim2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/expsegb.html>+expsegb ::  [D] -> Sig+expsegb b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "expsegb" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- An exponential segment generator operating at a-rate with+--       absolute times.+--+-- An exponential segment generator operating at a-rate. This unit+--       is almost identical to expsegb, but+--       more precise when defining segments with very short durations+--       (i.e., in a percussive attack phase) at audio rate.+--+-- > ares  expsegba  ia, itim1, ib [, itim2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/expsegba.html>+expsegba ::  D -> D -> D -> Sig+expsegba b1 b2 b3 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "expsegba" [(Ar,(repeat Ir))] [a1,a2,a3]++-- | +-- Trace a series of exponential segments between specified points including a release segment.+--+-- > ares  expsegr  ia, idur1, ib [, idur2] [, ic] [...], irel, iz+-- > kres  expsegr  ia, idur1, ib [, idur2] [, ic] [...], irel, iz+--+-- csound doc: <http://www.csounds.com/manual/html/expsegr.html>+expsegr ::  [D] -> D -> D -> Sig+expsegr b1 b2 b3 = Sig $ f <$> mapM unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = setRate Kr $ opcs "expsegr" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1, a2, a3])++-- | +-- An implementation of a logarithmic gain curve which is similar to the gainslider~ object from Cycling 74 Max / MSP.+--+-- This opcode is intended for use to multiply by an audio signal to give a console mixer like feel. There is no bounds in the+--       source code so you can for example give higher than 127 values for extra amplitude but possibly clipped audio.+--+-- > kout  gainslider  kindex+--+-- csound doc: <http://www.csounds.com/manual/html/gainslider.html>+gainslider ::  Sig -> Sig+gainslider b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "gainslider" [(Kr,[Kr])] [a1]++-- | +-- A jitter-spline generator.+--+-- > ares  jspline  xamp, kcpsMin, kcpsMax+-- > kres  jspline  kamp, kcpsMin, kcpsMax+--+-- csound doc: <http://www.csounds.com/manual/html/jspline.html>+jspline ::  Sig -> Sig -> Sig -> Sig+jspline b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "jspline" [(Ar,[Xr,Kr,Kr]),(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Trace a straight line between specified points.+--+-- > ares  line  ia, idur, ib+-- > kres  line  ia, idur, ib+--+-- csound doc: <http://www.csounds.com/manual/html/line.html>+line ::  D -> D -> D -> Sig+line b1 b2 b3 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "line" [(Ar,[Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Trace a series of line segments between specified points.+--+-- > ares  linseg  ia, idur1, ib [, idur2] [, ic] [...]+-- > kres  linseg  ia, idur1, ib [, idur2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/linseg.html>+linseg ::  [D] -> Sig+linseg b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "linseg" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- Trace a series of line segments between specified absolute points.+--+-- > ares  linsegb  ia, itim1, ib [, itim2] [, ic] [...]+-- > kres  linsegb  ia, itim1, ib [, itim2] [, ic] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/linsegb.html>+linsegb ::  [D] -> Sig+linsegb b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "linsegb" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1])++-- | +-- Trace a series of line segments between specified points including a release segment.+--+-- > ares  linsegr  ia, idur1, ib [, idur2] [, ic] [...], irel, iz+-- > kres  linsegr  ia, idur1, ib [, idur2] [, ic] [...], irel, iz+--+-- csound doc: <http://www.csounds.com/manual/html/linsegr.html>+linsegr ::  [D] -> D -> D -> Sig+linsegr b1 b2 b3 = Sig $ f <$> mapM unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = setRate Kr $ opcs "linsegr" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, last a1, a2, a3])++-- | +-- This opcode implements a formula for generating a normalised logarithmic curve in range 0 - 1. It is based on the Max / MSP work of Eric Singer (c) 1994.+--+-- Generates a logarithmic curve in range 0 to 1 of arbitrary steepness.+--       Steepness index equal to or lower than 1.0 will result in Not-a-Number+--       errors and cause unstable behavior.+--+-- > kout  logcurve  kindex, ksteepness+--+-- csound doc: <http://www.csounds.com/manual/html/logcurve.html>+logcurve ::  Sig -> Sig -> Sig+logcurve b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "logcurve" [(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Generate control signal consisting of linear segments delimited by two or more specified points.+--+-- Generate control signal consisting of linear segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate.+--+-- > ksig  loopseg  kfreq, ktrig, iphase, ktime0, kvalue0 [, ktime1] [, kvalue1] \+-- >           [, ktime2] [, kvalue2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/loopseg.html>+loopseg ::  Sig -> Sig -> D -> [Sig] -> Sig+loopseg b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> mapM unSig b4+    where f a1 a2 a3 a4 = opcs "loopseg" [(Kr,[Kr,Kr,Ir] ++ (repeat Kr))] ([a1,a2,a3] ++ a4)++-- | +-- Control signals based on linear segments.+--+-- Generate control signal consisiting of linear segments delimited+--     by two or more specified points. The entire envelope can be looped+--     at time-variant rate. Each segment coordinate can also be varied+--     at k-rate.+--+-- > ksig  loopsegp   kphase, kvalue0, kdur0, kvalue1 \+-- >           [, kdur1, ... , kdurN-1, kvalueN]+--+-- csound doc: <http://www.csounds.com/manual/html/loopsegp.html>+loopsegp ::  Sig -> [Sig] -> Sig+loopsegp b1 b2 = Sig $ f <$> unSig b1 <*> mapM unSig b2+    where f a1 a2 = opcs "loopsegp" [(Kr,(repeat Kr))] ([a1] ++ a2)++-- | +-- Generate control signal consisting of exponential or linear segments delimited by two or more specified points.+--+-- Generate control signal consisting of controllable exponential segments or linear segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate.+--+-- > ksig  looptseg  kfreq, ktrig, ktime0, kvalue0, ktype0, [, ktime1] [, kvalue1] [,ktype1] \+-- >           [, ktime2] [, kvalue2] [,ktype2] [...][, ktimeN] [, kvalueN]+--+-- csound doc: <http://www.csounds.com/manual/html/looptseg.html>+looptseg ::  Sig -> Sig -> [Sig] -> Sig+looptseg b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "looptseg" [(Kr,(repeat Kr))] ([a1,a2] ++ a3)++-- | +-- Generate control signal consisting of exponential segments delimited by two or more specified points.+--+-- Generate control signal consisting of exponential segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate.+--+-- > ksig  loopxseg  kfreq, ktrig, iphase, ktime0, kvalue0 [, ktime1] [, kvalue1] \+-- >           [, ktime2] [, kvalue2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/loopxseg.html>+loopxseg ::  Sig -> Sig -> D -> [Sig] -> Sig+loopxseg b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> mapM unSig b4+    where f a1 a2 a3 a4 = opcs "loopxseg" [(Kr,[Kr,Kr,Ir] ++ (repeat Kr))] ([a1,a2,a3] ++ a4)++-- | +-- Generate control signal consisting of held segments.+--+-- Generate control signal consisting of held segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate.+--+-- > ksig  lpshold  kfreq, ktrig, iphase, ktime0, kvalue0  [, ktime1] [, kvalue1] [, ktime2] [, kvalue2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/lpshold.html>+lpshold ::  Sig -> Sig -> D -> [Sig] -> Sig+lpshold b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> mapM unSig b4+    where f a1 a2 a3 a4 = opcs "lpshold" [(Kr,[Kr,Kr,Ir] ++ (repeat Kr))] ([a1,a2,a3] ++ a4)++-- | +-- Control signals based on held segments.+--+-- Generate control signal consisiting of held segments delimited+--     by two or more specified points. The entire envelope can be looped+--     at time-variant rate. Each segment coordinate can also be varied+--     at k-rate.+--+-- > ksig  lpsholdp   kphase, ktrig, ktime0, kvalue0  [, ktime1] [, kvalue1] \+-- >           [, ktime2] [, kvalue2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/lpsholdp.html>+lpsholdp ::  Sig -> Sig -> [Sig] -> Sig+lpsholdp b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "lpsholdp" [(Kr,(repeat Kr))] ([a1,a2] ++ a3)++-- | +-- Generate random spline curves.+--+-- > ares  rspline  xrangeMin, xrangeMax, kcpsMin, kcpsMax+-- > kres  rspline  krangeMin, krangeMax, kcpsMin, kcpsMax+--+-- csound doc: <http://www.csounds.com/manual/html/rspline.html>+rspline ::  Sig -> Sig -> Sig -> Sig -> Sig+rspline b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "rspline" [(Ar,[Xr,Xr,Kr,Kr]),(Kr,[Kr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Arbitrary signal scaling.+--+-- Scales incoming value to user-definable range. Similar to scale object found in popular dataflow languages.+--+-- > kscl  scale  kinput, kmax, kmin+--+-- csound doc: <http://www.csounds.com/manual/html/scale.html>+scale ::  Sig -> Sig -> Sig -> Sig+scale b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "scale" [(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Constructs a user-definable envelope.+--+-- > ares  transeg  ia, idur, itype, ib [, idur2] [, itype] [, ic] ...+-- > kres  transeg  ia, idur, itype, ib [, idur2] [, itype] [, ic] ...+--+-- csound doc: <http://www.csounds.com/manual/html/transeg.html>+transeg ::  [D] -> Sig+transeg b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "transeg" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, 0, last a1])++-- | +-- Constructs a user-definable envelope in absolute time.+--+-- > ares  transegb  ia, itim, itype, ib [, itim2] [, itype] [, ic] ...+-- > kres  transegb  ia, itim, itype, ib [, itim2] [, itype] [, ic] ...+--+-- csound doc: <http://www.csounds.com/manual/html/transegb.html>+transegb ::  [D] -> Sig+transegb b1 = Sig $ f <$> mapM unD b1+    where f a1 = setRate Kr $ opcs "transegb" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, 0, last a1])++-- | +-- Constructs a user-definable envelope with extended release segment.+--+-- Constructs a user-definable envelope. It is the same+--       as transeg,+--       with an extended release segment.+--+-- > ares  transegr  ia, idur, itype, ib [, idur2] [, itype] [, ic] ...+-- > kres  transegr  ia, idur, itype, ib [, idur2] [, itype] [, ic] ...+--+-- csound doc: <http://www.csounds.com/manual/html/transegr.html>+transegr ::  [D] -> D -> D -> Sig+transegr b1 b2 b3 = Sig $ f <$> mapM unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = setRate Kr $ opcs "transegr" [(Kr, repeat Ir), (Ar, repeat Ir)] (a1 ++ [1, 0, last a1, a2, a3])++-- Envelope Generators.++-- | +-- Calculates the classical ADSR envelope using linear segments.+--+-- > ares  adsr  iatt, idec, islev, irel [, idel]+-- > kres  adsr  iatt, idec, islev, irel [, idel]+--+-- csound doc: <http://www.csounds.com/manual/html/adsr.html>+adsr ::  D -> D -> D -> D -> Sig+adsr b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "adsr" [(Ar,[Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Applies an envelope consisting of 3 segments.+--+-- envlpx -- apply an envelope consisting of 3 segments:+--+-- > ares  envlpx  xamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]+-- > kres  envlpx  kamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]+--+-- csound doc: <http://www.csounds.com/manual/html/envlpx.html>+envlpx ::  Sig -> D -> D -> D -> Tab -> D -> D -> Sig+envlpx b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unTab b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "envlpx" [(Ar,[Xr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])+                                                 ,(Kr,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7]++-- | +-- The envlpx opcode with a final release segment.+--+-- envlpxr is the same as envlpx except that the final segment is entered only on sensing a MIDI note release. The note is then extended by the decay time.+--+-- > ares  envlpxr  xamp, irise, idec, ifn, iatss, iatdec [, ixmod] [,irind]+-- > kres  envlpxr  kamp, irise, idec, ifn, iatss, iatdec [, ixmod] [,irind]+--+-- csound doc: <http://www.csounds.com/manual/html/envlpxr.html>+envlpxr ::  Sig -> D -> D -> Tab -> D -> D -> Sig+envlpxr b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unTab b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "envlpxr" [(Ar,[Xr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])+                                               ,(Kr,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Applies a straight line rise and decay pattern to an input amp signal.+--+-- linen -- apply a straight line rise and decay pattern to an input amp signal.+--+-- > ares  linen  xamp, irise, idur, idec+-- > kres  linen  kamp, irise, idur, idec+--+-- csound doc: <http://www.csounds.com/manual/html/linen.html>+linen ::  Sig -> D -> D -> D -> Sig+linen b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "linen" [(Ar,[Xr,Ir,Ir,Ir]),(Kr,[Kr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- The linen opcode extended with a final release segment.+--+-- linenr -- same as linen except that the final segment is entered only on sensing a MIDI note release. The note is then extended by the decay time.+--+-- > ares  linenr  xamp, irise, idec, iatdec+-- > kres  linenr  kamp, irise, idec, iatdec+--+-- csound doc: <http://www.csounds.com/manual/html/linenr.html>+linenr ::  Sig -> D -> D -> D -> Sig+linenr b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "linenr" [(Ar,[Xr,Ir,Ir,Ir]),(Kr,[Kr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Calculates the classical ADSR envelope using the linsegr mechanism.+--+-- > ares  madsr  iatt, idec, islev, irel [, idel] [, ireltim]+-- > kres  madsr  iatt, idec, islev, irel [, idel] [, ireltim]+--+-- csound doc: <http://www.csounds.com/manual/html/madsr.html>+madsr ::  D -> D -> D -> D -> Sig+madsr b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "madsr" [(Ar,[Ir,Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                           ,a2+                                                                                           ,a3+                                                                                           ,a4]++-- | +-- Calculates the classical ADSR envelope using the expsegr mechanism.+--+-- > ares  mxadsr  iatt, idec, islev, irel [, idel] [, ireltim]+-- > kres  mxadsr  iatt, idec, islev, irel [, idel] [, ireltim]+--+-- csound doc: <http://www.csounds.com/manual/html/mxadsr.html>+mxadsr ::  D -> D -> D -> D -> Sig+mxadsr b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "mxadsr" [(Ar,[Ir,Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                            ,a2+                                                                                            ,a3+                                                                                            ,a4]++-- | +-- Calculates the classical ADSR envelope.+--+-- Calculates the classical ADSR envelope+--+-- > ares  xadsr  iatt, idec, islev, irel [, idel]+-- > kres  xadsr  iatt, idec, islev, irel [, idel]+--+-- csound doc: <http://www.csounds.com/manual/html/xadsr.html>+xadsr ::  D -> D -> D -> D -> Sig+xadsr b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "xadsr" [(Ar,[Ir,Ir,Ir,Ir,Ir]),(Kr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- Models and Emulations.++-- | +-- Semi-physical model of a bamboo sound.+--+-- bamboo is a semi-physical model of a bamboo sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  bamboo  kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- >           [, ifreq1] [, ifreq2]+--+-- csound doc: <http://www.csounds.com/manual/html/bamboo.html>+bamboo ::  Sig -> D -> Sig+bamboo b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "bamboo" [(Ar,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Creates a tone similar to a struck metal bar.+--+-- Audio output is a tone similar to a struck metal bar, using a+--     physical model developed from solving the partial differential+--     equation.  There are controls over the boundary conditions as+--     well as the bar characteristics.+--+-- > ares  barmodel  kbcL, kbcR, iK, ib, kscan, iT30, ipos, ivel, iwid+--+-- csound doc: <http://www.csounds.com/manual/html/barmodel.html>+barmodel ::  Sig -> Sig -> D -> D -> Sig -> D -> D -> D -> D -> Sig+barmodel b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unSig b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "barmodel" [(Ar,[Kr,Kr,Ir,Ir,Kr,Ir,Ir,Ir,Ir])] [a1+                                                                                             ,a2+                                                                                             ,a3+                                                                                             ,a4+                                                                                             ,a5+                                                                                             ,a6+                                                                                             ,a7+                                                                                             ,a8+                                                                                             ,a9]++-- | +-- Semi-physical model of a cabasa sound.+--+-- cabasa is a semi-physical model of a cabasa sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  cabasa  iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- csound doc: <http://www.csounds.com/manual/html/cabasa.html>+cabasa ::  D -> D -> Sig+cabasa b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "cabasa" [(Ar,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Simulates Chua's oscillator, an LRC oscillator with an active resistor, proved capable of bifurcation and chaotic attractors, with k-rate control of circuit elements.+--+-- > aI3, aV2, aV1  chuap  kL, kR0, kC1, kG, kGa, kGb, kE, kC2, iI3, iV2, iV1, ktime_step+--+-- csound doc: <http://www.csounds.com/manual/html/chuap.html>+chuap :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> D -> Sig -> a+chuap b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unD b9 <*> unD b10 <*> unD b11 <*> unSig b12+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 = mopcs "chuap" ([Ar,Ar,Ar]+                                                                   ,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Kr]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12]++-- | +-- Semi-physical model of a crunch sound.+--+-- crunch is a semi-physical model of a crunch sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  crunch  iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- csound doc: <http://www.csounds.com/manual/html/crunch.html>+crunch ::  D -> D -> Sig+crunch b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "crunch" [(Ar,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Semi-physical model of a water drop.+--+-- dripwater is a semi-physical model of a water drop. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  dripwater  kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- >           [, ifreq1] [, ifreq2]+--+-- csound doc: <http://www.csounds.com/manual/html/dripwater.html>+dripwater ::  Sig -> D -> Sig+dripwater b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "dripwater" [(Ar,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Dynamic stochastic approach to waveform synthesis conceived by Iannis Xenakis.+--+-- Implementation of the Génération Dynamique Stochastique+--       (GENDYN), a dynamic stochastic approach to waveform synthesis conceived+--       by Iannis Xenakis.+--+-- > ares  gendy  kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \+-- >                kampscl, kdurscl [, initcps] [, knum]+-- > kres  gendy  kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \+-- >                kampscl, kdurscl [, initcps] [, knum]+--+-- csound doc: <http://www.csounds.com/manual/html/gendy.html>+gendy ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+gendy b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "gendy" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr])+                                                      ,(Kr,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr])] [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- Dynamic stochastic approach to waveform synthesis using cubic interpolation.+--+-- Implementation with cubic interpolation of the+--       Génération Dynamique Stochastique (GENDYN),+--       a dynamic stochastic approach to waveform synthesis conceived by+--       Iannis Xenakis.+--+-- > ares  gendyc  kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \+-- >                 kampscl, kdurscl [, initcps] [, knum]+-- > kres  gendyc  kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \+-- >                 kampscl, kdurscl [, initcps] [, knum]+--+-- csound doc: <http://www.csounds.com/manual/html/gendyc.html>+gendyc ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+gendyc b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "gendyc" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr])+                                                       ,(Kr,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr])] [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- Variation of the dynamic stochastic approach to waveform+--       synthesis conceived by Iannis Xenakis.+--+-- gendyx (gendy eXtended) is an implementation+--       of the Génération Dynamique Stochastique+--       (GENDYN), a dynamic stochastic approach to waveform synthesis+--       conceived by Iannis Xenakis, using curves instead of segments.+--+-- > ares  gendyx  kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \+-- >                 kampscl, kdurscl, kcurveup, kcurvedown [, initcps] [, knum]+-- > kres  gendyx  kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \+-- >                 kampscl, kdurscl, kcurveup, kcurvedown [, initcps] [, knum]+--+-- csound doc: <http://www.csounds.com/manual/html/gendyx.html>+gendyx ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+gendyx b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9 <*> unSig b10 <*> unSig b11+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = opcs "gendyx" [(Ar+                                                                ,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr])+                                                               ,(Kr,[Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Ir,Kr])] [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11]++-- | +-- Audio output is a tone related to the striking of a cow bell or similar.+--+-- Audio output is a tone related to the striking of a cow bell or similar. The method is a physical model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  gogobel  kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivfn+--+-- csound doc: <http://www.csounds.com/manual/html/gogobel.html>+gogobel ::  Sig -> Sig -> D -> D -> D -> Sig -> Sig -> Tab -> Sig+gogobel b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unSig b6 <*> unSig b7 <*> unTab b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "gogobel" [(Ar,[Kr,Kr,Ir,Ir,Ir,Kr,Kr,Ir])] [a1+                                                                                      ,a2+                                                                                      ,a3+                                                                                      ,a4+                                                                                      ,a5+                                                                                      ,a6+                                                                                      ,a7+                                                                                      ,a8]++-- | +-- Semi-physical model of a guiro sound.+--+-- guiro is a semi-physical model of a guiro sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  guiro  kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] [, ifreq1]+--+-- csound doc: <http://www.csounds.com/manual/html/guiro.html>+guiro ::  Sig -> D -> Sig+guiro b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "guiro" [(Ar,[Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Implements the Lorenz system of equations.+--+-- Implements the Lorenz system of equations.  The Lorenz system is a chaotic-dynamic system which was originally used to simulate the motion of a particle in convection currents and simplified weather systems. Small differences in initial conditions rapidly lead to diverging values. This is sometimes expressed as the butterfly effect. If a butterfly flaps its wings in Australia, it will have an effect on the weather in Alaska. This system is one of the milestones in the development of chaos theory. It is useful as a chaotic audio source or as a low frequency modulation source.+--+-- > ax, ay, az  lorenz  ksv, krv, kbv, kh, ix, iy, iz, iskip [, iskipinit]+--+-- csound doc: <http://www.csounds.com/manual/html/lorenz.html>+lorenz :: Tuple a => Sig -> Sig -> Sig -> Sig -> D -> D -> D -> D -> a+lorenz b1 b2 b3 b4 b5 b6 b7 b8 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = mopcs "lorenz" ([Ar,Ar,Ar],[Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                               ,a2+                                                                                               ,a3+                                                                                               ,a4+                                                                                               ,a5+                                                                                               ,a6+                                                                                               ,a7+                                                                                               ,a8]++-- | +-- Mandelbrot set+--+-- Returns the number of iterations corresponding to a given point of complex plane by applying the Mandelbrot set formula.+--+-- > kiter, koutrig  mandel   ktrig, kx, ky, kmaxIter+--+-- csound doc: <http://www.csounds.com/manual/html/mandel.html>+mandel :: Tuple a => Sig -> Sig -> Sig -> Sig -> a+mandel b1 b2 b3 b4 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = mopcs "mandel" ([Kr,Kr],[Kr,Kr,Kr,Kr]) [a1,a2,a3,a4]++-- | +-- An emulation of a mandolin.+--+-- > ares  mandol  kamp, kfreq, kpluck, kdetune, kgain, ksize, ifn [, iminfreq]+--+-- csound doc: <http://www.csounds.com/manual/html/mandol.html>+mandol ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+mandol b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "mandol" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6+                                                                                  ,a7]++-- | +-- Physical model related to the striking of a wooden block.+--+-- Audio output is a tone related to the striking of a wooden block as found in a marimba. The method is a physical model developed from Perry Cook but re-coded for Csound.+--+-- > ares  marimba  kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec \+-- >           [, idoubles] [, itriples]+--+-- csound doc: <http://www.csounds.com/manual/html/marimba.html>+marimba ::  Sig -> Sig -> D -> D -> D -> Sig -> Sig -> Tab -> D -> Sig+marimba b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unSig b6 <*> unSig b7 <*> unTab b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "marimba" [(Ar+                                                         ,[Kr,Kr,Ir,Ir,Ir,Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- An emulation of a mini-Moog synthesizer.+--+-- > ares  moog  kamp, kfreq, kfiltq, kfiltrate, kvibf, kvamp, iafn, iwfn, ivfn+--+-- csound doc: <http://www.csounds.com/manual/html/moog.html>+moog ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Sig+moog b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7 <*> unTab b8 <*> unTab b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "moog" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir])] [a1+                                                                                         ,a2+                                                                                         ,a3+                                                                                         ,a4+                                                                                         ,a5+                                                                                         ,a6+                                                                                         ,a7+                                                                                         ,a8+                                                                                         ,a9]++-- | +-- Simulates a planet orbiting in a binary star system.+--+-- planet simulates a planet orbiting in a binary star system. The outputs are the x, y and z coordinates of the orbiting planet. It is possible for the planet to achieve escape velocity by a close encounter with a star. This makes this system somewhat unstable.+--+-- > ax, ay, az  planet  kmass1, kmass2, ksep, ix, iy, iz, ivx, ivy, ivz, idelta \+-- >           [, ifriction] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/planet.html>+planet :: Tuple a => Sig -> Sig -> Sig -> D -> D -> D -> D -> D -> D -> D -> a+planet b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = mopcs "planet" ([Ar,Ar,Ar]+                                                            ,[Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- Creates a tone similar to a piano string prepared in a Cageian fashion.+--+-- Audio output is a tone similar to a piano string, prepared with+--     a number of rubbers and rattles. The method uses a+--     physical model developed from solving the partial differential+--     equation.+--+-- > ares  prepiano  ifreq, iNS, iD, iK, \+-- >         iT30,iB, kbcl, kbcr, imass, ifreq, iinit, ipos, ivel, isfreq, \+-- >         isspread[, irattles, irubbers]+-- > al,ar  prepiano  ifreq, iNS, iD, iK, \+-- >         iT30,iB, kbcl, kbcr, imass, ifreq, iinit, ipos, ivel, isfreq, \+-- >         isspread[, irattles, irubbers]+--+-- csound doc: <http://www.csounds.com/manual/html/prepiano.html>+prepiano :: Tuple a => D -> D -> D -> D -> D -> D -> Sig -> Sig -> D -> D -> D -> D -> D -> D -> D -> a+prepiano b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unSig b7 <*> unSig b8 <*> unD b9 <*> unD b10 <*> unD b11 <*> unD b12 <*> unD b13 <*> unD b14 <*> unD b15+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 = mopcs "prepiano" ([Ar,Ar]+                                                                                  ,[Ir,Ir,Ir,Ir,Ir,Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                                                                         ,a2+                                                                                                                                         ,a3+                                                                                                                                         ,a4+                                                                                                                                         ,a5+                                                                                                                                         ,a6+                                                                                                                                         ,a7+                                                                                                                                         ,a8+                                                                                                                                         ,a9+                                                                                                                                         ,a10+                                                                                                                                         ,a11+                                                                                                                                         ,a12+                                                                                                                                         ,a13+                                                                                                                                         ,a14+                                                                                                                                         ,a15]++-- | +-- Semi-physical model of a sandpaper sound.+--+-- sandpaper is a semi-physical model of a sandpaper sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  sandpaper  iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- csound doc: <http://www.csounds.com/manual/html/sandpaper.html>+sandpaper ::  D -> D -> Sig+sandpaper b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "sandpaper" [(Ar,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Semi-physical model of a sekere sound.+--+-- sekere is a semi-physical model of a sekere sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  sekere  iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- csound doc: <http://www.csounds.com/manual/html/sekere.html>+sekere ::  D -> D -> Sig+sekere b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "sekere" [(Ar,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Sounds like the shaking of a maraca or similar gourd instrument.+--+-- Audio output is a tone related to the shaking of a maraca or similar gourd instrument. The method is a physically inspired model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  shaker  kamp, kfreq, kbeans, kdamp, ktimes [, idecay]+--+-- csound doc: <http://www.csounds.com/manual/html/shaker.html>+shaker ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig+shaker b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "shaker" [(Ar,[Kr,Kr,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Semi-physical model of a sleighbell sound.+--+-- sleighbells is a semi-physical model of a sleighbell sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  sleighbells  kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- >           [, ifreq1] [, ifreq2]+--+-- csound doc: <http://www.csounds.com/manual/html/sleighbells.html>+sleighbells ::  Sig -> D -> Sig+sleighbells b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "sleighbells" [(Ar,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Semi-physical model of a stick sound.+--+-- stix is a semi-physical model of a stick sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  stix  iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- csound doc: <http://www.csounds.com/manual/html/stix.html>+stix ::  D -> D -> Sig+stix b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "stix" [(Ar,[Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Semi-physical model of a tambourine sound.+--+-- tambourine is a semi-physical model of a tambourine sound. It is one of the PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects.+--+-- > ares  tambourine  kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- >           [, ifreq1] [, ifreq2]+--+-- csound doc: <http://www.csounds.com/manual/html/tambourine.html>+tambourine ::  Sig -> D -> Sig+tambourine b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "tambourine" [(Ar,[Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Physical model related to the striking of a metal block.+--+-- Audio output is a tone related to the striking of a metal block as found in a vibraphone. The method is a physical model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  vibes  kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec+--+-- csound doc: <http://www.csounds.com/manual/html/vibes.html>+vibes ::  Sig -> Sig -> D -> D -> D -> Sig -> Sig -> Tab -> D -> Sig+vibes b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unSig b6 <*> unSig b7 <*> unTab b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "vibes" [(Ar,[Kr,Kr,Ir,Ir,Ir,Kr,Kr,Ir,Ir])] [a1+                                                                                          ,a2+                                                                                          ,a3+                                                                                          ,a4+                                                                                          ,a5+                                                                                          ,a6+                                                                                          ,a7+                                                                                          ,a8+                                                                                          ,a9]++-- | +-- An emulation of a human voice.+--+-- > ares  voice  kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn+--+-- csound doc: <http://www.csounds.com/manual/html/voice.html>+voice ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Sig+voice b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7 <*> unTab b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "voice" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                    ,a2+                                                                                    ,a3+                                                                                    ,a4+                                                                                    ,a5+                                                                                    ,a6+                                                                                    ,a7+                                                                                    ,a8]++-- Phasors.++-- | +-- Produce a normalized moving phase value.+--+-- > ares  phasor  xcps [, iphs]+-- > kres  phasor  kcps [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/phasor.html>+phasor ::  Sig -> Sig+phasor b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "phasor" [(Ar,[Xr,Ir]),(Kr,[Kr,Ir])] [a1]++-- | +-- Produce an arbitrary number of normalized moving phase values.+--+-- Produce an arbitrary number of normalized moving phase values, accessable by an index.+--+-- > ares  phasorbnk  xcps, kndx, icnt [, iphs]+-- > kres  phasorbnk  kcps, kndx, icnt [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/phasorbnk.html>+phasorbnk ::  Sig -> Sig -> D -> Sig+phasorbnk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "phasorbnk" [(Ar,[Xr,Kr,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Produces a normalized moving phase value with sync input and output.+--+-- Produces a moving phase value between zero and one and an extra impulse output ("sync out") whenever its phase value crosses or is reset to zero. The phase can be reset at any time by an impulse on the "sync in" parameter.+--+-- > aphase, asyncout  syncphasor  xcps, asyncin, [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/syncphasor.html>+syncphasor :: Tuple a => Sig -> Sig -> a+syncphasor b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "syncphasor" ([Ar,Ar],[Xr,Ar,Ir]) [a1,a2]++-- Random (Noise) Generators.++-- | +-- Beta distribution random number generator (positive values only).+--+-- Beta distribution random number generator (positive values only). This is an x-class noise generator.+--+-- > ares  betarand  krange, kalpha, kbeta+-- > ires  betarand  krange, kalpha, kbeta+-- > kres  betarand  krange, kalpha, kbeta+--+-- csound doc: <http://www.csounds.com/manual/html/betarand.html>+betarand :: SigOrD a => a -> a -> a -> SE a+betarand b1 b2 b3 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2 <*> toGE b3+    where f a1 a2 a3 = opcs "betarand" [(Ar,[Kr,Kr,Kr]),(Ir,[Kr,Kr,Kr]),(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Exponential distribution random number generator.+--+-- Exponential distribution random number generator. This is an x-class noise generator.+--+-- > ares  bexprnd  krange+-- > ires  bexprnd  krange+-- > kres  bexprnd  krange+--+-- csound doc: <http://www.csounds.com/manual/html/bexprnd.html>+bexprnd :: SigOrD a => a -> SE a+bexprnd b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "bexprnd" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Cauchy distribution random number generator.+--+-- Cauchy distribution random number generator. This is an x-class noise generator.+--+-- > ares  cauchy  kalpha+-- > ires  cauchy  kalpha+-- > kres  cauchy  kalpha+--+-- csound doc: <http://www.csounds.com/manual/html/cauchy.html>+cauchy :: SigOrD a => a -> SE a+cauchy b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "cauchy" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Cauchy distribution random number generator with+--       interpolation.+--+-- Cauchy distribution random number generator with controlled+--       interpolation between values. This is an x-class noise+--       generator.+--+-- > ares  cauchyi  klambda, xamp, xcps+-- > ires  cauchyi  klambda, xamp, xcps+-- > kres  cauchyi  klambda, xamp, xcps+--+-- csound doc: <http://www.csounds.com/manual/html/cauchyi.html>+cauchyi :: SigOrD a => a -> a -> a -> SE a+cauchyi b1 b2 b3 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2 <*> toGE b3+    where f a1 a2 a3 = opcs "cauchyi" [(Ar,[Kr,Xr,Xr]),(Ir,[Kr,Xr,Xr]),(Kr,[Kr,Xr,Xr])] [a1,a2,a3]++-- | +-- Continuous USER-defined-distribution RaNDom generator.+--+-- > aout  cuserrnd  kmin, kmax, ktableNum+-- > iout  cuserrnd  imin, imax, itableNum+-- > kout  cuserrnd  kmin, kmax, ktableNum+--+-- csound doc: <http://www.csounds.com/manual/html/cuserrnd.html>+cuserrnd :: SigOrD a => a -> a -> a -> SE a+cuserrnd b1 b2 b3 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2 <*> toGE b3+    where f a1 a2 a3 = opcs "cuserrnd" [(Ar,[Kr,Kr,Kr]),(Ir,[Ir,Ir,Ir]),(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Discrete USER-defined-distribution RaNDom generator.+--+-- > aout  duserrnd  ktableNum+-- > iout  duserrnd  itableNum+-- > kout  duserrnd  ktableNum+--+-- csound doc: <http://www.csounds.com/manual/html/duserrnd.html>+duserrnd :: SigOrD a => a -> SE a+duserrnd b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "duserrnd" [(Ar,[Kr]),(Ir,[Ir]),(Kr,[Kr])] [a1]++-- | +-- Random impulses.+--+-- Generates random impulses from 0 to 1.+--+-- > ares  dust  kamp, kdensity+-- > kres  dust  kamp, kdensity+--+-- csound doc: <http://www.csounds.com/manual/html/dust.html>+dust ::  Sig -> Sig -> SE Sig+dust b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "dust" [(Ar,[Kr,Kr]),(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Random impulses.+--+-- Generates random impulses from -1 to 1.+--+-- > ares  dust2  kamp, kdensity+-- > kres  dust2  kamp, kdensity+--+-- csound doc: <http://www.csounds.com/manual/html/dust2.html>+dust2 ::  Sig -> Sig -> SE Sig+dust2 b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "dust2" [(Ar,[Kr,Kr]),(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Exponential distribution random number generator (positive values only).+--+-- Exponential distribution random number generator (positive values only). This is an x-class noise generator.+--+-- > ares  exprand  klambda+-- > ires  exprand  klambda+-- > kres  exprand  klambda+--+-- csound doc: <http://www.csounds.com/manual/html/exprand.html>+exprand :: SigOrD a => a -> SE a+exprand b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "exprand" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Exponential distribution random number generator with+--       interpolation (positive values only).+--+-- Exponential distribution random number generator with controlled+--       interpolation between values (positive values only). This is an+--       x-class noise generator.+--+-- > ares  exprandi  klambda, xamp, xcps+-- > ires  exprandi  klambda, xamp, xcps+-- > kres  exprandi  klambda, xamp, xcps+--+-- csound doc: <http://www.csounds.com/manual/html/exprandi.html>+exprandi :: SigOrD a => a -> a -> a -> SE a+exprandi b1 b2 b3 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2 <*> toGE b3+    where f a1 a2 a3 = opcs "exprandi" [(Ar,[Kr,Xr,Xr]),(Ir,[Kr,Xr,Xr]),(Kr,[Kr,Xr,Xr])] [a1,a2,a3]++-- | +-- A fractal noise generator.+--+-- A fractal noise generator implemented as a white noise filtered+--       by a cascade of 15 first-order filters.+--+-- > ares  fractalnoise  kamp, kbeta+--+-- csound doc: <http://www.csounds.com/manual/html/fractalnoise.html>+fractalnoise ::  Sig -> Sig -> SE Sig+fractalnoise b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "fractalnoise" [(Ar,[Kr,Kr])] [a1,a2]++-- | +-- Gaussian distribution random number generator.+--+-- Gaussian distribution random number generator. This is an x-class noise generator.+--+-- > ares  gauss  krange+-- > ires  gauss  krange+-- > kres  gauss  krange+--+-- csound doc: <http://www.csounds.com/manual/html/gauss.html>+gauss ::  Sig -> SE Sig+gauss b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "gauss" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Gaussian distribution random number generator with+--       interpolation.+--+-- Gaussian distribution random number generator with controlled+--       interpolation between values. This is an+--       x-class noise generator.+--+-- > ares  gaussi  krange, xamp, xcps+-- > ires  gaussi  krange, xamp, xcps+-- > kres  gaussi  krange, xamp, xcps+--+-- csound doc: <http://www.csounds.com/manual/html/gaussi.html>+gaussi :: SigOrD a => a -> a -> a -> SE a+gaussi b1 b2 b3 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2 <*> toGE b3+    where f a1 a2 a3 = opcs "gaussi" [(Ar,[Kr,Xr,Xr]),(Ir,[Kr,Xr,Xr]),(Kr,[Kr,Xr,Xr])] [a1,a2,a3]++-- | +-- Random impulses around a certain frequency.+--+-- Generates random impulses around a certain frequency.+--+-- > ares  gausstrig  kamp, kcps, kdev [, imode]+-- > kres  gausstrig  kamp, kcps, kdev [, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/gausstrig.html>+gausstrig ::  Sig -> Sig -> Sig -> SE Sig+gausstrig b1 b2 b3 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "gausstrig" [(Ar,[Kr,Kr,Kr,Ir]),(Kr,[Kr,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Generates a segmented line whose segments are randomly generated.+--+-- > kout  jitter  kamp, kcpsMin, kcpsMax+--+-- csound doc: <http://www.csounds.com/manual/html/jitter.html>+jitter ::  Sig -> Sig -> Sig -> SE Sig+jitter b1 b2 b3 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "jitter" [(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Generates a segmented line with user-controllable random segments.+--+-- > kout  jitter2  ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3+--+-- csound doc: <http://www.csounds.com/manual/html/jitter2.html>+jitter2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE Sig+jitter2 b1 b2 b3 b4 b5 b6 b7 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "jitter2" [(Kr,[Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1+                                                                                ,a2+                                                                                ,a3+                                                                                ,a4+                                                                                ,a5+                                                                                ,a6+                                                                                ,a7]++-- | +-- Linear distribution random number generator (positive values only).+--+-- Linear distribution random number generator (positive values only). This is an x-class noise generator.+--+-- > ares  linrand  krange+-- > ires  linrand  krange+-- > kres  linrand  krange+--+-- csound doc: <http://www.csounds.com/manual/html/linrand.html>+linrand :: SigOrD a => a -> SE a+linrand b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "linrand" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- A white noise generator with an IIR lowpass filter.+--+-- > ares  noise  xamp, kbeta+--+-- csound doc: <http://www.csounds.com/manual/html/noise.html>+noise ::  Sig -> Sig -> SE Sig+noise b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "noise" [(Ar,[Xr,Kr])] [a1,a2]++-- | +-- Cauchy distribution random number generator (positive values only).+--+-- Cauchy distribution random number generator (positive values only). This is an x-class noise generator.+--+-- > ares  pcauchy  kalpha+-- > ires  pcauchy  kalpha+-- > kres  pcauchy  kalpha+--+-- csound doc: <http://www.csounds.com/manual/html/pcauchy.html>+pcauchy :: SigOrD a => a -> SE a+pcauchy b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "pcauchy" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Generates approximate pink noise.+--+-- Generates approximate pink noise (-3dB/oct response) by one of two different methods:+--+-- > ares  pinkish  xin [, imethod] [, inumbands] [, iseed] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/pinkish.html>+pinkish ::  Sig -> SE Sig+pinkish b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "pinkish" [(Ar,[Xr,Ir,Ir,Ir,Ir])] [a1]++-- | +-- Poisson distribution random number generator (positive values only).+--+-- Poisson distribution random number generator (positive values only). This is an x-class noise generator.+--+-- > ares  poisson  klambda+-- > ires  poisson  klambda+-- > kres  poisson  klambda+--+-- csound doc: <http://www.csounds.com/manual/html/poisson.html>+poisson :: SigOrD a => a -> SE a+poisson b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "poisson" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Generates a controlled random number series.+--+-- Output is a controlled random number series between -amp and +amp+--+-- > ares  rand  xamp [, iseed] [, isel] [, ioffset]+-- > kres  rand  xamp [, iseed] [, isel] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/rand.html>+rand ::  Sig -> SE Sig+rand b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "rand" [(Ar,[Xr,Ir,Ir,Ir]),(Kr,[Xr,Ir,Ir,Ir])] [a1]++-- | +-- Generates random numbers and holds them for a period of time.+--+-- > ares  randh  xamp, xcps [, iseed] [, isize] [, ioffset]+-- > kres  randh  kamp, kcps [, iseed] [, isize] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/randh.html>+randh ::  Sig -> Sig -> SE Sig+randh b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "randh" [(Ar,[Xr,Xr,Ir,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir,Ir])] [a1,a2]++-- | +-- Generates a controlled random number series with interpolation between each new number.+--+-- > ares  randi  xamp, xcps [, iseed] [, isize] [, ioffset]+-- > kres  randi  kamp, kcps [, iseed] [, isize] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/randi.html>+randi ::  Sig -> Sig -> SE Sig+randi b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "randi" [(Ar,[Xr,Xr,Ir,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir,Ir])] [a1,a2]++-- | +-- Generates a controlled pseudo-random number series between min and max values.+--+-- Generates is a controlled pseudo-random number series between min and max values.+--+-- > ares  random  kmin, kmax+-- > ires  random  imin, imax+-- > kres  random  kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/random.html>+random :: SigOrD a => a -> a -> SE a+random b1 b2 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2+    where f a1 a2 = opcs "random" [(Ar,[Kr,Kr]),(Ir,[Ir,Ir]),(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Generates random numbers with a user-defined limit and holds them for a period of time.+--+-- > ares  randomh  kmin, kmax, xcps [,imode] [,ifirstval]+-- > kres  randomh  kmin, kmax, kcps [,imode] [,ifirstval]+--+-- csound doc: <http://www.csounds.com/manual/html/randomh.html>+randomh ::  Sig -> Sig -> Sig -> SE Sig+randomh b1 b2 b3 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "randomh" [(Ar,[Kr,Kr,Xr,Ir,Ir]),(Kr,[Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Generates a user-controlled random number series with interpolation between each new number.+--+-- > ares  randomi  kmin, kmax, xcps [,imode] [,ifirstval]+-- > kres  randomi  kmin, kmax, kcps [,imode] [,ifirstval]+--+-- csound doc: <http://www.csounds.com/manual/html/randomi.html>+randomi ::  Sig -> Sig -> Sig -> SE Sig+randomi b1 b2 b3 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "randomi" [(Ar,[Kr,Kr,Xr,Ir,Ir]),(Kr,[Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- 31-bit bipolar random opcodes with controllable distribution.+--+-- 31-bit bipolar random opcodes with controllable distribution. These units are portable, i.e. using the same seed value will generate the same random sequence on all systems. The distribution of generated random numbers can be varied at k-rate.+--+-- > ax  rnd31  kscl, krpow [, iseed]+-- > ix  rnd31  iscl, irpow [, iseed]+-- > kx  rnd31  kscl, krpow [, iseed]+--+-- csound doc: <http://www.csounds.com/manual/html/rnd31.html>+rnd31 :: SigOrD a => a -> a -> SE a+rnd31 b1 b2 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2+    where f a1 a2 = opcs "rnd31" [(Ar,[Kr,Kr,Ir]),(Ir,[Ir,Ir,Ir]),(Kr,[Kr,Kr,Ir])] [a1,a2]++-- | +-- Sets the global seed value.+--+-- Sets the global seed value for all x-class noise generators, as well as other opcodes that use a random call, such as grain.+--+-- >  seed  ival+--+-- csound doc: <http://www.csounds.com/manual/html/seed.html>+seed ::  D -> SE ()+seed b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "seed" [(Xr,[Ir])] [a1]++-- | +-- Generates a controlled pseudo-random number series between min and max values according to a trigger.+--+-- Generates a controlled pseudo-random number series between min and max values at k-rate whenever the trigger parameter is different to 0.+--+-- > kout  trandom  ktrig, kmin, kmax+--+-- csound doc: <http://www.csounds.com/manual/html/trandom.html>+trandom ::  Sig -> Sig -> Sig -> SE Sig+trandom b1 b2 b3 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "trandom" [(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Triangular distribution random number generator+--+-- Triangular distribution random number generator. This is an x-class noise generator.+--+-- > ares  trirand  krange+-- > ires  trirand  krange+-- > kres  trirand  krange+--+-- csound doc: <http://www.csounds.com/manual/html/trirand.html>+trirand :: SigOrD a => a -> SE a+trirand b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "trirand" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- Uniform distribution random number generator (positive values only).+--+-- Uniform distribution random number generator (positive values only). This is an x-class noise generator.+--+-- > ares  unirand  krange+-- > ires  unirand  krange+-- > kres  unirand  krange+--+-- csound doc: <http://www.csounds.com/manual/html/unirand.html>+unirand :: SigOrD a => a -> SE a+unirand b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = opcs "unirand" [(Ar,[Kr]),(Ir,[Kr]),(Kr,[Kr])] [a1]++-- | +-- truly random opcodes with controllable range.+--+-- truly random opcodes with controllable range. These+--       units are for Linux only and use /dev/urandom to construct+--       Csound random values+--+-- > ax  urandom  [imin, imax]+-- > ix  urandom  [imin, imax]+-- > kx  urandom  [imin, imax]+--+-- csound doc: <http://www.csounds.com/manual/html/urandom.html>+urandom :: SigOrD a =>  SE a+urandom  = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ return $ f +    where f  = opcs "urandom" [(Ar,[Ir,Ir]),(Ir,[Ir,Ir]),(Kr,[Ir,Ir])] []++-- | +-- A discrete user-defined-distribution random generator that can be used as a function.+--+-- > aout =  urd (ktableNum)+-- > iout =  urd (itableNum)+-- > kout =  urd (ktableNum)+--+-- csound doc: <http://www.csounds.com/manual/html/urd.html>+urd :: SigOrD a => a -> SE a+urd b1 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1+    where f a1 = oprBy "urd" [(Ar,[Kr]), (Kr,[Kr]), (Ir,[Ir])] [a1]++-- | +-- Weibull distribution random number generator (positive values only).+--+-- Weibull distribution random number generator (positive values only). This is an x-class noise generator+--+-- > ares  weibull  ksigma, ktau+-- > ires  weibull  ksigma, ktau+-- > kres  weibull  ksigma, ktau+--+-- csound doc: <http://www.csounds.com/manual/html/weibull.html>+weibull :: SigOrD a => a -> a -> SE a+weibull b1 b2 = fmap ( fromGE . return) $ SE $ (depT =<<) $ lift $ f <$> toGE b1 <*> toGE b2+    where f a1 a2 = opcs "weibull" [(Ar,[Kr,Kr]),(Ir,[Kr,Kr]),(Kr,[Kr,Kr])] [a1,a2]++-- Sample Playback.++-- | +-- Generates breakbeat-style cut-ups of a mono audio stream.+--+-- The BreakBeat Cutter automatically generates cut-ups of a source audio stream in the style of drum and bass/jungle breakbeat manipulations.  There are two versions, for mono (bbcutm) or stereo (bbcuts) sources.  Whilst originally based on breakbeat cutting, the opcode can be applied to any type of source audio.+--+-- > a1  bbcutm  asource, ibps, isubdiv, ibarlength, iphrasebars, inumrepeats \+-- >           [, istutterspeed] [, istutterchance] [, ienvchoice ]+--+-- csound doc: <http://www.csounds.com/manual/html/bbcutm.html>+bbcutm ::  Sig -> D -> D -> D -> D -> D -> Sig+bbcutm b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "bbcutm" [(Ar,[Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6]++-- | +-- Generates breakbeat-style cut-ups of a stereo audio stream.+--+-- The BreakBeat Cutter automatically generates cut-ups of a source audio stream in the style of drum and bass/jungle breakbeat manipulations.  There are two versions, for mono (bbcutm) or stereo (bbcuts) sources.  Whilst originally based on breakbeat cutting, the opcode can be applied to any type of source audio.+--+-- > a1,a2  bbcuts  asource1, asource2, ibps, isubdiv, ibarlength, iphrasebars, \+-- >           inumrepeats [, istutterspeed] [, istutterchance] [, ienvchoice]+--+-- csound doc: <http://www.csounds.com/manual/html/bbcuts.html>+bbcuts :: Tuple a => Sig -> Sig -> D -> D -> D -> D -> D -> a+bbcuts b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "bbcuts" ([Ar,Ar],[Ar,Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                            ,a2+                                                                                            ,a3+                                                                                            ,a4+                                                                                            ,a5+                                                                                            ,a6+                                                                                            ,a7]++-- | +-- Function-table-based crossfading looper.+--+-- This opcode reads audio from a function table and plays it back in a loop with user-defined+--    start time, duration and crossfade time. It also allows the pitch of the loop to be controlled,+--    including reversed playback. It accepts non-power-of-two tables, such as deferred-allocation+--    GEN01 tables.+--+-- > asig  flooper  kamp, kpitch, istart, idur, ifad, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/flooper.html>+flooper ::  Sig -> Sig -> D -> D -> D -> Tab -> Sig+flooper b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "flooper" [(Ar,[Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Function-table-based crossfading looper.+--+-- This opcode implements a crossfading looper with variable loop parameters and three+--   looping modes, optionally using a table for its crossfade shape. It accepts +--   non-power-of-two tables for its source sounds, such as deferred-allocation+--    GEN01 tables.+--+-- > asig  flooper2  kamp, kpitch, kloopstart, kloopend, kcrossfade, ifn \+-- >           [, istart, imode, ifenv, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/flooper2.html>+flooper2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+flooper2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unTab b6+    where f a1 a2 a3 a4 a5 a6 = opcs "flooper2" [(Ar,[Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5+                                                                                       ,a6]++-- | +-- Collects all audio from all Fluidsynth engines in a performance+--+-- > aleft, aright  fluidAllOut  +--+-- csound doc: <http://www.csounds.com/manual/html/fluidAllOut.html>+fluidAllOut :: Tuple a =>  a+fluidAllOut  = pureTuple $ return $ f +    where f  = mopcs "fluidAllOut" ([Ar,Ar],[]) []++-- | +-- Sends a MIDI controller data message to fluid.+--+-- Sends a MIDI controller data (MIDI controller number and value to use)+--     message to a fluid engine by number on the user specified MIDI channel number.+--+-- >  fluidCCi  iEngineNumber, iChannelNumber, iControllerNumber, iValue+--+-- csound doc: <http://www.csounds.com/manual/html/fluidCCi.html>+fluidCCi ::  D -> D -> D -> D -> SE ()+fluidCCi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "fluidCCi" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Sends a MIDI controller data message to fluid.+--+-- Sends a MIDI controller data (MIDI controller number and value to use)+--     message to a fluid engine by number on the user specified MIDI channel number.+--+-- >  fluidCCk  iEngineNumber, iChannelNumber, iControllerNumber, kValue+--+-- csound doc: <http://www.csounds.com/manual/html/fluidCCk.html>+fluidCCk ::  D -> D -> D -> Sig -> SE ()+fluidCCk b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "fluidCCk" [(Xr,[Ir,Ir,Ir,Kr])] [a1,a2,a3,a4]++-- | +-- Sends MIDI note on, note off, and other messages to a SoundFont preset.+--+-- The fluid opcodes provide a simple+--     Csound opcode wrapper around Peter Hanappe's Fluidsynth SoundFont2+--     synthesizer. This implementation accepts any MIDI note on, note+--     off, controller, pitch bend, or program change message at+--     k-rate. Maximum polyphony is 4096 simultaneously sounding+--     voices. Any number of SoundFonts may be loaded and played+--     simultaneously.+--+-- >  fluidControl  ienginenum, kstatus, kchannel, kdata1, kdata2+--+-- csound doc: <http://www.csounds.com/manual/html/fluidControl.html>+fluidControl ::  D -> Sig -> Sig -> Sig -> Sig -> SE ()+fluidControl b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "fluidControl" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Instantiates a fluidsynth engine.+--+-- Instantiates a fluidsynth engine, and returns ienginenum to identify the+--     engine. ienginenum is passed to other other opcodes for loading +--     and playing SoundFonts and gathering the generated sound.+--+-- > ienginenum  fluidEngine  [iReverbEnabled] [, iChorusEnabled] [,iNumChannels] [, iPolyphony] +--+-- csound doc: <http://www.csounds.com/manual/html/fluidEngine.html>+fluidEngine ::   D+fluidEngine  = D $ return $ f +    where f  = opcs "fluidEngine" [(Ir,[Ir,Ir,Ir,Ir])] []++-- | +-- Loads a SoundFont into a fluidEngine, optionally listing SoundFont contents.+--+-- Loads a SoundFont into an instance of a fluidEngine, optionally+--     listing banks and presets for SoundFont.+--+-- > isfnum  fluidLoad  soundfont, ienginenum[, ilistpresets]+--+-- csound doc: <http://www.csounds.com/manual/html/fluidLoad.html>+fluidLoad ::  D -> D -> Tab+fluidLoad b1 b2 = Tab $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "fluidLoad" [(Ir,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Plays a note on a channel in a fluidSynth engine.+--+-- Plays a note at imidikey pitch and imidivel velocity+--     on ichannelnum channel of number ienginenum fluidEngine.+--+-- >  fluidNote  ienginenum, ichannelnum, imidikey, imidivel+--+-- csound doc: <http://www.csounds.com/manual/html/fluidNote.html>+fluidNote ::  D -> D -> D -> D -> SE ()+fluidNote b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "fluidNote" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Outputs sound from a given fluidEngine+--+-- Outputs the sound from a fluidEngine.+--+-- > aleft, aright  fluidOut  ienginenum+--+-- csound doc: <http://www.csounds.com/manual/html/fluidOut.html>+fluidOut :: Tuple a => D -> a+fluidOut b1 = pureTuple $ f <$> unD b1+    where f a1 = mopcs "fluidOut" ([Ar,Ar],[Ir]) [a1]++-- | +-- Assigns a preset from a SoundFont to a channel on a fluidEngine.+--+-- >  fluidProgramSelect  ienginenum, ichannelnum, isfnum, ibanknum, ipresetnum+--+-- csound doc: <http://www.csounds.com/manual/html/fluidProgramSelect.html>+fluidProgramSelect ::  D -> D -> Tab -> D -> D -> SE ()+fluidProgramSelect b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "fluidProgramSelect" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Set interpolation method for channel in Fluid Engine+--+-- Set interpolation method for channel in Fluid Engine.  Lower +--     order interpolation methods will render faster at lower fidelity while +--     higher order interpolation methods will render slower at higher fidelity.+--     Default interpolation for a channel is 4th order interpolation.+--+-- >  fluidSetInterpMethod  ienginenum, ichannelnum, iInterpMethod+--+-- csound doc: <http://www.csounds.com/manual/html/fluidSetInterpMethod.html>+fluidSetInterpMethod ::  D -> D -> D -> SE ()+fluidSetInterpMethod b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "fluidSetInterpMethod" [(Xr,[Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Read sampled sound from a table.+--+-- Read sampled sound (mono or stereo) from a table, with optional sustain and release looping.+--+-- > ar1 [,ar2]  loscil  xamp, kcps, ifn [, ibas] [, imod1] [, ibeg1] [, iend1] \+-- >           [, imod2] [, ibeg2] [, iend2]+--+-- csound doc: <http://www.csounds.com/manual/html/loscil.html>+loscil :: Tuple a => Sig -> Sig -> Tab -> a+loscil b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = mopcs "loscil" ([Ar,Ar],[Xr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3]++-- | +-- Read sampled sound from a table using cubic interpolation.+--+-- Read sampled sound (mono or stereo) from a table, with optional sustain and release looping, using cubic interpolation.+--+-- > ar1 [,ar2]  loscil3  xamp, kcps, ifn [, ibas] [, imod1] [, ibeg1] [, iend1] \+-- >           [, imod2] [, ibeg2] [, iend2]+--+-- csound doc: <http://www.csounds.com/manual/html/loscil3.html>+loscil3 :: Tuple a => Sig -> Sig -> Tab -> a+loscil3 b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = mopcs "loscil3" ([Ar,Ar],[Xr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3]++-- | +-- Loop oscillator.+--+-- This file is currently a stub, but the syntax should be correct.+--+-- > ar1 [, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, ar13, ar14, \+-- >           ar15, ar16]  loscilx  xamp, kcps, ifn \+-- >           [, iwsize, ibas, istrt, imod1, ibeg1, iend1]+--+-- csound doc: <http://www.csounds.com/manual/html/loscilx.html>+loscilx :: Tuple a => Sig -> Sig -> Tab -> a+loscilx b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = mopcs "loscilx" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]+                                       ,[Xr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3]++-- | +-- Generates a table index for sample playback+--+-- This opcode can be used to generate table index for sample playback (e.g. tablexkt).+--+-- > ares  lphasor  xtrns [, ilps] [, ilpe] [, imode] [, istrt] [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/lphasor.html>+lphasor ::  Sig -> Sig+lphasor b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "lphasor" [(Ar,[Xr,Ir,Ir,Ir,Ir,Ir])] [a1]++-- | +-- Read sampled sound from a table with looping and high precision.+--+-- Read sampled sound (mono or stereo) from a table, with looping, and high precision.+--+-- > ares  lposcil  kamp, kfreqratio, kloop, kend, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/lposcil.html>+lposcil ::  Sig -> Sig -> Sig -> Sig -> Tab -> Sig+lposcil b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "lposcil" [(Ar,[Kr,Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Read sampled sound from a table with high precision and cubic interpolation.+--+-- Read sampled sound (mono or stereo) from a table, with looping, and high precision. lposcil3 uses cubic interpolation.+--+-- > ares  lposcil3  kamp, kfreqratio, kloop, kend, ifn [, iphs]+--+-- csound doc: <http://www.csounds.com/manual/html/lposcil3.html>+lposcil3 ::  Sig -> Sig -> Sig -> Sig -> Tab -> Sig+lposcil3 b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "lposcil3" [(Ar,[Kr,Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Read sampled sound from a table with looping and high precision.+--+-- lposcila reads sampled sound from a table with looping and high precision.+--+-- > ar  lposcila  aamp, kfreqratio, kloop, kend, ift [,iphs] +--+-- csound doc: <http://www.csounds.com/manual/html/lposcila.html>+lposcila ::  Sig -> Sig -> Sig -> Sig -> D -> Sig+lposcila b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "lposcila" [(Ar,[Ar,Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Read stereo sampled sound from a table with looping and high precision.+--+-- lposcilsa reads stereo sampled sound from a table with looping and high precision.+--+-- > ar1, ar2  lposcilsa  aamp, kfreqratio, kloop, kend, ift [,iphs] +--+-- csound doc: <http://www.csounds.com/manual/html/lposcilsa.html>+lposcilsa :: Tuple a => Sig -> Sig -> Sig -> Sig -> D -> a+lposcilsa b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "lposcilsa" ([Ar,Ar],[Ar,Kr,Kr,Kr,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Read stereo sampled sound from a table with looping and high precision.+--+-- lposcilsa2 reads stereo sampled sound from a table with looping and high precision.+--+-- > ar1, ar2  lposcilsa2  aamp, kfreqratio, kloop, kend, ift [,iphs] +--+-- csound doc: <http://www.csounds.com/manual/html/lposcilsa2.html>+lposcilsa2 :: Tuple a => Sig -> Sig -> Sig -> Sig -> D -> a+lposcilsa2 b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "lposcilsa2" ([Ar,Ar],[Ar,Kr,Kr,Kr,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Prints a list of all instruments of a previously loaded SoundFont2 (SF2) file.+--+-- Prints a list of all instruments of a previously loaded SoundFont2 (SF2) sample file. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- >  sfilist  ifilhandle+--+-- csound doc: <http://www.csounds.com/manual/html/sfilist.html>+sfilist ::  Str -> SE ()+sfilist b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "sfilist" [(Xr,[Sr])] [a1]++-- | +-- Plays a SoundFont2 (SF2) sample instrument, generating a stereo sound.+--+-- Plays a SoundFont2 (SF2) sample instrument, generating a stereo sound. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ar1, ar2  sfinstr  ivel, inotenum, xamp, xfreq, instrnum, ifilhandle \+-- >           [, iflag] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/sfinstr.html>+sfinstr :: Tuple a => D -> D -> Sig -> Sig -> D -> Str -> a+sfinstr b1 b2 b3 b4 b5 b6 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unStr b6+    where f a1 a2 a3 a4 a5 a6 = mopcs "sfinstr" ([Ar,Ar],[Ir,Ir,Xr,Xr,Ir,Sr,Ir,Ir]) [a1+                                                                                    ,a2+                                                                                    ,a3+                                                                                    ,a4+                                                                                    ,a5+                                                                                    ,a6]++-- | +-- Plays a SoundFont2 (SF2) sample instrument, generating a stereo sound with cubic interpolation.+--+-- Plays a SoundFont2 (SF2) sample instrument, generating a stereo sound with cubic interpolation. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ar1, ar2  sfinstr3  ivel, inotenum, xamp, xfreq, instrnum, ifilhandle \+-- >           [, iflag] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/sfinstr3.html>+sfinstr3 :: Tuple a => D -> D -> Sig -> Sig -> D -> Str -> a+sfinstr3 b1 b2 b3 b4 b5 b6 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unStr b6+    where f a1 a2 a3 a4 a5 a6 = mopcs "sfinstr3" ([Ar,Ar],[Ir,Ir,Xr,Xr,Ir,Sr,Ir,Ir]) [a1+                                                                                     ,a2+                                                                                     ,a3+                                                                                     ,a4+                                                                                     ,a5+                                                                                     ,a6]++-- | +-- Plays a SoundFont2 (SF2) sample instrument, generating a mono sound with cubic interpolation.+--+-- Plays a SoundFont2 (SF2) sample instrument, generating a mono sound with cubic interpolation. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ares  sfinstr3m  ivel, inotenum, xamp, xfreq, instrnum, ifilhandle \+-- >           [, iflag] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/sfinstr3m.html>+sfinstr3m ::  D -> D -> Sig -> Sig -> D -> Str -> Sig+sfinstr3m b1 b2 b3 b4 b5 b6 = Sig $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unStr b6+    where f a1 a2 a3 a4 a5 a6 = opcs "sfinstr3m" [(Ar,[Ir,Ir,Xr,Xr,Ir,Sr,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6]++-- | +-- Plays a SoundFont2 (SF2) sample instrument, generating a mono sound.+--+-- Plays a SoundFont2 (SF2) sample instrument, generating a mono sound. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ares  sfinstrm  ivel, inotenum, xamp, xfreq, instrnum, ifilhandle \+-- >           [, iflag] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/sfinstrm.html>+sfinstrm ::  D -> D -> Sig -> Sig -> D -> Str -> Sig+sfinstrm b1 b2 b3 b4 b5 b6 = Sig $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unStr b6+    where f a1 a2 a3 a4 a5 a6 = opcs "sfinstrm" [(Ar,[Ir,Ir,Xr,Xr,Ir,Sr,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Loads an entire SoundFont2 (SF2) sample file into memory.+--+-- Loads an entire SoundFont2 (SF2) sample file into memory. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ir  sfload  "filename"+--+-- csound doc: <http://www.csounds.com/manual/html/sfload.html>+sfload ::  Str -> D+sfload b1 = D $ f <$> unStr b1+    where f a1 = opcs "sfload" [(Ir,[Sr])] [a1]++-- | +-- Plays a SoundFont2 (SF2) sample preset, generating a stereo sound, with user-defined+--       time-varying crossfade looping.+--+-- Plays a SoundFont2 (SF2) sample preset, generating a stereo sound, similarly to sfplay. Unlike that opcode, though,+-- 	  it ignores the looping points set in the SF2 file and substitutes them for a user-defined crossfade loop. It is+-- 	  a cross between sfplay and+--       flooper2.+--+-- > ar1, ar2  sflooper  ivel, inotenum, kamp, kpitch, ipreindex, kloopstart, kloopend, kcrossfade \+-- >           [, istart, imode, ifenv, iskip] +--+-- csound doc: <http://www.csounds.com/manual/html/sflooper.html>+sflooper :: Tuple a => D -> D -> Sig -> Sig -> D -> Sig -> Sig -> Sig -> a+sflooper b1 b2 b3 b4 b5 b6 b7 b8 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unSig b6 <*> unSig b7 <*> unSig b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = mopcs "sflooper" ([Ar,Ar]+                                                       ,[Ir,Ir,Kr,Kr,Ir,Kr,Kr,Kr,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8]++-- | +-- Assigns all presets of a SoundFont2 (SF2) sample file to a sequence of progressive index numbers.+--+-- Assigns all presets of a previously loaded SoundFont2 (SF2)+--       sample file to a sequence of progressive index numbers. These+--       opcodes allow management the sample-structure of SF2 files. In+--       order to understand the usage of these opcodes, the user must+--       have some knowledge of the SF2 format, so a brief description of+--       this format can be found in+--       the SoundFont2 File Format+--       Appendix.+--+-- >  sfpassign  istartindex, ifilhandle[, imsgs]+--+-- csound doc: <http://www.csounds.com/manual/html/sfpassign.html>+sfpassign ::  D -> Str -> SE ()+sfpassign b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unStr b2+    where f a1 a2 = opcs "sfpassign" [(Xr,[Ir,Sr,Ir])] [a1,a2]++-- | +-- Plays a SoundFont2 (SF2) sample preset, generating a stereo sound.+--+-- Plays a SoundFont2 (SF2) sample preset, generating a stereo sound. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ar1, ar2  sfplay  ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]+--+-- csound doc: <http://www.csounds.com/manual/html/sfplay.html>+sfplay :: Tuple a => D -> D -> Sig -> Sig -> D -> a+sfplay b1 b2 b3 b4 b5 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "sfplay" ([Ar,Ar],[Ir,Ir,Xr,Xr,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Plays a SoundFont2 (SF2) sample preset, generating a stereo sound with cubic interpolation.+--+-- Plays a SoundFont2 (SF2) sample preset, generating a stereo sound with cubic interpolation. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ar1, ar2  sfplay3  ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]+--+-- csound doc: <http://www.csounds.com/manual/html/sfplay3.html>+sfplay3 :: Tuple a => D -> D -> Sig -> Sig -> D -> a+sfplay3 b1 b2 b3 b4 b5 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "sfplay3" ([Ar,Ar],[Ir,Ir,Xr,Xr,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Plays a SoundFont2 (SF2) sample preset, generating a mono sound with cubic interpolation.+--+-- Plays a SoundFont2 (SF2) sample preset, generating a mono sound with cubic interpolation. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ares  sfplay3m  ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]+--+-- csound doc: <http://www.csounds.com/manual/html/sfplay3m.html>+sfplay3m ::  D -> D -> Sig -> Sig -> D -> Sig+sfplay3m b1 b2 b3 b4 b5 = Sig $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "sfplay3m" [(Ar,[Ir,Ir,Xr,Xr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Plays a SoundFont2 (SF2) sample preset, generating a mono sound.+--+-- Plays a SoundFont2 (SF2) sample preset, generating a mono sound. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ares  sfplaym  ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]+--+-- csound doc: <http://www.csounds.com/manual/html/sfplaym.html>+sfplaym ::  D -> D -> Sig -> Sig -> D -> Sig+sfplaym b1 b2 b3 b4 b5 = Sig $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "sfplaym" [(Ar,[Ir,Ir,Xr,Xr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Prints a list of all presets of a SoundFont2 (SF2) sample file.+--+-- Prints a list of all presets of a previously loaded SoundFont2 (SF2) sample file. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- >  sfplist  ifilhandle+--+-- csound doc: <http://www.csounds.com/manual/html/sfplist.html>+sfplist ::  Str -> SE ()+sfplist b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "sfplist" [(Xr,[Sr])] [a1]++-- | +-- Assigns an existing preset of a SoundFont2 (SF2) sample file to an index number.+--+-- Assigns an existing preset of a previously loaded SoundFont2 (SF2) sample file to an index number. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.+--+-- > ir  sfpreset  iprog, ibank, ifilhandle, ipreindex+--+-- csound doc: <http://www.csounds.com/manual/html/sfpreset.html>+sfpreset ::  D -> D -> Str -> D -> D+sfpreset b1 b2 b3 b4 = D $ f <$> unD b1 <*> unD b2 <*> unStr b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "sfpreset" [(Ir,[Ir,Ir,Sr,Ir])] [a1,a2,a3,a4]++-- | +-- A sound looper with pitch control.+--+-- This opcode records input audio and plays it back in a loop with user-defined+--    duration and crossfade time. It also allows the pitch of the loop to be controlled,+--    including reversed playback.+--+-- > asig, krec  sndloop  ain, kpitch, ktrig, idur, ifad+--+-- csound doc: <http://www.csounds.com/manual/html/sndloop.html>+sndloop :: Tuple a => Sig -> Sig -> Sig -> D -> D -> a+sndloop b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "sndloop" ([Ar,Kr],[Ar,Kr,Kr,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- A simple time stretch by repeating cycles.+--+-- > ares  waveset  ain, krep [, ilen]+--+-- csound doc: <http://www.csounds.com/manual/html/waveset.html>+waveset ::  Sig -> Sig -> Sig+waveset b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "waveset" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- Scanned Synthesis.++-- | +-- Copies from one table to another with a gain control.+--+-- This is is a variant of tablecopy, copying from one table to another, starting at ipos, and with a gain control. The number of points copied is determined by the length of the source. Other points are not changed. This opcode can be used to “hit” a string in the scanned synthesis code.+--+-- >  scanhammer  isrc, idst, ipos, imult+--+-- csound doc: <http://www.csounds.com/manual/html/scanhammer.html>+scanhammer ::  D -> D -> D -> D -> SE ()+scanhammer b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "scanhammer" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Generate audio output using scanned synthesis.+--+-- > ares  scans  kamp, kfreq, ifn, id [, iorder]+--+-- csound doc: <http://www.csounds.com/manual/html/scans.html>+scans ::  Sig -> Sig -> Tab -> D -> Sig+scans b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "scans" [(Ar,[Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- A simpler scanned synthesis implementation.+--+-- A simpler scanned synthesis implementation. This is an implementation of a circular string scanned using external tables. This opcode will allow direct modification and reading of values with the table opcodes.+--+-- > aout  scantable  kamp, kpch, ipos, imass, istiff, idamp, ivel+--+-- csound doc: <http://www.csounds.com/manual/html/scantable.html>+scantable ::  Sig -> Sig -> D -> D -> D -> D -> D -> Sig+scantable b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "scantable" [(Ar,[Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6+                                                                                  ,a7]++-- | +-- Compute the waveform and the wavetable for use in scanned synthesis.+--+-- >  scanu  init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, \+-- >           kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id+--+-- csound doc: <http://www.csounds.com/manual/html/scanu.html>+scanu ::  D -> D -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig -> Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> D -> D -> SE ()+scanu b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 b17 b18 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unTab b3 <*> unTab b4 <*> unTab b5 <*> unTab b6 <*> unTab b7 <*> unSig b8 <*> unSig b9 <*> unSig b10 <*> unSig b11 <*> unD b12 <*> unD b13 <*> unSig b14 <*> unSig b15 <*> unSig b16 <*> unD b17 <*> unD b18+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 = opcs "scanu" [(Xr+                                                                                           ,[Ir,Ir,Ir,Ir,Ir,Ir,Ir,Kr,Kr,Kr,Kr,Ir,Ir,Kr,Kr,Ar,Ir,Ir])] [a1+                                                                                                                                                      ,a2+                                                                                                                                                      ,a3+                                                                                                                                                      ,a4+                                                                                                                                                      ,a5+                                                                                                                                                      ,a6+                                                                                                                                                      ,a7+                                                                                                                                                      ,a8+                                                                                                                                                      ,a9+                                                                                                                                                      ,a10+                                                                                                                                                      ,a11+                                                                                                                                                      ,a12+                                                                                                                                                      ,a13+                                                                                                                                                      ,a14+                                                                                                                                                      ,a15+                                                                                                                                                      ,a16+                                                                                                                                                      ,a17+                                                                                                                                                      ,a18]++-- | +-- Allows the position and velocity of a node in a scanned process to be read.+--+-- > kpos, kvel  xscanmap  iscan, kamp, kvamp [, iwhich]+--+-- csound doc: <http://www.csounds.com/manual/html/xscanmap.html>+xscanmap :: Tuple a => D -> Sig -> Sig -> a+xscanmap b1 b2 b3 = pureTuple $ f <$> unD b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = mopcs "xscanmap" ([Kr,Kr],[Ir,Kr,Kr,Ir]) [a1,a2,a3]++-- | +-- Fast scanned synthesis waveform and the wavetable generator.+--+-- Experimental version of scans.  Allows much larger matrices and is faster and smaller but removes some (unused?) flexibility.  If liked, it will replace the older opcode as it is syntax compatible but extended.+--+-- > ares  xscans  kamp, kfreq, ifntraj, id [, iorder]+--+-- csound doc: <http://www.csounds.com/manual/html/xscans.html>+xscans ::  Sig -> Sig -> Tab -> D -> Sig+xscans b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "xscans" [(Ar,[Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Allows the position and velocity of a node in a scanned process to be read.+--+-- >  xscansmap  kpos, kvel, iscan, kamp, kvamp [, iwhich]+--+-- csound doc: <http://www.csounds.com/manual/html/xscansmap.html>+xscansmap ::  Sig -> Sig -> D -> Sig -> Sig -> SE ()+xscansmap b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "xscansmap" [(Xr,[Kr,Kr,Ir,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Compute the waveform and the wavetable for use in scanned synthesis.+--+-- Experimental version of scanu. Allows much larger matrices and is faster and smaller but removes some (unused?) flexibility.  If liked, it will replace the older opcode as it is syntax compatible but extended.+--+-- >  xscanu  init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, \+-- >           kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id+--+-- csound doc: <http://www.csounds.com/manual/html/xscanu.html>+xscanu ::  D -> D -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig -> Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> D -> D -> SE ()+xscanu b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 b17 b18 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unTab b3 <*> unTab b4 <*> unTab b5 <*> unTab b6 <*> unTab b7 <*> unSig b8 <*> unSig b9 <*> unSig b10 <*> unSig b11 <*> unD b12 <*> unD b13 <*> unSig b14 <*> unSig b15 <*> unSig b16 <*> unD b17 <*> unD b18+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 = opcs "xscanu" [(Xr+                                                                                            ,[Ir,Ir,Ir,Ir,Ir,Ir,Ir,Kr,Kr,Kr,Kr,Ir,Ir,Kr,Kr,Ar,Ir,Ir])] [a1+                                                                                                                                                       ,a2+                                                                                                                                                       ,a3+                                                                                                                                                       ,a4+                                                                                                                                                       ,a5+                                                                                                                                                       ,a6+                                                                                                                                                       ,a7+                                                                                                                                                       ,a8+                                                                                                                                                       ,a9+                                                                                                                                                       ,a10+                                                                                                                                                       ,a11+                                                                                                                                                       ,a12+                                                                                                                                                       ,a13+                                                                                                                                                       ,a14+                                                                                                                                                       ,a15+                                                                                                                                                       ,a16+                                                                                                                                                       ,a17+                                                                                                                                                       ,a18]++-- STK Opcodes.++-- | +-- STKBandedWG uses banded waveguide techniques to model a variety of sounds.+--+-- This opcode uses banded waveguide techniques to model a variety of sounds, including bowed bars, glasses, and bowls.+--+-- > asignal  STKBandedWG  ifrequency, iamplitude, [kpress, kv1[, kmot, kv2[, klfo, kv3[, klfodepth, kv4[, kvel, kv5[, kstrk, kv6[, kinstr, kv7]]]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKBandedWG.html>+stkBandedWG ::  D -> D -> Sig+stkBandedWG b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKBandedWG" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1+                                                                                                ,a2]++-- | +-- STK Hammond-oid organ-like FM synthesis instrument.+--+-- > asignal  STKBeeThree  ifrequency, iamplitude, [kop4, kv1[, kop3, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKBeeThree.html>+stkBeeThree ::  D -> D -> Sig+stkBeeThree b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKBeeThree" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKBlowBotl uses a helmholtz resonator (biquad filter) with a polynomial jet excitation.+--+-- This opcode implements a helmholtz resonator (biquad filter) with a polynomial jet excitation (a la Cook).+--+-- > asignal  STKBlowBotl  ifrequency, iamplitude, [knoise, kv1[, klfo, kv2[, klfodepth, kv3[, kvol, kv4]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKBlowBotl.html>+stkBlowBotl ::  D -> D -> Sig+stkBlowBotl b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKBlowBotl" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STK clarinet physical model with one register hole and one tonehole.+--+-- This opcode is based on the clarinet model, with the addition of a two-port register hole and a three-port dynamic tonehole implementation.+--+-- > asignal  STKBlowHole  ifrequency, iamplitude, [kreed, kv1[, knoise, kv2[, khole, kv3[, kreg, kv4[, kbreath, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKBlowHole.html>+stkBlowHole ::  D -> D -> Sig+stkBlowHole b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKBlowHole" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKBowed is a bowed string instrument.+--+-- STKBowed is a bowed string instrument, using a waveguide model.+--+-- > asignal  STKBowed  ifrequency, iamplitude, [kpress, kv1[, kpos, kv2[, klfo, kv3[, klfodepth, kv4[, kvol, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKBowed.html>+stkBowed ::  D -> D -> Sig+stkBowed b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKBowed" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKBrass is a simple brass instrument.+--+-- STKBrass uses a simple brass instrument waveguide model, a la Cook.+--+-- > asignal  STKBrass  ifrequency, iamplitude, [klip, kv1[, kslide, kv2[, klfo, kv3[, klfodepth, kv4[, kvol, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKBrass.html>+stkBrass ::  D -> D -> Sig+stkBrass b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKBrass" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKClarinet uses a simple clarinet physical model.+--+-- > asignal  STKClarinet  ifrequency, iamplitude, [kstiff, kv1[, knoise, kv2[, klfo, kv3[, klfodepth, kv4[, kbreath, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKClarinet.html>+stkClarinet ::  D -> D -> Sig+stkClarinet b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKClarinet" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKDrummer is a drum sampling synthesizer.+--+-- STKDrummer is a drum sampling synthesizer using raw waves and one-pole filters,+--       The drum rawwave files are sampled at 22050 Hz, but will be appropriately interpolated for other sample rates.+--+-- > asignal  STKDrummer  ifrequency, iamplitude+--+-- csound doc: <http://www.csounds.com/manual/html/STKDrummer.html>+stkDrummer ::  D -> D -> Sig+stkDrummer b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKDrummer" [(Ar,[Ir,Ir])] [a1,a2]++-- | +-- STKFMVoices is a singing FM synthesis instrument.+--+-- STKFMVoices is a singing FM synthesis instrument. It has 3 carriers and a common modulator, also referred to as algorithm 6 of the TX81Z.+--+-- > asignal  STKFMVoices  ifrequency, iamplitude, [kvowel, kv1[, kspec, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKFMVoices.html>+stkFMVoices ::  D -> D -> Sig+stkFMVoices b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKFMVoices" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKFlute uses a simple flute physical model.+--+-- STKFlute uses a simple flute physical model. The jet model uses a polynomial, a la Cook.+--+-- > asignal  STKFlute  ifrequency, iamplitude, [kjet, kv1[, knoise, kv2[, klfo, kv3[, klfodepth, kv4[, kbreath, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKFlute.html>+stkFlute ::  D -> D -> Sig+stkFlute b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKFlute" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKHevyMetl produces metal sounds.+--+-- STKHevyMetl produces metal sounds, using FM synthesis.+--       It uses 3 cascade operators with feedback modulation, also referred to as algorithm 3 of the TX81Z.+--+-- > asignal  STKHevyMetl  ifrequency, iamplitude, [kmod, kv1[, kcross, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKHevyMetl.html>+stkHevyMetl ::  D -> D -> Sig+stkHevyMetl b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKHevyMetl" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKMandolin produces mamdolin-like sounds.+--+-- STKMandolin produces mamdolin-like sounds, using "commuted synthesis" techniques to model a mandolin instrument.+--+-- > asignal  STKMandolin  ifrequency, iamplitude, [kbody, kv1[, kpos, kv2[, ksus, kv3[, kdetune, kv4[, kmic, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKMandolin.html>+stkMandolin ::  D -> D -> Sig+stkMandolin b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKMandolin" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKModalBar is a resonant bar instrument.+--+-- This opcode is a resonant bar instrument.It has a number of different struck bar instruments.+--+-- > asignal  STKModalBar  ifrequency, iamplitude, [khard, kv1[, kpos, kv2[, klfo, kv3[, klfodepth, kv4[, kmix, kv5[, kvol, kv6[, kinstr, kv7]]]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKModalBar.html>+stkModalBar ::  D -> D -> Sig+stkModalBar b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKModalBar" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1+                                                                                                ,a2]++-- | +-- STKMoog produces moog-like swept filter sounds.+--+-- STKMoog produces moog-like swept filter sounds, using one attack wave, one looped wave, and an ADSR envelope and adds two sweepable formant filters.+--+-- > asignal  STKMoog  ifrequency, iamplitude, [kq, kv1[, krate, kv2[, klfo, kv3[, klfodepth, kv4[, kvol, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKMoog.html>+stkMoog ::  D -> D -> Sig+stkMoog b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKMoog" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKPercFlut is a percussive flute FM synthesis instrument.+--+-- STKPercFlut is a percussive flute FM synthesis instrument. The instrument uses an algorithm like the algorithm 4 of the TX81Z.+--+-- > asignal  STKPercFlut  ifrequency, iamplitude, [kmod, kv1[, kcross, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKPercFlut.html>+stkPercFlut ::  D -> D -> Sig+stkPercFlut b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKPercFlut" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKPlucked uses a plucked string physical model.+--+-- STKPlucked uses a plucked string physical model based on the Karplus-Strong algorithm.+--+-- > asignal  STKPlucked  ifrequency, iamplitude+--+-- csound doc: <http://www.csounds.com/manual/html/STKPlucked.html>+stkPlucked ::  D -> D -> Sig+stkPlucked b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKPlucked" [(Ar,[Ir,Ir])] [a1,a2]++-- | +-- STKResonate is a noise driven formant filter.+--+-- STKResonate is a noise driven formant filter. This instrument contains a noise source, which excites a biquad resonance filter, with volume controlled by an ADSR.+--+-- > asignal  STKResonate  ifrequency, iamplitude, [kfreq, kv1[, kpole, kv2[, knotch, kv3[, kzero, kv4[, kenv, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKResonate.html>+stkResonate ::  D -> D -> Sig+stkResonate b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKResonate" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STK Fender Rhodes-like electric piano FM synthesis instrument.+--+-- > asignal  STKRhodey  ifrequency, iamplitude, [kmod, kv1[, kcross, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKRhodey.html>+stkRhodey ::  D -> D -> Sig+stkRhodey b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKRhodey" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKSaxofony is a faux conical bore reed instrument.+--+-- STKSaxofony is a faux conical bore reed instrument.+--       This opcode uses a "hybrid" digital waveguide instrument that can generate a variety of wind-like sounds. It has also been referred to as the "blowed string" model. +--       The waveguide section is essentially that of a string, with one rigid and one lossy termination. The non-linear function is a reed table. +--       The string can be "blown" at any point between the terminations, though just as with strings, it is impossible to excite the system at either end. +--       If the excitation is placed at the string mid-point, the sound is that of a clarinet. At points closer to the "bridge", the sound is closer to that of a saxophone.+--+-- > asignal  STKSaxofony  ifrequency, iamplitude, [kstiff, kv1[, kapert, kv2[, kblow, kv3[, knoise, kv4[, klfo, kv5[, klfodepth, kv6[, kbreath, kv7]]]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKSaxofony.html>+stkSaxofony ::  D -> D -> Sig+stkSaxofony b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKSaxofony" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1+                                                                                                ,a2]++-- | +-- STKShakers is an instrument that simulates environmental sounds or collisions of multiple independent sound producing objects.+--+-- STKShakers are a set of PhISEM and PhOLIES instruments: +--       PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects. +--       It can simulate a Maraca, Sekere, Cabasa, Bamboo Wind Chimes, Water Drops, Tambourine, Sleighbells, and a Guiro. On http://soundlab.cs.princeton.edu/research/controllers/shakers/+-- PhOLIES (Physically-Oriented Library of Imitated Environmental Sounds) there is a similar approach for the synthesis of environmental sounds. +-- It simulates of breaking sticks, crunchy snow (or not), a wrench, sandpaper, and more..+--+-- > asignal  STKShakers  ifrequency, iamplitude, [kenerg, kv1[, kdecay, kv2[, kshake, kv3[, knum, kv4[, kres, kv5[, kinstr, kv6]]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKShakers.html>+stkShakers ::  D -> D -> Sig+stkShakers b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKShakers" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKSimple is a wavetable/noise instrument.+--+-- STKSimple is a wavetable/noise instrument.+--       It combines a looped wave, a noise source, a biquad resonance filter, a one-pole filter, and an ADSR envelope to create some interesting sounds.+--+-- > asignal  STKSimple  ifrequency, iamplitude, [kpos, kv1[, kcross, kv2[, kenv, kv3[, kgain, kv4]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKSimple.html>+stkSimple ::  D -> D -> Sig+stkSimple b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKSimple" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKSitar uses a plucked string physical model.+--+-- STKSitar uses a plucked string physical model based on the Karplus-Strong algorithm.+--+-- > asignal  STKSitar  ifrequency, iamplitude+--+-- csound doc: <http://www.csounds.com/manual/html/STKSitar.html>+stkSitar ::  D -> D -> Sig+stkSitar b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKSitar" [(Ar,[Ir,Ir])] [a1,a2]++-- | +-- STKStifKarp is a plucked stiff string instrument.+--+-- STKStifKarp is a plucked stiff string instrument. +--       It a simple plucked string algorithm (Karplus Strong) with enhancements, including string stiffness and pluck position controls. The stiffness is modeled with allpass filters.+--+-- > asignal  STKStifKarp  ifrequency, iamplitude, [kpos, kv1[, ksus, kv2[, kstretch, kv3]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKStifKarp.html>+stkStifKarp ::  D -> D -> Sig+stkStifKarp b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKStifKarp" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKTubeBell is a  tubular bell (orchestral chime) FM synthesis instrument.+--+-- STKTubeBell is a tubular bell (orchestral chime) FM synthesis instrument. +--       It uses two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.+--+-- > asignal  STKTubeBell  ifrequency, iamplitude, [kmod, kv1[, kcross, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKTubeBell.html>+stkTubeBell ::  D -> D -> Sig+stkTubeBell b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKTubeBell" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKVoicForm is a  four formant synthesis instrument.+--+-- STKVoicForm is a four formant synthesis instrument. +-- This instrument contains an excitation singing wavetable (looping wave with random and periodic vibrato, smoothing on frequency, etc.), excitation noise, and four sweepable complex resonances. +-- Measured formant data is included, and enough data is there to support either parallel or cascade synthesis. In the floating point case cascade synthesis is the most natural so that's what you'll find here.+--+-- > asignal  STKVoicForm  ifrequency, iamplitude, [kmix, kv1[, ksel, kv2[, klfo, kv3[, klfodepth, kv4[, kloud, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKVoicForm.html>+stkVoicForm ::  D -> D -> Sig+stkVoicForm b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKVoicForm" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKWhistle produces whistle sounds.+--+-- STKWhistle produces (police) whistle sounds. It uses a hybrid physical/spectral model of a police whistle (a la Cook).+--+-- > asignal  STKWhistle  ifrequency, iamplitude, [kmod, kv1[, knoise, kv2[, kfipfreq, kv3[, kfipgain, kv4[, kvol, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKWhistle.html>+stkWhistle ::  D -> D -> Sig+stkWhistle b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKWhistle" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- STKWurley simulates a Wurlitzer electric piano FM synthesis instrument.+--+-- STKWurley simulates a Wurlitzer electric piano FM synthesis instrument. +--       It uses two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.+--+-- > asignal  STKWurley  ifrequency, iamplitude, [kmod, kv1[, kcross, kv2[, klfo, kv3[, klfodepth, kv4[, kadsr, kv5]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/STKWurley.html>+stkWurley ::  D -> D -> Sig+stkWurley b1 b2 = Sig $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "STKWurley" [(Ar,[Ir,Ir,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2]++-- Table Access.++-- | +-- Accesses table values by incremental sampling.+--+-- > kres  oscil1  idel, kamp, idur [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/oscil1.html>+oscil1 ::  D -> Sig -> D -> Sig+oscil1 b1 b2 b3 = Sig $ f <$> unD b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "oscil1" [(Kr,[Ir,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Accesses table values by incremental sampling with linear interpolation.+--+-- > kres  oscil1i  idel, kamp, idur [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/oscil1i.html>+oscil1i ::  D -> Sig -> D -> Sig+oscil1i b1 b2 b3 = Sig $ f <$> unD b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "oscil1i" [(Kr,[Ir,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Accesses table values by direct indexing.+--+-- > ares  ptable  andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires  ptable  indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres  ptable  kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- csound doc: <http://www.csounds.com/manual/html/ptable.html>+ptable ::  Sig -> Tab -> Sig+ptable b1 b2 = Sig $ f <$> unSig b1 <*> unTab b2+    where f a1 a2 = opcs "ptable" [(Ar,[Ar,Ir,Ir,Ir,Ir])+                                  ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                  ,(Kr,[Kr,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Accesses table values by direct indexing with cubic interpolation.+--+-- > ares  ptable3  andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires  ptable3  indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres  ptable3  kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- csound doc: <http://www.csounds.com/manual/html/ptable3.html>+ptable3 ::  Sig -> Tab -> Sig+ptable3 b1 b2 = Sig $ f <$> unSig b1 <*> unTab b2+    where f a1 a2 = opcs "ptable3" [(Ar,[Ar,Ir,Ir,Ir,Ir])+                                   ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                   ,(Kr,[Kr,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Accesses table values by direct indexing with linear interpolation.+--+-- > ares  ptablei  andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires  ptablei  indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres  ptablei  kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- csound doc: <http://www.csounds.com/manual/html/ptablei.html>+ptablei ::  Sig -> Tab -> Sig+ptablei b1 b2 = Sig $ f <$> unSig b1 <*> unTab b2+    where f a1 a2 = opcs "ptablei" [(Ar,[Ar,Ir,Ir,Ir,Ir])+                                   ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                   ,(Kr,[Kr,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Fast table opcodes.+--+-- Fast table opcodes. Faster than+--     table and+--     tablew because don't+--     allow wrap-around and limit and don't check index validity. Have+--     been implemented in order to provide fast access to+--     arrays. Support non-power of two tables (can be generated by any+--     GEN function by giving a negative length value).+--+-- > ir  tab_i  indx, ifn[, ixmode]+--+-- csound doc: <http://www.csounds.com/manual/html/tab.html>+tab_i ::  D -> Tab -> D+tab_i b1 b2 = D $ f <$> unD b1 <*> unTab b2+    where f a1 a2 = opcs "tab_i" [(Ir,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Fast table opcodes.+--+-- Fast table opcodes. Faster than+--     table and+--     tablew because don't+--     allow wrap-around and limit and don't check index validity. Have+--     been implemented in order to provide fast access to+--     arrays. Support non-power of two tables (can be generated by any+--     GEN function by giving a negative length value).+--+-- > kr  tab  kndx, ifn[, ixmode]+-- > ar  tab  xndx, ifn[, ixmode]+--+-- csound doc: <http://www.csounds.com/manual/html/tab.html>+tab ::  Sig -> Tab -> Sig+tab b1 b2 = Sig $ f <$> unSig b1 <*> unTab b2+    where f a1 a2 = opcs "tab" [(Kr,[Kr,Ir,Ir]),(Ar,[Xr,Ir,Ir])] [a1,a2]++-- | +-- Fast table opcodes.+--+-- Fast table opcodes. Faster than+--     table and+--     tablew because don't+--     allow wrap-around and limit and don't check index validity. Have+--     been implemented in order to provide fast access to+--     arrays. Support non-power of two tables (can be generated by any+--     GEN function by giving a negative length value).+--+-- >  tabw_i  isig, indx, ifn [,ixmode]+--+-- csound doc: <http://www.csounds.com/manual/html/tab.html>+tabw_i ::  D -> D -> Tab -> SE ()+tabw_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "tabw_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Fast table opcodes.+--+-- Fast table opcodes. Faster than+--     table and+--     tablew because don't+--     allow wrap-around and limit and don't check index validity. Have+--     been implemented in order to provide fast access to+--     arrays. Support non-power of two tables (can be generated by any+--     GEN function by giving a negative length value).+--+-- >  tabw  ksig, kndx, ifn [,ixmode]+-- >  tabw  asig, andx, ifn [,ixmode]+--+-- csound doc: <http://www.csounds.com/manual/html/tab.html>+tabw ::  Sig -> Sig -> Tab -> SE ()+tabw b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "tabw" [(Xr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Accesses table values by direct indexing.+--+-- > ares  table  andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires  table  indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres  table  kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- csound doc: <http://www.csounds.com/manual/html/table.html>+table :: SigOrD a => a -> Tab -> a+table b1 b2 = fromGE $ f <$> toGE b1 <*> unTab b2+    where f a1 a2 = opcs "table" [(Ar,[Ar,Ir,Ir,Ir,Ir])+                                 ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                 ,(Kr,[Kr,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Accesses table values by direct indexing with cubic interpolation.+--+-- > ares  table3  andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires  table3  indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres  table3  kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- csound doc: <http://www.csounds.com/manual/html/table3.html>+table3 :: SigOrD a => a -> Tab -> a+table3 b1 b2 = fromGE $ f <$> toGE b1 <*> unTab b2+    where f a1 a2 = opcs "table3" [(Ar,[Ar,Ir,Ir,Ir,Ir])+                                  ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                  ,(Kr,[Kr,Ir,Ir,Ir,Ir])] [a1,a2]++-- | +-- Accesses table values by direct indexing with linear interpolation.+--+-- > ares  tablei  andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires  tablei  indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres  tablei  kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- csound doc: <http://www.csounds.com/manual/html/tablei.html>+tablei :: SigOrD a => a -> Tab -> a+tablei b1 b2 = fromGE $ f <$> toGE b1 <*> unTab b2+    where f a1 a2 = opcs "tablei" [(Ar,[Ar,Ir,Ir,Ir,Ir])+                                  ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                  ,(Kr,[Kr,Ir,Ir,Ir,Ir])] [a1,a2]++-- Wave Terrain Synthesis.++-- | +-- A simple wave-terrain synthesis opcode.+--+-- > aout  wterrain  kamp, kpch, k_xcenter, k_ycenter, k_xradius, k_yradius, \+-- >           itabx, itaby+--+-- csound doc: <http://www.csounds.com/manual/html/wterrain.html>+wterrain ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> Sig+wterrain b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "wterrain" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5+                                                                                       ,a6+                                                                                       ,a7+                                                                                       ,a8]++-- Waveguide Physical Modeling.++-- | +-- Produces a naturally decaying plucked string or drum sound.+--+-- Audio output is a naturally decaying plucked string or drum sound based on the Karplus-Strong algorithms.+--+-- > ares  pluck  kamp, kcps, icps, ifn, imeth [, iparm1] [, iparm2]+--+-- csound doc: <http://www.csounds.com/manual/html/pluck.html>+pluck ::  Sig -> Sig -> D -> Tab -> D -> Sig+pluck b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unTab b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "pluck" [(Ar,[Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Physical model of the plucked string.+--+-- repluck is an implementation of the physical model of the plucked string. A user can control the pluck point, the pickup point, the filter, and an additional audio signal, axcite. axcite is used to excite the 'string'. Based on the Karplus-Strong algorithm.+--+-- > ares  repluck  iplk, kamp, icps, kpick, krefl, axcite+--+-- csound doc: <http://www.csounds.com/manual/html/repluck.html>+repluck ::  D -> Sig -> D -> Sig -> Sig -> Sig -> Sig+repluck b1 b2 b3 b4 b5 b6 = Sig $ f <$> unD b1 <*> unSig b2 <*> unD b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "repluck" [(Ar,[Ir,Kr,Ir,Kr,Kr,Ar])] [a1,a2,a3,a4,a5,a6]++-- | +-- A string resonator with variable fundamental frequency.+--+-- An audio signal is modified by a string resonator with variable fundamental frequency.+--+-- > ares  streson  asig, kfr, ifdbgain+--+-- csound doc: <http://www.csounds.com/manual/html/streson.html>+streson ::  Sig -> Sig -> D -> Sig+streson b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "streson" [(Ar,[Ar,Kr,Ir])] [a1,a2,a3]++-- | +-- Creates a tone similar to a bowed string.+--+-- Audio output is a tone similar to a bowed string, using a physical model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  wgbow  kamp, kfreq, kpres, krat, kvibf, kvamp, ifn [, iminfreq]+--+-- csound doc: <http://www.csounds.com/manual/html/wgbow.html>+wgbow ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+wgbow b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "wgbow" [(Ar,[Kr,Kr,Kr,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                 ,a2+                                                                                 ,a3+                                                                                 ,a4+                                                                                 ,a5+                                                                                 ,a6+                                                                                 ,a7]++-- | +-- A physical model of a bowed bar.+--+-- A physical model of a bowed bar, belonging to the Perry Cook family of waveguide instruments.+--+-- > ares  wgbowedbar  kamp, kfreq, kpos, kbowpres, kgain [, iconst] [, itvel] \+-- >           [, ibowpos] [, ilow]+--+-- csound doc: <http://www.csounds.com/manual/html/wgbowedbar.html>+wgbowedbar ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig+wgbowedbar b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "wgbowedbar" [(Ar,[Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Creates a tone related to a brass instrument.+--+-- Audio output is a tone related to a brass instrument, using a physical model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  wgbrass  kamp, kfreq, ktens, iatt, kvibf, kvamp, ifn [, iminfreq]+--+-- csound doc: <http://www.csounds.com/manual/html/wgbrass.html>+wgbrass ::  Sig -> Sig -> Sig -> D -> Sig -> Sig -> Tab -> Sig+wgbrass b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unSig b5 <*> unSig b6 <*> unTab b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "wgbrass" [(Ar,[Kr,Kr,Kr,Ir,Kr,Kr,Ir,Ir])] [a1+                                                                                   ,a2+                                                                                   ,a3+                                                                                   ,a4+                                                                                   ,a5+                                                                                   ,a6+                                                                                   ,a7]++-- | +-- Creates a tone similar to a clarinet.+--+-- Audio output is a tone similar to a clarinet, using a physical model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  wgclar  kamp, kfreq, kstiff, iatt, idetk, kngain, kvibf, kvamp, ifn \+-- >           [, iminfreq]+--+-- csound doc: <http://www.csounds.com/manual/html/wgclar.html>+wgclar ::  Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> Tab -> Sig+wgclar b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unTab b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "wgclar" [(Ar,[Kr,Kr,Kr,Ir,Ir,Kr,Kr,Kr,Ir,Ir])] [a1+                                                                                              ,a2+                                                                                              ,a3+                                                                                              ,a4+                                                                                              ,a5+                                                                                              ,a6+                                                                                              ,a7+                                                                                              ,a8+                                                                                              ,a9]++-- | +-- Creates a tone similar to a flute.+--+-- Audio output is a tone similar to a flute, using a physical model developed from Perry Cook, but re-coded for Csound.+--+-- > ares  wgflute  kamp, kfreq, kjet, iatt, idetk, kngain, kvibf, kvamp, ifn \+-- >           [, iminfreq] [, ijetrf] [, iendrf]+--+-- csound doc: <http://www.csounds.com/manual/html/wgflute.html>+wgflute ::  Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> Tab -> Sig+wgflute b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unTab b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "wgflute" [(Ar+                                                         ,[Kr,Kr,Kr,Ir,Ir,Kr,Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- A high fidelity simulation of a plucked string.+--+-- A high fidelity simulation of a plucked string, using interpolating delay-lines.+--+-- > ares  wgpluck  icps, iamp, kpick, iplk, idamp, ifilt, axcite+--+-- csound doc: <http://www.csounds.com/manual/html/wgpluck.html>+wgpluck ::  D -> D -> Sig -> D -> D -> D -> Sig -> Sig+wgpluck b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "wgpluck" [(Ar,[Ir,Ir,Kr,Ir,Ir,Ir,Ar])] [a1+                                                                                ,a2+                                                                                ,a3+                                                                                ,a4+                                                                                ,a5+                                                                                ,a6+                                                                                ,a7]++-- | +-- Physical model of the plucked string.+--+-- wgpluck2 is an implementation of the physical model of the plucked string, with control over the pluck point, the pickup point and the filter. Based on the Karplus-Strong algorithm.+--+-- > ares  wgpluck2  iplk, kamp, icps, kpick, krefl+--+-- csound doc: <http://www.csounds.com/manual/html/wgpluck2.html>+wgpluck2 ::  D -> Sig -> D -> Sig -> Sig -> Sig+wgpluck2 b1 b2 b3 b4 b5 = Sig $ f <$> unD b1 <*> unSig b2 <*> unD b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "wgpluck2" [(Ar,[Ir,Kr,Ir,Kr,Kr])] [a1,a2,a3,a4,a5]
+ src/Csound/Typed/Opcode/SignalIO.hs view
@@ -0,0 +1,1231 @@+module Csound.Typed.Opcode.SignalIO (+    +    +    -- * File I/O.+    dumpk, dumpk2, dumpk3, dumpk4, ficlose, fin, fini, fink, fiopen, fout, fouti, foutir, foutk, fprintks, fprints, readk, readk2, readk3, readk4,+    +    -- * Signal Input.+    diskin, diskin2, in', in32, inch, inh, ino, inq, inrg, ins, invalue, inx, inz, mp3in, soundin,+    +    -- * Signal Output.+    mdelay, monitor, out, out32, outc, outch, outh, outo, outq, outq1, outq2, outq3, outq4, outrg, outs, outs1, outs2, outvalue, outx, outz, soundout, soundouts,+    +    -- * Software Bus.+    chani, chano, chn_k, chn_a, chn_S, chnclear, chnexport, chnget, chnmix, chnparams, chnrecv, chnsend, chnset, setksmps, xin, xout,+    +    -- * Printing and Display.+    dispfft, display, flashtxt, print', printf_i, printf, printk, printk2, printks, prints,+    +    -- * Soundfile Queries.+    filebit, filelen, filenchnls, filepeak, filesr, filevalid, mp3len) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- File I/O.++-- | +-- Periodically writes an orchestra control-signal value to an external file.+--+-- Periodically writes an orchestra control-signal value to a named external file in a specific format.+--+-- >  dumpk   ksig, ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/dumpk.html>+dumpk ::  Sig -> Str -> D -> D -> SE ()+dumpk b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "dumpk" [(Xr,[Kr,Sr,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Periodically writes two orchestra control-signal values to an external file.+--+-- Periodically writes two orchestra control-signal values to a named external file in a specific format.+--+-- >  dumpk2  ksig1, ksig2, ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/dumpk2.html>+dumpk2 ::  Sig -> Sig -> Str -> D -> D -> SE ()+dumpk2 b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unStr b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "dumpk2" [(Xr,[Kr,Kr,Sr,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Periodically writes three orchestra control-signal values to an external file.+--+-- Periodically writes three orchestra control-signal values to a named external file in a specific format.+--+-- >  dumpk3  ksig1, ksig2, ksig3, ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/dumpk3.html>+dumpk3 ::  Sig -> Sig -> Sig -> Str -> D -> D -> SE ()+dumpk3 b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unStr b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "dumpk3" [(Xr,[Kr,Kr,Kr,Sr,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Periodically writes four orchestra control-signal values to an external file.+--+-- Periodically writes four orchestra control-signal values to a named external file in a specific format.+--+-- >  dumpk4  ksig1, ksig2, ksig3, ksig4, ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/dumpk4.html>+dumpk4 ::  Sig -> Sig -> Sig -> Sig -> Str -> D -> D -> SE ()+dumpk4 b1 b2 b3 b4 b5 b6 b7 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unStr b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "dumpk4" [(Xr,[Kr,Kr,Kr,Kr,Sr,Ir,Ir])] [a1+                                                                               ,a2+                                                                               ,a3+                                                                               ,a4+                                                                               ,a5+                                                                               ,a6+                                                                               ,a7]++-- | +-- Closes a previously opened file.+--+-- ficlose can be used to close a file which was opened with fiopen.+--+-- >  ficlose  ihandle+-- >  ficlose  Sfilename+--+-- csound doc: <http://www.csounds.com/manual/html/ficlose.html>+ficlose ::  D -> SE ()+ficlose b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "ficlose" [(Xr,[Ir])] [a1]++-- | +-- Read signals from a file at a-rate.+--+-- >  fin  ifilename, iskipframes, iformat, ain1 [, ain2] [, ain3] [,...]+--+-- csound doc: <http://www.csounds.com/manual/html/fin.html>+fin ::  Str -> D -> D -> [Sig] -> SE ()+fin b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> mapM unSig b4+    where f a1 a2 a3 a4 = opcs "fin" [(Xr,[Sr,Ir,Ir] ++ (repeat Ar))] ([a1,a2,a3] ++ a4)++-- | +-- Read signals from a file at i-rate.+--+-- >  fini  ifilename, iskipframes, iformat, in1 [, in2] [, in3] [, ...]+--+-- csound doc: <http://www.csounds.com/manual/html/fini.html>+fini ::  Str -> D -> D -> [D] -> SE ()+fini b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> mapM unD b4+    where f a1 a2 a3 a4 = opcs "fini" [(Xr,[Sr] ++ (repeat Ir))] ([a1,a2,a3] ++ a4)++-- | +-- Read signals from a file at k-rate.+--+-- >  fink  ifilename, iskipframes, iformat, kin1 [, kin2] [, kin3] [,...]+--+-- csound doc: <http://www.csounds.com/manual/html/fink.html>+fink ::  Str -> D -> D -> [Sig] -> SE ()+fink b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> mapM unSig b4+    where f a1 a2 a3 a4 = opcs "fink" [(Xr,[Sr,Ir,Ir] ++ (repeat Kr))] ([a1,a2,a3] ++ a4)++-- | +-- Opens a file in a specific mode.+--+-- fiopen can be used to open a file in one of the specified modes.+--+-- > ihandle  fiopen  ifilename, imode+--+-- csound doc: <http://www.csounds.com/manual/html/fiopen.html>+fiopen ::  Str -> D -> SE D+fiopen b1 b2 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "fiopen" [(Ir,[Sr,Ir])] [a1,a2]++-- | +-- Outputs a-rate signals to an arbitrary number of channels.+--+-- fout outputs N a-rate signals to a specified file of N channels.+--+-- >  fout  ifilename, iformat, aout1 [, aout2, aout3,...,aoutN]+--+-- csound doc: <http://www.csounds.com/manual/html/fout.html>+fout ::  Str -> D -> [Sig] -> SE ()+fout b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "fout" [(Xr,[Sr,Ir] ++ (repeat Ar))] ([a1,a2] ++ a3)++-- | +-- Outputs i-rate signals of an arbitrary number of channels to a specified file.+--+-- fouti output N i-rate signals to a specified file of N channels.+--+-- >  fouti  ihandle, iformat, iflag, iout1 [, iout2, iout3,....,ioutN]+--+-- csound doc: <http://www.csounds.com/manual/html/fouti.html>+fouti ::  Str -> D -> D -> [D] -> SE ()+fouti b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> mapM unD b4+    where f a1 a2 a3 a4 = opcs "fouti" [(Xr,(repeat Ir))] ([a1,a2,a3] ++ a4)++-- | +-- Outputs i-rate signals from an arbitrary number of channels to a specified file.+--+-- foutir output N i-rate signals to a specified file of N channels.+--+-- >  foutir  ihandle, iformat, iflag, iout1 [, iout2, iout3,....,ioutN]+--+-- csound doc: <http://www.csounds.com/manual/html/foutir.html>+foutir ::  Str -> D -> D -> [D] -> SE ()+foutir b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> unD b3 <*> mapM unD b4+    where f a1 a2 a3 a4 = opcs "foutir" [(Xr,(repeat Ir))] ([a1,a2,a3] ++ a4)++-- | +-- Outputs k-rate signals of an arbitrary number of channels to a specified file, in raw (headerless) format.+--+-- foutk outputs N k-rate signals to a specified file of N channels.+--+-- >  foutk  ifilename, iformat, kout1 [, kout2, kout3,....,koutN]+--+-- csound doc: <http://www.csounds.com/manual/html/foutk.html>+foutk ::  Str -> D -> [Sig] -> SE ()+foutk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "foutk" [(Xr,[Sr,Ir] ++ (repeat Kr))] ([a1,a2] ++ a3)++-- | +-- Similar to printks but prints to a file.+--+-- >  fprintks  "filename", "string", [, kval1] [, kval2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/fprintks.html>+fprintks ::  Str -> Str -> [Sig] -> SE ()+fprintks b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "fprintks" [(Xr,[Sr,Sr] ++ (repeat Kr))] ([a1,a2] ++ a3)++-- | +-- Similar to prints but prints to a file.+--+-- >  fprints  "filename", "string" [, ival1] [, ival2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/fprints.html>+fprints ::  Str -> Str -> [D] -> SE ()+fprints b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unStr b2 <*> mapM unD b3+    where f a1 a2 a3 = opcs "fprints" [(Xr,[Sr,Sr] ++ (repeat Ir))] ([a1,a2] ++ a3)++-- | +-- Periodically reads an orchestra control-signal value from an external file.+--+-- Periodically reads an orchestra control-signal value from a named external file in a specific format.+--+-- > kres  readk  ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/readk.html>+readk ::  Str -> D -> D -> Sig+readk b1 b2 b3 = Sig $ f <$> unStr b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "readk" [(Kr,[Sr,Ir,Ir])] [a1,a2,a3]++-- | +-- Periodically reads two orchestra control-signal values from an external file.+--+-- > kr1, kr2  readk2  ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/readk2.html>+readk2 :: Tuple a => Str -> D -> D -> a+readk2 b1 b2 b3 = pureTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = mopcs "readk2" ([Kr,Kr],[Sr,Ir,Ir]) [a1,a2,a3]++-- | +-- Periodically reads three orchestra control-signal values from an external file.+--+-- > kr1, kr2, kr3  readk3  ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/readk3.html>+readk3 :: Tuple a => Str -> D -> D -> a+readk3 b1 b2 b3 = pureTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = mopcs "readk3" ([Kr,Kr,Kr],[Sr,Ir,Ir]) [a1,a2,a3]++-- | +-- Periodically reads four orchestra control-signal values from an external file.+--+-- > kr1, kr2, kr3, kr4  readk4  ifilname, iformat, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/readk4.html>+readk4 :: Tuple a => Str -> D -> D -> a+readk4 b1 b2 b3 = pureTuple $ f <$> unStr b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = mopcs "readk4" ([Kr,Kr,Kr,Kr],[Sr,Ir,Ir]) [a1,a2,a3]++-- Signal Input.++-- | +-- Deprecated. Reads audio data from an external device or stream and can alter its pitch.+--+-- > ar1 [, ar2 [, ar3 [, ... arN]]]  diskin  ifilcod, kpitch [, iskiptim] \+-- >           [, iwraparound] [, iformat] [, iskipinit]+--+-- csound doc: <http://www.csounds.com/manual/html/diskin.html>+diskin :: Tuple a => Str -> Sig -> a+diskin b1 b2 = pureTuple $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = mopcs "diskin" ((repeat Ar),[Sr,Kr,Ir,Ir,Ir,Ir]) [a1,a2]++-- | +-- Reads audio data from a file, and can alter its pitch using one of several+--       available interpolation types, as well as convert the sample rate to match+--       the orchestra sr setting.+--+-- Reads audio data from a file, and can alter its pitch using+-- 	one of several available interpolation types, as well as+-- 	convert the sample rate to match the orchestra sr+-- 	setting. diskin2 can also read+-- 	multichannel files with any number of channels in the range 1+-- 	to 24 in versions before 5.14, and 40 after.  .+-- 	diskin2 allows more control and higher+-- 	sound quality than diskin, but there is+-- 	also the disadvantage of higher CPU usage.+--+-- > a1[, a2[, ... aN]]  diskin2  ifilcod, kpitch[, iskiptim \+-- >           [, iwrap[, iformat [, iwsize[, ibufsize[, iskipinit]]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/diskin2.html>+diskin2 :: Tuple a => Str -> Sig -> a+diskin2 b1 b2 = pureTuple $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = mopcs "diskin2" ((repeat Ar),[Sr,Kr,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2]++-- | +-- Reads mono audio data from an external device or stream.+--+-- > ar1  in  +--+-- csound doc: <http://www.csounds.com/manual/html/in.html>+in' ::   Sig+in'  = Sig $ return $ f +    where f  = opcs "in" [(Ar,[])] []++-- | +-- Reads a 32-channel audio signal from an external device or stream.+--+-- > ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, ar13, ar14, \+-- >           ar15, ar16, ar17, ar18, ar19, ar20, ar21, ar22, ar23, ar24, ar25, ar26, \+-- >           ar27, ar28, ar29, ar30, ar31, ar32  in32  +--+-- csound doc: <http://www.csounds.com/manual/html/in32.html>+in32 :: Tuple a =>  a+in32  = pureTuple $ return $ f +    where f  = mopcs "in32" ([Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar+                             ,Ar]+                            ,[]) []++-- | +-- Reads from numbered channels in an external audio signal or stream.+--+-- > ain1[, ...]  inch  kchan1[,...]+--+-- csound doc: <http://www.csounds.com/manual/html/inch.html>+inch :: Tuple a => [Sig] -> a+inch b1 = pureTuple $ f <$> mapM unSig b1+    where f a1 = mopcs "inch" ((repeat Ar),(repeat Kr)) a1++-- | +-- Reads six-channel audio data from an external device or stream.+--+-- > ar1, ar2, ar3, ar4, ar5, ar6  inh  +--+-- csound doc: <http://www.csounds.com/manual/html/inh.html>+inh :: Tuple a =>  a+inh  = pureTuple $ return $ f +    where f  = mopcs "inh" ([Ar,Ar,Ar,Ar,Ar,Ar],[]) []++-- | +-- Reads eight-channel audio data from an external device or stream.+--+-- > ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8  ino  +--+-- csound doc: <http://www.csounds.com/manual/html/ino.html>+ino :: Tuple a =>  a+ino  = pureTuple $ return $ f +    where f  = mopcs "ino" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar],[]) []++-- | +-- Reads quad audio data from an external device or stream.+--+-- > ar1, ar2,  ar3, a4  inq  +--+-- csound doc: <http://www.csounds.com/manual/html/inq.html>+inq :: Tuple a =>  a+inq  = pureTuple $ return $ f +    where f  = mopcs "inq" ([Ar,Ar,Ar,Ar],[]) []++-- | +-- Allow input from a range of adjacent audio channels from the audio input device+--+-- inrg reads audio from a range of adjacent audio channels from the audio input device.+--+-- >  inrg  kstart, ain1 [,ain2, ain3, ..., ainN]+--+-- csound doc: <http://www.csounds.com/manual/html/inrg.html>+inrg ::  Sig -> [Sig] -> SE ()+inrg b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> mapM unSig b2+    where f a1 a2 = opcs "inrg" [(Xr,[Kr] ++ (repeat Ar))] ([a1] ++ a2)++-- | +-- Reads stereo audio data from an external device or stream.+--+-- > ar1, ar2  ins  +--+-- csound doc: <http://www.csounds.com/manual/html/ins.html>+ins :: Tuple a =>  a+ins  = pureTuple $ return $ f +    where f  = mopcs "ins" ([Ar,Ar],[]) []++-- | +-- Reads a k-rate signal from a user-defined channel.+--+-- Reads a k-rate signal or string from a user-defined channel.+--+-- > kvalue  invalue  "channel name"+-- > Sname  invalue  "channel name"+--+-- csound doc: <http://www.csounds.com/manual/html/invalue.html>+invalue ::  Str -> Str+invalue b1 = Str $ f <$> unStr b1+    where f a1 = opcs "invalue" [(Kr,[Sr]),(Sr,[Sr])] [a1]++-- | +-- Reads a 16-channel audio signal from an external device or stream.+--+-- > ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, \+-- >           ar13, ar14, ar15, ar16  inx  +--+-- csound doc: <http://www.csounds.com/manual/html/inx.html>+inx :: Tuple a =>  a+inx  = pureTuple $ return $ f +    where f  = mopcs "inx" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar],[]) []++-- | +-- Reads multi-channel audio samples into a ZAK array from an external device or stream.+--+-- >  inz  ksig1+--+-- csound doc: <http://www.csounds.com/manual/html/inz.html>+inz ::  Sig -> SE ()+inz b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "inz" [(Xr,[Kr])] [a1]++-- | +-- Reads stereo audio data from an external MP3 file.+--+-- > ar1, ar2  mp3in  ifilcod[, iskptim, iformat, iskipinit, ibufsize]+--+-- csound doc: <http://www.csounds.com/manual/html/mp3in.html>+mp3in :: Tuple a => Str -> a+mp3in b1 = pureTuple $ f <$> unStr b1+    where f a1 = mopcs "mp3in" ([Ar,Ar],[Sr,Ir,Ir,Ir,Ir]) [a1]++-- | +-- Reads audio data from an external device or stream.+--+-- Reads audio data from an external device or stream.  Up to 24+--       channels may be read before v5.14, extended to 40 in later versions.+--+-- > ar1[, ar2[, ar3[, ... a24]]]  soundin  ifilcod [, iskptim] [, iformat] \+-- >           [, iskipinit] [, ibufsize]+--+-- csound doc: <http://www.csounds.com/manual/html/soundin.html>+soundin :: Tuple a => Str -> a+soundin b1 = pureTuple $ f <$> unStr b1+    where f a1 = mopcs "soundin" ((repeat Ar),[Sr,Ir,Ir,Ir,Ir]) [a1]++-- Signal Output.++-- | +-- A MIDI delay opcode.+--+-- >  mdelay  kstatus, kchan, kd1, kd2, kdelay+--+-- csound doc: <http://www.csounds.com/manual/html/mdelay.html>+mdelay ::  Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+mdelay b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "mdelay" [(Xr,[Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Returns the audio spout frame.+--+-- Returns the audio spout frame (if active), otherwise it returns zero.+--+-- > aout1 [,aout2 ... aoutX]  monitor  +--+-- csound doc: <http://www.csounds.com/manual/html/monitor.html>+monitor :: Tuple a =>  a+monitor  = pureTuple $ return $ f +    where f  = mopcs "monitor" ((repeat Ar),[]) []++-- | +-- Writes mono audio data to an external device or stream.+--+-- >  out  asig+--+-- csound doc: <http://www.csounds.com/manual/html/out.html>+out ::  Sig -> SE ()+out b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "out" [(Xr,[Ar])] [a1]++-- | +-- Writes 32-channel audio data to an external device or stream.+--+-- >  out32  asig1, asig2, asig3, asig4, asig5, asig6, asig7, asig8, asig10, \+-- >           asig11, asig12, asig13, asig14, asig15, asig16, asig17, asig18, \+-- >           asig19, asig20, asig21, asig22, asig23, asig24, asig25, asig26, \+-- >           asig27, asig28, asig29, asig30, asig31, asig32+--+-- csound doc: <http://www.csounds.com/manual/html/out32.html>+out32 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+out32 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 b17 b18 b19 b20 b21 b22 b23 b24 b25 b26 b27 b28 b29 b30 b31 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9 <*> unSig b10 <*> unSig b11 <*> unSig b12 <*> unSig b13 <*> unSig b14 <*> unSig b15 <*> unSig b16 <*> unSig b17 <*> unSig b18 <*> unSig b19 <*> unSig b20 <*> unSig b21 <*> unSig b22 <*> unSig b23 <*> unSig b24 <*> unSig b25 <*> unSig b26 <*> unSig b27 <*> unSig b28 <*> unSig b29 <*> unSig b30 <*> unSig b31+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 = opcs "out32" [(Xr+                                                                                                                                               ,[Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar+                                                                                                                                                ,Ar])] [a1+                                                                                                                                                       ,a2+                                                                                                                                                       ,a3+                                                                                                                                                       ,a4+                                                                                                                                                       ,a5+                                                                                                                                                       ,a6+                                                                                                                                                       ,a7+                                                                                                                                                       ,a8+                                                                                                                                                       ,a9+                                                                                                                                                       ,a10+                                                                                                                                                       ,a11+                                                                                                                                                       ,a12+                                                                                                                                                       ,a13+                                                                                                                                                       ,a14+                                                                                                                                                       ,a15+                                                                                                                                                       ,a16+                                                                                                                                                       ,a17+                                                                                                                                                       ,a18+                                                                                                                                                       ,a19+                                                                                                                                                       ,a20+                                                                                                                                                       ,a21+                                                                                                                                                       ,a22+                                                                                                                                                       ,a23+                                                                                                                                                       ,a24+                                                                                                                                                       ,a25+                                                                                                                                                       ,a26+                                                                                                                                                       ,a27+                                                                                                                                                       ,a28+                                                                                                                                                       ,a29+                                                                                                                                                       ,a30+                                                                                                                                                       ,a31]++-- | +-- Writes audio data with an arbitrary number of channels to an external device or stream.+--+-- >  outc  asig1 [, asig2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/outc.html>+outc ::  [Sig] -> SE ()+outc b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unSig b1+    where f a1 = opcs "outc" [(Xr,(repeat Ar))] a1++-- | +-- Writes multi-channel audio data, with user-controllable channels, to an external device or stream.+--+-- >  outch  kchan1, asig1 [, kchan2] [, asig2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/outch.html>+outch ::  Sig -> [Sig] -> SE ()+outch b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> mapM unSig b2+    where f a1 a2 = opcs "outch" [(Xr,[Kr,Ar,Kr] ++ (repeat Ar))] ([a1] ++ a2)++-- | +-- Writes 6-channel audio data to an external device or stream.+--+-- >  outh  asig1, asig2, asig3, asig4, asig5, asig6+--+-- csound doc: <http://www.csounds.com/manual/html/outh.html>+outh ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+outh b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "outh" [(Xr,[Ar,Ar,Ar,Ar,Ar,Ar])] [a1,a2,a3,a4,a5,a6]++-- | +-- Writes 8-channel audio data to an external device or stream.+--+-- >  outo  asig1, asig2, asig3, asig4, asig5, asig6, asig7, asig8+--+-- csound doc: <http://www.csounds.com/manual/html/outo.html>+outo ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+outo b1 b2 b3 b4 b5 b6 b7 b8 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "outo" [(Xr,[Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar])] [a1+                                                                                   ,a2+                                                                                   ,a3+                                                                                   ,a4+                                                                                   ,a5+                                                                                   ,a6+                                                                                   ,a7+                                                                                   ,a8]++-- | +-- Writes 4-channel audio data to an external device or stream.+--+-- >  outq  asig1, asig2, asig3, asig4+--+-- csound doc: <http://www.csounds.com/manual/html/outq.html>+outq ::  Sig -> Sig -> Sig -> Sig -> SE ()+outq b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "outq" [(Xr,[Ar,Ar,Ar,Ar])] [a1,a2,a3,a4]++-- | +-- Writes samples to quad channel 1 of an external device or stream.+--+-- >  outq1  asig+--+-- csound doc: <http://www.csounds.com/manual/html/outq1.html>+outq1 ::  Sig -> SE ()+outq1 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outq1" [(Xr,[Ar])] [a1]++-- | +-- Writes samples to quad channel 2 of an external device or stream.+--+-- >  outq2  asig+--+-- csound doc: <http://www.csounds.com/manual/html/outq2.html>+outq2 ::  Sig -> SE ()+outq2 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outq2" [(Xr,[Ar])] [a1]++-- | +-- Writes samples to quad channel 3 of an external device or stream.+--+-- >  outq3  asig+--+-- csound doc: <http://www.csounds.com/manual/html/outq3.html>+outq3 ::  Sig -> SE ()+outq3 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outq3" [(Xr,[Ar])] [a1]++-- | +-- Writes samples to quad channel 4 of an external device or stream.+--+-- >  outq4  asig+--+-- csound doc: <http://www.csounds.com/manual/html/outq4.html>+outq4 ::  Sig -> SE ()+outq4 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outq4" [(Xr,[Ar])] [a1]++-- | +-- Allow output to a range of adjacent audio channels on the audio output device+--+-- outrg outputs audio to a range of adjacent audio channels on the audio output device.+--+-- >  outrg  kstart, aout1 [,aout2, aout3, ..., aoutN]+--+-- csound doc: <http://www.csounds.com/manual/html/outrg.html>+outrg ::  Sig -> [Sig] -> SE ()+outrg b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> mapM unSig b2+    where f a1 a2 = opcs "outrg" [(Xr,[Kr] ++ (repeat Ar))] ([a1] ++ a2)++-- | +-- Writes stereo audio data to an external device or stream.+--+-- >  outs  asig1, asig2+--+-- csound doc: <http://www.csounds.com/manual/html/outs.html>+outs ::  Sig -> Sig -> SE ()+outs b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "outs" [(Xr,[Ar,Ar])] [a1,a2]++-- | +-- Writes samples to stereo channel 1 of an external device or stream.+--+-- >  outs1  asig+--+-- csound doc: <http://www.csounds.com/manual/html/outs1.html>+outs1 ::  Sig -> SE ()+outs1 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outs1" [(Xr,[Ar])] [a1]++-- | +-- Writes samples to stereo channel 2 of an external device or stream.+--+-- >  outs2  asig+--+-- csound doc: <http://www.csounds.com/manual/html/outs2.html>+outs2 ::  Sig -> SE ()+outs2 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outs2" [(Xr,[Ar])] [a1]++-- | +-- Sends a k-rate signal or string to a user-defined channel.+--+-- >  outvalue  "channel name", kvalue+-- >  outvalue  "channel name", "string"+--+-- csound doc: <http://www.csounds.com/manual/html/outvalue.html>+outvalue ::  Str -> Sig -> SE ()+outvalue b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "outvalue" [(Xr,[Sr,Kr])] [a1,a2]++-- | +-- Writes 16-channel audio data to an external device or stream.+--+-- >  outx  asig1, asig2, asig3, asig4, asig5, asig6, asig7, asig8, \+-- >           asig9, asig10, asig11, asig12, asig13, asig14, asig15, asig16+--+-- csound doc: <http://www.csounds.com/manual/html/outx.html>+outx ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> SE ()+outx b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9 <*> unSig b10 <*> unSig b11 <*> unSig b12 <*> unSig b13 <*> unSig b14 <*> unSig b15 <*> unSig b16+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 = opcs "outx" [(Xr+                                                                                  ,[Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar])] [a1+                                                                                                                                       ,a2+                                                                                                                                       ,a3+                                                                                                                                       ,a4+                                                                                                                                       ,a5+                                                                                                                                       ,a6+                                                                                                                                       ,a7+                                                                                                                                       ,a8+                                                                                                                                       ,a9+                                                                                                                                       ,a10+                                                                                                                                       ,a11+                                                                                                                                       ,a12+                                                                                                                                       ,a13+                                                                                                                                       ,a14+                                                                                                                                       ,a15+                                                                                                                                       ,a16]++-- | +-- Writes multi-channel audio data from a ZAK array to an external device or stream.+--+-- >  outz  ksig1+--+-- csound doc: <http://www.csounds.com/manual/html/outz.html>+outz ::  Sig -> SE ()+outz b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "outz" [(Xr,[Kr])] [a1]++-- | +-- Deprecated. Writes audio output to a disk file.+--+-- The usage of soundout is discouraged. Please use  fout instead.+--+-- >  soundout   asig1, ifilcod [, iformat]+--+-- csound doc: <http://www.csounds.com/manual/html/soundout.html>+soundout ::  Sig -> Str -> SE ()+soundout b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = opcs "soundout" [(Xr,[Ar,Sr,Ir])] [a1,a2]++-- | +-- Deprecated. Writes audio output to a disk file.+--+-- The usage of soundouts is discouraged. Please use  fout instead.+--+-- >  soundouts   asigl, asigr, ifilcod [, iformat]+--+-- csound doc: <http://www.csounds.com/manual/html/soundouts.html>+soundouts ::  Sig -> Sig -> Str -> SE ()+soundouts b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unStr b3+    where f a1 a2 a3 = opcs "soundouts" [(Xr,[Ar,Ar,Sr,Ir])] [a1,a2,a3]++-- Software Bus.++-- | +-- Reads data from the software bus+--+-- Reads data from a channel of the inward software bus.+--+-- > kval  chani  kchan+-- > aval  chani  kchan+--+-- csound doc: <http://www.csounds.com/manual/html/chani.html>+chani ::  Sig -> SE Sig+chani b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "chani" [(Kr,[Kr]),(Ar,[Kr])] [a1]++-- | +-- Send data to the outwards software bus+--+-- Send data to a channel of the outward software bus.+--+-- >  chano  kval, kchan+-- >  chano  aval, kchan+--+-- csound doc: <http://www.csounds.com/manual/html/chano.html>+chano ::  Sig -> Sig -> SE ()+chano b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "chano" [(Xr,[Kr,Kr])] [a1,a2]++-- | +-- Declare a channel of the named software bus.+--+-- Declare a channel of the named software bus, with setting optional+--       parameters in the case of a control channel. If the channel does not+--       exist yet, it is created, with an inital value of zero or empty string.+--       Otherwise, the type (control, audio, or string) of the existing channel+--       must match the declaration, or an init error occurs. The input/output+--       mode of an existing channel is updated so that it becomes the bitwise+--       OR of the previous and the newly specified value.+--+-- >   chn_k  Sname, imode[, itype, idflt, imin, ima, ix, iy, iwidth, iheight, Sattributes]+--+-- csound doc: <http://www.csounds.com/manual/html/chn.html>+chn_k ::  Str -> D -> SE ()+chn_k b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "chn_k" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Sr])] [a1,a2]++-- | +-- Declare a channel of the named software bus.+--+-- Declare a channel of the named software bus, with setting optional+--       parameters in the case of a control channel. If the channel does not+--       exist yet, it is created, with an inital value of zero or empty string.+--       Otherwise, the type (control, audio, or string) of the existing channel+--       must match the declaration, or an init error occurs. The input/output+--       mode of an existing channel is updated so that it becomes the bitwise+--       OR of the previous and the newly specified value.+--+-- >   chn_a  Sname, imode+--+-- csound doc: <http://www.csounds.com/manual/html/chn.html>+chn_a ::  Str -> D -> SE ()+chn_a b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "chn_a" [(Xr,[Sr,Ir])] [a1,a2]++-- | +-- Declare a channel of the named software bus.+--+-- Declare a channel of the named software bus, with setting optional+--       parameters in the case of a control channel. If the channel does not+--       exist yet, it is created, with an inital value of zero or empty string.+--       Otherwise, the type (control, audio, or string) of the existing channel+--       must match the declaration, or an init error occurs. The input/output+--       mode of an existing channel is updated so that it becomes the bitwise+--       OR of the previous and the newly specified value.+--+-- >   chn_S  Sname, imode+--+-- csound doc: <http://www.csounds.com/manual/html/chn.html>+chn_S ::  Str -> D -> SE ()+chn_S b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "chn_S" [(Xr,[Sr,Ir])] [a1,a2]++-- | +-- Clears an audio output channel of the named software bus.+--+-- Clears an audio channel of the named software bus to zero.+--       Implies declaring the channel with imode=2 (see also+--       chn_a).+--+-- >  chnclear  Sname+--+-- csound doc: <http://www.csounds.com/manual/html/chnclear.html>+chnclear ::  Str -> SE ()+chnclear b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "chnclear" [(Xr,[Sr])] [a1]++-- | +-- Export a global variable as a channel of the bus.+--+-- Export a global variable as a channel of the bus; the channel+--       should not already exist, otherwise an init error occurs.+--       This opcode is normally called from the orchestra header, and allows+--       the host application to read or write orchestra variables directly,+--       without having to use+--       chnget or+--       chnset to copy data.+--+-- > gival  chnexport  Sname, imode[, itype, idflt, imin, imax]+-- > gkval  chnexport  Sname, imode[, itype, idflt, imin, imax]+-- > gaval  chnexport  Sname, imode+-- > gSval  chnexport  Sname, imode+--+-- csound doc: <http://www.csounds.com/manual/html/chnexport.html>+chnexport ::  Str -> D -> Str+chnexport b1 b2 = Str $ f <$> unStr b1 <*> unD b2+    where f a1 a2 = opcs "chnexport" [(Ir,[Sr,Ir,Ir,Ir,Ir,Ir])+                                     ,(Kr,[Sr,Ir,Ir,Ir,Ir,Ir])+                                     ,(Ar,[Sr,Ir])+                                     ,(Sr,[Sr,Ir])] [a1,a2]++-- | +-- Reads data from the software bus.+--+-- Reads data from a channel of the inward named software bus.+--       Implies declaring the channel with imode=1 (see also+--       chn_k, chn_a, and chn_S).+--+-- > ival  chnget  Sname+-- > kval  chnget  Sname+-- > aval  chnget  Sname+-- > Sval  chnget  Sname+--+-- csound doc: <http://www.csounds.com/manual/html/chnget.html>+chnget ::  Str -> SE Str+chnget b1 = fmap ( Str . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "chnget" [(Ir,[Sr]),(Kr,[Sr]),(Ar,[Sr]),(Sr,[Sr])] [a1]++-- | +-- Writes audio data to the named software bus, mixing to the previous+--       output.+--+-- Adds an audio signal to a channel of the named software bus.+--       Implies declaring the channel with imode=2 (see also+--       chn_a).+--+-- >  chnmix  aval, Sname+--+-- csound doc: <http://www.csounds.com/manual/html/chnmix.html>+chnmix ::  Sig -> Str -> SE ()+chnmix b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = opcs "chnmix" [(Xr,[Ar,Sr])] [a1,a2]++-- | +-- Query parameters of a channel.+--+-- Query parameters of a channel (if it does not exist, all+--       returned values are zero).+--+-- > itype, imode, ictltype, idflt, imin, imax  chnparams  +--+-- csound doc: <http://www.csounds.com/manual/html/chnparams.html>+chnparams :: Tuple a =>  a+chnparams  = pureTuple $ return $ f +    where f  = mopcs "chnparams" ([Ir,Ir,Ir,Ir,Ir,Ir],[]) []++-- | +-- Recieves data from the software bus.+--+-- Receives data from a channel of the inward named software bus.+--       Implies declaring the channel with imode=1 (see also chn_k, chn_a,+--       and chn_S).+--       Note that +--       chnsend/chnrecv (which in Csound6 work identically to invalue/outvalue) +--       are usually used for the callback-based communication between Csound and +--       an external host. Use the chnset/chnget opcodes for sending and receiving +--       data inside Csound.+--+-- > ival  chnrecv  Sname+-- > kval  chnrecv  Sname+-- > aval  chnrecv  Sname+-- > Sval  chnrecv  Sname+--+-- csound doc: <http://www.csounds.com/manual/html/chnrecv.html>+chnrecv ::  Str -> SE Str+chnrecv b1 = fmap ( Str . return) $ SE $ (depT =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "chnrecv" [(Ir,[Sr]),(Kr,[Sr]),(Ar,[Sr]),(Sr,[Sr])] [a1]++-- | +-- Sends data via the named software bus.+--+-- Send to a channel of the named software bus. Implies declaring the+--       channel with imode=2 (see also chn_k, chn_a, and chn_S). Note that +--       chnsend/chnrecv (which in Csound6 work identically to invalue/outvalue) +--       are usually used for the callback-based communication between Csound and +--       an external host. Use the chnset/chnget opcodes for sending and receiving +--       data inside Csound.+--+-- >  chnsend  ival, Sname+-- >  chnsend  kval, Sname+-- >  chnsend  aval, Sname+-- >  chnsend  Sval, Sname+--+-- csound doc: <http://www.csounds.com/manual/html/chnsend.html>+chnsend ::  D -> Str -> SE ()+chnsend b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unStr b2+    where f a1 a2 = opcs "chnsend" [(Xr,[Ir,Sr])] [a1,a2]++-- | +-- Writes data to the named software bus.+--+-- Write to a channel of the named software bus. Implies declaring the+--       channel with imod=2 (see also+--       chn_k, chn_a, and chn_S).+--+-- >  chnset  ival, Sname+-- >  chnset  kval, Sname+-- >  chnset  aval, Sname+-- >  chnset  Sval, Sname+--+-- csound doc: <http://www.csounds.com/manual/html/chnset.html>+chnset ::  D -> Str -> SE ()+chnset b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unStr b2+    where f a1 a2 = opcs "chnset" [(Xr,[Ir,Sr])] [a1,a2]++-- | +-- Sets the local ksmps value in an instrument or user-defined opcode block+--+-- Sets the local ksmps value in an instrument or user-defined opcode block.+--+-- >  setksmps  iksmps+--+-- csound doc: <http://www.csounds.com/manual/html/setksmps.html>+setksmps ::  D -> SE ()+setksmps b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "setksmps" [(Xr,[Ir])] [a1]++-- | +-- Passes variables to a user-defined opcode block,+--+-- The xin and xout opcodes copy variables to and from the opcode definition, allowing communication with the calling instrument.+--+-- > xinarg1 [, xinarg2] ... [xinargN]  xin  +--+-- csound doc: <http://www.csounds.com/manual/html/xin.html>+xin :: Tuple a =>  a+xin  = pureTuple $ return $ f +    where f  = mopcs "xin" ((repeat Xr),[]) []++-- | +-- Retrieves variables from a user-defined opcode block,+--+-- The xin and xout opcodes copy variables to and from the opcode definition, allowing communication with the calling instrument.+--+-- >  xout  xoutarg1 [, xoutarg2] ... [, xoutargN]+--+-- csound doc: <http://www.csounds.com/manual/html/xout.html>+xout ::  [Sig] -> SE ()+xout b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unSig b1+    where f a1 = opcs "xout" [(Xr,(repeat Xr))] a1++-- Printing and Display.++-- | +-- Displays the Fourier Transform of an audio or control signal.+--+-- These units will print orchestra init-values, or produce graphic display of orchestra control signals and audio signals. Uses X11 windows if enabled, else (or if -g flag is set) displays are approximated in ASCII characters.+--+-- >  dispfft  xsig, iprd, iwsiz [, iwtyp] [, idbout] [, iwtflg]+--+-- csound doc: <http://www.csounds.com/manual/html/dispfft.html>+dispfft ::  Sig -> D -> D -> SE ()+dispfft b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "dispfft" [(Xr,[Xr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Displays the audio or control signals as an amplitude vs. time graph.+--+-- These units will print orchestra init-values, or produce graphic display of orchestra control signals and audio signals. Uses X11 windows if enabled, else (or if -g flag is set) displays are approximated in ASCII characters.+--+-- >  display  xsig, iprd [, inprds] [, iwtflg]+--+-- csound doc: <http://www.csounds.com/manual/html/display.html>+display ::  Sig -> D -> SE ()+display b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "display" [(Xr,[Xr,Ir,Ir,Ir])] [a1,a2]++-- | +-- Allows text to be displayed from instruments like sliders+--+-- Allows text to be displayed from instruments like sliders etc. (only on Unix and Windows at present)+--+-- >  flashtxt   iwhich, String+--+-- csound doc: <http://www.csounds.com/manual/html/flashtxt.html>+flashtxt ::  D -> Str -> SE ()+flashtxt b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unStr b2+    where f a1 a2 = opcs "flashtxt" [(Xr,[Ir,Sr])] [a1,a2]++-- | +-- Displays the values init (i-rate) variables.+--+-- These units will print orchestra init-values.+--+-- >  print  iarg [, iarg1] [, iarg2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/print.html>+print' ::  [D] -> SE ()+print' b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unD b1+    where f a1 = opcs "print" [(Xr,(repeat Ir))] a1++-- | +-- printf-style formatted output+--+-- printf and printf_i write+--     formatted output, similarly to the C function+--     printf(). printf_i runs at i-time only, while+--     printf runs both at initialization and+--     performance time.+--+-- >  printf_i  Sfmt, itrig, [iarg1[, iarg2[, ... ]]]+--+-- csound doc: <http://www.csounds.com/manual/html/printf.html>+printf_i ::  Str -> D -> [D] -> SE ()+printf_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> mapM unD b3+    where f a1 a2 a3 = opcs "printf_i" [(Xr,[Sr] ++ (repeat Ir))] ([a1,a2] ++ a3)++-- | +-- printf-style formatted output+--+-- printf and printf_i write+--     formatted output, similarly to the C function+--     printf(). printf_i runs at i-time only, while+--     printf runs both at initialization and+--     performance time.+--+-- >  printf  Sfmt, ktrig, [xarg1[, xarg2[, ... ]]]+--+-- csound doc: <http://www.csounds.com/manual/html/printf.html>+printf ::  Str -> Sig -> [Sig] -> SE ()+printf b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "printf" [(Xr,[Sr,Kr] ++ (repeat Xr))] ([a1,a2] ++ a3)++-- | +-- Prints one k-rate value at specified intervals.+--+-- >  printk  itime, kval [, ispace]+--+-- csound doc: <http://www.csounds.com/manual/html/printk.html>+printk ::  D -> Sig -> SE ()+printk b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unSig b2+    where f a1 a2 = opcs "printk" [(Xr,[Ir,Kr,Ir])] [a1,a2]++-- | +-- Prints a new value every time a control variable changes.+--+-- >  printk2  kvar [, inumspaces]+--+-- csound doc: <http://www.csounds.com/manual/html/printk2.html>+printk2 ::  Sig -> SE ()+printk2 b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "printk2" [(Xr,[Kr,Ir])] [a1]++-- | +-- Prints at k-rate using a printf() style syntax.+--+-- >  printks  "string", itime [, kval1] [, kval2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/printks.html>+printks ::  Str -> D -> [Sig] -> SE ()+printks b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unD b2 <*> mapM unSig b3+    where f a1 a2 a3 = opcs "printks" [(Xr,[Sr,Ir] ++ (repeat Kr))] ([a1,a2] ++ a3)++-- | +-- Prints at init-time using a printf() style syntax.+--+-- >  prints  "string" [, kval1] [, kval2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/prints.html>+prints ::  Str -> [Sig] -> SE ()+prints b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> mapM unSig b2+    where f a1 a2 = opcs "prints" [(Xr,[Sr] ++ (repeat Kr))] ([a1] ++ a2)++-- Soundfile Queries.++-- | +-- Returns the number of bits in each sample in a sound file.+--+-- > ir  filebit  ifilcod [, iallowraw]+--+-- csound doc: <http://www.csounds.com/manual/html/filebit.html>+filebit ::  Str -> D+filebit b1 = D $ f <$> unStr b1+    where f a1 = opcs "filebit" [(Ir,[Sr,Ir])] [a1]++-- | +-- Returns the length of a sound file.+--+-- > ir  filelen  ifilcod, [iallowraw]+--+-- csound doc: <http://www.csounds.com/manual/html/filelen.html>+filelen ::  Str -> D+filelen b1 = D $ f <$> unStr b1+    where f a1 = opcs "filelen" [(Ir,[Sr,Ir])] [a1]++-- | +-- Returns the number of channels in a sound file.+--+-- > ir  filenchnls  ifilcod [, iallowraw]+--+-- csound doc: <http://www.csounds.com/manual/html/filenchnls.html>+filenchnls ::  Str -> D+filenchnls b1 = D $ f <$> unStr b1+    where f a1 = opcs "filenchnls" [(Ir,[Sr,Ir])] [a1]++-- | +-- Returns the peak absolute value of a sound file.+--+-- > ir  filepeak  ifilcod [, ichnl]+--+-- csound doc: <http://www.csounds.com/manual/html/filepeak.html>+filepeak ::  Str -> D+filepeak b1 = D $ f <$> unStr b1+    where f a1 = opcs "filepeak" [(Ir,[Sr,Ir])] [a1]++-- | +-- Returns the sample rate of a sound file.+--+-- > ir  filesr  ifilcod [, iallowraw]+--+-- csound doc: <http://www.csounds.com/manual/html/filesr.html>+filesr ::  Str -> D+filesr b1 = D $ f <$> unStr b1+    where f a1 = opcs "filesr" [(Ir,[Sr,Ir])] [a1]++-- | +-- Checks that a file can be used.+--+-- Returns 1 if the sound file is valid, or 0 if not.+--+-- > ir  filevalid  ifilcod+--+-- csound doc: <http://www.csounds.com/manual/html/filevalid.html>+filevalid ::  Str -> D+filevalid b1 = D $ f <$> unStr b1+    where f a1 = opcs "filevalid" [(Ir,[Sr])] [a1]++-- | +-- Returns the length of an MP3 sound file.+--+-- > ir  mp3len  ifilcod+--+-- csound doc: <http://www.csounds.com/manual/html/mp3len.html>+mp3len ::  Str -> D+mp3len b1 = D $ f <$> unStr b1+    where f a1 = opcs "mp3len" [(Ir,[Sr])] [a1]
+ src/Csound/Typed/Opcode/SignalModifiers.hs view
@@ -0,0 +1,2283 @@+module Csound.Typed.Opcode.SignalModifiers (+    +    +    -- * Amplitude Modifiers.+    balance, clip, compress, dam, gain,+    +    -- * Convolution and Morphing.+    convolve, cross2, dconv, ftconv, ftmorf, pconvolve,+    +    -- * Delay.+    delay, delay1, delayk, vdel_k, delayr, delayw, deltap, deltap3, deltapi, deltapn, deltapx, deltapxw, multitap, vdelay, vdelay3, vdelayx, vdelayxq, vdelayxs, vdelayxw, vdelayxwq, vdelayxws,+    +    -- * Panning and Spatialization.+    bformdec, bformdec1, bformenc, bformenc1, hrtfearly, hrtfmove, hrtfmove2, hrtfreverb, hrtfstat, locsend, locsig, pan, pan2, space, spat3d, spat3di, spat3dt, spdist, spsend, vbap, vbap16, vbap16move, vbap4, vbap4move, vbap8, vbap8move, vbapg, vbaplsinit, vbapmove, vbapz, vbapzmove,+    +    -- * Reverberation.+    alpass, babo, comb, combinv, freeverb, nestedap, nreverb, platerev, reverb, reverb2, reverbsc, valpass, vcomb,+    +    -- * Sample Level Operators.+    denorm, diff, downsamp, fold, integ, interp, ntrpol, samphold, upsamp, vaget, vaset,+    +    -- * Signal Limiters.+    limit, mirror, wrap,+    +    -- * Special Effects.+    distort, distort1, flanger, harmon, harmon2, harmon3, harmon4, phaser1, phaser2,+    +    -- * Standard Filters.+    atone, atonex, biquad, biquada, butbp, butbr, buthp, butlp, butterbp, butterbr, butterhp, butterlp, clfilt, doppler, mode, tone, tonex,+    +    -- * Standard Filters:Resonant.+    areson, bqrez, lowpass2, lowres, lowresx, lpf18, moogladder, moogvcf, moogvcf2, reson, resonr, resonx, resony, resonz, rezzy, statevar, svfilter, tbvcf, vlowres,+    +    -- * Standard Filters:Control.+    aresonk, atonek, lineto, port, portk, resonk, resonxk, tlineto, tonek,+    +    -- * Specialized Filters.+    dcblock, dcblock2, eqfil, filter2, fofilter, hilbert, nlfilt, nlfilt2, pareq, rbjeq, zfilter2,+    +    -- * Waveguides.+    wguide1, wguide2,+    +    -- * Waveshaping.+    chebyshevpoly, pdclip, pdhalf, pdhalfy, powershape,+    +    -- * Comparators and Accumulators.+    max', max_k, maxabs, maxabsaccum, maxaccum, min', minabs, minabsaccum, minaccum) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Amplitude Modifiers.++-- | +-- Adjust one audio signal according to the values of another.+--+-- The rms power of asig can be interrogated, set, or adjusted to match that of a comparator signal.+--+-- > ares  balance  asig, acomp [, ihp] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/balance.html>+balance ::  Sig -> Sig -> Sig+balance b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "balance" [(Ar,[Ar,Ar,Ir,Ir])] [a1,a2]++-- | +-- Clips a signal to a predefined limit.+--+-- Clips an a-rate signal to a predefined limit, in a “soft” manner, using one of three methods.+--+-- > ares  clip  asig, imeth, ilimit [, iarg]+--+-- csound doc: <http://www.csounds.com/manual/html/clip.html>+clip ::  Sig -> D -> D -> Sig+clip b1 b2 b3 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "clip" [(Ar,[Ar,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Compress, limit, expand, duck or gate an audio signal.+--+-- This unit functions as an audio+--     compressor, limiter, expander, or noise gate, using either+--     soft-knee or hard-knee mapping, and with dynamically variable+--     performance characteristics.  It takes two audio input signals,+--     aasig and acsig, the first of which is modified by a running+--     analysis of the second. Both signals can be the same, or the first+--     can be modified by a different controlling signal.+--+-- > ar  compress  aasig, acsig, kthresh, kloknee, khiknee, kratio, katt, krel, ilook+--+-- csound doc: <http://www.csounds.com/manual/html/compress.html>+compress ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Sig+compress b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "compress" [(Ar,[Ar,Ar,Kr,Kr,Kr,Kr,Kr,Kr,Ir])] [a1+                                                                                             ,a2+                                                                                             ,a3+                                                                                             ,a4+                                                                                             ,a5+                                                                                             ,a6+                                                                                             ,a7+                                                                                             ,a8+                                                                                             ,a9]++-- | +-- A dynamic compressor/expander.+--+-- This opcode dynamically modifies a gain value applied to the input sound ain by comparing its power level to a given threshold level. The signal will be compressed/expanded with different factors regarding that it is over or under the threshold.+--+-- > ares  dam  asig, kthreshold, icomp1, icomp2, irtime, iftime+--+-- csound doc: <http://www.csounds.com/manual/html/dam.html>+dam ::  Sig -> Sig -> D -> D -> D -> D -> Sig+dam b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "dam" [(Ar,[Ar,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Adjusts the amplitude audio signal according to a root-mean-square value.+--+-- > ares  gain  asig, krms [, ihp] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/gain.html>+gain ::  Sig -> Sig -> Sig+gain b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "gain" [(Ar,[Ar,Kr,Ir,Ir])] [a1,a2]++-- Convolution and Morphing.++-- | +-- Convolves a signal and an impulse response.+--+-- Output is the convolution of signal ain and the impulse response contained in ifilcod. If more than one output signal is supplied, each will be convolved with the same impulse response. Note that it is considerably more efficient to use one instance of the operator when processing a mono input to create stereo, or quad, outputs.+--+-- > ar1 [, ar2] [, ar3] [, ar4]  convolve  ain, ifilcod [, ichannel]+--+-- csound doc: <http://www.csounds.com/manual/html/convolve.html>+convolve :: Tuple a => Sig -> Str -> a+convolve b1 b2 = pureTuple $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = mopcs "convolve" ([Ar,Ar,Ar,Ar],[Ar,Sr,Ir]) [a1,a2]++-- | +-- Cross synthesis using FFT's.+--+-- This is an implementation of cross synthesis using FFT's.+--+-- > ares  cross2  ain1, ain2, isize, ioverlap, iwin, kbias+--+-- csound doc: <http://www.csounds.com/manual/html/cross2.html>+cross2 ::  Sig -> Sig -> D -> D -> D -> Sig -> Sig+cross2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "cross2" [(Ar,[Ar,Ar,Ir,Ir,Ir,Kr])] [a1,a2,a3,a4,a5,a6]++-- | +-- A direct convolution opcode.+--+-- > ares  dconv  asig, isize, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/dconv.html>+dconv ::  Sig -> D -> Tab -> Sig+dconv b1 b2 b3 = Sig $ f <$> unSig b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "dconv" [(Ar,[Ar,Ir,Ir])] [a1,a2,a3]++-- | +-- Low latency multichannel convolution, using a function table as impulse+-- 	response source.+--+-- Low latency multichannel convolution, using a function table as impulse+-- 	response source. The algorithm is to split the impulse response to+-- 	partitions of length determined by the iplen parameter, and delay and+-- 	mix partitions so that the original, full length impulse response is+-- 	reconstructed without gaps. The output delay (latency) is iplen samples,+-- 	and does not depend on the control rate, unlike in the case of other+-- 	convolve opcodes.+--+-- > a1[, a2[, a3[, ... a8]]]  ftconv  ain, ift, iplen[, iskipsamples \+-- >           [, iirlen[, iskipinit]]]+--+-- csound doc: <http://www.csounds.com/manual/html/ftconv.html>+ftconv :: Tuple a => Sig -> D -> D -> a+ftconv b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = mopcs "ftconv" ((repeat Ar),[Ar,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3]++-- | +-- Morphs between multiple ftables as specified in a list.+--+-- Uses an index into a table of ftable numbers to morph between adjacent tables in the list.This morphed function is written into the table referenced by iresfn on every k-cycle.+--+-- >  ftmorf  kftndx, iftfn, iresfn+--+-- csound doc: <http://www.csounds.com/manual/html/ftmorf.html>+ftmorf ::  Sig -> Tab -> Tab -> SE ()+ftmorf b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unTab b3+    where f a1 a2 a3 = opcs "ftmorf" [(Xr,[Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Convolution based on a uniformly partitioned overlap-save algorithm+--+-- Convolution based on a uniformly partitioned overlap-save algorithm. Compared to the convolve opcode, pconvolve has these benefits:+--+-- > ar1 [, ar2] [, ar3] [, ar4]  pconvolve  ain, ifilcod [, ipartitionsize, ichannel]+--+-- csound doc: <http://www.csounds.com/manual/html/pconvolve.html>+pconvolve :: Tuple a => Sig -> Str -> a+pconvolve b1 b2 = pureTuple $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = mopcs "pconvolve" ([Ar,Ar,Ar,Ar],[Ar,Sr,Ir,Ir]) [a1,a2]++-- Delay.++-- | +-- Delays an input signal by some time interval.+--+-- A signal can be read from or written into a delay path, or it can be automatically delayed by some time interval.+--+-- > ares  delay  asig, idlt [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/delay.html>+delay ::  Sig -> D -> Sig+delay b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "delay" [(Ar,[Ar,Ir,Ir])] [a1,a2]++-- | +-- Delays an input signal by one sample.+--+-- > ares  delay1  asig [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/delay1.html>+delay1 ::  Sig -> Sig+delay1 b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "delay1" [(Ar,[Ar,Ir])] [a1]++-- | +-- Delays an input signal by some time interval.+--+-- k-rate delay opcodes+--+-- > kr  delayk   ksig, idel[, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/delayk.html>+delayk ::  Sig -> D -> Sig+delayk b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "delayk" [(Kr,[Kr,Ir,Ir])] [a1,a2]++-- | +-- Delays an input signal by some time interval.+--+-- k-rate delay opcodes+--+-- > kr  vdel_k   ksig, kdel, imdel[, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/delayk.html>+vdel_k ::  Sig -> Sig -> D -> Sig+vdel_k b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "vdel_k" [(Kr,[Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Reads from an automatically established digital delay line.+--+-- > ares  delayr  idlt [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/delayr.html>+delayr ::  D -> SE Sig+delayr b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "delayr" [(Ar,[Ir,Ir])] [a1]++-- | +-- Writes the audio signal to a digital delay line.+--+-- >  delayw  asig+--+-- csound doc: <http://www.csounds.com/manual/html/delayw.html>+delayw ::  Sig -> SE ()+delayw b1 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "delayw" [(Xr,[Ar])] [a1]++-- | +-- Taps a delay line at variable offset times.+--+-- Tap a delay line at variable offset times.+--+-- > ares  deltap  kdlt+--+-- csound doc: <http://www.csounds.com/manual/html/deltap.html>+deltap ::  Sig -> SE Sig+deltap b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "deltap" [(Ar,[Kr])] [a1]++-- | +-- Taps a delay line at variable offset times, uses cubic interpolation.+--+-- > ares  deltap3  xdlt+--+-- csound doc: <http://www.csounds.com/manual/html/deltap3.html>+deltap3 ::  Sig -> SE Sig+deltap3 b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "deltap3" [(Ar,[Xr])] [a1]++-- | +-- Taps a delay line at variable offset times, uses interpolation.+--+-- > ares  deltapi  xdlt+--+-- csound doc: <http://www.csounds.com/manual/html/deltapi.html>+deltapi ::  Sig -> SE Sig+deltapi b1 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1+    where f a1 = opcs "deltapi" [(Ar,[Xr])] [a1]++-- | +-- Taps a delay line at variable offset times.+--+-- Tap a delay line at variable offset times.+--+-- > ares  deltapn  xnumsamps+--+-- csound doc: <http://www.csounds.com/manual/html/deltapn.html>+deltapn ::  Sig -> Sig+deltapn b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "deltapn" [(Ar,[Xr])] [a1]++-- | +-- Read from or write to a delay line with interpolation.+--+-- deltapx is similar to deltapi or deltap3. However, it allows higher quality interpolation. This opcode can read from and write to a delayr/delayw delay line with interpolation.+--+-- > aout  deltapx  adel, iwsize+--+-- csound doc: <http://www.csounds.com/manual/html/deltapx.html>+deltapx ::  Sig -> D -> SE Sig+deltapx b1 b2 = fmap ( Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "deltapx" [(Ar,[Ar,Ir])] [a1,a2]++-- | +-- Mixes the input signal to a delay line.+--+-- deltapxw mixes the input signal to a delay line. This opcode can be mixed with reading units (deltap, deltapn, deltapi, deltap3, and deltapx) in any order; the actual delay time is the difference of the read and write time. This opcode can read from and write to a delayr/delayw delay line with interpolation.+--+-- >  deltapxw  ain, adel, iwsize+--+-- csound doc: <http://www.csounds.com/manual/html/deltapxw.html>+deltapxw ::  Sig -> Sig -> D -> SE ()+deltapxw b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "deltapxw" [(Xr,[Ar,Ar,Ir])] [a1,a2,a3]++-- | +-- Multitap delay line implementation.+--+-- > ares  multitap  asig [, itime1, igain1] [, itime2, igain2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/multitap.html>+multitap ::  Sig -> [D] -> Sig+multitap b1 b2 = Sig $ f <$> unSig b1 <*> mapM unD b2+    where f a1 a2 = opcs "multitap" [(Ar,[Ar] ++ (repeat Ir))] ([a1] ++ a2)++-- | +-- An interpolating variable time delay.+--+-- This is an interpolating variable time delay, it is not very different from the existing implementation (deltapi), it is only easier to use.+--+-- > ares  vdelay  asig, adel, imaxdel [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelay.html>+vdelay ::  Sig -> Sig -> D -> Sig+vdelay b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "vdelay" [(Ar,[Ar,Ar,Ir,Ir])] [a1,a2,a3]++-- | +-- A variable time delay with cubic interpolation.+--+-- vdelay3 is experimental. It is the same as vdelay except that it uses cubic interpolation. (New in Version 3.50.)+--+-- > ares  vdelay3  asig, adel, imaxdel [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelay3.html>+vdelay3 ::  Sig -> Sig -> D -> Sig+vdelay3 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "vdelay3" [(Ar,[Ar,Ar,Ir,Ir])] [a1,a2,a3]++-- | +-- A variable delay opcode with high quality interpolation.+--+-- > aout  vdelayx  ain, adl, imd, iws [, ist]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayx.html>+vdelayx ::  Sig -> Sig -> D -> D -> Sig+vdelayx b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vdelayx" [(Ar,[Ar,Ar,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- A 4-channel variable delay opcode with high quality interpolation.+--+-- > aout1, aout2, aout3, aout4  vdelayxq  ain1, ain2, ain3, ain4, adl, imd, iws [, ist]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayxq.html>+vdelayxq :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> a+vdelayxq b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "vdelayxq" ([Ar,Ar,Ar,Ar],[Ar,Ar,Ar,Ar,Ar,Ir,Ir,Ir]) [a1+                                                                                              ,a2+                                                                                              ,a3+                                                                                              ,a4+                                                                                              ,a5+                                                                                              ,a6+                                                                                              ,a7]++-- | +-- A stereo variable delay opcode with high quality interpolation.+--+-- > aout1, aout2  vdelayxs  ain1, ain2, adl, imd, iws [, ist]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayxs.html>+vdelayxs :: Tuple a => Sig -> Sig -> Sig -> D -> D -> a+vdelayxs b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "vdelayxs" ([Ar,Ar],[Ar,Ar,Ar,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Variable delay opcodes with high quality interpolation.+--+-- > aout  vdelayxw  ain, adl, imd, iws [, ist]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayxw.html>+vdelayxw ::  Sig -> Sig -> D -> D -> Sig+vdelayxw b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vdelayxw" [(Ar,[Ar,Ar,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Variable delay opcodes with high quality interpolation.+--+-- > aout1, aout2, aout3, aout4  vdelayxwq  ain1, ain2, ain3, ain4, adl, \+-- >           imd, iws [, ist]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayxwq.html>+vdelayxwq :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> a+vdelayxwq b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "vdelayxwq" ([Ar,Ar,Ar,Ar],[Ar,Ar,Ar,Ar,Ar,Ir,Ir,Ir]) [a1+                                                                                               ,a2+                                                                                               ,a3+                                                                                               ,a4+                                                                                               ,a5+                                                                                               ,a6+                                                                                               ,a7]++-- | +-- Variable delay opcodes with high quality interpolation.+--+-- > aout1, aout2  vdelayxws  ain1, ain2, adl, imd, iws [, ist]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayxws.html>+vdelayxws :: Tuple a => Sig -> Sig -> Sig -> D -> D -> a+vdelayxws b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "vdelayxws" ([Ar,Ar],[Ar,Ar,Ar,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- Panning and Spatialization.++-- | +-- Deprecated. Decodes an ambisonic B format signal.+--+-- Decodes an ambisonic B format signal into loudspeaker specific signals. Note that this opcode is+--       deprecated as it is inaccurate, and is replaced by the much+--       better opcode bformdec1 which replicates all+--       the important features.+--+-- > ao1, ao2  bformdec  isetup, aw, ax, ay, az [, ar, as, at, au, av \+-- >           [, abk, al, am, an, ao, ap, aq]]+-- > ao1, ao2, ao3, ao4  bformdec  isetup, aw, ax, ay, az [, ar, as, at, \+-- >           au, av [, abk, al, am, an, ao, ap, aq]]+-- > ao1, ao2, ao3, ao4, ao5  bformdec  isetup, aw, ax, ay, az [, ar, as, \+-- >           at, au, av [, abk, al, am, an, ao, ap, aq]]+-- > ao1, ao2, ao3, ao4, ao5, ao6, ao7, ao8  bformdec  isetup, aw, ax, ay, az \+-- >           [, ar, as, at, au, av [, abk, al, am, an, ao, ap, aq]]]+--+-- csound doc: <http://www.csounds.com/manual/html/bformdec.html>+bformdec :: Tuple a => D -> Sig -> Sig -> Sig -> Sig -> a+bformdec b1 b2 b3 b4 b5 = pureTuple $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = mopcs "bformdec" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]+                                              ,[Ir,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]) [a1,a2,a3,a4,a5]++-- | +-- Decodes an ambisonic B format signal+--+-- Decodes an ambisonic B format signal into loudspeaker specific signals.+--+-- > ao1, ao2  bformdec1  isetup, aw, ax, ay, az [, ar, as, at, au, av \+-- >           [, abk, al, am, an, ao, ap, aq]]+-- > ao1, ao2, ao3, ao4  bformdec1  isetup, aw, ax, ay, az [, ar, as, at, \+-- >           au, av [, abk, al, am, an, ao, ap, aq]]+-- > ao1, ao2, ao3, ao4, ao5  bformdec1  isetup, aw, ax, ay, az [, ar, as, \+-- >           at, au, av [, abk, al, am, an, ao, ap, aq]]+-- > ao1, ao2, ao3, ao4, ao5, ao6, ao7, ao8  bformdec1  isetup, aw, ax, ay, az \+-- >           [, ar, as, at, au, av [, abk, al, am, an, ao, ap, aq]]]+--+-- csound doc: <http://www.csounds.com/manual/html/bformdec1.html>+bformdec1 :: Tuple a => D -> Sig -> Sig -> Sig -> Sig -> a+bformdec1 b1 b2 b3 b4 b5 = pureTuple $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = mopcs "bformdec1" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]+                                               ,[Ir,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]) [a1,a2,a3,a4,a5]++-- | +-- Deprecated. Codes a signal into the ambisonic B format.+--+-- Codes a signal into the ambisonic B format. Note that this opcode is+--       deprecated as it is inaccurate, and is replaced by the much+--       better+--       opcode bformenc1+--       which replicates all the important features; also note that the+--       gain arguments are not available in bformenc1.+--+-- > aw, ax, ay, az  bformenc  asig, kalpha, kbeta, kord0, kord1+-- > aw, ax, ay, az, ar, as, at, au, av  bformenc  asig, kalpha, kbeta, \+-- >           kord0, kord1 , kord2+-- > aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq  bformenc  \+-- >           asig, kalpha, kbeta, kord0, kord1, kord2, kord3+--+-- csound doc: <http://www.csounds.com/manual/html/bformenc.html>+bformenc :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> a+bformenc b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = mopcs "bformenc" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]+                                              ,[Ar,Kr,Kr,Kr,Kr,Kr,Kr]) [a1,a2,a3,a4,a5]++-- | +-- Codes a signal into the ambisonic B format.+--+-- Codes a signal into the ambisonic B format+--+-- > aw, ax, ay, az  bformenc1  asig, kalpha, kbeta+-- > aw, ax, ay, az, ar, as, at, au, av  bformenc1  asig, kalpha, kbeta+-- > aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq  bformenc1  \+-- >           asig, kalpha, kbeta+--+-- csound doc: <http://www.csounds.com/manual/html/bformenc1.html>+bformenc1 :: Tuple a => Sig -> Sig -> Sig -> a+bformenc1 b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = mopcs "bformenc1" ([Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ar]+                                         ,[Ar,Kr,Kr]) [a1,a2,a3]++-- | +-- Generates 3D binaural audio with high-fidelity early reflections in a parametric room using a Phase Truncation algorithm.+--+-- This opcode essentially nests the hrtfmove opcode in an image model for a user-definable shoebox-shaped room. A default room can be selected, or advanced room parameters can be used. Room surfaces can be controlled with high and low-frequency absorption coefficients and gain factors of a three-band equaliser.+--+-- > aleft, aright, irt60low, irt60high, imfp  hrtfearly  asrc, ksrcx, ksrcy, ksrcz, klstnrx, klstnry, klstnrz, \+-- >           ifilel, ifiler, idefroom [,ifade, isr, iorder, ithreed, kheadrot, iroomx, iroomy, iroomz, iwallhigh, \+-- >           iwalllow, iwallgain1, iwallgain2, iwallgain3, ifloorhigh, ifloorlow, ifloorgain1, ifloorgain2, \+-- >           ifloorgain3, iceilinghigh, iceilinglow, iceilinggain1, iceilinggain2, iceilinggain3]+--+-- csound doc: <http://www.csounds.com/manual/html/hrtfearly.html>+hrtfearly :: Tuple a => Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> D -> a+hrtfearly b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unD b8 <*> unD b9 <*> unD b10+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = mopcs "hrtfearly" ([Ar,Ar,Ir,Ir,Ir]+                                                               ,[Ar+                                                                ,Kr+                                                                ,Kr+                                                                ,Kr+                                                                ,Kr+                                                                ,Kr+                                                                ,Kr+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Kr+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir+                                                                ,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]++-- | +-- Generates dynamic 3d binaural audio for headphones using magnitude interpolation and phase truncation.+--+-- This opcode takes a source signal and spatialises it in the 3 dimensional space around a listener+--       by convolving the source with stored head related transfer function (HRTF) based filters.+--+-- > aleft, aright  hrtfmove  asrc, kAz, kElev, ifilel, ifiler [, imode, ifade, isr]+--+-- csound doc: <http://www.csounds.com/manual/html/hrtfmove.html>+hrtfmove :: Tuple a => Sig -> Sig -> Sig -> D -> D -> a+hrtfmove b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "hrtfmove" ([Ar,Ar],[Ar,Kr,Kr,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Generates dynamic 3d binaural audio for headphones using a Woodworth based spherical head model+--       with improved low frequency phase accuracy.+--+-- This opcode takes a source signal and spatialises it in the 3 dimensional space around a listener+--       using head related transfer function (HRTF) based filters.+--+-- > aleft, aright  hrtfmove2  asrc, kAz, kElev, ifilel, ifiler [,ioverlap, iradius, isr]+--+-- csound doc: <http://www.csounds.com/manual/html/hrtfmove2.html>+hrtfmove2 :: Tuple a => Sig -> Sig -> Sig -> D -> D -> a+hrtfmove2 b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "hrtfmove2" ([Ar,Ar],[Ar,Kr,Kr,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- A binaural, dynamic FDN based diffuse-field reverberator. The opcode works independently as an efficient, flexible reverberator.+--+-- A frequency-dependent, efficient reverberant field is created based on low and high frequency desired reverb times. The opcode is designed to work with hrtfearly, ideally using its outputs as inputs. However, hrtfreverb can be used as a standalone tool. Stability is enforced.+--+-- > aleft, aright, idel  hrtfreverb  asrc, ilowrt60, ihighrt60, ifilel, ifiler [,isr, imfp, iorder]+--+-- csound doc: <http://www.csounds.com/manual/html/hrtfreverb.html>+hrtfreverb :: Tuple a => Sig -> D -> D -> D -> D -> a+hrtfreverb b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "hrtfreverb" ([Ar,Ar,Ir],[Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5]++-- | +-- Generates static 3d binaural audio for headphones using a+--       Woodworth based spherical head model with improved low frequency+--       phase accuracy.+--+-- This opcode takes a source signal and spatialises it in the 3 dimensional space around a listener using head related transfer function (HRTF) based filters. It produces a static output (azimuth and elevation parameters are i-rate), because a static source allows much more efficient processing than hrtfmove and hrtfmove2,.+--+-- > +-- >           aleft, aright  hrtfstat  asrc, iAz, iElev, ifilel, ifiler [,iradius, isr]+-- >         +--+-- csound doc: <http://www.csounds.com/manual/html/hrtfstat.html>+hrtfstat :: Tuple a => Sig -> D -> D -> D -> D -> a+hrtfstat b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = mopcs "hrtfstat" ([Ar,Ar],[Ar,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5]++-- | +-- Distributes the audio signals of a previous locsig opcode.+--+-- locsend depends upon the existence of a previously defined locsig. The number of output signals must match the number in the previous locsig. The output signals from locsend are derived from the values given for distance and reverb in the locsig and are ready to be sent to local or global reverb units (see example below). The reverb amount and the balance between the 2 or 4 channels are calculated in the same way as described in the Dodge book (an essential text!).+--+-- > a1, a2  locsend  +-- > a1, a2,  a3, a4  locsend  +--+-- csound doc: <http://www.csounds.com/manual/html/locsend.html>+locsend :: Tuple a =>  a+locsend  = pureTuple $ return $ f +    where f  = mopcs "locsend" ([Ar,Ar,Ar,Ar],[]) []++-- | +-- Takes an input signal and distributes between 2 or 4 channels.+--+-- locsig takes an input signal and distributes it among 2 or 4 channels using values in degrees to calculate the balance between adjacent channels. It also takes arguments for distance (used to attenuate signals that are to sound as if they are some distance further than the loudspeaker itself), and for the amount the signal that will be sent to reverberators. This unit is based upon the example in the Charles Dodge/Thomas Jerse book, Computer Music, page 320.+--+-- > a1, a2  locsig  asig, kdegree, kdistance, kreverbsend+-- > a1, a2,  a3, a4  locsig  asig, kdegree, kdistance, kreverbsend+--+-- csound doc: <http://www.csounds.com/manual/html/locsig.html>+locsig :: Tuple a => Sig -> Sig -> Sig -> Sig -> a+locsig b1 b2 b3 b4 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = mopcs "locsig" ([Ar,Ar,Ar,Ar],[Ar,Kr,Kr,Kr]) [a1,a2,a3,a4]++-- | +-- Distribute an audio signal amongst four channels.+--+-- Distribute an audio signal amongst four channels with localization control.+--+-- > a1, a2, a3, a4  pan  asig, kx, ky, ifn [, imode] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/pan.html>+pan :: Tuple a => Sig -> Sig -> Sig -> Tab -> a+pan b1 b2 b3 b4 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unTab b4+    where f a1 a2 a3 a4 = mopcs "pan" ([Ar,Ar,Ar,Ar],[Ar,Kr,Kr,Ir,Ir,Ir]) [a1,a2,a3,a4]++-- | +-- Distribute an audio signal across two channels.+--+-- Distribute an audio signal across two channels with a choice of methods.+--+-- > a1, a2  pan2  asig, xp [, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/pan2.html>+pan2 :: Tuple a => Sig -> Sig -> a+pan2 b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "pan2" ([Ar,Ar],[Ar,Xr,Ir]) [a1,a2]++-- | +-- Distributes an input signal among 4 channels using cartesian coordinates.+--+-- space takes an input signal and distributes it among 4 channels using Cartesian xy coordinates to calculate the balance of the outputs. The xy coordinates can be defined in a separate text file and accessed through a Function statement in the score using Gen28, or they can be specified using the optional kx, ky arguments. The advantages to the former are:+--+-- > a1, a2, a3, a4   space  asig, ifn, ktime, kreverbsend, kx, ky+--+-- csound doc: <http://www.csounds.com/manual/html/space.html>+space :: Tuple a => Sig -> Tab -> Sig -> Sig -> Sig -> Sig -> a+space b1 b2 b3 b4 b5 b6 = pureTuple $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = mopcs "space" ([Ar,Ar,Ar,Ar],[Ar,Ir,Kr,Kr,Kr,Kr]) [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6]++-- | +-- Positions the input sound in a 3D space and allows moving the sound at k-rate.+--+-- This opcode positions the input sound in a 3D space, with optional simulation of room acoustics, in various output formats. spat3d allows moving the sound at k-rate (this movement is interpolated internally to eliminate "zipper noise" if sr not equal to kr).+--+-- > aW, aX, aY, aZ  spat3d  ain, kX, kY, kZ, idist, ift, imode, imdel, iovr [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/spat3d.html>+spat3d :: Tuple a => Sig -> Sig -> Sig -> Sig -> D -> D -> D -> D -> D -> a+spat3d b1 b2 b3 b4 b5 b6 b7 b8 b9 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8 <*> unD b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = mopcs "spat3d" ([Ar,Ar,Ar,Ar]+                                                        ,[Ar,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8,a9]++-- | +-- Positions the input sound in a 3D space with the sound source position set at i-time.+--+-- This opcode positions the input sound in a 3D space, with optional simulation of room acoustics, in various output formats. With spat3di, sound source position is set at i-time.+--+-- > aW, aX, aY, aZ  spat3di  ain, iX, iY, iZ, idist, ift, imode [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/spat3di.html>+spat3di :: Tuple a => Sig -> D -> D -> D -> D -> D -> D -> a+spat3di b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "spat3di" ([Ar,Ar,Ar,Ar],[Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                             ,a2+                                                                                             ,a3+                                                                                             ,a4+                                                                                             ,a5+                                                                                             ,a6+                                                                                             ,a7]++-- | +-- Can be used to render an impulse response for a 3D space at i-time.+--+-- This opcode positions the input sound in a 3D space, with optional simulation of room acoustics, in various output formats. spat3dt can be used to render the impulse response at i-time, storing output in a function table, suitable for convolution.+--+-- >  spat3dt  ioutft, iX, iY, iZ, idist, ift, imode, irlen [, iftnocl]+--+-- csound doc: <http://www.csounds.com/manual/html/spat3dt.html>+spat3dt ::  D -> D -> D -> D -> D -> D -> D -> D -> SE ()+spat3dt b1 b2 b3 b4 b5 b6 b7 b8 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "spat3dt" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                         ,a2+                                                                                         ,a3+                                                                                         ,a4+                                                                                         ,a5+                                                                                         ,a6+                                                                                         ,a7+                                                                                         ,a8]++-- | +-- Calculates distance values from xy coordinates.+--+-- spdist uses the same xy data as space, also either from a text file using Gen28 or from x and y arguments given to the unit directly. The purpose of this unit is to make available the values for distance that are calculated from the xy coordinates.+--+-- > k1  spdist  ifn, ktime, kx, ky+--+-- csound doc: <http://www.csounds.com/manual/html/spdist.html>+spdist ::  Tab -> Sig -> Sig -> Sig -> Sig+spdist b1 b2 b3 b4 = Sig $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "spdist" [(Kr,[Ir,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Generates output signals based on a previously defined space opcode.+--+-- spsend depends upon the existence of a previously defined space. The output signals from spsend are derived from the values given for xy and reverb in the space and are ready to be sent to local or global reverb units (see example below).+--+-- > a1, a2, a3, a4  spsend  +--+-- csound doc: <http://www.csounds.com/manual/html/spsend.html>+spsend :: Tuple a =>  a+spsend  = pureTuple $ return $ f +    where f  = mopcs "spsend" ([Ar,Ar,Ar,Ar],[]) []++-- | +-- Distributes an audio signal among many channels.+--+-- Distributes an audio signal amongmany channels, up to 64.+--+-- > ar1[, ar2...]  vbap  asig, kazim [,+-- >         kelev] [, kspread] [, ilayout]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap.html>+vbap :: Tuple a => Sig -> Sig -> a+vbap b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "vbap" ((repeat Ar),[Ar,Kr,Kr,Kr,Ir]) [a1,a2]++-- | +-- Distributes an audio signal among 16 channels.+--+-- > ar1, ..., ar16  vbap16  asig, kazim [, kelev] [, kspread]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap16.html>+vbap16 :: Tuple a => Sig -> Sig -> a+vbap16 b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "vbap16" ((repeat Ar),[Ar,Kr,Kr,Kr]) [a1,a2]++-- | +-- Distribute an audio signal among 16 channels with moving virtual sources.+--+-- > ar1, ..., ar16  vbap16move  asig, idur, ispread, ifldnum, ifld1 \+-- >           [, ifld2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap16move.html>+vbap16move :: Tuple a => Sig -> D -> D -> D -> [D] -> a+vbap16move b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> mapM unD b5+    where f a1 a2 a3 a4 a5 = mopcs "vbap16move" ((repeat Ar),[Ar] ++ (repeat Ir)) ([a1+                                                                                   ,a2+                                                                                   ,a3+                                                                                   ,a4] ++ a5)++-- | +-- Distributes an audio signal among 4 channels.+--+-- > ar1, ar2, ar3, ar4  vbap4  asig, kazim [, kelev] [, kspread]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap4.html>+vbap4 :: Tuple a => Sig -> Sig -> a+vbap4 b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "vbap4" ([Ar,Ar,Ar,Ar],[Ar,Kr,Kr,Kr]) [a1,a2]++-- | +-- Distributes an audio signal among 4 channels with moving virtual sources.+--+-- > ar1, ar2, ar3, ar4  vbap4move  asig, idur, ispread, ifldnum, ifld1 \+-- >           [, ifld2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap4move.html>+vbap4move :: Tuple a => Sig -> D -> D -> D -> [D] -> a+vbap4move b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> mapM unD b5+    where f a1 a2 a3 a4 a5 = mopcs "vbap4move" ([Ar,Ar,Ar,Ar],[Ar] ++ (repeat Ir)) ([a1+                                                                                    ,a2+                                                                                    ,a3+                                                                                    ,a4] ++ a5)++-- | +-- Distributes an audio signal among 8 channels.+--+-- > ar1, ..., ar8  vbap8  asig, kazim [, kelev] [, kspread]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap8.html>+vbap8 :: Tuple a => Sig -> Sig -> a+vbap8 b1 b2 = pureTuple $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = mopcs "vbap8" ((repeat Ar),[Ar,Kr,Kr,Kr]) [a1,a2]++-- | +-- Distributes an audio signal among 8 channels with moving virtual sources.+--+-- > ar1, ..., ar8  vbap8move  asig, idur, ispread, ifldnum, ifld1 \+-- >           [, ifld2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/vbap8move.html>+vbap8move :: Tuple a => Sig -> D -> D -> D -> [D] -> a+vbap8move b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> mapM unD b5+    where f a1 a2 a3 a4 a5 = mopcs "vbap8move" ((repeat Ar),[Ar] ++ (repeat Ir)) ([a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4] ++ a5)++-- | +-- Calculates the gains for a sound location between multiple channels.+--+-- Calculates the gains for a sound location for up to 64.+--+-- > k1[, k2...]  vbapg  kazim [,kelev] [, kspread] [, ilayout]+--+-- csound doc: <http://www.csounds.com/manual/html/vbapg.html>+vbapg :: Tuple a => Sig -> a+vbapg b1 = pureTuple $ f <$> unSig b1+    where f a1 = mopcs "vbapg" ((repeat Kr),[Kr,Kr,Kr,Ir]) [a1]++-- | +-- Configures VBAP output according to loudspeaker parameters.+--+-- >  vbaplsinit  idim, ilsnum [, idir1] [, idir2] [...] [, idir32]+--+-- csound doc: <http://www.csounds.com/manual/html/vbaplsinit.html>+vbaplsinit ::  D -> D -> SE ()+vbaplsinit b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "vbaplsinit" [(Xr,(repeat Ir))] [a1,a2]++-- | +-- Distributes an audio signal among many channels with moving virtual sources.+--+-- Distributes an audio signal among upto 64 channels with moving+--       virtual sources.+--+-- > ar1[, ar2...]  vbapmove  asig, idur, ispread, ifldnum, ifld1 \+-- >           [, ifld2] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/vbapmove.html>+vbapmove :: Tuple a => Sig -> D -> D -> D -> [D] -> a+vbapmove b1 b2 b3 b4 b5 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> mapM unD b5+    where f a1 a2 a3 a4 a5 = mopcs "vbapmove" ((repeat Ar),[Ar] ++ (repeat Ir)) ([a1+                                                                                 ,a2+                                                                                 ,a3+                                                                                 ,a4] ++ a5)++-- | +-- Writes a multi-channel audio signal to a ZAK array.+--+-- >  vbapz  inumchnls, istartndx, asig, kazim [, kelev] [, kspread]+--+-- csound doc: <http://www.csounds.com/manual/html/vbapz.html>+vbapz ::  D -> D -> Sig -> Sig -> SE ()+vbapz b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "vbapz" [(Xr,[Ir,Ir,Ar,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Writes a multi-channel audio signal to a ZAK array with moving virtual sources.+--+-- >  vbapzmove  inumchnls, istartndx, asig, idur, ispread, ifldnum, ifld1, \+-- >           ifld2, [...]+--+-- csound doc: <http://www.csounds.com/manual/html/vbapzmove.html>+vbapzmove ::  Sig -> D -> D -> D -> [D] -> SE ()+vbapzmove b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> mapM unD b5+    where f a1 a2 a3 a4 a5 = opcs "vbapzmove" [(Xr,[Ir,Ir,Ar] ++ (repeat Ir))] ([a1,a2,a3,a4] ++ a5)++-- Reverberation.++-- | +-- Reverberates an input signal with a flat frequency response.+--+-- > ares  alpass  asig, krvt, ilpt [, iskip] [, insmps]+--+-- csound doc: <http://www.csounds.com/manual/html/alpass.html>+alpass ::  Sig -> Sig -> D -> Sig+alpass b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "alpass" [(Ar,[Ar,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- A physical model reverberator.+--+-- babo  stands  for  ball-within-the-box.   It is a physical model reverberator based on the paper by Davide  Rocchesso "The  Ball  within  the Box: a sound-processing metaphor", Computer Music Journal,  Vol  19,  N.4,  pp.45-47,  Winter 1995.+--+-- > a1, a2  babo  asig, ksrcx, ksrcy, ksrcz, irx, iry, irz [, idiff] [, ifno]+--+-- csound doc: <http://www.csounds.com/manual/html/babo.html>+babo :: Tuple a => Sig -> Sig -> Sig -> Sig -> D -> D -> D -> a+babo b1 b2 b3 b4 b5 b6 b7 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = mopcs "babo" ([Ar,Ar],[Ar,Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir]) [a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5+                                                                                       ,a6+                                                                                       ,a7]++-- | +-- Reverberates an input signal with a “colored” frequency response.+--+-- > ares  comb  asig, krvt, ilpt [, iskip] [, insmps]+--+-- csound doc: <http://www.csounds.com/manual/html/comb.html>+comb ::  Sig -> Sig -> D -> Sig+comb b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "comb" [(Ar,[Ar,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Reverberates an input signal with a “colored” frequency response.+--+-- Reverberates an input signal with a “colored”+--       frequency response with a FIR filter.+--+-- > ares  combinv  asig, krvt, ilpt [, iskip] [, insmps]+--+-- csound doc: <http://www.csounds.com/manual/html/combinv.html>+combinv ::  Sig -> Sig -> D -> Sig+combinv b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "combinv" [(Ar,[Ar,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Opcode version of Jezar's Freeverb+--+-- freeverb is a stereo reverb unit based on Jezar's public domain+-- 		C++ sources, composed of eight parallel comb filters on both+-- 		channels, followed by four allpass units in series. The filters+-- 		on the right channel are slightly detuned compared to the left+-- 		channel in order to create a stereo effect.+--+-- > aoutL, aoutR  freeverb  ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]] +--+-- csound doc: <http://www.csounds.com/manual/html/freeverb.html>+freeverb :: Tuple a => Sig -> Sig -> Sig -> Sig -> a+freeverb b1 b2 b3 b4 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = mopcs "freeverb" ([Ar,Ar],[Ar,Ar,Kr,Kr,Ir,Ir]) [a1,a2,a3,a4]++-- | +-- Three different nested all-pass filters.+--+-- Three different nested all-pass filters, useful for implementing reverbs.+--+-- > ares  nestedap  asig, imode, imaxdel, idel1, igain1 [, idel2] [, igain2] \+-- >           [, idel3] [, igain3] [, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/nestedap.html>+nestedap ::  Sig -> D -> D -> D -> D -> Sig+nestedap b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "nestedap" [(Ar,[Ar,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- A reverberator consisting of 6 parallel comb-lowpass filters.+--+-- This is a reverberator consisting of 6 parallel comb-lowpass filters being fed into a series of 5 allpass filters. nreverb replaces reverb2 (version 3.48) and so both opcodes are identical.+--+-- > ares  nreverb  asig, ktime, khdif [, iskip] [,inumCombs] [, ifnCombs] \+-- >           [, inumAlpas] [, ifnAlpas]+--+-- csound doc: <http://www.csounds.com/manual/html/nreverb.html>+nreverb ::  Sig -> Sig -> Sig -> Sig+nreverb b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "nreverb" [(Ar,[Ar,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Models the reverberation of a metal plate.+--+-- Models the reverberation of a rectangular metal plate with+--       settable physical characteristics when excited by audio signal(s).+--+-- > a1[, a2, ...]  platerev  itabexcite. itabouts, kbndry, iaspect, istiff, idecay, iloss, aexcite1[, aexcite2, ...]+--+-- csound doc: <http://www.csounds.com/manual/html/platerev.html>+platerev :: Tuple a => D -> D -> Sig -> D -> D -> D -> D -> [Sig] -> a+platerev b1 b2 b3 b4 b5 b6 b7 b8 = pureTuple $ f <$> unD b1 <*> unD b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> mapM unSig b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = mopcs "platerev" ((repeat Ar)+                                                       ,[Ir,Ir,Kr,Ir,Ir,Ir,Ir] ++ (repeat Ar)) ([a1,a2,a3,a4,a5,a6,a7] ++ a8)++-- | +-- Reverberates an input signal with a “natural room” frequency response.+--+-- > ares  reverb  asig, krvt [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/reverb.html>+reverb ::  Sig -> Sig -> Sig+reverb b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "reverb" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- Same as the nreverb opcode.+--+-- > ares  reverb2  asig, ktime, khdif [, iskip] [,inumCombs] \+-- >           [, ifnCombs] [, inumAlpas] [, ifnAlpas]+--+-- csound doc: <http://www.csounds.com/manual/html/reverb2.html>+reverb2 ::  Sig -> Sig -> Sig -> Sig+reverb2 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "reverb2" [(Ar,[Ar,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- 8 delay line stereo FDN reverb, based on work by Sean Costello+--+-- 8 delay line stereo FDN reverb, with feedback matrix based upon physical+-- 		modeling scattering junction of 8 lossless waveguides of equal characteristic+-- 		impedance. Based on Csound orchestra version by Sean Costello.+--+-- > aoutL, aoutR  reverbsc  ainL, ainR, kfblvl, kfco[, israte[, ipitchm[, iskip]]] +--+-- csound doc: <http://www.csounds.com/manual/html/reverbsc.html>+reverbsc :: Tuple a => Sig -> Sig -> Sig -> Sig -> a+reverbsc b1 b2 b3 b4 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = mopcs "reverbsc" ([Ar,Ar],[Ar,Ar,Kr,Kr,Ir,Ir,Ir]) [a1,a2,a3,a4]++-- | +-- Variably reverberates an input signal with a flat frequency response.+--+-- > ares  valpass  asig, krvt, xlpt, imaxlpt [, iskip] [, insmps]+--+-- csound doc: <http://www.csounds.com/manual/html/valpass.html>+valpass ::  Sig -> Sig -> Sig -> D -> Sig+valpass b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "valpass" [(Ar,[Ar,Kr,Xr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Variably reverberates an input signal with a “colored” frequency response.+--+-- > ares  vcomb  asig, krvt, xlpt, imaxlpt [, iskip] [, insmps]+--+-- csound doc: <http://www.csounds.com/manual/html/vcomb.html>+vcomb ::  Sig -> Sig -> Sig -> D -> Sig+vcomb b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vcomb" [(Ar,[Ar,Kr,Xr,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- Sample Level Operators.++-- | +-- Mixes low level noise to a list of a-rate signals+--+-- Mixes low level (~1e-20 for floats, and ~1e-56 for doubles)+--     	noise to a list of a-rate signals. Can be used before IIR+--     	filters and reverbs to avoid denormalized numbers which may+--     	otherwise result in significantly increased CPU usage.+--+-- >  denorm  a1[, a2[, a3[, ... ]]]+--+-- csound doc: <http://www.csounds.com/manual/html/denorm.html>+denorm ::  [Sig] -> SE ()+denorm b1 = SE $ (depT_ =<<) $ lift $ f <$> mapM unSig b1+    where f a1 = opcs "denorm" [(Xr,(repeat Ar))] a1++-- | +-- Modify a signal by differentiation.+--+-- > ares  diff  asig [, iskip]+-- > kres  diff  ksig [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/diff.html>+diff ::  Sig -> Sig+diff b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "diff" [(Ar,[Ar,Ir]),(Kr,[Kr,Ir])] [a1]++-- | +-- Modify a signal by down-sampling.+--+-- > kres  downsamp  asig [, iwlen]+--+-- csound doc: <http://www.csounds.com/manual/html/downsamp.html>+downsamp ::  Sig -> Sig+downsamp b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "downsamp" [(Kr,[Ar,Ir])] [a1]++-- | +-- Adds artificial foldover to an audio signal.+--+-- > ares  fold  asig, kincr+--+-- csound doc: <http://www.csounds.com/manual/html/fold.html>+fold ::  Sig -> Sig -> Sig+fold b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "fold" [(Ar,[Ar,Kr])] [a1,a2]++-- | +-- Modify a signal by integration.+--+-- > ares  integ  asig [, iskip]+-- > kres  integ  ksig [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/integ.html>+integ ::  Sig -> Sig+integ b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "integ" [(Ar,[Ar,Ir]),(Kr,[Kr,Ir])] [a1]++-- | +-- Converts a control signal to an audio signal using linear interpolation.+--+-- > ares  interp  ksig [, iskip] [, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/interp.html>+interp ::  Sig -> Sig+interp b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "interp" [(Ar,[Kr,Ir,Ir])] [a1]++-- | +-- Calculates the weighted mean value of two input signals.+--+-- Calculates the weighted mean value (i.e. linear interpolation) of two input signals+--+-- > ares  ntrpol  asig1, asig2, kpoint [, imin] [, imax]+-- > ires  ntrpol  isig1, isig2, ipoint [, imin] [, imax]+-- > kres  ntrpol  ksig1, ksig2, kpoint [, imin] [, imax]+--+-- csound doc: <http://www.csounds.com/manual/html/ntrpol.html>+ntrpol ::  Sig -> Sig -> Sig -> Sig+ntrpol b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "ntrpol" [(Ar,[Ar,Ar,Kr,Ir,Ir])+                                     ,(Ir,[Ir,Ir,Ir,Ir,Ir])+                                     ,(Kr,[Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs a sample-and-hold operation on its input.+--+-- > ares  samphold  asig, agate [, ival] [, ivstor]+-- > kres  samphold  ksig, kgate [, ival] [, ivstor]+--+-- csound doc: <http://www.csounds.com/manual/html/samphold.html>+samphold ::  Sig -> Sig -> Sig+samphold b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "samphold" [(Ar,[Ar,Ar,Ir,Ir]),(Kr,[Kr,Kr,Ir,Ir])] [a1,a2]++-- | +-- Modify a signal by up-sampling.+--+-- > ares  upsamp  ksig+--+-- csound doc: <http://www.csounds.com/manual/html/upsamp.html>+upsamp ::  Sig -> Sig+upsamp b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "upsamp" [(Ar,[Kr])] [a1]++-- | +-- Access values of the current buffer of an a-rate variable by indexing.+--+-- Access values of the current buffer of an a-rate variable by indexing.+--       Useful for doing sample-by-sample manipulation at k-rate without using+--       setksmps 1.+--+-- > kval  vaget  kndx, avar+--+-- csound doc: <http://www.csounds.com/manual/html/vaget.html>+vaget ::  Sig -> Sig -> Sig+vaget b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "vaget" [(Kr,[Kr,Ar])] [a1,a2]++-- | +-- Write value of into the current buffer of an a-rate variable by index.+--+-- Write values into the current buffer of an a-rate variable at the given+--       index.  Useful for doing sample-by-sample manipulation at k-rate without+--       using setksmps 1.+--+-- >  vaset  kval, kndx, avar+--+-- csound doc: <http://www.csounds.com/manual/html/vaset.html>+vaset ::  Sig -> Sig -> Sig -> SE ()+vaset b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vaset" [(Xr,[Kr,Kr,Ar])] [a1,a2,a3]++-- Signal Limiters.++-- | +-- Sets the lower and upper limits of the value it processes.+--+-- > ares  limit  asig, klow, khigh+-- > ires  limit  isig, ilow, ihigh+-- > kres  limit  ksig, klow, khigh+--+-- csound doc: <http://www.csounds.com/manual/html/limit.html>+limit ::  Sig -> Sig -> Sig -> Sig+limit b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "limit" [(Ar,[Ar,Kr,Kr]),(Ir,[Ir,Ir,Ir]),(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Reflects the signal that exceeds the low and high thresholds.+--+-- > ares  mirror  asig, klow, khigh+-- > ires  mirror  isig, ilow, ihigh+-- > kres  mirror  ksig, klow, khigh+--+-- csound doc: <http://www.csounds.com/manual/html/mirror.html>+mirror ::  Sig -> Sig -> Sig -> Sig+mirror b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "mirror" [(Ar,[Ar,Kr,Kr]),(Ir,[Ir,Ir,Ir]),(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Wraps-around the signal that exceeds the low and high thresholds.+--+-- > ares  wrap  asig, klow, khigh+-- > ires  wrap  isig, ilow, ihigh+-- > kres  wrap  ksig, klow, khigh+--+-- csound doc: <http://www.csounds.com/manual/html/wrap.html>+wrap ::  Sig -> Sig -> Sig -> Sig+wrap b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "wrap" [(Ar,[Ar,Kr,Kr]),(Ir,[Ir,Ir,Ir]),(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- Special Effects.++-- | +-- Distort an audio signal via waveshaping and optional clipping.+--+-- > ar  distort  asig, kdist, ifn[, ihp, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/distort.html>+distort ::  Sig -> Sig -> Tab -> Sig+distort b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "distort" [(Ar,[Ar,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Modified hyperbolic tangent distortion.+--+-- Implementation of modified hyperbolic tangent distortion. distort1 can be used to generate wave shaping distortion based on a modification of the tanh function.+--+-- > ares  distort1  asig, kpregain, kpostgain, kshape1, kshape2[, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/distort1.html>+distort1 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig+distort1 b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "distort1" [(Ar,[Ar,Kr,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- A user controlled flanger.+--+-- > ares  flanger  asig, adel, kfeedback [, imaxd]+--+-- csound doc: <http://www.csounds.com/manual/html/flanger.html>+flanger ::  Sig -> Sig -> Sig -> Sig+flanger b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "flanger" [(Ar,[Ar,Ar,Kr,Ir])] [a1,a2,a3]++-- | +-- Analyze an audio input and generate harmonizing voices in synchrony.+--+-- > ares  harmon  asig, kestfrq, kmaxvar, kgenfreq1, kgenfreq2, imode, \+-- >           iminfrq, iprd+--+-- csound doc: <http://www.csounds.com/manual/html/harmon.html>+harmon ::  Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> D -> Sig+harmon b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "harmon" [(Ar,[Ar,Kr,Kr,Kr,Kr,Ir,Ir,Ir])] [a1+                                                                                     ,a2+                                                                                     ,a3+                                                                                     ,a4+                                                                                     ,a5+                                                                                     ,a6+                                                                                     ,a7+                                                                                     ,a8]++-- | +-- Analyze an audio input and generate harmonizing voices in+--       synchrony with formants preserved.+--+-- Generate harmonizing voices with formants preserved.+--+-- > ares  harmon2  asig, koct, kfrq1, kfrq2, icpsmode, ilowest[, ipolarity]+--+-- csound doc: <http://www.csounds.com/manual/html/harmon2.html>+harmon2 ::  Sig -> Sig -> Sig -> Sig -> D -> D -> Sig+harmon2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "harmon2" [(Ar,[Ar,Kr,Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Analyze an audio input and generate harmonizing voices in+--       synchrony with formants preserved.+--+-- Generate harmonizing voices with formants preserved.+--+-- > ares  harmon3  asig, koct, kfrq1, \+-- >         kfrq2, kfrq3, icpsmode, ilowest[, ipolarity]+--+-- csound doc: <http://www.csounds.com/manual/html/harmon2.html>+harmon3 ::  Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> Sig+harmon3 b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "harmon3" [(Ar,[Ar,Kr,Kr,Kr,Kr,Ir,Ir,Ir])] [a1+                                                                                   ,a2+                                                                                   ,a3+                                                                                   ,a4+                                                                                   ,a5+                                                                                   ,a6+                                                                                   ,a7]++-- | +-- Analyze an audio input and generate harmonizing voices in+--       synchrony with formants preserved.+--+-- Generate harmonizing voices with formants preserved.+--+-- > ares  harmon4  asig, koct, kfrq1, \+-- >         kfrq2, kfrq3, kfrq4, icpsmode, ilowest[, ipolarity]+--+-- csound doc: <http://www.csounds.com/manual/html/harmon2.html>+harmon4 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> Sig+harmon4 b1 b2 b3 b4 b5 b6 b7 b8 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = opcs "harmon4" [(Ar,[Ar,Kr,Kr,Kr,Kr,Kr,Ir,Ir,Ir])] [a1+                                                                                         ,a2+                                                                                         ,a3+                                                                                         ,a4+                                                                                         ,a5+                                                                                         ,a6+                                                                                         ,a7+                                                                                         ,a8]++-- | +-- First-order allpass filters arranged in a series.+--+-- An implementation of iord number of first-order allpass filters in series.+--+-- > ares  phaser1  asig, kfreq, kord, kfeedback [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/phaser1.html>+phaser1 ::  Sig -> Sig -> Sig -> Sig -> Sig+phaser1 b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "phaser1" [(Ar,[Ar,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Second-order allpass filters arranged in a series.+--+-- An implementation of iord number of second-order allpass filters in series.+--+-- > ares  phaser2  asig, kfreq, kq, kord, kmode, ksep, kfeedback+--+-- csound doc: <http://www.csounds.com/manual/html/phaser2.html>+phaser2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+phaser2 b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "phaser2" [(Ar,[Ar,Kr,Kr,Kr,Kr,Kr,Kr])] [a1+                                                                                ,a2+                                                                                ,a3+                                                                                ,a4+                                                                                ,a5+                                                                                ,a6+                                                                                ,a7]++-- Standard Filters.++-- | +-- A hi-pass filter whose transfer functions are the complements of the tone opcode.+--+-- > ares  atone  asig, khp [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/atone.html>+atone ::  Sig -> Sig -> Sig+atone b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "atone" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- Emulates a stack of filters using the atone opcode.+--+-- atonex is equivalent to a filter consisting of more layers of atone with the same arguments, serially connected. Using a stack of a larger number of filters allows a sharper cutoff. They are faster than using a larger number instances in a Csound orchestra of the old opcodes, because only one initialization and k- cycle are needed at time and the audio loop falls entirely inside the cache memory of processor.+--+-- > ares  atonex  asig, khp [, inumlayer] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/atonex.html>+atonex ::  Sig -> Sig -> Sig+atonex b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "atonex" [(Ar,[Ar,Kr,Ir,Ir])] [a1,a2]++-- | +-- A sweepable general purpose biquadratic digital filter.+--+-- > ares  biquad  asig, kb0, kb1, kb2, ka0, ka1, ka2 [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/biquad.html>+biquad ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+biquad b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "biquad" [(Ar,[Ar,Kr,Kr,Kr,Kr,Kr,Kr,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6+                                                                                  ,a7]++-- | +-- A sweepable general purpose biquadratic digital filter with a-rate parameters.+--+-- A sweepable general purpose biquadratic digital filter.+--+-- > ares  biquada  asig, ab0, ab1, ab2, aa0, aa1, aa2 [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/biquada.html>+biquada ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+biquada b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "biquada" [(Ar,[Ar,Ar,Ar,Ar,Ar,Ar,Ar,Ir])] [a1+                                                                                   ,a2+                                                                                   ,a3+                                                                                   ,a4+                                                                                   ,a5+                                                                                   ,a6+                                                                                   ,a7]++-- | +-- Same as the butterbp opcode.+--+-- > ares  butbp  asig, kfreq, kband [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butbp.html>+butbp ::  Sig -> Sig -> Sig -> Sig+butbp b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "butbp" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Same as the butterbr opcode.+--+-- > ares  butbr  asig, kfreq, kband [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butbr.html>+butbr ::  Sig -> Sig -> Sig -> Sig+butbr b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "butbr" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Same as the butterhp opcode.+--+-- > ares  buthp  asig, kfreq [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/buthp.html>+buthp ::  Sig -> Sig -> Sig+buthp b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "buthp" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- Same as the butterlp opcode.+--+-- > ares  butlp  asig, kfreq [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butlp.html>+butlp ::  Sig -> Sig -> Sig+butlp b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "butlp" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- A band-pass Butterworth filter.+--+-- Implementation of a second-order band-pass Butterworth filter. This opcode can also be written as butbp.+--+-- > ares  butterbp  asig, kfreq, kband [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butterbp.html>+butterbp ::  Sig -> Sig -> Sig -> Sig+butterbp b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "butterbp" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- A band-reject Butterworth filter.+--+-- Implementation of a second-order band-reject Butterworth filter. This opcode can also be written as butbr.+--+-- > ares  butterbr  asig, kfreq, kband [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butterbr.html>+butterbr ::  Sig -> Sig -> Sig -> Sig+butterbr b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "butterbr" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- A high-pass Butterworth filter.+--+-- Implementation of second-order high-pass Butterworth filter. This opcode can also be written as buthp.+--+-- > ares  butterhp  asig, kfreq [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butterhp.html>+butterhp ::  Sig -> Sig -> Sig+butterhp b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "butterhp" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- A low-pass Butterworth filter.+--+-- Implementation of a second-order low-pass Butterworth filter. This opcode can also be written as butlp.+--+-- > ares  butterlp  asig, kfreq [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/butterlp.html>+butterlp ::  Sig -> Sig -> Sig+butterlp b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "butterlp" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- Implements low-pass and high-pass filters of different styles.+--+-- Implements the classical standard analog filter types: low-pass and high-pass. They are implemented with the four classical kinds of filters: Butterworth, Chebyshev Type I, Chebyshev Type II, and Elliptical.  The number of poles may be any even number from 2 to 80.+--+-- > ares  clfilt  asig, kfreq, itype, inpol [, ikind] [, ipbr] [, isba] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/clfilt.html>+clfilt ::  Sig -> Sig -> D -> D -> Sig+clfilt b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "clfilt" [(Ar,[Ar,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- A fast and robust method for approximating sound propagation, achieving convincing Doppler shifts without having to solve equations.+--+-- A fast and robust method for approximating sound propagation, achieving convincing Doppler shifts without having to solve equations. The method computes frequency shifts based on reading an input delay line at a delay time computed from the distance between source and mic and the speed of sound. One instance of the opcode is required for each dimension of space through which the sound source moves. If the source sound moves at a constant speed from in front of the microphone, through the microphone, to behind the microphone, then the output will be frequency shifted above the source frequency at a constant frequency while the source approaches, then discontinuously will be shifted below the source frequency at a constant frequency as the source recedes from the microphone. If the source sound moves at a constant speed through a point to one side of the microphone, then the rate of change of position will not be constant, and the familiar Doppler frequency shift typical of a siren or engine approaching and receding along a road beside a listener will be heard.+--+-- > ashifted  doppler  asource, ksourceposition, kmicposition [, isoundspeed, ifiltercutoff]+--+-- csound doc: <http://www.csounds.com/manual/html/doppler.html>+doppler ::  Sig -> Sig -> Sig -> Sig+doppler b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "doppler" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A filter that simulates a mass-spring-damper system+--+-- Filters the incoming signal with the specified resonance frequency and+--       quality factor. It can also be seen as a signal generator for high quality+--       factor, with an impulse for the excitation. You can combine several modes+--       to built complex instruments such as bells or guitar tables.+--+-- > aout  mode  ain, kfreq, kQ [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/mode.html>+mode ::  Sig -> Sig -> Sig -> Sig+mode b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "mode" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- A first-order recursive low-pass filter with variable frequency response.+--+-- > ares  tone  asig, khp [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/tone.html>+tone ::  Sig -> Sig -> Sig+tone b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "tone" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- | +-- Emulates a stack of filters using the tone opcode.+--+-- tonex is equivalent to a filter consisting of more layers of tone with the same arguments, serially connected. Using a stack of a larger number of filters allows a sharper cutoff. They are faster than using a larger number instances in a Csound orchestra of the old opcodes, because only one initialization and k- cycle are needed at time and the audio loop falls entirely inside the cache memory of processor.+--+-- > ares  tonex   asig, khp [, inumlayer] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/tonex.html>+tonex ::  Sig -> Sig -> Sig+tonex b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "tonex" [(Ar,[Ar,Kr,Ir,Ir])] [a1,a2]++-- Standard Filters:Resonant.++-- | +-- A notch filter whose transfer functions are the complements of the reson opcode.+--+-- > ares  areson  asig, kcf, kbw [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/areson.html>+areson ::  Sig -> Sig -> Sig -> Sig+areson b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "areson" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A second-order multi-mode filter.+--+-- > ares  bqrez  asig, xfco, xres [, imode] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/bqrez.html>+bqrez ::  Sig -> Sig -> Sig -> Sig+bqrez b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "bqrez" [(Ar,[Ar,Xr,Xr,Ir,Ir])] [a1,a2,a3]++-- | +-- A resonant lowpass filter.+--+-- Implementation of a resonant second-order lowpass filter.+--+-- > ares  lowpass2  asig, kcf, kq [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/lowpass2.html>+lowpass2 ::  Sig -> Sig -> Sig -> Sig+lowpass2 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "lowpass2" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Another resonant lowpass filter.+--+-- lowres is a resonant lowpass filter.+--+-- > ares  lowres  asig, kcutoff, kresonance [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/lowres.html>+lowres ::  Sig -> Sig -> Sig -> Sig+lowres b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "lowres" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- Simulates layers of serially connected resonant lowpass filters.+--+-- lowresx is equivalent to more layers of lowres with the same arguments serially connected.+--+-- > ares  lowresx  asig, kcutoff, kresonance [, inumlayer] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/lowresx.html>+lowresx ::  Sig -> Sig -> Sig -> Sig+lowresx b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "lowresx" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A 3-pole sweepable resonant lowpass filter.+--+-- Implementation of a 3 pole sweepable resonant lowpass filter.+--+-- > ares  lpf18  asig, kfco, kres, kdist [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/lpf18.html>+lpf18 ::  Sig -> Sig -> Sig -> Sig -> Sig+lpf18 b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "lpf18" [(Ar,[Ar,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Moog ladder lowpass filter.+--+-- Moogladder is an new digital implementation of the Moog ladder filter based on +-- the work of Antti Huovilainen, described in the paper "Non-Linear Digital +-- Implementation of the Moog Ladder Filter" (Proceedings of DaFX04, Univ of Napoli). +-- This implementation is probably a more accurate digital representation of +-- the original analogue filter.+--+-- > asig  moogladder  ain, kcf, kres[, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/moogladder.html>+moogladder ::  Sig -> Sig -> Sig -> Sig+moogladder b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "moogladder" [(Ar,[Ar,Kr,Kr,Ir])] [a1,a2,a3]++-- | +-- A digital emulation of the Moog diode ladder filter configuration.+--+-- > ares  moogvcf  asig, xfco, xres [,iscale, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/moogvcf.html>+moogvcf ::  Sig -> Sig -> Sig -> Sig+moogvcf b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "moogvcf" [(Ar,[Ar,Xr,Xr,Ir,Ir])] [a1,a2,a3]++-- | +-- A digital emulation of the Moog diode ladder filter configuration.+--+-- > ares  moogvcf2  asig, xfco, xres [,iscale, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/moogvcf2.html>+moogvcf2 ::  Sig -> Sig -> Sig -> Sig+moogvcf2 b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "moogvcf2" [(Ar,[Ar,Xr,Xr,Ir,Ir])] [a1,a2,a3]++-- | +-- A second-order resonant filter.+--+-- > ares  reson  asig, kcf, kbw [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/reson.html>+reson ::  Sig -> Sig -> Sig -> Sig+reson b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "reson" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A bandpass filter with variable frequency response.+--+-- Implementations of a second-order, two-pole two-zero bandpass filter with variable frequency response.+--+-- > ares  resonr  asig, kcf, kbw [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/resonr.html>+resonr ::  Sig -> Sig -> Sig -> Sig+resonr b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "resonr" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Emulates a stack of filters using the reson opcode.+--+-- resonx is equivalent to a filters consisting of more layers of reson with the same arguments, serially connected. Using a stack of a larger number of filters allows a sharper cutoff. They are faster than using a larger number instances in a Csound orchestra of the old opcodes, because only one initialization and k- cycle are needed at time and the audio loop falls entirely inside the cache memory of processor.+--+-- > ares  resonx  asig, kcf, kbw [, inumlayer] [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/resonx.html>+resonx ::  Sig -> Sig -> Sig -> Sig+resonx b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "resonx" [(Ar,[Ar,Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- A bank of second-order bandpass filters, connected in parallel.+--+-- > ares  resony  asig, kbf, kbw, inum, ksep [, isepmode] [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/resony.html>+resony ::  Sig -> Sig -> Sig -> D -> Sig -> Sig+resony b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "resony" [(Ar,[Ar,Kr,Kr,Ir,Kr,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- A bandpass filter with variable frequency response.+--+-- Implementations of a second-order, two-pole two-zero bandpass filter with variable frequency response.+--+-- > ares  resonz  asig, kcf, kbw [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/resonz.html>+resonz ::  Sig -> Sig -> Sig -> Sig+resonz b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "resonz" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A resonant low-pass filter.+--+-- > ares  rezzy  asig, xfco, xres [, imode, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/rezzy.html>+rezzy ::  Sig -> Sig -> Sig -> Sig+rezzy b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "rezzy" [(Ar,[Ar,Xr,Xr,Ir,Ir])] [a1,a2,a3]++-- | +-- State-variable filter.+--+-- Statevar is a new digital implementation of the analogue state-variable filter. +-- This filter has four simultaneous outputs: high-pass, low-pass,+-- band-pass and band-reject. This filter uses oversampling for sharper+-- resonance (default: 3 times oversampling). It includes a+-- resonance limiter that prevents the filter from getting unstable.+--+-- > ahp,alp,abp,abr  statevar  ain, kcf, kq [, iosamps, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/statevar.html>+statevar :: Tuple a => Sig -> Sig -> Sig -> a+statevar b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = mopcs "statevar" ([Ar,Ar,Ar,Ar],[Ar,Kr,Kr,Ir,Ir]) [a1,a2,a3]++-- | +-- A resonant second order filter, with simultaneous lowpass, highpass and bandpass outputs.+--+-- Implementation of a resonant second order filter, with simultaneous lowpass, highpass and bandpass outputs.+--+-- > alow, ahigh, aband  svfilter   asig, kcf, kq [, iscl]+--+-- csound doc: <http://www.csounds.com/manual/html/svfilter.html>+svfilter :: Tuple a => Sig -> Sig -> Sig -> a+svfilter b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = mopcs "svfilter" ([Ar,Ar,Ar],[Ar,Kr,Kr,Ir]) [a1,a2,a3]++-- | +-- Models some of the filter characteristics of a Roland TB303 voltage-controlled filter.+--+-- This opcode attempts to model some of the filter characteristics of a Roland TB303 voltage-controlled filter. Euler's method is used to approximate the system, rather than traditional filter methods. Cutoff frequency, Q, and distortion are all coupled. Empirical methods were used to try to unentwine,  but frequency is only approximate as a result. Future fixes for some problems with this opcode may break existing orchestras relying on this version of tbvcf.+--+-- > ares  tbvcf  asig, xfco, xres, kdist, kasym [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/tbvcf.html>+tbvcf ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig+tbvcf b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "tbvcf" [(Ar,[Ar,Xr,Xr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- A bank of filters in which the cutoff frequency can be separated under user control.+--+-- A bank of filters in which the cutoff frequency can be separated under user control+--+-- > ares  vlowres  asig, kfco, kres, iord, ksep+--+-- csound doc: <http://www.csounds.com/manual/html/vlowres.html>+vlowres ::  Sig -> Sig -> Sig -> D -> Sig -> Sig+vlowres b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "vlowres" [(Ar,[Ar,Kr,Kr,Ir,Kr])] [a1,a2,a3,a4,a5]++-- Standard Filters:Control.++-- | +-- A notch filter whose transfer functions are the complements of the reson opcode.+--+-- > kres  aresonk  ksig, kcf, kbw [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/aresonk.html>+aresonk ::  Sig -> Sig -> Sig -> Sig+aresonk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "aresonk" [(Kr,[Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- A hi-pass filter whose transfer functions are the complements of the tonek opcode.+--+-- > kres  atonek  ksig, khp [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/atonek.html>+atonek ::  Sig -> Sig -> Sig+atonek b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "atonek" [(Kr,[Kr,Kr,Ir])] [a1,a2]++-- | +-- Generate glissandos starting from a control signal.+--+-- > kres  lineto  ksig, ktime+--+-- csound doc: <http://www.csounds.com/manual/html/lineto.html>+lineto ::  Sig -> Sig -> Sig+lineto b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "lineto" [(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Applies portamento to a step-valued control signal.+--+-- > kres  port  ksig, ihtim [, isig]+--+-- csound doc: <http://www.csounds.com/manual/html/port.html>+port ::  Sig -> D -> Sig+port b1 b2 = Sig $ f <$> unSig b1 <*> unD b2+    where f a1 a2 = opcs "port" [(Kr,[Kr,Ir,Ir])] [a1,a2]++-- | +-- Applies portamento to a step-valued control signal.+--+-- > kres  portk  ksig, khtim [, isig]+--+-- csound doc: <http://www.csounds.com/manual/html/portk.html>+portk ::  Sig -> Sig -> Sig+portk b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "portk" [(Kr,[Kr,Kr,Ir])] [a1,a2]++-- | +-- A second-order resonant filter.+--+-- > kres  resonk  ksig, kcf, kbw [, iscl] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/resonk.html>+resonk ::  Sig -> Sig -> Sig -> Sig+resonk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "resonk" [(Kr,[Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Control signal resonant filter stack.+--+-- resonxk is equivalent to a group of resonk filters, with the same arguments, serially connected. Using a stack of a larger number of filters allows a sharper cutoff.+--+-- > kres  resonxk  ksig, kcf, kbw[, inumlayer, iscl, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/resonxk.html>+resonxk ::  Sig -> Sig -> Sig -> Sig+resonxk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "resonxk" [(Kr,[Kr,Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Generate glissandos starting from a control signal.+--+-- Generate glissandos starting from a control signal with a trigger.+--+-- > kres  tlineto  ksig, ktime, ktrig+--+-- csound doc: <http://www.csounds.com/manual/html/tlineto.html>+tlineto ::  Sig -> Sig -> Sig -> Sig+tlineto b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "tlineto" [(Kr,[Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- A first-order recursive low-pass filter with variable frequency response.+--+-- > kres  tonek  ksig, khp [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/tonek.html>+tonek ::  Sig -> Sig -> Sig+tonek b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "tonek" [(Kr,[Kr,Kr,Ir])] [a1,a2]++-- Specialized Filters.++-- | +-- A DC blocking filter.+--+-- Implements the DC blocking filter+--+-- > ares  dcblock  ain [, igain]+--+-- csound doc: <http://www.csounds.com/manual/html/dcblock.html>+dcblock ::  Sig -> Sig+dcblock b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "dcblock" [(Ar,[Ar,Ir])] [a1]++-- | +-- A DC blocking filter.+--+-- Implements a DC blocking filter with improved DC attenuation.+--+-- > ares  dcblock2  ain [, iorder] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/dcblock2.html>+dcblock2 ::  Sig -> Sig+dcblock2 b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "dcblock2" [(Ar,[Ar,Ir,Ir])] [a1]++-- | +-- Equalizer filter+--+-- The opcode eqfil is a 2nd order tunable equalisation filter based on Regalia and Mitra+--       design ("Tunable Digital Frequency Response Equalization Filters", IEEE Trans.+--       on Ac., Sp. and Sig Proc., 35 (1), 1987). It provides a peak/notch filter for+--       building parametric/graphic equalisers.+--+-- > asig  eqfil  ain, kcf, kbw, kgain[, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/eqfil.html>+eqfil ::  Sig -> Sig -> Sig -> Sig -> Sig+eqfil b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "eqfil" [(Ar,[Ar,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Performs filtering using a transposed form-II digital filter lattice with no time-varying control.+--+-- General purpose custom filter with no time-varying pole control. The filter coefficients implement the following difference equation:+--+-- > ares  filter2  asig, iM, iN, ib0, ib1, ..., ibM, ia1, ia2, ..., iaN+-- > kres  filter2  ksig, iM, iN, ib0, ib1, ..., ibM, ia1, ia2, ..., iaN+--+-- csound doc: <http://www.csounds.com/manual/html/filter2.html>+filter2 ::  Sig -> D -> D -> [D] -> Sig+filter2 b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> mapM unD b4+    where f a1 a2 a3 a4 = opcs "filter2" [(Ar,[Ar] ++ (repeat Ir)),(Kr,[Kr] ++ (repeat Ir))] ([a1+                                                                                              ,a2+                                                                                              ,a3] ++ a4)++-- | +-- Formant filter.+--+-- Fofilter generates a stream of overlapping sinewave grains, when fed with +-- a pulse train. Each grain is the impulse response of a combination of +-- two BP filters. The grains are defined by their attack time (determining +-- the skirtwidth of the formant region at -60dB) and decay time +-- (-6dB bandwidth). Overlapping will occur when 1/freq < decay, but, +-- unlike FOF, there is no upper limit on the number of overlaps. +-- The original idea for this opcode came from J McCartney's formlet class +-- in SuperCollider, but this is possibly implemented differently(?).+--+-- > asig  fofilter  ain, kcf, kris, kdec[, istor]+--+-- csound doc: <http://www.csounds.com/manual/html/fofilter.html>+fofilter ::  Sig -> Sig -> Sig -> Sig -> Sig+fofilter b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "fofilter" [(Ar,[Ar,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- A Hilbert transformer.+--+-- An IIR implementation of a Hilbert transformer.+--+-- > ar1, ar2  hilbert  asig+--+-- csound doc: <http://www.csounds.com/manual/html/hilbert.html>+hilbert :: Tuple a => Sig -> a+hilbert b1 = pureTuple $ f <$> unSig b1+    where f a1 = mopcs "hilbert" ([Ar,Ar],[Ar]) [a1]++-- | +-- A filter with a non-linear effect.+--+-- Implements the filter:+--+-- > ares  nlfilt  ain, ka, kb, kd, kC, kL+--+-- csound doc: <http://www.csounds.com/manual/html/nlfilt.html>+nlfilt ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+nlfilt b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "nlfilt" [(Ar,[Ar,Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5,a6]++-- | +-- A filter with a non-linear effect and blowup protection.+--+-- Implements the filter:+--+-- > ares  nlfilt2  ain, ka, kb, kd, kC, kL+--+-- csound doc: <http://www.csounds.com/manual/html/nlfilt2.html>+nlfilt2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+nlfilt2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "nlfilt2" [(Ar,[Ar,Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3,a4,a5,a6]++-- | +-- Implementation of Zoelzer's parametric equalizer filters.+--+-- Implementation of Zoelzer's parametric equalizer filters, with some modifications by the author.+--+-- > ares  pareq  asig, kc, kv, kq [, imode] [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/pareq.html>+pareq ::  Sig -> Sig -> Sig -> Sig -> Sig+pareq b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "pareq" [(Ar,[Ar,Kr,Kr,Kr,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Parametric equalizer and filter opcode with 7 filter types, based+--       on algorithm by Robert Bristow-Johnson.+--+-- Parametric equalizer and filter opcode with 7 filter types,+--     	based on algorithm by Robert Bristow-Johnson.+--+-- > ar  rbjeq  asig, kfco, klvl, kQ, kS[, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/rbjeq.html>+rbjeq ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig+rbjeq b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "rbjeq" [(Ar,[Ar,Kr,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Performs filtering using a transposed form-II digital filter lattice with radial pole-shearing and angular pole-warping.+--+-- General purpose custom filter with time-varying pole control. The filter coefficients implement the following difference equation:+--+-- > ares  zfilter2  asig, kdamp, kfreq, iM, iN, ib0, ib1, ..., ibM, \+-- >           ia1,ia2, ..., iaN+--+-- csound doc: <http://www.csounds.com/manual/html/zfilter2.html>+zfilter2 ::  Sig -> Sig -> Sig -> D -> D -> [D] -> Sig+zfilter2 b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4 <*> unD b5 <*> mapM unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "zfilter2" [(Ar,[Ar,Kr,Kr] ++ (repeat Ir))] ([a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5] ++ a6)++-- Waveguides.++-- | +-- A simple waveguide model consisting of one delay-line and one first-order lowpass filter.+--+-- > ares  wguide1  asig, xfreq, kcutoff, kfeedback+--+-- csound doc: <http://www.csounds.com/manual/html/wguide1.html>+wguide1 ::  Sig -> Sig -> Sig -> Sig -> Sig+wguide1 b1 b2 b3 b4 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "wguide1" [(Ar,[Ar,Xr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- A model of beaten plate consisting of two parallel delay-lines and two first-order lowpass filters.+--+-- > ares  wguide2  asig, xfreq1, xfreq2, kcutoff1, kcutoff2, \+-- >           kfeedback1, kfeedback2+--+-- csound doc: <http://www.csounds.com/manual/html/wguide2.html>+wguide2 ::  Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+wguide2 b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "wguide2" [(Ar,[Ar,Xr,Xr,Kr,Kr,Kr,Kr])] [a1+                                                                                ,a2+                                                                                ,a3+                                                                                ,a4+                                                                                ,a5+                                                                                ,a6+                                                                                ,a7]++-- Waveshaping.++-- | +-- Efficiently evaluates the sum of Chebyshev polynomials of arbitrary order.+--+-- The chebyshevpoly opcode calculates the value of a polynomial expression with a single a-rate input variable that is made up of a linear combination of the first N Chebyshev polynomials of the first kind.  Each Chebyshev polynomial, Tn(x), is weighted by a k-rate coefficient, kn, so that the opcode is calculating a sum of any number of terms in the form kn*Tn(x).  Thus, the chebyshevpoly opcode allows for the waveshaping of an audio signal with a dynamic transfer function that gives precise control over the harmonic content of the output.+--+-- > aout  chebyshevpoly  ain, k0 [, k1 [, k2 [...]]]+--+-- csound doc: <http://www.csounds.com/manual/html/chebyshevpoly.html>+chebyshevpoly ::  Sig -> [Sig] -> Sig+chebyshevpoly b1 b2 = Sig $ f <$> unSig b1 <*> mapM unSig b2+    where f a1 a2 = opcs "chebyshevpoly" [(Ar,[Ar] ++ (repeat Kr))] ([a1] ++ a2)++-- | +-- Performs linear clipping on an audio signal or a phasor.+--+-- The pdclip opcode allows a percentage of the input range of a signal to be clipped to fullscale. It is similar to simply multiplying the signal and limiting the range of the result, but pdclip allows you to think about how much of the signal range is being distorted instead of the scalar factor and has a offset parameter for assymetric clipping of the signal range. pdclip is also useful for remapping phasors for phase distortion synthesis.+--+-- > aout  pdclip  ain, kWidth, kCenter [, ibipolar [, ifullscale]]+--+-- csound doc: <http://www.csounds.com/manual/html/pdclip.html>+pdclip ::  Sig -> Sig -> Sig -> Sig+pdclip b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pdclip" [(Ar,[Ar,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Distorts a phasor for reading the two halves of a table at different rates.+--+-- The pdhalf opcode is designed to emulate the "classic" phase distortion synthesis method of the Casio CZ-series of synthesizers from the mid-1980's.  This technique reads the first and second halves of a function table at different rates in order to warp the waveform.  For example, pdhalf can smoothly transform a sine wave into something approximating the shape of a saw wave.+--+-- > aout  pdhalf  ain, kShapeAmount [, ibipolar [, ifullscale]]+--+-- csound doc: <http://www.csounds.com/manual/html/pdhalf.html>+pdhalf ::  Sig -> Sig -> Sig+pdhalf b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "pdhalf" [(Ar,[Ar,Kr,Ir,Ir])] [a1,a2]++-- | +-- Distorts a phasor for reading two unequal portions of a table in equal periods.+--+-- The pdhalfy opcode is a variation on the phase distortion synthesis method of the pdhalf opcode.  It is useful for distorting a phasor in order to read two unequal portions of a table in the same number of samples.+--+-- > aout  pdhalfy  ain, kShapeAmount [, ibipolar [, ifullscale]]+--+-- csound doc: <http://www.csounds.com/manual/html/pdhalfy.html>+pdhalfy ::  Sig -> Sig -> Sig+pdhalfy b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "pdhalfy" [(Ar,[Ar,Kr,Ir,Ir])] [a1,a2]++-- | +-- Waveshapes a signal by raising it to a variable exponent.+--+-- The powershape opcode raises an input signal to a power with pre- and post-scaling of the signal so that the output will be in a predictable range.  It also processes negative inputs in a symmetrical way to positive inputs, calculating a dynamic transfer function that is useful for waveshaping.+--+-- > aout  powershape  ain, kShapeAmount [, ifullscale]+--+-- csound doc: <http://www.csounds.com/manual/html/powershape.html>+powershape ::  Sig -> Sig -> Sig+powershape b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "powershape" [(Ar,[Ar,Kr,Ir])] [a1,a2]++-- Comparators and Accumulators.++-- | +-- Produces a signal that is the maximum of any number of input signals.+--+-- The max opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the maximum of all of the inputs.  For a-rate signals, the inputs are compared one sample at a time (i.e. max does not scan an entire ksmps period of a signal for its local maximum as the max_k opcode does).+--+-- > amax  max  ain1, ain2 [, ain3] [, ain4] [...]+-- > kmax  max  kin1, kin2 [, kin3] [, kin4] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/max.html>+max' ::  [Sig] -> Sig+max' b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "max" [(Ar,(repeat Ar)),(Kr,(repeat Kr))] a1++-- | +-- Local maximum (or minimum) value of an incoming asig signal+--+-- max_k outputs the local maximum (or minimum) value of  the incoming asig signal, checked in the time interval between ktrig has become true twice.+--+-- > knumkout  max_k  asig, ktrig, itype+--+-- csound doc: <http://www.csounds.com/manual/html/max_k.html>+max_k ::  Sig -> Sig -> D -> Sig+max_k b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "max_k" [(Kr,[Ar,Kr,Ir])] [a1,a2,a3]++-- | +-- Produces a signal that is the maximum of the absolute values of any number of input signals.+--+-- The maxabs opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the maximum of all of the inputs.  It is identical to the max opcode except that it takes the absolute value of each input before comparing them.  Therefore, the output is always non-negative.  For a-rate signals, the inputs are compared one sample at a time (i.e. maxabs does not scan an entire ksmps period of a signal for its local maximum as the max_k opcode does).+--+-- > amax  maxabs  ain1, ain2 [, ain3] [, ain4] [...]+-- > kmax  maxabs  kin1, kin2 [, kin3] [, kin4] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/maxabs.html>+maxabs ::  [Sig] -> Sig+maxabs b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "maxabs" [(Ar,(repeat Ar)),(Kr,(repeat Kr))] a1++-- | +-- Accumulates the maximum of the absolute values of audio signals.+--+-- maxabsaccum compares two audio-rate variables and stores the maximum of their absolute values into the first.+--+-- >  maxabsaccum  aAccumulator, aInput+--+-- csound doc: <http://www.csounds.com/manual/html/maxabsaccum.html>+maxabsaccum ::  Sig -> Sig -> SE ()+maxabsaccum b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "maxabsaccum" [(Xr,[Ar,Ar])] [a1,a2]++-- | +-- Accumulates the maximum value of audio signals.+--+-- maxaccum compares two audio-rate variables and stores the maximum value between them into the first.+--+-- >  maxaccum  aAccumulator, aInput+--+-- csound doc: <http://www.csounds.com/manual/html/maxaccum.html>+maxaccum ::  Sig -> Sig -> SE ()+maxaccum b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "maxaccum" [(Xr,[Ar,Ar])] [a1,a2]++-- | +-- Produces a signal that is the minimum of any number of input signals.+--+-- The min opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the minimum of all of the inputs.  For a-rate signals, the inputs are compared one sample at a time (i.e. min does not scan an entire ksmps period of a signal for its local minimum as the max_k opcode does).+--+-- > amin  min  ain1, ain2 [, ain3] [, ain4] [...]+-- > kmin  min  kin1, kin2 [, kin3] [, kin4] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/min.html>+min' ::  [Sig] -> Sig+min' b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "min" [(Ar,(repeat Ar)),(Kr,(repeat Kr))] a1++-- | +-- Produces a signal that is the minimum of the absolute values of any number of input signals.+--+-- The minabs opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the minimum of all of the inputs.  It is identical to the min opcode except that it takes the absolute value of each input before comparing them.  Therefore, the output is always non-negative.    For a-rate signals, the inputs are compared one sample at a time (i.e. minabs does not scan an entire ksmps period of a signal for its local minimum as the max_k opcode does).+--+-- > amin  minabs  ain1, ain2 [, ain3] [, ain4] [...]+-- > kmin  minabs  kin1, kin2 [, kin3] [, kin4] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/minabs.html>+minabs ::  [Sig] -> Sig+minabs b1 = Sig $ f <$> mapM unSig b1+    where f a1 = opcs "minabs" [(Ar,(repeat Ar)),(Kr,(repeat Kr))] a1++-- | +-- Accumulates the minimum of the absolute values of audio signals.+--+-- minabsaccum compares two audio-rate variables and stores the minimum of their absolute values into the first.+--+-- >  minabsaccum  aAccumulator, aInput+--+-- csound doc: <http://www.csounds.com/manual/html/minabsaccum.html>+minabsaccum ::  Sig -> Sig -> SE ()+minabsaccum b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "minabsaccum" [(Xr,[Ar,Ar])] [a1,a2]++-- | +-- Accumulates the minimum value of audio signals.+--+-- minaccum compares two audio-rate variables and stores the minimum value between them into the first.+--+-- >  minaccum  aAccumulator, aInput+--+-- csound doc: <http://www.csounds.com/manual/html/minaccum.html>+minaccum ::  Sig -> Sig -> SE ()+minaccum b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "minaccum" [(Xr,[Ar,Ar])] [a1,a2]
+ src/Csound/Typed/Opcode/SpectralProcessing.hs view
@@ -0,0 +1,1244 @@+module Csound.Typed.Opcode.SpectralProcessing (+    +    +    -- * STFT.+    ktableseg, pvadd, pvbufread, pvcross, pvinterp, pvoc, pvread, tableseg, tablexseg, vpvoc,+    +    -- * LPC.+    lpfreson, lpinterp, lpread, lpreson, lpslot,+    +    -- * Non-Standard.+    specaddm, specdiff, specdisp, specfilt, spechist, specptrk, specscal, specsum, spectrum,+    +    -- * Streaming.+    binit, partials, pvsadsyn, pvsanal, pvsarp, pvsbandp, pvsbandr, pvsbin, pvsblur, pvsbuffer, pvsbufread, pvsbufread2, pvscale, pvscent, pvscross, pvsdemix, pvsdiskin, pvsdisp, pvsfilter, pvsfread, pvsfreeze, pvsftr, pvsftw, pvsfwrite, pvsgain, pvshift, pvsifd, pvsin, pvsinfo, pvsinit, pvslock, pvsmaska, pvsmix, pvsmooth, pvsmorph, pvsosc, pvsout, pvspitch, pvstencil, pvsvoc, pvswarp, pvsynth, resyn, sinsyn, tradsyn, trcross, trfilter, trhighest, trlowest, trmix, trscale, trshift, trsplit,+    +    -- * ATS.+    atsAdd, atsAddnz, atsBufread, atsCross, atsInfo, atsInterpread, atsPartialtap, atsRead, atsReadnz, atsSinnoi,+    +    -- * Loris.+    lorismorph, lorisplay, lorisread) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- STFT.++-- | +-- Deprecated.+--+-- Deprecated. Use the tableseg opcode instead.+--+-- >  ktableseg  ifn1, idur1, ifn2 [, idur2] [, ifn3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/ktableseg.html>+ktableseg ::  Tab -> D -> Tab -> SE ()+ktableseg b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "ktableseg" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- Reads from a pvoc file and uses the data to perform additive synthesis.+--+-- pvadd reads from a pvoc file and uses the data to perform additive synthesis using an internal array of interpolating oscillators. The user supplies the wave table (usually one period of a sine wave), and can choose which analysis bins will be used in the re-synthesis.+--+-- > ares  pvadd  ktimpnt, kfmod, ifilcod, ifn, ibins [, ibinoffset] \+-- >           [, ibinincr] [, iextractmode] [, ifreqlim] [, igatefn]+--+-- csound doc: <http://www.csounds.com/manual/html/pvadd.html>+pvadd ::  Sig -> Sig -> Str -> Tab -> D -> Sig+pvadd b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unStr b3 <*> unTab b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "pvadd" [(Ar,[Kr,Kr,Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Reads from a phase vocoder analysis file and makes the retrieved data available.+--+-- pvbufread reads from a pvoc file and makes the retrieved data available to any following pvinterp and pvcross units that appear in an instrument before a subsequent pvbufread (just as lpread and lpreson work together). The data is passed internally and the unit has no output of its own.+--+-- >  pvbufread  ktimpnt, ifile+--+-- csound doc: <http://www.csounds.com/manual/html/pvbufread.html>+pvbufread ::  Sig -> Str -> SE ()+pvbufread b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = opcs "pvbufread" [(Xr,[Kr,Sr])] [a1,a2]++-- | +-- Applies the amplitudes from one phase vocoder analysis file to the data from a second file.+--+-- pvcross applies the amplitudes from one phase vocoder analysis file to the data from a second file and then performs the resynthesis. The data is passed, as described above, from a previously called pvbufread unit. The two k-rate amplitude arguments are used to scale the amplitudes of each files separately before they are added together and used in the resynthesis (see below for further explanation). The frequencies of the first file are not used at all in this process. This unit simply allows for cross-synthesis through the application of the amplitudes of the spectra of one signal to the frequencies of a second signal. Unlike pvinterp, pvcross does allow for the use of the ispecwp as in pvoc and vpvoc.+--+-- > ares  pvcross  ktimpnt, kfmod, ifile, kampscale1, kampscale2 [, ispecwp]+--+-- csound doc: <http://www.csounds.com/manual/html/pvcross.html>+pvcross ::  Sig -> Sig -> Str -> Sig -> Sig -> Sig+pvcross b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unStr b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "pvcross" [(Ar,[Kr,Kr,Sr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Interpolates between the amplitudes and frequencies of two phase vocoder analysis files.+--+-- pvinterp interpolates between the amplitudes and frequencies, on a bin by bin basis, of two phase vocoder analysis files (one from a previously called pvbufread unit and the other from within its own argument list), allowing for user defined transitions between analyzed sounds. It also allows for general scaling of the amplitudes and frequencies of each file separately before the interpolated values are calculated and sent to the resynthesis routines. The kfmod argument in pvinterp performs its frequency scaling on the frequency values after their derivation from the separate scaling and subsequent interpolation is performed so that this acts as an overall scaling value of the new frequency components.+--+-- > ares  pvinterp  ktimpnt, kfmod, ifile, kfreqscale1, kfreqscale2, \+-- >           kampscale1, kampscale2, kfreqinterp, kampinterp+--+-- csound doc: <http://www.csounds.com/manual/html/pvinterp.html>+pvinterp ::  Sig -> Sig -> Str -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+pvinterp b1 b2 b3 b4 b5 b6 b7 b8 b9 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unStr b3 <*> unSig b4 <*> unSig b5 <*> unSig b6 <*> unSig b7 <*> unSig b8 <*> unSig b9+    where f a1 a2 a3 a4 a5 a6 a7 a8 a9 = opcs "pvinterp" [(Ar,[Kr,Kr,Sr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1+                                                                                             ,a2+                                                                                             ,a3+                                                                                             ,a4+                                                                                             ,a5+                                                                                             ,a6+                                                                                             ,a7+                                                                                             ,a8+                                                                                             ,a9]++-- | +-- Implements signal reconstruction using an fft-based phase vocoder.+--+-- > ares  pvoc  ktimpnt, kfmod, ifilcod [, ispecwp] [, iextractmode] \+-- >           [, ifreqlim] [, igatefn]+--+-- csound doc: <http://www.csounds.com/manual/html/pvoc.html>+pvoc ::  Sig -> Sig -> Str -> Sig+pvoc b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unStr b3+    where f a1 a2 a3 = opcs "pvoc" [(Ar,[Kr,Kr,Sr,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Reads from a phase vocoder analysis file and returns the frequency and amplitude from a single analysis channel or bin.+--+-- pvread reads from a pvoc file and returns the frequency and amplitude from a single analysis channel or bin. The returned values can be used anywhere else in the Csound instrument. For example, one can use them as arguments to an oscillator to synthesize a single component from an analyzed signal or a bank of pvreads can be used to resynthesize the analyzed sound using additive synthesis by passing the frequency and magnitude values to a bank of oscillators.+--+-- > kfreq, kamp  pvread  ktimpnt, ifile, ibin+--+-- csound doc: <http://www.csounds.com/manual/html/pvread.html>+pvread :: Tuple a => Sig -> Str -> D -> a+pvread b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unStr b2 <*> unD b3+    where f a1 a2 a3 = mopcs "pvread" ([Kr,Kr],[Kr,Sr,Ir]) [a1,a2,a3]++-- | +-- Creates a new function table by making linear segments between values in stored function tables.+--+-- tableseg is like linseg but interpolate between values in a stored function tables. The result is a new function table passed internally to any following vpvoc which occurs before a subsequent tableseg (much like lpread/lpreson pairs work). The uses of these are described below under vpvoc.+--+-- >  tableseg  ifn1, idur1, ifn2 [, idur2] [, ifn3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/tableseg.html>+tableseg ::  Tab -> D -> Tab -> SE ()+tableseg b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "tableseg" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- Creates a new function table by making exponential segments between values in stored function tables.+--+-- tablexseg is like expseg but interpolate between values in a stored function tables. The result is a new function table passed internally to any following vpvoc which occurs before a subsequent tablexseg (much like lpread/lpreson pairs work). The uses of these are described below under vpvoc.+--+-- >  tablexseg  ifn1, idur1, ifn2 [, idur2] [, ifn3] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/tablexseg.html>+tablexseg ::  Tab -> D -> Tab -> SE ()+tablexseg b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3+    where f a1 a2 a3 = opcs "tablexseg" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- Implements signal reconstruction using an fft-based phase vocoder and an extra envelope.+--+-- > ares  vpvoc  ktimpnt, kfmod, ifile [, ispecwp] [, ifn]+--+-- csound doc: <http://www.csounds.com/manual/html/vpvoc.html>+vpvoc ::  Sig -> Sig -> Str -> Sig+vpvoc b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unStr b3+    where f a1 a2 a3 = opcs "vpvoc" [(Ar,[Kr,Kr,Sr,Ir,Ir])] [a1,a2,a3]++-- LPC.++-- | +-- Resynthesises a signal from the data passed internally by a previous lpread, applying formant shifting.+--+-- > ares  lpfreson  asig, kfrqratio+--+-- csound doc: <http://www.csounds.com/manual/html/lpfreson.html>+lpfreson ::  Sig -> Sig -> Sig+lpfreson b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "lpfreson" [(Ar,[Ar,Kr])] [a1,a2]++-- | +-- Computes a new set of poles from the interpolation between two analysis.+--+-- >  lpinterp  islot1, islot2, kmix+--+-- csound doc: <http://www.csounds.com/manual/html/lpinterp.html>+lpinterp ::  D -> D -> Sig -> SE ()+lpinterp b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unSig b3+    where f a1 a2 a3 = opcs "lpinterp" [(Xr,[Ir,Ir,Kr])] [a1,a2,a3]++-- | +-- Reads a control file of time-ordered information frames.+--+-- > krmsr, krmso, kerr, kcps  lpread  ktimpnt, ifilcod [, inpoles] [, ifrmrate]+--+-- csound doc: <http://www.csounds.com/manual/html/lpread.html>+lpread :: Tuple a => Sig -> Str -> a+lpread b1 b2 = pureTuple $ f <$> unSig b1 <*> unStr b2+    where f a1 a2 = mopcs "lpread" ([Kr,Kr,Kr,Kr],[Kr,Sr,Ir,Ir]) [a1,a2]++-- | +-- Resynthesises a signal from the data passed internally by a previous lpread.+--+-- > ares  lpreson  asig+--+-- csound doc: <http://www.csounds.com/manual/html/lpreson.html>+lpreson ::  Sig -> Sig+lpreson b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "lpreson" [(Ar,[Ar])] [a1]++-- | +-- Selects the slot to be use by further lp opcodes.+--+-- >  lpslot  islot+--+-- csound doc: <http://www.csounds.com/manual/html/lpslot.html>+lpslot ::  D -> SE ()+lpslot b1 = SE $ (depT_ =<<) $ lift $ f <$> unD b1+    where f a1 = opcs "lpslot" [(Xr,[Ir])] [a1]++-- Non-Standard.++-- | +-- Perform a weighted add of two input spectra.+--+-- > wsig  specaddm  wsig1, wsig2 [, imul2]+--+-- csound doc: <http://www.csounds.com/manual/html/specaddm.html>+specaddm ::  Wspec -> Wspec -> Wspec+specaddm b1 b2 = Wspec $ f <$> unWspec b1 <*> unWspec b2+    where f a1 a2 = opcs "specaddm" [(Wr,[Wr,Wr,Ir])] [a1,a2]++-- | +-- Finds the positive difference values between consecutive spectral frames.+--+-- > wsig  specdiff  wsigin+--+-- csound doc: <http://www.csounds.com/manual/html/specdiff.html>+specdiff ::  Wspec -> Wspec+specdiff b1 = Wspec $ f <$> unWspec b1+    where f a1 = opcs "specdiff" [(Wr,[Wr])] [a1]++-- | +-- Displays the magnitude values of the spectrum.+--+-- >  specdisp  wsig, iprd [, iwtflg]+--+-- csound doc: <http://www.csounds.com/manual/html/specdisp.html>+specdisp ::  Wspec -> D -> SE ()+specdisp b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unWspec b1 <*> unD b2+    where f a1 a2 = opcs "specdisp" [(Xr,[Wr,Ir,Ir])] [a1,a2]++-- | +-- Filters each channel of an input spectrum.+--+-- > wsig  specfilt  wsigin, ifhtim+--+-- csound doc: <http://www.csounds.com/manual/html/specfilt.html>+specfilt ::  Wspec -> D -> Wspec+specfilt b1 b2 = Wspec $ f <$> unWspec b1 <*> unD b2+    where f a1 a2 = opcs "specfilt" [(Wr,[Wr,Ir])] [a1,a2]++-- | +-- Accumulates the values of successive spectral frames.+--+-- > wsig  spechist  wsigin+--+-- csound doc: <http://www.csounds.com/manual/html/spechist.html>+spechist ::  Wspec -> Wspec+spechist b1 = Wspec $ f <$> unWspec b1+    where f a1 = opcs "spechist" [(Wr,[Wr])] [a1]++-- | +-- Estimates the pitch of the most prominent complex tone in the spectrum.+--+-- Estimate the pitch of the most prominent complex tone in the spectrum.+--+-- > koct, kamp  specptrk  wsig, kvar, ilo, ihi, istr, idbthresh, inptls, \+-- >           irolloff [, iodd] [, iconfs] [, interp] [, ifprd] [, iwtflg]+--+-- csound doc: <http://www.csounds.com/manual/html/specptrk.html>+specptrk :: Tuple a => Wspec -> Sig -> D -> D -> D -> D -> D -> D -> a+specptrk b1 b2 b3 b4 b5 b6 b7 b8 = pureTuple $ f <$> unWspec b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7 <*> unD b8+    where f a1 a2 a3 a4 a5 a6 a7 a8 = mopcs "specptrk" ([Kr,Kr]+                                                       ,[Wr,Kr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4,a5,a6,a7,a8]++-- | +-- Scales an input spectral datablock with spectral envelopes.+--+-- > wsig  specscal  wsigin, ifscale, ifthresh+--+-- csound doc: <http://www.csounds.com/manual/html/specscal.html>+specscal ::  Wspec -> D -> D -> Wspec+specscal b1 b2 b3 = Wspec $ f <$> unWspec b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "specscal" [(Wr,[Wr,Ir,Ir])] [a1,a2,a3]++-- | +-- Sums the magnitudes across all channels of the spectrum.+--+-- > ksum  specsum  wsig [, interp]+--+-- csound doc: <http://www.csounds.com/manual/html/specsum.html>+specsum ::  Wspec -> Sig+specsum b1 = Sig $ f <$> unWspec b1+    where f a1 = opcs "specsum" [(Kr,[Wr,Ir])] [a1]++-- | +-- Generate a constant-Q, exponentially-spaced DFT.+--+-- Generate a constant-Q, exponentially-spaced DFT across all octaves of a multiply-downsampled control or audio input signal.+--+-- > wsig  spectrum  xsig, iprd, iocts, ifrqa [, iq] [, ihann] [, idbout] \+-- >           [, idsprd] [, idsinrs]+--+-- csound doc: <http://www.csounds.com/manual/html/spectrum.html>+spectrum ::  Sig -> D -> D -> D -> Wspec+spectrum b1 b2 b3 b4 = Wspec $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "spectrum" [(Wr,[Xr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- Streaming.++-- | +-- PVS tracks to amplitude+frequency conversion.+--+-- The binit opcode takes an input containg a TRACKS pv streaming signal (as generated,+--   for instance by partials) and converts it into a equal-bandwidth bin-frame containing amplitude+--   and frequency pairs (PVS_AMP_FREQ), suitable for overlap-add resynthesis (such as performed by +--   pvsynth) or further PVS streaming phase vocoder signal transformations. For each frequency bin,+--   it will look for a suitable track signal to fill it; if not found, the bin will be empty (0 amplitude).+--   If more than one track fits a certain bin, the one with highest amplitude will be chosen. This+--   means that not all of the input signal is actually 'binned', the operation is lossy. However, in+--   many situations this loss is not perceptually relevant.+--+-- > fsig  binit  fin, isize+--+-- csound doc: <http://www.csounds.com/manual/html/binit.html>+binit ::  Spec -> D -> Spec+binit b1 b2 = Spec $ f <$> unSpec b1 <*> unD b2+    where f a1 a2 = opcs "binit" [(Fr,[Fr,Ir])] [a1,a2]++-- | +-- Partial track spectral analysis.+--+-- The partials opcode takes two input PV streaming signals containg AMP_FREQ and AMP_PHASE signals (as generated+--   for instance by pvsifd or in the first case, by pvsanal) and performs partial track analysis,+--   as described in Lazzarini et al, "Time-stretching using the Instantaneous Frequency Distribution and Partial+--   Tracking", Proc.of ICMC05, Barcelona. It generates a TRACKS PV streaming signal, containing amplitude, frequency, +--   phase and track ID for each output track. This type of signal will contain a variable number of output tracks,+--   up to the total number of analysis bins contained in the inputs (fftsize/2 + 1 bins). The second input (AMP_PHASE) +--   is optional, as it can take the same signal as the first input. In this case, however, all phase information will +--   be NULL and resynthesis using phase information cannot be performed.+--+-- > ftrks  partials  ffr, fphs, kthresh, kminpts, kmaxgap, imaxtracks+--+-- csound doc: <http://www.csounds.com/manual/html/partials.html>+partials ::  Spec -> Spec -> Sig -> Sig -> Sig -> D -> Spec+partials b1 b2 b3 b4 b5 b6 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3 <*> unSig b4 <*> unSig b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "partials" [(Fr,[Fr,Fr,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Resynthesize using a fast oscillator-bank.+--+-- > ares  pvsadsyn  fsrc, inoscs, kfmod [, ibinoffset] [, ibinincr] [, iinit]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsadsyn.html>+pvsadsyn ::  Spec -> D -> Sig -> Sig+pvsadsyn b1 b2 b3 = Sig $ f <$> unSpec b1 <*> unD b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvsadsyn" [(Ar,[Fr,Ir,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Generate an fsig from a mono audio source ain, using phase vocoder overlap-add analysis.+--+-- > fsig  pvsanal  ain, ifftsize, ioverlap, iwinsize, iwintype [, iformat] [, iinit]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsanal.html>+pvsanal ::  Sig -> D -> D -> D -> D -> Spec+pvsanal b1 b2 b3 b4 b5 = Spec $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "pvsanal" [(Fr,[Ar,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Arpeggiate the spectral components of a streaming pv signal.+--+-- This opcode arpeggiates spectral components, by amplifying one bin and attenuating+--     all the others around it. Used with an LFO it will provide a spectral arpeggiator similar to Trevor Wishart's+--     CDP program specarp.+--+-- > fsig  pvsarp  fsigin, kbin, kdepth, kgain+--+-- csound doc: <http://www.csounds.com/manual/html/pvsarp.html>+pvsarp ::  Spec -> Sig -> Sig -> Sig -> Spec+pvsarp b1 b2 b3 b4 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "pvsarp" [(Fr,[Fr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- A band pass filter working in the spectral domain.+--+-- Filter the pvoc frames, passing bins whose frequency is within a+--       band, and with linear interpolation for transitional bands.+--+-- > fsig  pvsbandp  fsigin, xlowcut, xlowfull, \+-- >           xhighfull, xhighcut[, ktype]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsbandp.html>+pvsbandp ::  Spec -> Sig -> Sig -> Sig -> Sig -> Spec+pvsbandp b1 b2 b3 b4 b5 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "pvsbandp" [(Fr,[Fr,Xr,Xr,Xr,Xr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- A band reject filter working in the spectral domain.+--+-- Filter the pvoc frames, rejecting bins whose frequency is within a+--       band, and with linear interpolation for transitional bands.+--+-- > fsig  pvsbandr  fsigin, xlowcut, xlowfull, \+-- >           xhighfull, xhighcut[, ktype]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsbandr.html>+pvsbandr ::  Spec -> Sig -> Sig -> Sig -> Sig -> Spec+pvsbandr b1 b2 b3 b4 b5 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "pvsbandr" [(Fr,[Fr,Xr,Xr,Xr,Xr,Kr])] [a1,a2,a3,a4,a5]++-- | +-- Obtain the amp and freq values off a PVS signal bin.+--+-- Obtain the amp and freq values off a PVS signal bin as k-rate variables.+--+-- > kamp, kfr  pvsbin  fsig, kbin+--+-- csound doc: <http://www.csounds.com/manual/html/pvsbin.html>+pvsbin :: Tuple a => Spec -> Sig -> a+pvsbin b1 b2 = pureTuple $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = mopcs "pvsbin" ([Kr,Kr],[Fr,Kr]) [a1,a2]++-- | +-- Average the amp/freq time functions of each analysis channel for+--     a specified time.+--+-- Average the amp/freq time functions of each analysis channel for+--     a specified time (truncated to number of frames). As a side-effect+--     the input pvoc stream will be delayed by that amount.+--+-- > fsig  pvsblur  fsigin, kblurtime, imaxdel+--+-- csound doc: <http://www.csounds.com/manual/html/pvsblur.html>+pvsblur ::  Spec -> Sig -> D -> Spec+pvsblur b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "pvsblur" [(Fr,[Fr,Kr,Ir])] [a1,a2,a3]++-- | +-- This opcode creates and writes to a circular buffer for f-signals (streaming PV signals).+--+-- This opcode sets up and writes to a circular buffer of length ilen (secs),+--         giving a handle for the buffer and a time pointer, which holds the+--         current write position (also in seconds). It can be used with one or +--         more pvsbufread opcodes. Writing is circular, wrapping around at the+--         end of the buffer.+--+-- > ihandle, ktime   pvsbuffer  fsig, ilen +--+-- csound doc: <http://www.csounds.com/manual/html/pvsbuffer.html>+pvsbuffer :: Tuple a => Spec -> D -> a+pvsbuffer b1 b2 = pureTuple $ f <$> unSpec b1 <*> unD b2+    where f a1 a2 = mopcs "pvsbuffer" ([Ir,Kr],[Fr,Ir]) [a1,a2]++-- | +-- This opcode reads a circular buffer of f-signals (streaming PV signals).+--+-- This opcode reads from a circular buffer of length ilen (secs),+--       taking a handle for the buffer and a time pointer, which holds the+--       current read position (also in seconds). It is used in conjunction with a+--       pvsbuffer opocde. +--       Reading is circular, wrapping around at the end of the buffer.+--+-- > fsig  pvsbufread   ktime, khandle[, ilo, ihi, iclear] +--+-- csound doc: <http://www.csounds.com/manual/html/pvsbufread.html>+pvsbufread ::  Sig -> Sig -> Spec+pvsbufread b1 b2 = Spec $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "pvsbufread" [(Fr,[Kr,Kr,Ir,Ir,Ir])] [a1,a2]++-- | +-- This opcode reads a circular buffer of f-signals (streaming PV signals), with binwise additional delays.+--+-- This opcode reads from a circular buffer of length ilen (secs),+--       taking a handle for the buffer and a time pointer, which holds the+--       current read position (also in seconds). It is used in conjunction with a pvsbuffer opocde. +--       Reading is circular, wrapping around at the end of the buffer. Extra delay times are taken from+--       a function table, with each point on it defining a delay time in seconds affecting the corresponding bin.+--+-- > fsig  pvsbufread2   ktime, khandle, ift1, ift2 +--+-- csound doc: <http://www.csounds.com/manual/html/pvsbufread2.html>+pvsbufread2 ::  Sig -> Sig -> D -> D -> Spec+pvsbufread2 b1 b2 b3 b4 = Spec $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "pvsbufread2" [(Fr,[Kr,Kr,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Scale the frequency components of a pv stream.+--+-- Scale the frequency components of a pv stream, resulting+--       in pitch shift. Output amplitudes can be optionally modified in order+--       to attempt formant preservation.+--+-- > fsig  pvscale  fsigin, kscal[, kkeepform, kgain, kcoefs]+--+-- csound doc: <http://www.csounds.com/manual/html/pvscale.html>+pvscale ::  Spec -> Sig -> Spec+pvscale b1 b2 = Spec $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = opcs "pvscale" [(Fr,[Fr,Kr,Kr,Kr,Kr])] [a1,a2]++-- | +-- Calculate the spectral centroid of a signal.+--+-- Calculate the spectral centroid of a signal from its discrete Fourier transform.+--+-- > kcent  pvscent  fsig+--+-- csound doc: <http://www.csounds.com/manual/html/pvscent.html>+pvscent ::  Spec -> Sig+pvscent b1 = Sig $ f <$> unSpec b1+    where f a1 = opcs "pvscent" [(Kr,[Fr])] [a1]++-- | +-- Performs cross-synthesis between two source fsigs.+--+-- > fsig  pvscross  fsrc, fdest, kamp1, kamp2+--+-- csound doc: <http://www.csounds.com/manual/html/pvscross.html>+pvscross ::  Spec -> Spec -> Sig -> Sig -> Spec+pvscross b1 b2 b3 b4 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "pvscross" [(Fr,[Fr,Fr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Spectral azimuth-based de-mixing of stereo sources.+--+-- Spectral azimuth-based de-mixing of stereo sources, with a reverse-panning result. This+--       opcode implements the Azimuth Discrimination and Resynthesis (ADRess) algorithm, developed by+--       Dan Barry (Barry et Al. "Sound Source Separation Azimuth Discrimination and Resynthesis". DAFx'04, +--       Univ. of Napoli). The source separation, or de-mixing, is controlled by two parameters: an azimuth+--       position (kpos) and a subspace width (kwidth). The first one is used to locate the spectral peaks of +--       individual sources on a stereo mix, whereas the second widens the 'search space', including/exclufing +--       the peaks around kpos. These two parameters can be used interactively to extract source sounds from+--       a stereo mix. The algorithm is particularly successful with studio recordings where individual instruments+--       occupy individual panning positions; it is, in fact, a reverse-panning algorithm.+--+-- > fsig  pvsdemix  fleft, fright, kpos, kwidth, ipoints+--+-- csound doc: <http://www.csounds.com/manual/html/pvsdemix.html>+pvsdemix ::  Spec -> Spec -> Sig -> Sig -> D -> Spec+pvsdemix b1 b2 b3 b4 b5 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3 <*> unSig b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "pvsdemix" [(Fr,[Fr,Fr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Read a selected channel from a PVOC-EX analysis file.+--+-- Create an fsig stream by reading a selected channel from a PVOC-EX analysis file, with frame interpolation.+--+-- > fsig  pvsdiskin  SFname,ktscal,kgain[,ioffset, ichan]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsdiskin.html>+pvsdiskin ::  Str -> Sig -> Sig -> Spec+pvsdiskin b1 b2 b3 = Spec $ f <$> unStr b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvsdiskin" [(Fr,[Sr,Kr,Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- Displays a PVS signal as an amplitude vs. freq graph.+--+-- This opcode will display a PVS signal fsig. Uses X11 or  FLTK windows if enabled, else +-- 	  (or if -g flag is set) +-- 	  displays are approximated in ASCII characters.+--+-- >  pvsdisp  fsig[, ibins, iwtflg] +--+-- csound doc: <http://www.csounds.com/manual/html/pvsdisp.html>+pvsdisp ::  Spec -> SE ()+pvsdisp b1 = SE $ (depT_ =<<) $ lift $ f <$> unSpec b1+    where f a1 = opcs "pvsdisp" [(Xr,[Fr,Ir,Ir])] [a1]++-- | +-- Multiply amplitudes of a pvoc stream by those of a second+-- pvoc stream, with dynamic scaling.+--+-- > fsig  pvsfilter  fsigin, fsigfil, kdepth[, igain]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsfilter.html>+pvsfilter ::  Spec -> Spec -> Sig -> Spec+pvsfilter b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvsfilter" [(Fr,[Fr,Fr,Kr,Ir])] [a1,a2,a3]++-- | +-- Read a selected channel from a PVOC-EX analysis file.+--+-- Create an fsig stream by reading a selected channel from a PVOC-EX analysis file loaded into memory, with frame interpolation. Only format 0 files (amplitude+frequency) are currently supported. The operation of this opcode mirrors that of pvoc, but outputs an fsig instead of a resynthesized signal.+--+-- > fsig  pvsfread  ktimpt, ifn [, ichan]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsfread.html>+pvsfread ::  Sig -> Tab -> Spec+pvsfread b1 b2 = Spec $ f <$> unSig b1 <*> unTab b2+    where f a1 a2 = opcs "pvsfread" [(Fr,[Kr,Ir,Ir])] [a1,a2]++-- | +-- Freeze the amplitude and frequency time functions of a pv stream according to a control-rate+--       trigger.+--+-- This opcodes 'freezes' the evolution of pvs stream by locking into steady amplitude and/or+--       frequency values for each bin. The freezing is controlled, independently for amplitudes and+--       frequencies, by a control-rate trigger, which switches the freezing 'on' if equal to or above+--       1 and 'off' if below 1.+--+-- > fsig  pvsfreeze  fsigin, kfreeza, kfreezf+--+-- csound doc: <http://www.csounds.com/manual/html/pvsfreeze.html>+pvsfreeze ::  Spec -> Sig -> Sig -> Spec+pvsfreeze b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvsfreeze" [(Fr,[Fr,Kr,Kr])] [a1,a2,a3]++-- | +-- Reads amplitude and/or frequency data from function tables.+--+-- >  pvsftr  fsrc, ifna [, ifnf]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsftr.html>+pvsftr ::  Spec -> Tab -> SE ()+pvsftr b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSpec b1 <*> unTab b2+    where f a1 a2 = opcs "pvsftr" [(Xr,[Fr,Ir,Ir])] [a1,a2]++-- | +-- Writes amplitude and/or frequency data to function tables.+--+-- > kflag  pvsftw  fsrc, ifna [, ifnf]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsftw.html>+pvsftw ::  Spec -> Tab -> Sig+pvsftw b1 b2 = Sig $ f <$> unSpec b1 <*> unTab b2+    where f a1 a2 = opcs "pvsftw" [(Kr,[Fr,Ir,Ir])] [a1,a2]++-- | +-- Write a fsig to a PVOCEX file.+--+-- This opcode writes a fsig to a PVOCEX file (which in turn can be read by pvsfread or other programs that support PVOCEX file input).+--+-- >  pvsfwrite  fsig, ifile+--+-- csound doc: <http://www.csounds.com/manual/html/pvsfwrite.html>+pvsfwrite ::  Spec -> Str -> SE ()+pvsfwrite b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSpec b1 <*> unStr b2+    where f a1 a2 = opcs "pvsfwrite" [(Xr,[Fr,Sr])] [a1,a2]++-- | +-- Scale the amplitude of a pv stream.+--+-- > fsig  pvsgain  fsigin, kgain +--+-- csound doc: <http://www.csounds.com/manual/html/pvsgain.html>+pvsgain ::  Spec -> Sig -> Spec+pvsgain b1 b2 = Spec $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = opcs "pvsgain" [(Fr,[Fr,Kr])] [a1,a2]++-- | +-- Shift the frequency components of a pv stream, stretching/compressing+--       its spectrum.+--+-- > fsig  pvshift  fsigin, kshift, klowest[, kkeepform, igain, kcoefs]+--+-- csound doc: <http://www.csounds.com/manual/html/pvshift.html>+pvshift ::  Spec -> Sig -> Sig -> Spec+pvshift b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvshift" [(Fr,[Fr,Kr,Kr,Kr,Ir,Kr])] [a1,a2,a3]++-- | +-- Instantaneous Frequency Distribution, magnitude and phase analysis.+--+-- The pvsifd opcode takes an input a-rate signal and performs an Instantaneous Frequency,+--   magnitude and phase analysis, using the STFT and pvsifd (Instantaneous Frequency Distribution),+--   as described in Lazzarini et al, "Time-stretching using the Instantaneous Frequency Distribution and Partial+--   Tracking", Proc.of ICMC05, Barcelona. It generates two PV streaming signals, one containing the+--   amplitudes and frequencies (a similar output to pvsanal) and another containing amplitudes and +--   unwrapped phases.+--+-- > ffr,fphs  pvsifd  ain, ifftsize, ihopsize, iwintype[,iscal]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsifd.html>+pvsifd :: Tuple a => Sig -> D -> D -> D -> a+pvsifd b1 b2 b3 b4 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = mopcs "pvsifd" ([Fr,Fr],[Ar,Ir,Ir,Ir,Ir]) [a1,a2,a3,a4]++-- | +-- Retrieve an fsig from the input software bus; a pvs equivalent to chani.+--+-- This opcode retrieves an f-sig from the pvs in software bus, which can be+--       used to get data from an external source, using the Csound 5 API. A channel+--       is created if not already existing. The fsig channel is in that case initialised with+--       the given parameters. It is important to note that the pvs input+--       and output (pvsout opcode) busses are independent and data is not shared between them.+--+-- > fsig  pvsin  kchan[, isize, iolap, iwinsize, iwintype, iformat]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsin.html>+pvsin ::  Sig -> Spec+pvsin b1 = Spec $ f <$> unSig b1+    where f a1 = opcs "pvsin" [(Fr,[Kr,Ir,Ir,Ir,Ir,Ir])] [a1]++-- | +-- Get information from a PVOC-EX formatted source.+--+-- Get format information about fsrc, whether created by an opcode such as pvsanal, or obtained from a PVOCEX file by pvsfread. This information is available at init time, and can be used to set parameters for other pvs opcodes, and in particular for creating function tables (e.g. for pvsftw), or setting the number of oscillators for pvsadsyn.+--+-- > ioverlap, inumbins, iwinsize, iformat  pvsinfo  fsrc+--+-- csound doc: <http://www.csounds.com/manual/html/pvsinfo.html>+pvsinfo :: Tuple a => Spec -> a+pvsinfo b1 = pureTuple $ f <$> unSpec b1+    where f a1 = mopcs "pvsinfo" ([Ir,Ir,Ir,Ir],[Fr]) [a1]++-- | +-- Initialise a spectral (f) variable to zero.+--+-- Performs the equivalent to an init operation on an f-variable.+--+-- > fsig  pvsinit  isize[, iolap, iwinsize, iwintype, iformat]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsinit.html>+pvsinit ::  D -> Spec+pvsinit b1 = Spec $ f <$> unD b1+    where f a1 = opcs "pvsinit" [(Fr,[Ir,Ir,Ir,Ir,Ir])] [a1]++-- | +-- Frequency lock an input fsig+--+-- This opcode searches for spectral peaks and then locks the frequencies around those peaks. This is similar to+--       phase-locking in non-streaming PV processing. It can be used to improve timestretching and pitch-shifting quality in+--       PV processing.+--+-- > fsig  pvslock  fsigin, klock+--+-- csound doc: <http://www.csounds.com/manual/html/pvslock.html>+pvslock ::  Spec -> Sig -> Spec+pvslock b1 b2 = Spec $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = opcs "pvslock" [(Fr,[Fr,Kr])] [a1,a2]++-- | +-- Modify amplitudes using a function table, with dynamic scaling.+--+-- Modify amplitudes of fsrc using  function table, with dynamic scaling.+--+-- > fsig  pvsmaska  fsrc, ifn, kdepth+--+-- csound doc: <http://www.csounds.com/manual/html/pvsmaska.html>+pvsmaska ::  Spec -> Tab -> Sig -> Spec+pvsmaska b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvsmaska" [(Fr,[Fr,Ir,Kr])] [a1,a2,a3]++-- | +-- Mix 'seamlessly' two pv signals.+--+-- Mix 'seamlessly' two pv signals.  This opcode combines the+--       most prominent components of two pvoc streams into a single+--       mixed stream.+--+-- > fsig  pvsmix  fsigin1, fsigin2+--+-- csound doc: <http://www.csounds.com/manual/html/pvsmix.html>+pvsmix ::  Spec -> Spec -> Spec+pvsmix b1 b2 = Spec $ f <$> unSpec b1 <*> unSpec b2+    where f a1 a2 = opcs "pvsmix" [(Fr,[Fr,Fr])] [a1,a2]++-- | +-- Smooth the amplitude and frequency time functions of a pv stream using parallel 1st order+--       lowpass IIR filters with time-varying cutoff frequency.+--+-- Smooth the amplitude and frequency time functions of a pv stream using a 1st order+--       lowpass IIR with time-varying cutoff frequency. This opcode uses the same filter +--       as the tone opcode, but this time acting separately on the amplitude and frequency+--       time functions that make up a pv stream. The cutoff frequency parameter runs at the+--       control-rate, but unlike tone and tonek, it is not specified in Hz, but as fractions+--       of 1/2 frame-rate (actually the pv stream sampling rate), which is easier to+--       understand. This means that the highest cutoff frequency is 1 and the lowest 0; the lower+--       the frequency the smoother the functions and more pronounced the effect will be.+--+-- > fsig  pvsmooth  fsigin, kacf, kfcf+--+-- csound doc: <http://www.csounds.com/manual/html/pvsmooth.html>+pvsmooth ::  Spec -> Sig -> Sig -> Spec+pvsmooth b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvsmooth" [(Fr,[Fr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs morphing (or interpolation) between two source fsigs.+--+-- Performs morphing (or interpolation)  between two source fsigs.+--+-- > fsig  pvsmorph  fsig1, fsig2, kampint, kfrqint+--+-- csound doc: <http://www.csounds.com/manual/html/pvsmorph.html>+pvsmorph ::  Spec -> Spec -> Sig -> Sig -> Spec+pvsmorph b1 b2 b3 b4 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "pvsmorph" [(Fr,[Fr,Fr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- PVS-based oscillator simulator.+--+-- Generates periodic signal spectra in AMP-FREQ format, with the option of four wave types:+--+-- > fsig  pvsosc  kamp, kfreq, ktype, isize [,ioverlap] [, iwinsize] [, iwintype] [, iformat]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsosc.html>+pvsosc ::  Sig -> Sig -> Sig -> D -> Spec+pvsosc b1 b2 b3 b4 = Spec $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "pvsosc" [(Fr,[Kr,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Write a fsig to the pvs output bus.+--+-- This opcode writes a fsig to a channel of the pvs output bus. Note that the pvs out bus and+-- 	    the pvs in bus are separate and independent. A new channel is created if non-existent.+--+-- >  pvsout  fsig, kchan+--+-- csound doc: <http://www.csounds.com/manual/html/pvsout.html>+pvsout ::  Spec -> Sig -> SE ()+pvsout b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = opcs "pvsout" [(Xr,[Fr,Kr])] [a1,a2]++-- | +-- Track the pitch and amplitude of a PVS signal.+--+-- Track the pitch and amplitude of a PVS signal as k-rate variables.+--+-- > kfr, kamp  pvspitch  fsig, kthresh+--+-- csound doc: <http://www.csounds.com/manual/html/pvspitch.html>+pvspitch :: Tuple a => Spec -> Sig -> a+pvspitch b1 b2 = pureTuple $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = mopcs "pvspitch" ([Kr,Kr],[Fr,Kr]) [a1,a2]++-- | +-- Transforms a pvoc stream according to a masking function table.+--+-- Transforms a pvoc stream according to a masking function table;+--       if the pvoc stream amplitude falls below the value of the function+--       for a specific pvoc channel, it applies a gain to that channel.+--+-- > fsig  pvstencil  fsigin, kgain, klevel, iftable+--+-- csound doc: <http://www.csounds.com/manual/html/pvstencil.html>+pvstencil ::  Spec -> Sig -> Sig -> D -> Spec+pvstencil b1 b2 b3 b4 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "pvstencil" [(Fr,[Fr,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Combine the spectral envelope of one fsig with the excitation (frequencies) of another.+--+-- This opcode provides support for cross-synthesis of amplitudes and frequencies. It takes+--     the amplitudes of one input fsig and combines with frequencies from another. It is a spectral+--     version of the well-known channel vocoder.+--+-- > fsig  pvsvoc  famp, fexc, kdepth, kgain [,kcoefs]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsvoc.html>+pvsvoc ::  Spec -> Spec -> Sig -> Sig -> Spec+pvsvoc b1 b2 b3 b4 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "pvsvoc" [(Fr,[Fr,Fr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Warp the spectral envelope of a PVS signal+--+-- Warp the spectral envelope of a PVS signal by means of shifting and scaling.+--+-- > fsig  pvswarp  fsigin, kscal, kshift[, klowest, kmeth, kgain, kcoefs]+--+-- csound doc: <http://www.csounds.com/manual/html/pvswarp.html>+pvswarp ::  Spec -> Sig -> Sig -> Spec+pvswarp b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "pvswarp" [(Fr,[Fr,Kr,Kr,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Resynthesise using a FFT overlap-add.+--+-- Resynthesise phase vocoder data (f-signal) using a FFT overlap-add.+--+-- > ares  pvsynth  fsrc, [iinit]+--+-- csound doc: <http://www.csounds.com/manual/html/pvsynth.html>+pvsynth ::  Spec -> Sig+pvsynth b1 = Sig $ f <$> unSpec b1+    where f a1 = opcs "pvsynth" [(Ar,[Fr,Ir])] [a1]++-- | +-- Streaming partial track additive synthesis with cubic phase interpolation with+-- pitch control and support for timescale-modified input+--+-- The resyn opcode takes an input containg a TRACKS pv streaming signal (as generated,+--   for instance by partials). It resynthesises the signal using linear amplitude and cubic phase+--   interpolation to drive a bank of interpolating oscillators with amplitude and pitch scaling controls. Resyn is+--   a modified version of sinsyn, allowing for the resynthesis of data with pitch and timescale changes.+--+-- > asig  resyn  fin, kscal, kpitch, kmaxtracks, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/resyn.html>+resyn ::  Spec -> Sig -> Sig -> Sig -> Tab -> Sig+resyn b1 b2 b3 b4 b5 = Sig $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "resyn" [(Ar,[Fr,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Streaming partial track additive synthesis with cubic phase interpolation+--+-- The sinsyn opcode takes an input containg a TRACKS pv streaming signal (as generated,+--   for instance by the partials opcode). It resynthesises the signal using linear amplitude and cubic phase+--   interpolation to drive a bank of interpolating oscillators with amplitude scaling control. sinsyn +--   attempts to preserve the phase of the partials in the original signal and in so doing it does not allow for+--   pitch or timescale modifications of the signal.+--+-- > asig  sinsyn  fin, kscal, kmaxtracks, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/sinsyn.html>+sinsyn ::  Spec -> Sig -> Sig -> Tab -> Sig+sinsyn b1 b2 b3 b4 = Sig $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unTab b4+    where f a1 a2 a3 a4 = opcs "sinsyn" [(Ar,[Fr,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Streaming partial track additive synthesis+--+-- The tradsyn opcode takes an input containg a TRACKS pv streaming signal (as generated,+--       for instance by partials),as described in Lazzarini et al, "Time-stretching using the Instantaneous Frequency Distribution and Partial+--       Tracking", Proc.of ICMC05, Barcelona. It resynthesises the signal using linear amplitude and frequency+--       interpolation to drive a bank of interpolating oscillators with amplitude and pitch scaling controls.+--+-- > asig  tradsyn  fin, kscal, kpitch, kmaxtracks, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/tradsyn.html>+tradsyn ::  Spec -> Sig -> Sig -> Sig -> Tab -> Sig+tradsyn b1 b2 b3 b4 b5 = Sig $ f <$> unSpec b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "tradsyn" [(Ar,[Fr,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Streaming partial track cross-synthesis.+--+-- The trcross opcode takes two inputs containg TRACKS pv streaming signals (as generated,+--       for instance by partials) and cross-synthesises them into a single TRACKS stream. Two+--       different modes of operation are used: mode 0, cross-synthesis by multiplication of+--       the amplitudes of the two inputs and mode 1, cross-synthesis by the substititution of+--       the amplitudes of input 1 by the input 2. Frequencies and phases of input 1 are preserved+--       in the output. The cross-synthesis is done by matching tracks between the two inputs using+--       a 'search interval'. The matching algorithm will look for tracks in the second input that +--       are within the search interval around each track in the first input. This interval can be changed+--       at the control rate. Wider search intervals will find more matches.+--+-- > fsig  trcross  fin1, fin2, ksearch, kdepth [, kmode] +--+-- csound doc: <http://www.csounds.com/manual/html/trcross.html>+trcross ::  Spec -> Spec -> Sig -> Sig -> Spec+trcross b1 b2 b3 b4 = Spec $ f <$> unSpec b1 <*> unSpec b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "trcross" [(Fr,[Fr,Fr,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Streaming partial track filtering.+--+-- The trfilter opcode takes an input containg a TRACKS pv streaming signal (as generated,+--       for instance by partials) and filters it using an amplitude response curve stored in+--       a function table. The function table can have any size (no restriction to powers-of-two).+--       The table lookup is done by linear-interpolation. It is possible to create time-varying+--       filter curves by updating the amlitude response table with a table-writing opcode.+--+-- > fsig  trfilter  fin, kamnt, ifn+--+-- csound doc: <http://www.csounds.com/manual/html/trfilter.html>+trfilter ::  Spec -> Sig -> Tab -> Spec+trfilter b1 b2 b3 = Spec $ f <$> unSpec b1 <*> unSig b2 <*> unTab b3+    where f a1 a2 a3 = opcs "trfilter" [(Fr,[Fr,Kr,Ir])] [a1,a2,a3]++-- | +-- Extracts the highest-frequency track from a streaming track input signal.+--+-- The trhighest opcode takes an input containg TRACKS pv streaming signals (as generated,+--       for instance by partials) and outputs only the highest track. In addition it outputs+--       two k-rate signals, corresponding to the frequency and amplitude of the highest track+--       signal.+--+-- > fsig, kfr, kamp  trhighest  fin1, kscal+--+-- csound doc: <http://www.csounds.com/manual/html/trhighest.html>+trhighest :: Tuple a => Spec -> Sig -> a+trhighest b1 b2 = pureTuple $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = mopcs "trhighest" ([Fr,Kr,Kr],[Fr,Kr]) [a1,a2]++-- | +-- Extracts the lowest-frequency track from a streaming track input signal.+--+-- The trlowest opcode takes an input containg TRACKS pv streaming signals (as generated,+--       for instance by partials) and outputs only the lowest track. In addition it outputs+--       two k-rate signals, corresponding to the frequency and amplitude of the lowest track+--       signal.+--+-- > fsig, kfr, kamp  trlowest  fin1, kscal+--+-- csound doc: <http://www.csounds.com/manual/html/trlowest.html>+trlowest :: Tuple a => Spec -> Sig -> a+trlowest b1 b2 = pureTuple $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = mopcs "trlowest" ([Fr,Kr,Kr],[Fr,Kr]) [a1,a2]++-- | +-- Streaming partial track mixing.+--+-- The trmix opcode takes two inputs containg TRACKS pv streaming signals (as generated,+--       for instance by partials) and mixes them into a single TRACKS stream. Tracks will be+--       mixed up to the available space (defined by the original number of FFT bins in +--       the analysed signals). If the sum of the input tracks exceeds this space, the higher-ordered+--       tracks in the second input will be pruned.+--+-- > fsig  trmix  fin1, fin2 +--+-- csound doc: <http://www.csounds.com/manual/html/trmix.html>+trmix ::  Spec -> Spec -> Spec+trmix b1 b2 = Spec $ f <$> unSpec b1 <*> unSpec b2+    where f a1 a2 = opcs "trmix" [(Fr,[Fr,Fr])] [a1,a2]++-- | +-- Streaming partial track frequency scaling.+--+-- The trscale opcode takes an input containg a TRACKS pv streaming signal (as generated,+--       for instance by partials) and scales all frequencies by a k-rate amount. It can also, optionally,+--       scale the gain of the signal by a k-rate amount (default 1). The result is pitch shifting of+--       the input tracks.+--+-- > fsig  trscale  fin, kpitch[, kgain]+--+-- csound doc: <http://www.csounds.com/manual/html/trscale.html>+trscale ::  Spec -> Sig -> Spec+trscale b1 b2 = Spec $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = opcs "trscale" [(Fr,[Fr,Kr,Kr])] [a1,a2]++-- | +-- Streaming partial track frequency scaling.+--+-- The trshift opcode takes an input containg a TRACKS pv streaming signal (as generated,+--       for instance by partials) and shifts all frequencies by a k-rate frequency. It can also, optionally,+--       scale the gain of the signal by a k-rate amount (default 1). The result is frequency shifting of+--       the input tracks.+--+-- > fsig  trshift  fin, kpshift[, kgain]+--+-- csound doc: <http://www.csounds.com/manual/html/trshift.html>+trshift ::  Spec -> Sig -> Spec+trshift b1 b2 = Spec $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = opcs "trshift" [(Fr,[Fr,Kr,Kr])] [a1,a2]++-- | +-- Streaming partial track frequency splitting.+--+-- The trsplit opcode takes an input containg a TRACKS pv streaming signal (as generated,+--       for instance by partials) and splits it into two signals according to a k-rate frequency 'split point'. +--       The first output will contain all tracks up from 0Hz to the split frequency and the second will +--       contain the tracks from the split frequency up to the Nyquist.+--       It can also, optionally, scale the gain of the output signals by a k-rate amount (default 1). +--       The result is two output signals containing only part of the original spectrum.+--+-- > fsiglow, fsighi  trsplit  fin, ksplit[, kgainlow, kgainhigh]+--+-- csound doc: <http://www.csounds.com/manual/html/trsplit.html>+trsplit :: Tuple a => Spec -> Sig -> a+trsplit b1 b2 = pureTuple $ f <$> unSpec b1 <*> unSig b2+    where f a1 a2 = mopcs "trsplit" ([Fr,Fr],[Fr,Kr,Kr,Kr]) [a1,a2]++-- ATS.++-- | +-- uses the data from an ATS analysis file to perform additive synthesis.+--+-- ATSadd reads from an ATS analysis file and uses the data to perform additive synthesis using an internal array of interpolating oscillators.+--+-- > ar  ATSadd  ktimepnt, kfmod, iatsfile, ifn, ipartials[, ipartialoffset, \+-- >             ipartialincr, igatefn]+--+-- csound doc: <http://www.csounds.com/manual/html/ATSadd.html>+atsAdd ::  Sig -> Sig -> D -> Tab -> D -> Sig+atsAdd b1 b2 b3 b4 b5 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unTab b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "ATSadd" [(Ar,[Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- uses the data from an ATS analysis file to perform noise resynthesis.+--+-- ATSaddnz reads from an ATS analysis file and uses the data to perform additive synthesis using a modified randi function.+--+-- > ar  ATSaddnz  ktimepnt, iatsfile, ibands[, ibandoffset, ibandincr]+--+-- csound doc: <http://www.csounds.com/manual/html/ATSaddnz.html>+atsAddnz ::  Sig -> D -> D -> Sig+atsAddnz b1 b2 b3 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "ATSaddnz" [(Ar,[Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- reads data from and ATS data file and stores it in an internal data table of frequency, amplitude pairs.+--+-- ATSbufread reads data from and ATS data file and stores it in an internal data table of frequency, amplitude pairs.+--+-- >  ATSbufread  ktimepnt, kfmod, iatsfile, ipartials[, ipartialoffset, \+-- >               ipartialincr]+--+-- csound doc: <http://www.csounds.com/manual/html/ATSbufread.html>+atsBufread ::  Sig -> Sig -> D -> D -> SE ()+atsBufread b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "ATSbufread" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- perform cross synthesis from ATS analysis files.+--+-- ATScross uses data from an ATS analysis file and data from an ATSbufread to perform cross synthesis.+--+-- > ar  ATScross  ktimepnt, kfmod, iatsfile, ifn, kmylev, kbuflev, ipartials \+-- >               [, ipartialoffset, ipartialincr]+--+-- csound doc: <http://www.csounds.com/manual/html/ATScross.html>+atsCross ::  Sig -> Sig -> D -> Tab -> Sig -> Sig -> D -> Sig+atsCross b1 b2 b3 b4 b5 b6 b7 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unTab b4 <*> unSig b5 <*> unSig b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "ATScross" [(Ar,[Kr,Kr,Ir,Ir,Kr,Kr,Ir,Ir,Ir])] [a1+                                                                                       ,a2+                                                                                       ,a3+                                                                                       ,a4+                                                                                       ,a5+                                                                                       ,a6+                                                                                       ,a7]++-- | +-- reads data out of the header of an ATS file.+--+-- atsinfo reads data out of the header of an ATS file.+--+-- > idata  ATSinfo  iatsfile, ilocation+--+-- csound doc: <http://www.csounds.com/manual/html/ATSinfo.html>+atsInfo ::  D -> D -> D+atsInfo b1 b2 = D $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "ATSinfo" [(Ir,[Ir,Ir])] [a1,a2]++-- | +-- allows a user to determine the frequency envelope of any ATSbufread.+--+-- ATSinterpread allows a user to determine the frequency envelope of any ATSbufread.+--+-- > kamp  ATSinterpread  kfreq+--+-- csound doc: <http://www.csounds.com/manual/html/ATSinterpread.html>+atsInterpread ::  Sig -> Sig+atsInterpread b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "ATSinterpread" [(Kr,[Kr])] [a1]++-- | +-- returns a frequency, amplitude pair from an ATSbufread opcode.+--+-- ATSpartialtap takes a partial number and returns a frequency, amplitude pair. The frequency and amplitude data comes from an ATSbufread opcode.+--+-- > kfrq, kamp  ATSpartialtap  ipartialnum+--+-- csound doc: <http://www.csounds.com/manual/html/ATSpartialtap.html>+atsPartialtap :: Tuple a => D -> a+atsPartialtap b1 = pureTuple $ f <$> unD b1+    where f a1 = mopcs "ATSpartialtap" ([Kr,Kr],[Ir]) [a1]++-- | +-- reads data from an ATS file.+--+-- ATSread returns the amplitude (kamp) and frequency (kfreq) information of a user specified partial contained in the ATS analysis file at the time indicated by the time pointer ktimepnt.+--+-- > kfreq, kamp  ATSread  ktimepnt, iatsfile, ipartial+--+-- csound doc: <http://www.csounds.com/manual/html/ATSread.html>+atsRead :: Tuple a => Sig -> D -> D -> a+atsRead b1 b2 b3 = pureTuple $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = mopcs "ATSread" ([Kr,Kr],[Kr,Ir,Ir]) [a1,a2,a3]++-- | +-- reads data from an ATS file.+--+-- ATSreadnz returns the energy (kenergy) of a user specified noise band (1-25 bands) at the time indicated by the time pointer ktimepnt.+--+-- > kenergy  ATSreadnz  ktimepnt, iatsfile, iband+--+-- csound doc: <http://www.csounds.com/manual/html/ATSreadnz.html>+atsReadnz ::  Sig -> D -> D -> Sig+atsReadnz b1 b2 b3 = Sig $ f <$> unSig b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "ATSreadnz" [(Kr,[Kr,Ir,Ir])] [a1,a2,a3]++-- | +-- uses the data from an ATS analysis file to perform resynthesis.+--+-- ATSsinnoi reads data from an ATS data file and uses the information to synthesize sines and noise together.+--+-- > ar  ATSsinnoi  ktimepnt, ksinlev, knzlev, kfmod, iatsfile, ipartials \+-- >               [, ipartialoffset, ipartialincr]+--+-- csound doc: <http://www.csounds.com/manual/html/ATSsinnoi.html>+atsSinnoi ::  Sig -> Sig -> Sig -> Sig -> D -> D -> Sig+atsSinnoi b1 b2 b3 b4 b5 b6 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unSig b3 <*> unSig b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "ATSsinnoi" [(Ar,[Kr,Kr,Kr,Kr,Ir,Ir,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6]++-- Loris.++-- | +-- Morphs two stored sets of bandwidth-enhanced partials+--     and stores a new set of partials representing the morphed+--     sound. The morph is performed by linearly interpolating the+--     parameter envelopes (frequency, amplitude, and bandwidth, or+--     noisiness) of the bandwidth-enhanced partials according to+--     control-rate frequency, amplitude, and bandwidth morphing+--     functions.+--+-- lorismorph morphs two stored sets of bandwidth-enhanced+--     partials and stores a new set of partials representing the morphed+--     sound. The morph is performed by linearly interpolating the+--     parameter envelopes (frequency, amplitude, and bandwidth, or+--     noisiness) of the bandwidth-enhanced partials according to+--     control-rate frequency, amplitude, and bandwidth morphing+--     functions.+--+-- >  lorismorph  isrcidx, itgtidx, istoreidx, kfreqmorphenv, kampmorphenv, kbwmorphenv+--+-- csound doc: <http://www.csounds.com/manual/html/lorismorph.html>+lorismorph ::  D -> D -> D -> Sig -> Sig -> Sig -> SE ()+lorismorph b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "lorismorph" [(Xr,[Ir,Ir,Ir,Kr,Kr,Kr])] [a1,a2,a3,a4,a5,a6]++-- | +-- renders a stored set of bandwidth-enhanced partials using the method of Bandwidth-Enhanced Additive Synthesis implemented in the Loris software, applying control-rate frequency, amplitude, and bandwidth scaling envelopes.+--+-- lorisplay renders a stored set of+--     bandwidth-enhanced partials using the method of Bandwidth-Enhanced+--     Additive Synthesis implemented in the Loris software, applying+--     control-rate frequency, amplitude, and bandwidth scaling+--     envelopes.+--+-- > ar  lorisplay  ireadidx, kfreqenv, kampenv, kbwenv+--+-- csound doc: <http://www.csounds.com/manual/html/lorisplay.html>+lorisplay ::  D -> Sig -> Sig -> Sig -> Sig+lorisplay b1 b2 b3 b4 = Sig $ f <$> unD b1 <*> unSig b2 <*> unSig b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "lorisplay" [(Ar,[Ir,Kr,Kr,Kr])] [a1,a2,a3,a4]++-- | +-- Imports a set of bandwidth-enhanced partials from a SDIF-format+--     data file, applying control-rate frequency, amplitude, and+--     bandwidth scaling envelopes, and stores the modified partials in+--     memory.+--+-- lorisread imports a set of bandwidth-enhanced partials from a SDIF-format data file, applying control-rate frequency, amplitude, and bandwidth scaling envelopes, and stores the modified partials in memory.+--+-- >  lorisread  ktimpnt, ifilcod, istoreidx, kfreqenv, kampenv, kbwenv[, ifadetime]+--+-- csound doc: <http://www.csounds.com/manual/html/lorisread.html>+lorisread ::  Sig -> Str -> D -> Sig -> Sig -> Sig -> SE ()+lorisread b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unStr b2 <*> unD b3 <*> unSig b4 <*> unSig b5 <*> unSig b6+    where f a1 a2 a3 a4 a5 a6 = opcs "lorisread" [(Xr,[Kr,Sr,Ir,Kr,Kr,Kr,Ir])] [a1,a2,a3,a4,a5,a6]
+ src/Csound/Typed/Opcode/Strings.hs view
@@ -0,0 +1,394 @@+module Csound.Typed.Opcode.Strings (+    +    +    -- * Definition.+    strget, strset,+    +    -- * Manipulation.+    puts, sprintf, sprintfk, strcat, strcatk, strcmp, strcmpk, strcpy, strcpyk, strindex, strindexk, strlen, strlenk, strrindex, strrindexk, strsub, strsubk,+    +    -- * Conversion.+    strchar, strchark, strlower, strlowerk, strtod, strtodk, strtol, strtolk, strupper, strupperk) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Definition.++-- | +-- Set string variable to value from strset table or string p-field+--+-- strget sets a string variable at initialization time to the value stored in strset table at the specified index, or a string p-field from the score. If there is no string defined for the index, the variable is set to an empty string.+--+-- > Sdst  strget  indx+--+-- csound doc: <http://www.csounds.com/manual/html/strget.html>+strget ::  D -> Str+strget b1 = Str $ f <$> unD b1+    where f a1 = opcs "strget" [(Sr,[Ir])] [a1]++-- | +-- Allows a string to be linked with a numeric value.+--+-- >  strset  iarg, istring+--+-- csound doc: <http://www.csounds.com/manual/html/strset.html>+strset ::  D -> D -> SE ()+strset b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "strset" [(Xr,[Ir,Ir])] [a1,a2]++-- Manipulation.++-- | +-- Print a string constant or variable+--+-- puts prints a string with an optional newline at the end whenever the trigger signal is positive and changes.+--+-- >  puts  Sstr, ktrig[, inonl]+--+-- csound doc: <http://www.csounds.com/manual/html/puts.html>+puts ::  Str -> Sig -> SE ()+puts b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "puts" [(Xr,[Sr,Kr,Ir])] [a1,a2]++-- | +-- printf-style formatted output to a string variable.+--+-- sprintf write printf-style formatted output to a string variable, similarly to the C function sprintf(). sprintf runs at i-time only.+--+-- > Sdst  sprintf  Sfmt, xarg1[, xarg2[, ... ]]+--+-- csound doc: <http://www.csounds.com/manual/html/sprintf.html>+sprintf ::  Str -> Sig -> Str+sprintf b1 b2 = Str $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "sprintf" [(Sr,[Sr] ++ (repeat Xr))] [a1,a2]++-- | +-- printf-style formatted output to a string variable at k-rate.+--+-- sprintfk writes printf-style formatted output to a string variable, similarly to the C function sprintf(). sprintfk runs both at initialization and performance time.+--+-- > Sdst  sprintfk  Sfmt, xarg1[, xarg2[, ... ]]+--+-- csound doc: <http://www.csounds.com/manual/html/sprintfk.html>+sprintfk ::  Str -> Sig -> Str+sprintfk b1 b2 = Str $ f <$> unStr b1 <*> unSig b2+    where f a1 a2 = opcs "sprintfk" [(Sr,[Sr] ++ (repeat Xr))] [a1,a2]++-- | +-- Concatenate strings+--+-- Concatenate two strings and store the result in a variable. strcat runs at i-time only. It is allowed for any of the input arguments to be the same as the output variable.+--+-- > Sdst  strcat  Ssrc1, Ssrc2+--+-- csound doc: <http://www.csounds.com/manual/html/strcat.html>+strcat ::  Str -> Str -> Str+strcat b1 b2 = Str $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strcat" [(Sr,[Sr,Sr])] [a1,a2]++-- | +-- Concatenate strings (k-rate)+--+-- Concatenate two strings and store the result in a variable. strcatk does the concatenation both at initialization and performance time. It is allowed for any of the input arguments to be the same as the output variable.+--+-- > Sdst  strcatk  Ssrc1, Ssrc2+--+-- csound doc: <http://www.csounds.com/manual/html/strcatk.html>+strcatk ::  Str -> Str -> Str+strcatk b1 b2 = Str $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strcatk" [(Sr,[Sr,Sr])] [a1,a2]++-- | +-- Compare strings+--+-- Compare strings and set the result to -1, 0, or 1 if the first string is less than, equal to, or greater than the second, respectively. strcmp compares at i-time only.+--+-- > ires  strcmp  S1, S2+--+-- csound doc: <http://www.csounds.com/manual/html/strcmp.html>+strcmp ::  Str -> Str -> D+strcmp b1 b2 = D $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strcmp" [(Ir,[Sr,Sr])] [a1,a2]++-- | +-- Compare strings+--+-- Compare strings and set the result to -1, 0, or 1 if the first string is less than, equal to, or greater than the second, respectively. strcmpk does the comparison both at initialization and performance time.+--+-- > kres  strcmpk  S1, S2+--+-- csound doc: <http://www.csounds.com/manual/html/strcmpk.html>+strcmpk ::  Str -> Str -> Sig+strcmpk b1 b2 = Sig $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strcmpk" [(Kr,[Sr,Sr])] [a1,a2]++-- | +-- Assign value to a string variable+--+-- Assign to a string variable by copying the source which may be a constant or another string variable. strcpy and = copy the string at i-time only.+--+-- > Sdst  strcpy  Ssrc+--+-- csound doc: <http://www.csounds.com/manual/html/strcpy.html>+strcpy ::  Str -> Str+strcpy b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strcpy" [(Sr,[Sr])] [a1]++-- | +-- Assign value to a string variable (k-rate)+--+-- Assign to a string variable by copying the source which may be a constant or another string variable. strcpyk does the assignment both at initialization and performance time.+--+-- > Sdst  strcpyk  Ssrc+--+-- csound doc: <http://www.csounds.com/manual/html/strcpyk.html>+strcpyk ::  Str -> Str+strcpyk b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strcpyk" [(Sr,[Sr])] [a1]++-- | +-- Return the position of the first occurence of a string in another string+--+-- Return the position of the first occurence of S2 in S1, or -1 if not+--       found. If S2 is empty, 0 is returned. strindex runs at init time only.+--+-- > ipos  strindex  S1, S2+--+-- csound doc: <http://www.csounds.com/manual/html/strindex.html>+strindex ::  Str -> Str -> D+strindex b1 b2 = D $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strindex" [(Ir,[Sr,Sr])] [a1,a2]++-- | +-- Return the position of the first occurence of a string in another string+--+-- Return the position of the first occurence of S2 in S1, or -1 if not+--       found. If S2 is empty, 0 is returned. strindexk runs both at init and+--       performance time.+--+-- > kpos  strindexk  S1, S2+--+-- csound doc: <http://www.csounds.com/manual/html/strindexk.html>+strindexk ::  Str -> Str -> Sig+strindexk b1 b2 = Sig $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strindexk" [(Kr,[Sr,Sr])] [a1,a2]++-- | +-- Return the length of a string+--+-- Return the length of a string, or zero if it is empty. strlen runs at init time only.+--+-- > ilen  strlen  Sstr+--+-- csound doc: <http://www.csounds.com/manual/html/strlen.html>+strlen ::  Str -> D+strlen b1 = D $ f <$> unStr b1+    where f a1 = opcs "strlen" [(Ir,[Sr])] [a1]++-- | +-- Return the length of a string+--+-- Return the length of a string, or zero if it is empty. strlenk runs both at init and performance time.+--+-- > klen  strlenk  Sstr+--+-- csound doc: <http://www.csounds.com/manual/html/strlenk.html>+strlenk ::  Str -> Sig+strlenk b1 = Sig $ f <$> unStr b1+    where f a1 = opcs "strlenk" [(Kr,[Sr])] [a1]++-- | +-- Return the position of the last occurence of a string in another string+--+-- Return the position of the last occurence of S2 in S1, or -1 if not+--       found. If S2 is empty, the length of S1 is returned. strrindex runs+--       at init time only.+--+-- > ipos  strrindex  S1, S2+--+-- csound doc: <http://www.csounds.com/manual/html/strrindex.html>+strrindex ::  Str -> Str -> D+strrindex b1 b2 = D $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strrindex" [(Ir,[Sr,Sr])] [a1,a2]++-- | +-- Return the position of the last occurence of a string in another string+--+-- Return the position of the last occurence of S2 in S1, or -1 if not+--       found. If S2 is empty, the length of S1 is returned. strrindexk runs+--       both at init and performance time.+--+-- > kpos  strrindexk  S1, S2+--+-- csound doc: <http://www.csounds.com/manual/html/strrindexk.html>+strrindexk ::  Str -> Str -> Sig+strrindexk b1 b2 = Sig $ f <$> unStr b1 <*> unStr b2+    where f a1 a2 = opcs "strrindexk" [(Kr,[Sr,Sr])] [a1,a2]++-- | +-- Extract a substring+--+-- Return a substring of the source string. strsub runs at init time only.+--+-- > Sdst  strsub  Ssrc[, istart[, iend]]+--+-- csound doc: <http://www.csounds.com/manual/html/strsub.html>+strsub ::  Str -> Str+strsub b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strsub" [(Sr,[Sr,Ir,Ir])] [a1]++-- | +-- Extract a substring+--+-- Return a substring of the source string. strsubk runs both at init and+--       performance time.+--+-- > Sdst  strsubk  Ssrc, kstart, kend+--+-- csound doc: <http://www.csounds.com/manual/html/strsubk.html>+strsubk ::  Str -> Sig -> Sig -> Str+strsubk b1 b2 b3 = Str $ f <$> unStr b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "strsubk" [(Sr,[Sr,Kr,Kr])] [a1,a2,a3]++-- Conversion.++-- | +-- Return the ASCII code of a character in a string+--+-- Return the ASCII code of the character in Sstr at ipos (defaults to zero+--       which means the first character), or zero if ipos is out of range.+--       strchar runs at init time only.+--+-- > ichr  strchar  Sstr[, ipos]+--+-- csound doc: <http://www.csounds.com/manual/html/strchar.html>+strchar ::  Str -> D+strchar b1 = D $ f <$> unStr b1+    where f a1 = opcs "strchar" [(Ir,[Sr,Ir])] [a1]++-- | +-- Return the ASCII code of a character in a string+--+-- Return the ASCII code of the character in Sstr at kpos (defaults to zero+--       which means the first character), or zero if kpos is out of range.+--       strchark runs both at init and performance time.+--+-- > kchr  strchark  Sstr[, kpos]+--+-- csound doc: <http://www.csounds.com/manual/html/strchark.html>+strchark ::  Str -> Sig+strchark b1 = Sig $ f <$> unStr b1+    where f a1 = opcs "strchark" [(Kr,[Sr,Kr])] [a1]++-- | +-- Convert a string to lower case+--+-- Convert Ssrc to lower case, and write the result to Sdst.+--       strlower runs at init time only.+--+-- > Sdst  strlower  Ssrc+--+-- csound doc: <http://www.csounds.com/manual/html/strlower.html>+strlower ::  Str -> Str+strlower b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strlower" [(Sr,[Sr])] [a1]++-- | +-- Convert a string to lower case+--+-- Convert Ssrc to lower case, and write the result to Sdst.+--       strlowerk runs both at init and performance time.+--+-- > Sdst  strlowerk  Ssrc+--+-- csound doc: <http://www.csounds.com/manual/html/strlowerk.html>+strlowerk ::  Str -> Str+strlowerk b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strlowerk" [(Sr,[Sr])] [a1]++-- | +-- Converts a string to a float (i-rate).+--+-- Convert a string to a floating point value. It is also possible to+--     pass an strset index or a string p-field from the score instead of a string+--     argument. If the string cannot be parsed as a floating point or integer number, an init or perf error occurs and the instrument is deactivated.+--+-- > ir  strtod  Sstr+-- > ir  strtod  indx+--+-- csound doc: <http://www.csounds.com/manual/html/strtod.html>+strtod ::  Str -> D+strtod b1 = D $ f <$> unStr b1+    where f a1 = opcs "strtod" [(Ir,[Sr]),(Ir,[Ir])] [a1]++-- | +-- Converts a string to a float (k-rate).+--+-- Convert a string to a floating point value at i- or k-rate. It is also possible to pass an strset index or a string p-field from the score instead of a string+--     argument. If the string cannot be parsed as a floating point or integer number, an init or perf error occurs and the instrument is deactivated.+--+-- > kr  strtodk  Sstr+-- > kr  strtodk  kndx+--+-- csound doc: <http://www.csounds.com/manual/html/strtodk.html>+strtodk ::  Str -> Sig+strtodk b1 = Sig $ f <$> unStr b1+    where f a1 = opcs "strtodk" [(Kr,[Sr]),(Kr,[Kr])] [a1]++-- | +-- Converts a string to a signed integer (i-rate).+--+-- Convert a string to a signed integer value. It is also possible to+--     pass an strset index or a string p-field from the score instead of a string+--     argument. If the string cannot be parsed as an integer number, an init error occurs and the instrument is deactivated.+--+-- > ir  strtol  Sstr+-- > ir  strtol  indx+--+-- csound doc: <http://www.csounds.com/manual/html/strtol.html>+strtol ::  Str -> D+strtol b1 = D $ f <$> unStr b1+    where f a1 = opcs "strtol" [(Ir,[Sr]),(Ir,[Ir])] [a1]++-- | +-- Converts a string to a signed integer (k-rate).+--+-- Convert a string to a signed integer value at i- or k-rate. It is also possible to pass an strset index or a string p-field from the score instead of a string+--     argument. If the string cannot be parsed as an integer number, an init or perf error occurs and the instrument is deactivated.+--+-- > kr  strtolk  Sstr+-- > kr  strtolk  kndx+--+-- csound doc: <http://www.csounds.com/manual/html/strtolk.html>+strtolk ::  Str -> Sig+strtolk b1 = Sig $ f <$> unStr b1+    where f a1 = opcs "strtolk" [(Kr,[Sr]),(Kr,[Kr])] [a1]++-- | +-- Convert a string to upper case+--+-- Convert Ssrc to upper case, and write the result to Sdst.+--       strupper runs at init time only.+--+-- > Sdst  strupper  Ssrc+--+-- csound doc: <http://www.csounds.com/manual/html/strupper.html>+strupper ::  Str -> Str+strupper b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strupper" [(Sr,[Sr])] [a1]++-- | +-- Convert a string to upper case+--+-- Convert Ssrc to upper case, and write the result to Sdst.+--       strupperk runs both at init and performance time.+--+-- > Sdst  strupperk  Ssrc+--+-- csound doc: <http://www.csounds.com/manual/html/strupperk.html>+strupperk ::  Str -> Str+strupperk b1 = Str $ f <$> unStr b1+    where f a1 = opcs "strupperk" [(Sr,[Sr])] [a1]
+ src/Csound/Typed/Opcode/TableControl.hs view
@@ -0,0 +1,58 @@+module Csound.Typed.Opcode.TableControl (+    +    +    +    ftfree, ftgen, ftgentmp, sndload) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Deletes function table.+--+-- >  ftfree  ifno, iwhen+--+-- csound doc: <http://www.csounds.com/manual/html/ftfree.html>+ftfree ::  Tab -> D -> SE ()+ftfree b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2+    where f a1 a2 = opcs "ftfree" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Generate a score function table from within the orchestra.+--+-- > gir  ftgen  ifn, itime, isize, igen, iarga [, iargb ] [...]+--+-- csound doc: <http://www.csounds.com/manual/html/ftgen.html>+ftgen ::  Tab -> D -> D -> D -> D -> SE D+ftgen b1 b2 b3 b4 b5 = fmap ( D . return) $ SE $ (depT =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "ftgen" [(Ir,(repeat Ir))] [a1,a2,a3,a4,a5]++-- | +-- Generate a score function table from within the orchestra, which is deleted at the end of the note.+--+-- Generate a score function table from within the orchestra,+--     which is optionally deleted at the end of the note.+--+-- > ifno  ftgentmp  ip1, ip2dummy, isize, igen, iarga, iargb, ...+--+-- csound doc: <http://www.csounds.com/manual/html/ftgentmp.html>+ftgentmp ::  D -> D -> D -> D -> D -> [D] -> Tab+ftgentmp b1 b2 b3 b4 b5 b6 = Tab $ f <$> unD b1 <*> unD b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> mapM unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "ftgentmp" [(Ir,(repeat Ir))] ([a1,a2,a3,a4,a5] ++ a6)++-- | +-- Loads a sound file into memory for use by loscilx+--+-- sndload loads a sound file into memory for use by loscilx.+--+-- >  sndload  Sfname[, ifmt[, ichns[, isr[, ibas[, iamp[, istrt   \+-- >           [, ilpmod[, ilps[, ilpe]]]]]]]]]+--+-- csound doc: <http://www.csounds.com/manual/html/sndload.html>+sndload ::  Str -> SE ()+sndload b1 = SE $ (depT_ =<<) $ lift $ f <$> unStr b1+    where f a1 = opcs "sndload" [(Xr,[Sr,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir,Ir])] [a1]
+ src/Csound/Typed/Opcode/Vectorial.hs view
@@ -0,0 +1,587 @@+module Csound.Typed.Opcode.Vectorial (+    +    +    -- * Tables.+    vtaba, vtabi, vtabk, vtable1k, vtablea, vtablei, vtablek, vtablewa, vtablewi, vtablewk, vtabwa, vtabwi, vtabwk,+    +    -- * Scalar operations.+    vadd, vadd_i, vexp, vexp_i, vmult, vmult_i, vpow, vpow_i,+    +    -- * Vectorial operations.+    vaddv, vaddv_i, vcopy, vcopy_i, vdivv, vdivv_i, vexpv, vexpv_i, vmap, vmultv, vmultv_i, vpowv, vpowv_i, vsubv, vsubv_i,+    +    -- * Envelopes.+    vexpseg, vlinseg,+    +    -- * Limiting and Wrapping.+    vlimit, vmirror, vwrap,+    +    -- * Delay Paths.+    vdelayk, vecdelay, vport,+    +    -- * Random.+    vrandh, vrandi,+    +    -- * Cellular Automata.+    cell, vcella) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- Tables.++-- | +-- Read vectors (from tables -or arrays of vectors).+--+-- This opcode reads vectors from tables at a-rate.+--+-- >  vtaba   andx, ifn, aout1 [, aout2, aout3, .... , aoutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtaba.html>+vtaba ::  Sig -> Tab -> Sig -> SE ()+vtaba b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vtaba" [(Xr,[Ar,Ir] ++ (repeat Ar))] [a1,a2,a3]++-- | +-- Read vectors (from tables -or arrays of vectors).+--+-- This opcode reads vectors from tables.+--+-- >  vtabi   indx, ifn, iout1 [, iout2, iout3, .... , ioutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtabi.html>+vtabi ::  D -> Tab -> D -> SE ()+vtabi b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vtabi" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- Read vectors (from tables -or arrays of vectors).+--+-- This opcode reads vectors from tables at k-rate.+--+-- >  vtabk   kndx, ifn, kout1 [, kout2, kout3, .... , koutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtabk.html>+vtabk ::  Sig -> Tab -> Sig -> SE ()+vtabk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vtabk" [(Xr,[Kr,Ir] ++ (repeat Kr))] [a1,a2,a3]++-- | +-- Read a vector (several scalars simultaneously) from a table.+--+-- This opcode reads vectors from tables at k-rate.+--+-- >  vtable1k   kfn,kout1 [, kout2, kout3, .... , koutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtable1k.html>+vtable1k ::  Tab -> Sig -> SE ()+vtable1k b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2+    where f a1 a2 = opcs "vtable1k" [(Xr,(repeat Kr))] [a1,a2]++-- | +-- Read vectors (from tables -or arrays of vectors).+--+-- This opcode reads vectors from tables at a-rate.+--+-- >  vtablea   andx, kfn, kinterp, ixmode, aout1 [, aout2, aout3, .... , aoutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtablea.html>+vtablea ::  Sig -> Tab -> Sig -> D -> Sig -> SE ()+vtablea b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unD b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "vtablea" [(Xr,[Ar,Kr,Kr,Ir] ++ (repeat Ar))] [a1,a2,a3,a4,a5]++-- | +-- Read vectors (from tables -or arrays of vectors).+--+-- This opcode reads vectors from tables.+--+-- >  vtablei   indx, ifn, interp, ixmode, iout1 [, iout2, iout3, .... , ioutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtablei.html>+vtablei ::  D -> Tab -> D -> D -> D -> SE ()+vtablei b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "vtablei" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]++-- | +-- Read vectors (from tables -or arrays of vectors).+--+-- This opcode reads vectors from tables at k-rate.+--+-- >  vtablek   kndx, kfn, kinterp, ixmode, kout1 [, kout2, kout3, .... , koutN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtablek.html>+vtablek ::  Sig -> Tab -> Sig -> D -> Sig -> SE ()+vtablek b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unD b4 <*> unSig b5+    where f a1 a2 a3 a4 a5 = opcs "vtablek" [(Xr,[Kr,Kr,Kr,Ir] ++ (repeat Kr))] [a1,a2,a3,a4,a5]++-- | +-- Write vectors (to tables -or arrays of vectors).+--+-- This opcode writes vectors to tables at a-rate.+--+-- >  vtablewa   andx, kfn, ixmode, ainarg1 [, ainarg2, ainarg3 , .... , ainargN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtablewa.html>+vtablewa ::  Sig -> Tab -> D -> Sig -> SE ()+vtablewa b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unD b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "vtablewa" [(Xr,[Ar,Kr,Ir] ++ (repeat Ar))] [a1,a2,a3,a4]++-- | +-- Write vectors (to tables -or arrays of vectors).+--+-- This opcode writes vectors to tables at init time.+--+-- >  vtablewi   indx, ifn, ixmode, inarg1 [, inarg2, inarg3 , .... , inargN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtablewi.html>+vtablewi ::  D -> Tab -> D -> D -> SE ()+vtablewi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vtablewi" [(Xr,(repeat Ir))] [a1,a2,a3,a4]++-- | +-- Write vectors (to tables -or arrays of vectors).+--+-- This opcode writes vectors to tables at k-rate.+--+-- >  vtablewk   kndx, kfn, ixmode, kinarg1 [, kinarg2, kinarg3 , .... , kinargN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtablewk.html>+vtablewk ::  Sig -> Tab -> D -> Sig -> SE ()+vtablewk b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unD b3 <*> unSig b4+    where f a1 a2 a3 a4 = opcs "vtablewk" [(Xr,[Kr,Kr,Ir] ++ (repeat Kr))] [a1,a2,a3,a4]++-- | +-- Write vectors (to tables -or arrays of vectors).+--+-- This opcode writes vectors to tables at a-rate.+--+-- >  vtabwa   andx, ifn, ainarg1 [, ainarg2, ainarg3 , .... , ainargN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtabwa.html>+vtabwa ::  Sig -> Tab -> Sig -> SE ()+vtabwa b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vtabwa" [(Xr,[Ar,Ir] ++ (repeat Ar))] [a1,a2,a3]++-- | +-- Write vectors (to tables -or arrays of vectors).+--+-- This opcode writes vectors to tables at init time.+--+-- >  vtabwi   indx, ifn, inarg1 [, inarg2, inarg3 , .... , inargN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtabwi.html>+vtabwi ::  D -> Tab -> D -> SE ()+vtabwi b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vtabwi" [(Xr,(repeat Ir))] [a1,a2,a3]++-- | +-- Write vectors (to tables -or arrays of vectors).+--+-- This opcode writes vectors to tables at k-rate.+--+-- >  vtabwk   kndx, ifn, kinarg1 [, kinarg2, kinarg3 , .... , kinargN ]+--+-- csound doc: <http://www.csounds.com/manual/html/vtabwk.html>+vtabwk ::  Sig -> Tab -> Sig -> SE ()+vtabwk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vtabwk" [(Xr,[Kr,Ir] ++ (repeat Kr))] [a1,a2,a3]++-- Scalar operations.++-- | +-- Adds a scalar value to a vector in a table.+--+-- >  vadd   ifn, kval, kelements [, kdstoffset] [, kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vadd.html>+vadd ::  Tab -> Sig -> Sig -> SE ()+vadd b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vadd" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Adds a scalar value to a vector in a table.+--+-- >  vadd_i   ifn, ival, ielements [, idstoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vadd_i.html>+vadd_i ::  Tab -> D -> D -> SE ()+vadd_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "vadd_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs power-of operations between a vector and a scalar+--+-- >  vexp   ifn, kval, kelements [, kdstoffset] [, kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vexp.html>+vexp ::  Tab -> Sig -> Sig -> SE ()+vexp b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vexp" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs power-of operations between a vector and a scalar+--+-- >  vexp_i   ifn, ival, ielements[, idstoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vexp_i.html>+vexp_i ::  Tab -> D -> D -> SE ()+vexp_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "vexp_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Multiplies a vector in a table by a scalar value.+--+-- >  vmult   ifn, kval, kelements [, kdstoffset] [, kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vmult.html>+vmult ::  Tab -> Sig -> Sig -> SE ()+vmult b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vmult" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Multiplies a vector in a table by a scalar value.+--+-- >  vmult_i   ifn, ival, ielements [, idstoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vmult_i.html>+vmult_i ::  Tab -> D -> D -> SE ()+vmult_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "vmult_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Raises each element of a vector to a scalar power.+--+-- >  vpow   ifn, kval, kelements [, kdstoffset] [, kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vpow.html>+vpow ::  Tab -> Sig -> Sig -> SE ()+vpow b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vpow" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Raises each element of a vector to a scalar power+--+-- >  vpow_i   ifn, ival, ielements [, idstoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vpow_i.html>+vpow_i ::  Tab -> D -> D -> SE ()+vpow_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3+    where f a1 a2 a3 = opcs "vpow_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- Vectorial operations.++-- | +-- Performs addition between two vectorial control signals.+--+-- >  vaddv   ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vaddv.html>+vaddv ::  Tab -> Tab -> Sig -> SE ()+vaddv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vaddv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs addition between two vectorial control signals at init time.+--+-- >  vaddv_i   ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vaddv_i.html>+vaddv_i ::  Tab -> Tab -> D -> SE ()+vaddv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vaddv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Copies between two vectorial control signals+--+-- >  vcopy   ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [, kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vcopy.html>+vcopy ::  Tab -> Tab -> Sig -> SE ()+vcopy b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vcopy" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Copies a vector from one table to another.+--+-- >  vcopy_i   ifn1, ifn2, ielements [,idstoffset, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vcopy_i.html>+vcopy_i ::  Tab -> Tab -> D -> SE ()+vcopy_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vcopy_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs division between two vectorial control signals+--+-- >  vdivv   ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vdivv.html>+vdivv ::  Tab -> Tab -> Sig -> SE ()+vdivv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vdivv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs division between two vectorial control signals at init time.+--+-- >  vdivv_i   ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vdivv_i.html>+vdivv_i ::  Tab -> Tab -> D -> SE ()+vdivv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vdivv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs exponential operations between two vectorial control signals+--+-- >  vexpv   ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vexpv.html>+vexpv ::  Tab -> Tab -> Sig -> SE ()+vexpv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vexpv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs exponential operations between two vectorial control signals at init time.+--+-- >  vexpv_i   ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vexpv_i.html>+vexpv_i ::  Tab -> Tab -> D -> SE ()+vexpv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vexpv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Maps elements from a vector according to indexes contained in another vector.+--+-- Maps elements from a vector onto another according to the indexes of a this vector.+--+-- >  vmap   ifn1, ifn2, ielements [,idstoffset, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vmap.html>+vmap ::  Tab -> Tab -> D -> SE ()+vmap b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vmap" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs mutiplication between two vectorial control signals+--+-- >  vmultv   ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vmultv.html>+vmultv ::  Tab -> Tab -> Sig -> SE ()+vmultv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vmultv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs mutiplication between two vectorial control signals at init time.+--+-- >  vmultv_i   ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vmultv_i.html>+vmultv_i ::  Tab -> Tab -> D -> SE ()+vmultv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vmultv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs power-of operations between two vectorial control signals+--+-- >  vpowv  ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vpowv.html>+vpowv ::  Tab -> Tab -> Sig -> SE ()+vpowv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vpowv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs power-of operations between two vectorial control signals at init time.+--+-- >  vpowv_i  ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vpowv_i.html>+vpowv_i ::  Tab -> Tab -> D -> SE ()+vpowv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vpowv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Performs subtraction between two vectorial control signals+--+-- >  vsubv   ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]+--+-- csound doc: <http://www.csounds.com/manual/html/vsubv.html>+vsubv ::  Tab -> Tab -> Sig -> SE ()+vsubv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3+    where f a1 a2 a3 = opcs "vsubv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]++-- | +-- Performs subtraction between two vectorial control signals at init time.+--+-- >  vsubv_i   ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vsubv_i.html>+vsubv_i ::  Tab -> Tab -> D -> SE ()+vsubv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3+    where f a1 a2 a3 = opcs "vsubv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]++-- Envelopes.++-- | +-- Vectorial envelope generator+--+-- Generate exponential vectorial segments+--+-- >  vexpseg   ifnout, ielements, ifn1, idur1, ifn2 [, idur2, ifn3 [...]]+--+-- csound doc: <http://www.csounds.com/manual/html/vexpseg.html>+vexpseg ::  Tab -> D -> Tab -> D -> Tab -> SE ()+vexpseg b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "vexpseg" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]++-- | +-- Vectorial envelope generator+--+-- Generate linear vectorial segments+--+-- >  vlinseg   ifnout, ielements, ifn1, idur1, ifn2 [, idur2, ifn3 [...]]+--+-- csound doc: <http://www.csounds.com/manual/html/vlinseg.html>+vlinseg ::  Tab -> D -> Tab -> D -> Tab -> SE ()+vlinseg b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unTab b5+    where f a1 a2 a3 a4 a5 = opcs "vlinseg" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]++-- Limiting and Wrapping.++-- | +-- Limiting and Wrapping Vectorial Signals+--+-- Limits elements of vectorial control signals.+--+-- >  vlimit   ifn, kmin, kmax, ielements+--+-- csound doc: <http://www.csounds.com/manual/html/vlimit.html>+vlimit ::  Tab -> Sig -> Sig -> D -> SE ()+vlimit b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vlimit" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Limiting and Wrapping Vectorial Signals+--+-- 'Reflects' elements of vectorial control signals on thresholds.+--+-- >  vmirror   ifn, kmin, kmax, ielements+--+-- csound doc: <http://www.csounds.com/manual/html/vmirror.html>+vmirror ::  Tab -> Sig -> Sig -> D -> SE ()+vmirror b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vmirror" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- | +-- Limiting and Wrapping Vectorial Signals+--+-- Wraps elements of vectorial control signals.+--+-- >  vwrap   ifn, kmin, kmax, ielements+--+-- csound doc: <http://www.csounds.com/manual/html/vwrap.html>+vwrap ::  Tab -> Sig -> Sig -> D -> SE ()+vwrap b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vwrap" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]++-- Delay Paths.++-- | +-- k-rate variable time delay.+--+-- Variable delay applied to a k-rate signal+--+-- > kout  vdelayk   ksig, kdel, imaxdel [, iskip, imode]+--+-- csound doc: <http://www.csounds.com/manual/html/vdelayk.html>+vdelayk ::  Sig -> Sig -> D -> Sig+vdelayk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "vdelayk" [(Kr,[Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3]++-- | +-- Vectorial Control-rate Delay Paths+--+-- Generate a sort of 'vectorial' delay+--+-- >  vecdelay   ifn, ifnIn, ifnDel, ielements, imaxdel [, iskip]+--+-- csound doc: <http://www.csounds.com/manual/html/vecdelay.html>+vecdelay ::  Tab -> Tab -> Tab -> D -> D -> SE ()+vecdelay b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unTab b3 <*> unD b4 <*> unD b5+    where f a1 a2 a3 a4 a5 = opcs "vecdelay" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]++-- | +-- Vectorial Control-rate Delay Paths+--+-- Generate a sort of 'vectorial' portamento+--+-- >  vport  ifn, khtime, ielements [, ifnInit]+--+-- csound doc: <http://www.csounds.com/manual/html/vport.html>+vport ::  Tab -> Sig -> D -> SE ()+vport b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unD b3+    where f a1 a2 a3 = opcs "vport" [(Xr,[Ir,Kr,Ir,Ir])] [a1,a2,a3]++-- Random.++-- | +-- Generates a vector of random numbers stored into a table, holding the values for a period of time.+--+-- Generates a vector of random numbers stored into a table, holding the values for a period of time. Generates a sort of 'vectorial band-limited noise'.+--+-- >  vrandh   ifn,  krange, kcps, ielements [, idstoffset] [, iseed] \+-- >           [, isize] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vrandh.html>+vrandh ::  Tab -> Sig -> Sig -> D -> SE ()+vrandh b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vrandh" [(Xr,[Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- | +-- Generate a sort of 'vectorial band-limited noise'+--+-- >  vrandi   ifn,  krange, kcps, ielements [, idstoffset] [, iseed] \+-- >           [, isize] [, ioffset]+--+-- csound doc: <http://www.csounds.com/manual/html/vrandi.html>+vrandi ::  Tab -> Sig -> Sig -> D -> SE ()+vrandi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4+    where f a1 a2 a3 a4 = opcs "vrandi" [(Xr,[Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]++-- Cellular Automata.++-- | +-- Cellular Automaton+--+-- One-Dimensional Cellular Automaton. This opcode is the+--          modified version of vcella by Gabriel Maldonado.+--+-- >  cell  ktrig, kreinit, ioutFunc, initStateFunc, iRuleFunc, ielements+--+-- csound doc: <http://www.csounds.com/manual/html/cell.html>+cell ::  Sig -> Sig -> D -> D -> D -> D -> SE ()+cell b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6+    where f a1 a2 a3 a4 a5 a6 = opcs "cell" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]++-- | +-- Cellular Automata+--+-- Unidimensional Cellular Automata applied to Csound vectors+--+-- >  vcella  ktrig, kreinit, ioutFunc, initStateFunc, \+-- >           iRuleFunc, ielements, irulelen [, iradius]+--+-- csound doc: <http://www.csounds.com/manual/html/vcella.html>+vcella ::  Sig -> Sig -> D -> D -> D -> D -> D -> SE ()+vcella b1 b2 b3 b4 b5 b6 b7 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7+    where f a1 a2 a3 a4 a5 a6 a7 = opcs "vcella" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1+                                                                                  ,a2+                                                                                  ,a3+                                                                                  ,a4+                                                                                  ,a5+                                                                                  ,a6+                                                                                  ,a7]
+ src/Csound/Typed/Opcode/ZakPatchSystem.hs view
@@ -0,0 +1,164 @@+module Csound.Typed.Opcode.ZakPatchSystem (+    +    +    +    zacl, zakinit, zamod, zar, zarg, zaw, zawm, zir, ziw, ziwm, zkcl, zkmod, zkr, zkw, zkwm) where++import Control.Applicative+import Control.Monad.Trans.Class+import Csound.Dynamic+import Csound.Typed++-- ++-- | +-- Clears one or more variables in the za space.+--+-- >  zacl  kfirst, klast+--+-- csound doc: <http://www.csounds.com/manual/html/zacl.html>+zacl ::  Sig -> Sig -> SE ()+zacl b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zacl" [(Xr,[Kr,Kr])] [a1,a2]++-- | +-- Establishes zak space.+--+-- Establishes zak space. Must be called only once.+--+-- >  zakinit  isizea, isizek+--+-- csound doc: <http://www.csounds.com/manual/html/zakinit.html>+zakinit ::  D -> D -> SE ()+zakinit b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "zakinit" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Modulates one a-rate signal by a second one.+--+-- > ares  zamod  asig, kzamod+--+-- csound doc: <http://www.csounds.com/manual/html/zamod.html>+zamod ::  Sig -> Sig -> Sig+zamod b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zamod" [(Ar,[Ar,Kr])] [a1,a2]++-- | +-- Reads from a location in za space at a-rate.+--+-- > ares  zar  kndx+--+-- csound doc: <http://www.csounds.com/manual/html/zar.html>+zar ::  Sig -> Sig+zar b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "zar" [(Ar,[Kr])] [a1]++-- | +-- Reads from a location in za space at a-rate, adds some gain.+--+-- > ares  zarg  kndx, kgain+--+-- csound doc: <http://www.csounds.com/manual/html/zarg.html>+zarg ::  Sig -> Sig -> Sig+zarg b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zarg" [(Ar,[Kr,Kr])] [a1,a2]++-- | +-- Writes to a za variable at a-rate without mixing.+--+-- >  zaw  asig, kndx+--+-- csound doc: <http://www.csounds.com/manual/html/zaw.html>+zaw ::  Sig -> Sig -> SE ()+zaw b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zaw" [(Xr,[Ar,Kr])] [a1,a2]++-- | +-- Writes to a za variable at a-rate with mixing.+--+-- >  zawm  asig, kndx [, imix]+--+-- csound doc: <http://www.csounds.com/manual/html/zawm.html>+zawm ::  Sig -> Sig -> SE ()+zawm b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zawm" [(Xr,[Ar,Kr,Ir])] [a1,a2]++-- | +-- Reads from a location in zk space at i-rate.+--+-- > ir  zir  indx+--+-- csound doc: <http://www.csounds.com/manual/html/zir.html>+zir ::  D -> D+zir b1 = D $ f <$> unD b1+    where f a1 = opcs "zir" [(Ir,[Ir])] [a1]++-- | +-- Writes to a zk variable at i-rate without mixing.+--+-- >  ziw  isig, indx+--+-- csound doc: <http://www.csounds.com/manual/html/ziw.html>+ziw ::  D -> D -> SE ()+ziw b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "ziw" [(Xr,[Ir,Ir])] [a1,a2]++-- | +-- Writes to a zk variable to an i-rate variable with mixing.+--+-- >  ziwm  isig, indx [, imix]+--+-- csound doc: <http://www.csounds.com/manual/html/ziwm.html>+ziwm ::  D -> D -> SE ()+ziwm b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unD b2+    where f a1 a2 = opcs "ziwm" [(Xr,[Ir,Ir,Ir])] [a1,a2]++-- | +-- Clears one or more variables in the zk space.+--+-- >  zkcl  kfirst, klast+--+-- csound doc: <http://www.csounds.com/manual/html/zkcl.html>+zkcl ::  Sig -> Sig -> SE ()+zkcl b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zkcl" [(Xr,[Kr,Kr])] [a1,a2]++-- | +-- Facilitates the modulation of one signal by another.+--+-- > kres  zkmod  ksig, kzkmod+--+-- csound doc: <http://www.csounds.com/manual/html/zkmod.html>+zkmod ::  Sig -> Sig -> Sig+zkmod b1 b2 = Sig $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zkmod" [(Kr,[Kr,Kr])] [a1,a2]++-- | +-- Reads from a location in zk space at k-rate.+--+-- > kres  zkr  kndx+--+-- csound doc: <http://www.csounds.com/manual/html/zkr.html>+zkr ::  Sig -> Sig+zkr b1 = Sig $ f <$> unSig b1+    where f a1 = opcs "zkr" [(Kr,[Kr])] [a1]++-- | +-- Writes to a zk variable at k-rate without mixing.+--+-- >  zkw  ksig, kndx+--+-- csound doc: <http://www.csounds.com/manual/html/zkw.html>+zkw ::  Sig -> Sig -> SE ()+zkw b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zkw" [(Xr,[Kr,Kr])] [a1,a2]++-- | +-- Writes to a zk variable at k-rate with mixing.+--+-- >  zkwm  ksig, kndx [, imix]+--+-- csound doc: <http://www.csounds.com/manual/html/zkwm.html>+zkwm ::  Sig -> Sig -> SE ()+zkwm b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2+    where f a1 a2 = opcs "zkwm" [(Xr,[Kr,Kr,Ir])] [a1,a2]