diff options
Diffstat (limited to 'src/Csound/Typed/Control/Api.hs')
-rw-r--r-- | src/Csound/Typed/Control/Api.hs | 52 |
1 files changed, 2 insertions, 50 deletions
diff --git a/src/Csound/Typed/Control/Api.hs b/src/Csound/Typed/Control/Api.hs index 4110b92..b0b91a9 100644 --- a/src/Csound/Typed/Control/Api.hs +++ b/src/Csound/Typed/Control/Api.hs @@ -6,17 +6,13 @@ module Csound.Typed.Control.Api( ) where import Data.Boolean -import Control.Monad.Trans.Class -import Control.Applicative import qualified Csound.Dynamic as D -import Csound.Dynamic(Rate(..), opcs, depT_) -import Data.Boolean((==*), (>*), ifB) import Csound.Typed.Types import Csound.Typed.Control.Ref import Csound.Typed.GlobalState -import Csound.Typed.GlobalState.Opcodes(eventi, Event(..), turnoff, port, downsamp) +import Csound.Typed.GlobalState.Opcodes(eventi, Event(..), downsamp) import Csound.Typed.InnerOpcodes import Csound.Typed.Plugins.TabQueue @@ -120,7 +116,7 @@ namedMonoMsg name = do return $ MonoArg kamp kcps kgate trig where onNote = tabQueue2_append - offNote tab (pch, vol) = tabQueue2_delete tab pch + offNote tab (pch, _vol) = tabQueue2_delete tab pch trigByNameMidiCbk :: String -> ((D, D) -> SE ()) -> ((D, D) -> SE ()) -> SE () trigByNameMidiCbk name noteOn noteOff = @@ -132,52 +128,8 @@ trigByNameMidiCbk name noteOn noteOff = whenD1 (noteFlag ==* 0) $ noteOff (pch, vol) SE turnoff -port' :: Sig -> D -> Sig -port' a b = fromGE $ do - a' <- toGE a - b' <- toGE b - return $ port a' b' - downsamp' :: Sig -> Sig downsamp' a = fromGE $ do a' <- toGE a return $ downsamp a' --- | --- 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] - - --- | --- 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] |