{-
    Safe/Boot.hs - as in BootTidal but in the Op monad
    Copyright (C) 2021 Johannes Waldmann and contributors

    Forked from:
    https://github.com/jwaldmann/safe-tidal-cli/

    This library is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this library.  If not, see <http://www.gnu.org/licenses/>.
-}

{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# language NoMonomorphismRestriction #-}

module Sound.Tidal.Safe.Boot where

import Sound.Tidal.Safe.Context
import qualified Sound.Tidal.Transition

-- everyone is missing the tidal :: Stream argument
-- this will be provided by the Reader monad

p :: ID -> ControlPattern -> Op ()
p = ID -> ControlPattern -> Op ()
streamReplace
hush :: Op ()
hush = Op ()
streamHush
list :: Op ()
list = Op ()
streamList
mute :: ID -> Op ()
mute = ID -> Op ()
streamMute
unmute :: ID -> Op ()
unmute = ID -> Op ()
streamUnmute
solo :: ID -> Op ()
solo = ID -> Op ()
streamSolo
unsolo :: ID -> Op ()
unsolo = ID -> Op ()
streamUnsolo
once :: ControlPattern -> Op ()
once = ControlPattern -> Op ()
streamOnce
first :: ControlPattern -> Op ()
first = ControlPattern -> Op ()
streamFirst
asap :: ControlPattern -> Op ()
asap = ControlPattern -> Op ()
once
nudgeAll :: Double -> Op ()
nudgeAll = Double -> Op ()
streamNudgeAll
all :: (ControlPattern -> ControlPattern) -> Op ()
all = (ControlPattern -> ControlPattern) -> Op ()
streamAll
resetCycles :: Op ()
resetCycles = Op ()
streamResetCycles
setcps :: Pattern Double -> Op ()
setcps = ControlPattern -> Op ()
asap forall b c a. (b -> c) -> (a -> b) -> a -> c
. Pattern Double -> ControlPattern
cps
xfade :: ID -> ControlPattern -> Op ()
xfade ID
i = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.xfadeIn Time
4) ID
i
xfadeIn :: ID -> Time -> ControlPattern -> Op ()
xfadeIn ID
i Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.xfadeIn Time
t) ID
i
histpan :: ID -> Int -> ControlPattern -> Op ()
histpan ID
i Int
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Int -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.histpan Int
t) ID
i
wait :: ID -> Time -> ControlPattern -> Op ()
wait ID
i Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.wait Time
t) ID
i
waitT :: ID
-> (Time -> [ControlPattern] -> ControlPattern)
-> Time
-> ControlPattern
-> Op ()
waitT ID
i Time -> [ControlPattern] -> ControlPattern
f Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True ((Time -> [ControlPattern] -> ControlPattern)
-> Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.waitT Time -> [ControlPattern] -> ControlPattern
f Time
t) ID
i
jump :: ID -> ControlPattern -> Op ()
jump ID
i = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.jump) ID
i
jumpIn :: ID -> Int -> ControlPattern -> Op ()
jumpIn ID
i Int
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Int -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.jumpIn Int
t) ID
i
jumpIn' :: ID -> Int -> ControlPattern -> Op ()
jumpIn' ID
i Int
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Int -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.jumpIn' Int
t) ID
i
jumpMod :: ID -> Int -> ControlPattern -> Op ()
jumpMod ID
i Int
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Int -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.jumpMod Int
t) ID
i
mortal :: ID -> Time -> Time -> ControlPattern -> Op ()
mortal ID
i Time
lifespan Time
releaseTime = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.mortal Time
lifespan Time
releaseTime) ID
i
interpolate :: ID -> ControlPattern -> Op ()
interpolate ID
i = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.interpolate) ID
i
interpolateIn :: ID -> Time -> ControlPattern -> Op ()
interpolateIn ID
i Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.interpolateIn Time
t) ID
i
clutch :: ID -> ControlPattern -> Op ()
clutch ID
i = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (forall a. Time -> [Pattern a] -> Pattern a
Sound.Tidal.Transition.clutch) ID
i
clutchIn :: ID -> Time -> ControlPattern -> Op ()
clutchIn ID
i Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (forall a. Time -> Time -> [Pattern a] -> Pattern a
Sound.Tidal.Transition.clutchIn Time
t) ID
i
anticipate :: ID -> ControlPattern -> Op ()
anticipate ID
i = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.anticipate) ID
i
anticipateIn :: ID -> Time -> ControlPattern -> Op ()
anticipateIn ID
i Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
True (Time -> Time -> [ControlPattern] -> ControlPattern
Sound.Tidal.Transition.anticipateIn Time
t) ID
i
forId :: ID -> Time -> ControlPattern -> Op ()
forId ID
i Time
t = Bool
-> (Time -> [ControlPattern] -> ControlPattern)
-> ID
-> ControlPattern
-> Op ()
transition Bool
False (forall a. Time -> Time -> [Pattern a] -> Pattern a
Sound.Tidal.Transition.mortalOverlay Time
t) ID
i

d1 :: ControlPattern -> Op ()
d1 = ID -> ControlPattern -> Op ()
p ID
1 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
0)
d2 :: ControlPattern -> Op ()
d2 = ID -> ControlPattern -> Op ()
p ID
2 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
1)
d3 :: ControlPattern -> Op ()
d3 = ID -> ControlPattern -> Op ()
p ID
3 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
2)
d4 :: ControlPattern -> Op ()
d4 = ID -> ControlPattern -> Op ()
p ID
4 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
3)
d5 :: ControlPattern -> Op ()
d5 = ID -> ControlPattern -> Op ()
p ID
5 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
4)
d6 :: ControlPattern -> Op ()
d6 = ID -> ControlPattern -> Op ()
p ID
6 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
5)
d7 :: ControlPattern -> Op ()
d7 = ID -> ControlPattern -> Op ()
p ID
7 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
6)
d8 :: ControlPattern -> Op ()
d8 = ID -> ControlPattern -> Op ()
p ID
8 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
7)
d9 :: ControlPattern -> Op ()
d9 = ID -> ControlPattern -> Op ()
p ID
9 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
8)
d10 :: ControlPattern -> Op ()
d10 = ID -> ControlPattern -> Op ()
p ID
10 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
9)
d11 :: ControlPattern -> Op ()
d11 = ID -> ControlPattern -> Op ()
p ID
11 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
10)
d12 :: ControlPattern -> Op ()
d12 = ID -> ControlPattern -> Op ()
p ID
12 forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Unionable a => Pattern a -> Pattern a -> Pattern a
|< Pattern Int -> ControlPattern
orbit Pattern Int
11)
d13 :: ControlPattern -> Op ()
d13 = ID -> ControlPattern -> Op ()
p ID
13
d14 :: ControlPattern -> Op ()
d14 = ID -> ControlPattern -> Op ()
p ID
14
d15 :: ControlPattern -> Op ()
d15 = ID -> ControlPattern -> Op ()
p ID
15
d16 :: ControlPattern -> Op ()
d16 = ID -> ControlPattern -> Op ()
p ID
16

setI :: String -> Pattern Int -> Op ()
setI = String -> Pattern Int -> Op ()
streamSetI
setF :: String -> Pattern Double -> Op ()
setF = String -> Pattern Double -> Op ()
streamSetF
setS :: String -> Pattern String -> Op ()
setS = String -> Pattern String -> Op ()
streamSetS
setR :: String -> Pattern Time -> Op ()
setR = String -> Pattern Time -> Op ()
streamSetR
setB :: String -> Pattern Bool -> Op ()
setB = String -> Pattern Bool -> Op ()
streamSetB