module Csound.Typed.Opcode.Miscellaneous (
directory, fareylen, fareyleni, modmatrix, pwd, select, system_i, system, tableshuffle, tableshufflei) where
import Control.Monad.Trans.Class
import Csound.Dynamic
import Csound.Typed
directory :: Str -> Str
directory :: Str -> Str
directory Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"directory" [(Rate
Sr,[Rate
Sr,Rate
Sr])] [E
a1]
fareylen :: Tab -> Sig
fareylen :: Tab -> Sig
fareylen Tab
b1 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Tab -> GE E
unTab Tab
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"fareylen" [(Rate
Kr,[Rate
Kr])] [E
a1]
fareyleni :: Tab -> D
fareyleni :: Tab -> D
fareyleni Tab
b1 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Tab -> GE E
unTab Tab
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"fareyleni" [(Rate
Ir,[Rate
Ir])] [E
a1]
modmatrix :: Tab -> Tab -> Tab -> D -> D -> D -> Sig -> SE ()
modmatrix :: Tab -> Tab -> Tab -> D -> D -> D -> Sig -> SE ()
modmatrix Tab
b1 Tab
b2 Tab
b3 D
b4 D
b5 D
b6 Sig
b7 = Dep () -> SE ()
forall a. Dep a -> SE a
SE (Dep () -> SE ()) -> Dep () -> SE ()
forall a b. (a -> b) -> a -> b
$ (E -> Dep ()
forall (m :: * -> *). Monad m => E -> DepT m ()
depT_ (E -> Dep ()) -> DepT GE E -> Dep ()
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<<) (DepT GE E -> Dep ()) -> DepT GE E -> Dep ()
forall a b. (a -> b) -> a -> b
$ GE E -> DepT GE E
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (GE E -> DepT GE E) -> GE E -> DepT GE E
forall a b. (a -> b) -> a -> b
$ E -> E -> E -> E -> E -> E -> E -> E
f (E -> E -> E -> E -> E -> E -> E -> E)
-> GE E -> GE (E -> E -> E -> E -> E -> E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Tab -> GE E
unTab Tab
b1 GE (E -> E -> E -> E -> E -> E -> E)
-> GE E -> GE (E -> E -> E -> E -> E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Tab -> GE E
unTab Tab
b2 GE (E -> E -> E -> E -> E -> E)
-> GE E -> GE (E -> E -> E -> E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Tab -> GE E
unTab Tab
b3 GE (E -> E -> E -> E -> E) -> GE E -> GE (E -> E -> E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> D -> GE E
unD D
b4 GE (E -> E -> E -> E) -> GE E -> GE (E -> E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> D -> GE E
unD D
b5 GE (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> D -> GE E
unD D
b6 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b7
where f :: E -> E -> E -> E -> E -> E -> E -> E
f E
a1 E
a2 E
a3 E
a4 E
a5 E
a6 E
a7 = Name -> Spec1 -> [E] -> E
opcs Name
"modmatrix" [(Rate
Xr,[Rate
Ir,Rate
Ir,Rate
Ir,Rate
Ir,Rate
Ir,Rate
Ir,Rate
Kr])] [E
a1
,E
a2
,E
a3
,E
a4
,E
a5
,E
a6
,E
a7]
pwd :: Str
pwd :: Str
pwd = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> GE E
forall (m :: * -> *) a. Monad m => a -> m a
return (E -> GE E) -> E -> GE E
forall a b. (a -> b) -> a -> b
$ E
f
where f :: E
f = Name -> Spec1 -> [E] -> E
opcs Name
"pwd" [(Rate
Sr,[])] []
select :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig
select :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig
select Sig
b1 Sig
b2 Sig
b3 Sig
b4 Sig
b5 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E -> E -> E -> E -> E
f (E -> E -> E -> E -> E -> E) -> GE E -> GE (E -> E -> E -> E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Sig -> GE E
unSig Sig
b1 GE (E -> E -> E -> E -> E) -> GE E -> GE (E -> E -> E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b2 GE (E -> E -> E -> E) -> GE E -> GE (E -> E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b3 GE (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b4 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b5
where f :: E -> E -> E -> E -> E -> E
f E
a1 E
a2 E
a3 E
a4 E
a5 = Name -> Spec1 -> [E] -> E
opcs Name
"select" [(Rate
Ar,[Rate
Ar,Rate
Ar,Rate
Ar,Rate
Ar,Rate
Ar])] [E
a1,E
a2,E
a3,E
a4,E
a5]
system_i :: D -> Str -> D
system_i :: D -> Str -> D
system_i D
b1 Str
b2 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> D -> GE E
unD D
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"system_i" [(Rate
Ir,[Rate
Ir,Rate
Sr,Rate
Ir])] [E
a1,E
a2]
system :: Sig -> Str -> Sig
system :: Sig -> Str -> Sig
system Sig
b1 Str
b2 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Sig -> GE E
unSig Sig
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"system" [(Rate
Kr,[Rate
Kr,Rate
Sr,Rate
Kr])] [E
a1,E
a2]
tableshuffle :: Sig -> SE ()
tableshuffle :: Sig -> SE ()
tableshuffle Sig
b1 = Dep () -> SE ()
forall a. Dep a -> SE a
SE (Dep () -> SE ()) -> Dep () -> SE ()
forall a b. (a -> b) -> a -> b
$ (E -> Dep ()
forall (m :: * -> *). Monad m => E -> DepT m ()
depT_ (E -> Dep ()) -> DepT GE E -> Dep ()
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<<) (DepT GE E -> Dep ()) -> DepT GE E -> Dep ()
forall a b. (a -> b) -> a -> b
$ GE E -> DepT GE E
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (GE E -> DepT GE E) -> GE E -> DepT GE E
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Sig -> GE E
unSig Sig
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"tableshuffle" [(Rate
Xr,[Rate
Kr])] [E
a1]
tableshufflei :: D -> SE ()
tableshufflei :: D -> SE ()
tableshufflei D
b1 = Dep () -> SE ()
forall a. Dep a -> SE a
SE (Dep () -> SE ()) -> Dep () -> SE ()
forall a b. (a -> b) -> a -> b
$ (E -> Dep ()
forall (m :: * -> *). Monad m => E -> DepT m ()
depT_ (E -> Dep ()) -> DepT GE E -> Dep ()
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<<) (DepT GE E -> Dep ()) -> DepT GE E -> Dep ()
forall a b. (a -> b) -> a -> b
$ GE E -> DepT GE E
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (GE E -> DepT GE E) -> GE E -> DepT GE E
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> D -> GE E
unD D
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"tableshufflei" [(Rate
Xr,[Rate
Ir])] [E
a1]