module Sound.Tidal.Params where

-- **Please note**, this file is generated by bin/generate-params.hs
-- Submit any pull requests against that file and/or params-header.hs
-- in the same folder, thanks.

{-
    Params.hs - Provides the basic control patterns available to TidalCycles by default
    Copyright (C) 2021, Alex McLean and contributors

    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/>.
-}

import qualified Data.Map.Strict as Map

import Sound.Tidal.Pattern
import Sound.Tidal.Core ((#))
import Sound.Tidal.Utils
import Data.Maybe (fromMaybe)
import Data.Word (Word8)

-- | group multiple params into one
grp :: [String -> ControlMap] -> Pattern String -> ControlPattern
grp [] _ = empty
grp fs p = splitby <$> p
  where splitby name = Map.unions $ map (\(v, f) -> f v) $ zip (split name) fs
        split :: String -> [String]
        split = wordsBy (==':')

mF :: String -> String -> ControlMap
mF name v = fromMaybe Map.empty $ do f <- readMaybe v
                                     return $ Map.singleton name (VF f)

mI :: String -> String -> ControlMap
mI name v = fromMaybe Map.empty $ do i <- readMaybe v
                                     return $ Map.singleton name (VI i)

mS :: String -> String -> ControlMap
mS name v = Map.singleton name (VS v)

-- | Param makers

pF :: String -> Pattern Double -> ControlPattern
pF name = fmap (Map.singleton name . VF)

pI :: String -> Pattern Int -> ControlPattern
pI name = fmap (Map.singleton name . VI)

pB :: String -> Pattern Bool -> ControlPattern
pB name = fmap (Map.singleton name . VB)
 
pR :: String -> Pattern Rational -> ControlPattern
pR name = fmap (Map.singleton name . VR)

pN :: String -> Pattern Note -> ControlPattern
pN name = fmap (Map.singleton name . VN)

pS :: String -> Pattern String -> ControlPattern
pS name = fmap (Map.singleton name . VS)

pX :: String -> Pattern [Word8] -> ControlPattern
pX name = fmap (Map.singleton name . VX)

-- | Grouped params

sound :: Pattern String -> ControlPattern
sound = grp [mS "s", mF "n"]

cc :: Pattern String -> ControlPattern
cc = grp [mF "ccn", mF "ccv"]

nrpn :: Pattern String -> ControlPattern
nrpn = grp [mI "nrpn", mI "val"]

grain' :: Pattern String -> ControlPattern
grain' = grp [mF "begin", mF "end"]

midinote :: Pattern Note -> ControlPattern
midinote = note . (subtract 60 <$>)

drum :: Pattern String -> ControlPattern
drum = n . (subtract 60 . drumN <$>)

drumN :: Num a => String -> a
drumN "hq" = 27
drumN "sl" = 28
drumN "ps" = 29
drumN "pl" = 30
drumN "st" = 31
drumN "sq" = 32
drumN "ml" = 33
drumN "mb" = 34
drumN "ab" = 35
drumN "bd" = 36
drumN "rm" = 37
drumN "sn" = 38
drumN "cp" = 39
drumN "es" = 40
drumN "lf" = 41
drumN "ch" = 42
drumN "lt" = 43
drumN "hh" = 44
drumN "ft" = 45
drumN "oh" = 46
drumN "mt" = 47
drumN "hm" = 48
drumN "cr" = 49
drumN "ht" = 50
drumN "ri" = 51
drumN "cy" = 52
drumN "be" = 53
drumN "ta" = 54
drumN "sc" = 55
drumN "cb" = 56
drumN "cs" = 57
drumN "vi" = 58
drumN "rc" = 59
drumN "hb" = 60
drumN "lb" = 61
drumN "mh" = 62
drumN "hc" = 63
drumN "lc" = 64
drumN "he" = 65
drumN "le" = 66
drumN "ag" = 67
drumN "la" = 68
drumN "ca" = 69
drumN "ma" = 70
drumN "sw" = 71
drumN "lw" = 72
drumN "sg" = 73
drumN "lg" = 74
drumN "cl" = 75
drumN "hi" = 76
drumN "li" = 77
drumN "mc" = 78
drumN "oc" = 79
drumN "tr" = 80
drumN "ot" = 81
drumN "sh" = 82
drumN "jb" = 83
drumN "bt" = 84
drumN "ct" = 85
drumN "ms" = 86
drumN "os" = 87
drumN _ = 0

-- Generated params

-- | a pattern of numbers that speed up (or slow down) samples while they play.
accelerate :: Pattern Double -> ControlPattern
accelerate = pF "accelerate"
acceleratebus :: Pattern Int -> Pattern Double -> ControlPattern
acceleratebus busid pat = (pF "accelerate" pat) # (pI "^accelerate" busid)
acceleraterecv :: Pattern Int -> ControlPattern
acceleraterecv busid = pI "^accelerate" busid

-- | like @gain@, but linear.
amp :: Pattern Double -> ControlPattern
amp = pF "amp"
ampbus :: Pattern Int -> Pattern Double -> ControlPattern
ampbus busid pat = (pF "amp" pat) # (pI "^amp" busid)
amprecv :: Pattern Int -> ControlPattern
amprecv busid = pI "^amp" busid

-- | 
array :: Pattern [Word8] -> ControlPattern
array = pX "array"
arraybus :: Pattern Int -> Pattern [Word8] -> ControlPattern
arraybus busid pat = (pX "array" pat) # (pI "^array" busid)
arrayrecv :: Pattern Int -> ControlPattern
arrayrecv busid = pI "^array" busid

-- | a pattern of numbers to specify the attack time (in seconds) of an envelope applied to each sample.
attack :: Pattern Double -> ControlPattern
attack = pF "attack"
attackbus :: Pattern Int -> Pattern Double -> ControlPattern
attackbus busid pat = (pF "attack" pat) # (pI "^attack" busid)
attackrecv :: Pattern Int -> ControlPattern
attackrecv busid = pI "^attack" busid

-- | a pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter.
bandf :: Pattern Double -> ControlPattern
bandf = pF "bandf"
bandfbus :: Pattern Int -> Pattern Double -> ControlPattern
bandfbus busid pat = (pF "bandf" pat) # (pI "^bandf" busid)
bandfrecv :: Pattern Int -> ControlPattern
bandfrecv busid = pI "^bandf" busid

-- | a pattern of anumbers from 0 to 1. Sets the q-factor of the band-pass filter.
bandq :: Pattern Double -> ControlPattern
bandq = pF "bandq"
bandqbus :: Pattern Int -> Pattern Double -> ControlPattern
bandqbus busid pat = (pF "bandq" pat) # (pI "^bandq" busid)
bandqrecv :: Pattern Int -> ControlPattern
bandqrecv busid = pI "^bandq" busid

-- | a pattern of numbers from 0 to 1. Skips the beginning of each sample, e.g. `0.25` to cut off the first quarter from each sample.
begin :: Pattern Double -> ControlPattern
begin = pF "begin"
beginbus :: Pattern Int -> Pattern Double -> ControlPattern
beginbus busid pat = (pF "begin" pat) # (pI "^begin" busid)
beginrecv :: Pattern Int -> ControlPattern
beginrecv busid = pI "^begin" busid

-- | Spectral binshift
binshift :: Pattern Double -> ControlPattern
binshift = pF "binshift"
binshiftbus :: Pattern Int -> Pattern Double -> ControlPattern
binshiftbus busid pat = (pF "binshift" pat) # (pI "^binshift" busid)
binshiftrecv :: Pattern Int -> ControlPattern
binshiftrecv busid = pI "^binshift" busid

-- | 
button0 :: Pattern Double -> ControlPattern
button0 = pF "button0"
button0bus :: Pattern Int -> Pattern Double -> ControlPattern
button0bus busid pat = (pF "button0" pat) # (pI "^button0" busid)
button0recv :: Pattern Int -> ControlPattern
button0recv busid = pI "^button0" busid

-- | 
button1 :: Pattern Double -> ControlPattern
button1 = pF "button1"
button1bus :: Pattern Int -> Pattern Double -> ControlPattern
button1bus busid pat = (pF "button1" pat) # (pI "^button1" busid)
button1recv :: Pattern Int -> ControlPattern
button1recv busid = pI "^button1" busid

-- | 
button10 :: Pattern Double -> ControlPattern
button10 = pF "button10"
button10bus :: Pattern Int -> Pattern Double -> ControlPattern
button10bus busid pat = (pF "button10" pat) # (pI "^button10" busid)
button10recv :: Pattern Int -> ControlPattern
button10recv busid = pI "^button10" busid

-- | 
button11 :: Pattern Double -> ControlPattern
button11 = pF "button11"
button11bus :: Pattern Int -> Pattern Double -> ControlPattern
button11bus busid pat = (pF "button11" pat) # (pI "^button11" busid)
button11recv :: Pattern Int -> ControlPattern
button11recv busid = pI "^button11" busid

-- | 
button12 :: Pattern Double -> ControlPattern
button12 = pF "button12"
button12bus :: Pattern Int -> Pattern Double -> ControlPattern
button12bus busid pat = (pF "button12" pat) # (pI "^button12" busid)
button12recv :: Pattern Int -> ControlPattern
button12recv busid = pI "^button12" busid

-- | 
button13 :: Pattern Double -> ControlPattern
button13 = pF "button13"
button13bus :: Pattern Int -> Pattern Double -> ControlPattern
button13bus busid pat = (pF "button13" pat) # (pI "^button13" busid)
button13recv :: Pattern Int -> ControlPattern
button13recv busid = pI "^button13" busid

-- | 
button14 :: Pattern Double -> ControlPattern
button14 = pF "button14"
button14bus :: Pattern Int -> Pattern Double -> ControlPattern
button14bus busid pat = (pF "button14" pat) # (pI "^button14" busid)
button14recv :: Pattern Int -> ControlPattern
button14recv busid = pI "^button14" busid

-- | 
button15 :: Pattern Double -> ControlPattern
button15 = pF "button15"
button15bus :: Pattern Int -> Pattern Double -> ControlPattern
button15bus busid pat = (pF "button15" pat) # (pI "^button15" busid)
button15recv :: Pattern Int -> ControlPattern
button15recv busid = pI "^button15" busid

-- | 
button2 :: Pattern Double -> ControlPattern
button2 = pF "button2"
button2bus :: Pattern Int -> Pattern Double -> ControlPattern
button2bus busid pat = (pF "button2" pat) # (pI "^button2" busid)
button2recv :: Pattern Int -> ControlPattern
button2recv busid = pI "^button2" busid

-- | 
button3 :: Pattern Double -> ControlPattern
button3 = pF "button3"
button3bus :: Pattern Int -> Pattern Double -> ControlPattern
button3bus busid pat = (pF "button3" pat) # (pI "^button3" busid)
button3recv :: Pattern Int -> ControlPattern
button3recv busid = pI "^button3" busid

-- | 
button4 :: Pattern Double -> ControlPattern
button4 = pF "button4"
button4bus :: Pattern Int -> Pattern Double -> ControlPattern
button4bus busid pat = (pF "button4" pat) # (pI "^button4" busid)
button4recv :: Pattern Int -> ControlPattern
button4recv busid = pI "^button4" busid

-- | 
button5 :: Pattern Double -> ControlPattern
button5 = pF "button5"
button5bus :: Pattern Int -> Pattern Double -> ControlPattern
button5bus busid pat = (pF "button5" pat) # (pI "^button5" busid)
button5recv :: Pattern Int -> ControlPattern
button5recv busid = pI "^button5" busid

-- | 
button6 :: Pattern Double -> ControlPattern
button6 = pF "button6"
button6bus :: Pattern Int -> Pattern Double -> ControlPattern
button6bus busid pat = (pF "button6" pat) # (pI "^button6" busid)
button6recv :: Pattern Int -> ControlPattern
button6recv busid = pI "^button6" busid

-- | 
button7 :: Pattern Double -> ControlPattern
button7 = pF "button7"
button7bus :: Pattern Int -> Pattern Double -> ControlPattern
button7bus busid pat = (pF "button7" pat) # (pI "^button7" busid)
button7recv :: Pattern Int -> ControlPattern
button7recv busid = pI "^button7" busid

-- | 
button8 :: Pattern Double -> ControlPattern
button8 = pF "button8"
button8bus :: Pattern Int -> Pattern Double -> ControlPattern
button8bus busid pat = (pF "button8" pat) # (pI "^button8" busid)
button8recv :: Pattern Int -> ControlPattern
button8recv busid = pI "^button8" busid

-- | 
button9 :: Pattern Double -> ControlPattern
button9 = pF "button9"
button9bus :: Pattern Int -> Pattern Double -> ControlPattern
button9bus busid pat = (pF "button9" pat) # (pI "^button9" busid)
button9recv :: Pattern Int -> ControlPattern
button9recv busid = pI "^button9" busid

-- | 
ccn :: Pattern Double -> ControlPattern
ccn = pF "ccn"
ccnbus :: Pattern Int -> Pattern Double -> ControlPattern
ccnbus busid pat = (pF "ccn" pat) # (pI "^ccn" busid)
ccnrecv :: Pattern Int -> ControlPattern
ccnrecv busid = pI "^ccn" busid

-- | 
ccv :: Pattern Double -> ControlPattern
ccv = pF "ccv"
ccvbus :: Pattern Int -> Pattern Double -> ControlPattern
ccvbus busid pat = (pF "ccv" pat) # (pI "^ccv" busid)
ccvrecv :: Pattern Int -> ControlPattern
ccvrecv busid = pI "^ccv" busid

-- | choose the channel the pattern is sent to in superdirt
channel :: Pattern Int -> ControlPattern
channel = pI "channel"
channelbus :: Pattern Int -> Pattern Int -> ControlPattern
channelbus _ _ = error $ "Control parameter 'channel' can't be sent to a bus."

-- | 
clhatdecay :: Pattern Double -> ControlPattern
clhatdecay = pF "clhatdecay"
clhatdecaybus :: Pattern Int -> Pattern Double -> ControlPattern
clhatdecaybus busid pat = (pF "clhatdecay" pat) # (pI "^clhatdecay" busid)
clhatdecayrecv :: Pattern Int -> ControlPattern
clhatdecayrecv busid = pI "^clhatdecay" busid

-- | fake-resampling, a pattern of numbers for lowering the sample rate, i.e. 1 for original 2 for half, 3 for a third and so on.
coarse :: Pattern Double -> ControlPattern
coarse = pF "coarse"
coarsebus :: Pattern Int -> Pattern Double -> ControlPattern
coarsebus busid pat = (pF "coarse" pat) # (pI "^coarse" busid)
coarserecv :: Pattern Int -> ControlPattern
coarserecv busid = pI "^coarse" busid

-- | Spectral comb
comb :: Pattern Double -> ControlPattern
comb = pF "comb"
combbus :: Pattern Int -> Pattern Double -> ControlPattern
combbus busid pat = (pF "comb" pat) # (pI "^comb" busid)
combrecv :: Pattern Int -> ControlPattern
combrecv busid = pI "^comb" busid

-- | 
control :: Pattern Double -> ControlPattern
control = pF "control"
controlbus :: Pattern Int -> Pattern Double -> ControlPattern
controlbus busid pat = (pF "control" pat) # (pI "^control" busid)
controlrecv :: Pattern Int -> ControlPattern
controlrecv busid = pI "^control" busid

-- | 
cps :: Pattern Double -> ControlPattern
cps = pF "cps"
cpsbus :: Pattern Int -> Pattern Double -> ControlPattern
cpsbus busid pat = (pF "cps" pat) # (pI "^cps" busid)
cpsrecv :: Pattern Int -> ControlPattern
cpsrecv busid = pI "^cps" busid

-- | bit crushing, a pattern of numbers from 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction).
crush :: Pattern Double -> ControlPattern
crush = pF "crush"
crushbus :: Pattern Int -> Pattern Double -> ControlPattern
crushbus busid pat = (pF "crush" pat) # (pI "^crush" busid)
crushrecv :: Pattern Int -> ControlPattern
crushrecv busid = pI "^crush" busid

-- | 
ctlNum :: Pattern Double -> ControlPattern
ctlNum = pF "ctlNum"
ctlNumbus :: Pattern Int -> Pattern Double -> ControlPattern
ctlNumbus busid pat = (pF "ctlNum" pat) # (pI "^ctlNum" busid)
ctlNumrecv :: Pattern Int -> ControlPattern
ctlNumrecv busid = pI "^ctlNum" busid

-- | 
ctranspose :: Pattern Double -> ControlPattern
ctranspose = pF "ctranspose"
ctransposebus :: Pattern Int -> Pattern Double -> ControlPattern
ctransposebus busid pat = (pF "ctranspose" pat) # (pI "^ctranspose" busid)
ctransposerecv :: Pattern Int -> ControlPattern
ctransposerecv busid = pI "^ctranspose" busid

-- | In the style of classic drum-machines, `cut` will stop a playing sample as soon as another samples with in same cutgroup is to be played. An example would be an open hi-hat followed by a closed one, essentially muting the open.
cut :: Pattern Int -> ControlPattern
cut = pI "cut"
cutbus :: Pattern Int -> Pattern Int -> ControlPattern
cutbus busid pat = (pI "cut" pat) # (pI "^cut" busid)
cutrecv :: Pattern Int -> ControlPattern
cutrecv busid = pI "^cut" busid

-- | a pattern of numbers from 0 to 1. Applies the cutoff frequency of the low-pass filter.
cutoff :: Pattern Double -> ControlPattern
cutoff = pF "cutoff"
cutoffbus :: Pattern Int -> Pattern Double -> ControlPattern
cutoffbus busid pat = (pF "cutoff" pat) # (pI "^cutoff" busid)
cutoffrecv :: Pattern Int -> ControlPattern
cutoffrecv busid = pI "^cutoff" busid

-- | 
cutoffegint :: Pattern Double -> ControlPattern
cutoffegint = pF "cutoffegint"
cutoffegintbus :: Pattern Int -> Pattern Double -> ControlPattern
cutoffegintbus busid pat = (pF "cutoffegint" pat) # (pI "^cutoffegint" busid)
cutoffegintrecv :: Pattern Int -> ControlPattern
cutoffegintrecv busid = pI "^cutoffegint" busid

-- | 
decay :: Pattern Double -> ControlPattern
decay = pF "decay"
decaybus :: Pattern Int -> Pattern Double -> ControlPattern
decaybus busid pat = (pF "decay" pat) # (pI "^decay" busid)
decayrecv :: Pattern Int -> ControlPattern
decayrecv busid = pI "^decay" busid

-- | 
degree :: Pattern Double -> ControlPattern
degree = pF "degree"
degreebus :: Pattern Int -> Pattern Double -> ControlPattern
degreebus busid pat = (pF "degree" pat) # (pI "^degree" busid)
degreerecv :: Pattern Int -> ControlPattern
degreerecv busid = pI "^degree" busid

-- | a pattern of numbers from 0 to 1. Sets the level of the delay signal.
delay :: Pattern Double -> ControlPattern
delay = pF "delay"
delaybus :: Pattern Int -> Pattern Double -> ControlPattern
delaybus busid pat = (pF "delay" pat) # (pI "^delay" busid)
delayrecv :: Pattern Int -> ControlPattern
delayrecv busid = pI "^delay" busid

-- | a pattern of numbers from 0 to 1. Sets the amount of delay feedback.
delayfeedback :: Pattern Double -> ControlPattern
delayfeedback = pF "delayfeedback"
delayfeedbackbus :: Pattern Int -> Pattern Double -> ControlPattern
delayfeedbackbus busid pat = (pF "delayfeedback" pat) # (pI "^delayfeedback" busid)
delayfeedbackrecv :: Pattern Int -> ControlPattern
delayfeedbackrecv busid = pI "^delayfeedback" busid

-- | a pattern of numbers from 0 to 1. Sets the length of the delay.
delaytime :: Pattern Double -> ControlPattern
delaytime = pF "delaytime"
delaytimebus :: Pattern Int -> Pattern Double -> ControlPattern
delaytimebus busid pat = (pF "delaytime" pat) # (pI "^delaytime" busid)
delaytimerecv :: Pattern Int -> ControlPattern
delaytimerecv busid = pI "^delaytime" busid

-- | 
detune :: Pattern Double -> ControlPattern
detune = pF "detune"
detunebus :: Pattern Int -> Pattern Double -> ControlPattern
detunebus busid pat = (pF "detune" pat) # (pI "^detune" busid)
detunerecv :: Pattern Int -> ControlPattern
detunerecv busid = pI "^detune" busid

-- | noisy fuzzy distortion
distort :: Pattern Double -> ControlPattern
distort = pF "distort"
distortbus :: Pattern Int -> Pattern Double -> ControlPattern
distortbus busid pat = (pF "distort" pat) # (pI "^distort" busid)
distortrecv :: Pattern Int -> ControlPattern
distortrecv busid = pI "^distort" busid

-- | DJ filter, below 0.5 is low pass filter, above is high pass filter.
djf :: Pattern Double -> ControlPattern
djf = pF "djf"
djfbus :: Pattern Int -> Pattern Double -> ControlPattern
djfbus busid pat = (pF "djf" pat) # (pI "^djf" busid)
djfrecv :: Pattern Int -> ControlPattern
djfrecv busid = pI "^djf" busid

-- | when set to `1` will disable all reverb for this pattern. See `room` and `size` for more information about reverb.
dry :: Pattern Double -> ControlPattern
dry = pF "dry"
drybus :: Pattern Int -> Pattern Double -> ControlPattern
drybus busid pat = (pF "dry" pat) # (pI "^dry" busid)
dryrecv :: Pattern Int -> ControlPattern
dryrecv busid = pI "^dry" busid

-- | 
dur :: Pattern Double -> ControlPattern
dur = pF "dur"
durbus :: Pattern Int -> Pattern Double -> ControlPattern
durbus busid pat = (pF "dur" pat) # (pI "^dur" busid)
durrecv :: Pattern Int -> ControlPattern
durrecv busid = pI "^dur" busid

-- | the same as `begin`, but cuts the end off samples, shortening them; e.g. `0.75` to cut off the last quarter of each sample.
end :: Pattern Double -> ControlPattern
end = pF "end"
endbus :: Pattern Int -> Pattern Double -> ControlPattern
endbus _ _ = error $ "Control parameter 'end' can't be sent to a bus."

-- | Spectral enhance
enhance :: Pattern Double -> ControlPattern
enhance = pF "enhance"
enhancebus :: Pattern Int -> Pattern Double -> ControlPattern
enhancebus busid pat = (pF "enhance" pat) # (pI "^enhance" busid)
enhancerecv :: Pattern Int -> ControlPattern
enhancerecv busid = pI "^enhance" busid

-- | 
expression :: Pattern Double -> ControlPattern
expression = pF "expression"
expressionbus :: Pattern Int -> Pattern Double -> ControlPattern
expressionbus busid pat = (pF "expression" pat) # (pI "^expression" busid)
expressionrecv :: Pattern Int -> ControlPattern
expressionrecv busid = pI "^expression" busid

-- | 
frameRate :: Pattern Double -> ControlPattern
frameRate = pF "frameRate"
frameRatebus :: Pattern Int -> Pattern Double -> ControlPattern
frameRatebus busid pat = (pF "frameRate" pat) # (pI "^frameRate" busid)
frameRaterecv :: Pattern Int -> ControlPattern
frameRaterecv busid = pI "^frameRate" busid

-- | 
frames :: Pattern Double -> ControlPattern
frames = pF "frames"
framesbus :: Pattern Int -> Pattern Double -> ControlPattern
framesbus busid pat = (pF "frames" pat) # (pI "^frames" busid)
framesrecv :: Pattern Int -> ControlPattern
framesrecv busid = pI "^frames" busid

-- | Spectral freeze
freeze :: Pattern Double -> ControlPattern
freeze = pF "freeze"
freezebus :: Pattern Int -> Pattern Double -> ControlPattern
freezebus busid pat = (pF "freeze" pat) # (pI "^freeze" busid)
freezerecv :: Pattern Int -> ControlPattern
freezerecv busid = pI "^freeze" busid

-- | 
freq :: Pattern Double -> ControlPattern
freq = pF "freq"
freqbus :: Pattern Int -> Pattern Double -> ControlPattern
freqbus busid pat = (pF "freq" pat) # (pI "^freq" busid)
freqrecv :: Pattern Int -> ControlPattern
freqrecv busid = pI "^freq" busid

-- | for internal sound routing
from :: Pattern Double -> ControlPattern
from = pF "from"
frombus :: Pattern Int -> Pattern Double -> ControlPattern
frombus busid pat = (pF "from" pat) # (pI "^from" busid)
fromrecv :: Pattern Int -> ControlPattern
fromrecv busid = pI "^from" busid

-- | frequency shifter
fshift :: Pattern Double -> ControlPattern
fshift = pF "fshift"
fshiftbus :: Pattern Int -> Pattern Double -> ControlPattern
fshiftbus busid pat = (pF "fshift" pat) # (pI "^fshift" busid)
fshiftrecv :: Pattern Int -> ControlPattern
fshiftrecv busid = pI "^fshift" busid

-- | frequency shifter
fshiftnote :: Pattern Double -> ControlPattern
fshiftnote = pF "fshiftnote"
fshiftnotebus :: Pattern Int -> Pattern Double -> ControlPattern
fshiftnotebus busid pat = (pF "fshiftnote" pat) # (pI "^fshiftnote" busid)
fshiftnoterecv :: Pattern Int -> ControlPattern
fshiftnoterecv busid = pI "^fshiftnote" busid

-- | frequency shifter
fshiftphase :: Pattern Double -> ControlPattern
fshiftphase = pF "fshiftphase"
fshiftphasebus :: Pattern Int -> Pattern Double -> ControlPattern
fshiftphasebus busid pat = (pF "fshiftphase" pat) # (pI "^fshiftphase" busid)
fshiftphaserecv :: Pattern Int -> ControlPattern
fshiftphaserecv busid = pI "^fshiftphase" busid

-- | a pattern of numbers that specify volume. Values less than 1 make the sound quieter. Values greater than 1 make the sound louder. For the linear equivalent, see @amp@.
gain :: Pattern Double -> ControlPattern
gain = pF "gain"
gainbus :: Pattern Int -> Pattern Double -> ControlPattern
gainbus _ _ = error $ "Control parameter 'gain' can't be sent to a bus."

-- | 
gate :: Pattern Double -> ControlPattern
gate = pF "gate"
gatebus :: Pattern Int -> Pattern Double -> ControlPattern
gatebus busid pat = (pF "gate" pat) # (pI "^gate" busid)
gaterecv :: Pattern Int -> ControlPattern
gaterecv busid = pI "^gate" busid

-- | 
harmonic :: Pattern Double -> ControlPattern
harmonic = pF "harmonic"
harmonicbus :: Pattern Int -> Pattern Double -> ControlPattern
harmonicbus busid pat = (pF "harmonic" pat) # (pI "^harmonic" busid)
harmonicrecv :: Pattern Int -> ControlPattern
harmonicrecv busid = pI "^harmonic" busid

-- | 
hatgrain :: Pattern Double -> ControlPattern
hatgrain = pF "hatgrain"
hatgrainbus :: Pattern Int -> Pattern Double -> ControlPattern
hatgrainbus busid pat = (pF "hatgrain" pat) # (pI "^hatgrain" busid)
hatgrainrecv :: Pattern Int -> ControlPattern
hatgrainrecv busid = pI "^hatgrain" busid

-- | High pass sort of spectral filter
hbrick :: Pattern Double -> ControlPattern
hbrick = pF "hbrick"
hbrickbus :: Pattern Int -> Pattern Double -> ControlPattern
hbrickbus busid pat = (pF "hbrick" pat) # (pI "^hbrick" busid)
hbrickrecv :: Pattern Int -> ControlPattern
hbrickrecv busid = pI "^hbrick" busid

-- | a pattern of numbers from 0 to 1. Applies the cutoff frequency of the high-pass filter. Also has alias @hpf@
hcutoff :: Pattern Double -> ControlPattern
hcutoff = pF "hcutoff"
hcutoffbus :: Pattern Int -> Pattern Double -> ControlPattern
hcutoffbus busid pat = (pF "hcutoff" pat) # (pI "^hcutoff" busid)
hcutoffrecv :: Pattern Int -> ControlPattern
hcutoffrecv busid = pI "^hcutoff" busid

-- | a pattern of numbers to specify the hold time (in seconds) of an envelope applied to each sample. Only takes effect if `attack` and `release` are also specified.
hold :: Pattern Double -> ControlPattern
hold = pF "hold"
holdbus :: Pattern Int -> Pattern Double -> ControlPattern
holdbus busid pat = (pF "hold" pat) # (pI "^hold" busid)
holdrecv :: Pattern Int -> ControlPattern
holdrecv busid = pI "^hold" busid

-- | 
hours :: Pattern Double -> ControlPattern
hours = pF "hours"
hoursbus :: Pattern Int -> Pattern Double -> ControlPattern
hoursbus busid pat = (pF "hours" pat) # (pI "^hours" busid)
hoursrecv :: Pattern Int -> ControlPattern
hoursrecv busid = pI "^hours" busid

-- | a pattern of numbers from 0 to 1. Applies the resonance of the high-pass filter. Has alias @hpq@
hresonance :: Pattern Double -> ControlPattern
hresonance = pF "hresonance"
hresonancebus :: Pattern Int -> Pattern Double -> ControlPattern
hresonancebus busid pat = (pF "hresonance" pat) # (pI "^hresonance" busid)
hresonancerecv :: Pattern Int -> ControlPattern
hresonancerecv busid = pI "^hresonance" busid

-- | 
imag :: Pattern Double -> ControlPattern
imag = pF "imag"
imagbus :: Pattern Int -> Pattern Double -> ControlPattern
imagbus busid pat = (pF "imag" pat) # (pI "^imag" busid)
imagrecv :: Pattern Int -> ControlPattern
imagrecv busid = pI "^imag" busid

-- | 
kcutoff :: Pattern Double -> ControlPattern
kcutoff = pF "kcutoff"
kcutoffbus :: Pattern Int -> Pattern Double -> ControlPattern
kcutoffbus busid pat = (pF "kcutoff" pat) # (pI "^kcutoff" busid)
kcutoffrecv :: Pattern Int -> ControlPattern
kcutoffrecv busid = pI "^kcutoff" busid

-- | shape/bass enhancer
krush :: Pattern Double -> ControlPattern
krush = pF "krush"
krushbus :: Pattern Int -> Pattern Double -> ControlPattern
krushbus busid pat = (pF "krush" pat) # (pI "^krush" busid)
krushrecv :: Pattern Int -> ControlPattern
krushrecv busid = pI "^krush" busid

-- | 
lagogo :: Pattern Double -> ControlPattern
lagogo = pF "lagogo"
lagogobus :: Pattern Int -> Pattern Double -> ControlPattern
lagogobus busid pat = (pF "lagogo" pat) # (pI "^lagogo" busid)
lagogorecv :: Pattern Int -> ControlPattern
lagogorecv busid = pI "^lagogo" busid

-- | Low pass sort of spectral filter
lbrick :: Pattern Double -> ControlPattern
lbrick = pF "lbrick"
lbrickbus :: Pattern Int -> Pattern Double -> ControlPattern
lbrickbus busid pat = (pF "lbrick" pat) # (pI "^lbrick" busid)
lbrickrecv :: Pattern Int -> ControlPattern
lbrickrecv busid = pI "^lbrick" busid

-- | 
lclap :: Pattern Double -> ControlPattern
lclap = pF "lclap"
lclapbus :: Pattern Int -> Pattern Double -> ControlPattern
lclapbus busid pat = (pF "lclap" pat) # (pI "^lclap" busid)
lclaprecv :: Pattern Int -> ControlPattern
lclaprecv busid = pI "^lclap" busid

-- | 
lclaves :: Pattern Double -> ControlPattern
lclaves = pF "lclaves"
lclavesbus :: Pattern Int -> Pattern Double -> ControlPattern
lclavesbus busid pat = (pF "lclaves" pat) # (pI "^lclaves" busid)
lclavesrecv :: Pattern Int -> ControlPattern
lclavesrecv busid = pI "^lclaves" busid

-- | 
lclhat :: Pattern Double -> ControlPattern
lclhat = pF "lclhat"
lclhatbus :: Pattern Int -> Pattern Double -> ControlPattern
lclhatbus busid pat = (pF "lclhat" pat) # (pI "^lclhat" busid)
lclhatrecv :: Pattern Int -> ControlPattern
lclhatrecv busid = pI "^lclhat" busid

-- | 
lcrash :: Pattern Double -> ControlPattern
lcrash = pF "lcrash"
lcrashbus :: Pattern Int -> Pattern Double -> ControlPattern
lcrashbus busid pat = (pF "lcrash" pat) # (pI "^lcrash" busid)
lcrashrecv :: Pattern Int -> ControlPattern
lcrashrecv busid = pI "^lcrash" busid

-- | controls the amount of overlap between two adjacent sounds
legato :: Pattern Double -> ControlPattern
legato = pF "legato"
legatobus :: Pattern Int -> Pattern Double -> ControlPattern
legatobus _ _ = error $ "Control parameter 'legato' can't be sent to a bus."

-- | 
leslie :: Pattern Double -> ControlPattern
leslie = pF "leslie"
lesliebus :: Pattern Int -> Pattern Double -> ControlPattern
lesliebus busid pat = (pF "leslie" pat) # (pI "^leslie" busid)
leslierecv :: Pattern Int -> ControlPattern
leslierecv busid = pI "^leslie" busid

-- | 
lfo :: Pattern Double -> ControlPattern
lfo = pF "lfo"
lfobus :: Pattern Int -> Pattern Double -> ControlPattern
lfobus busid pat = (pF "lfo" pat) # (pI "^lfo" busid)
lforecv :: Pattern Int -> ControlPattern
lforecv busid = pI "^lfo" busid

-- | 
lfocutoffint :: Pattern Double -> ControlPattern
lfocutoffint = pF "lfocutoffint"
lfocutoffintbus :: Pattern Int -> Pattern Double -> ControlPattern
lfocutoffintbus busid pat = (pF "lfocutoffint" pat) # (pI "^lfocutoffint" busid)
lfocutoffintrecv :: Pattern Int -> ControlPattern
lfocutoffintrecv busid = pI "^lfocutoffint" busid

-- | 
lfodelay :: Pattern Double -> ControlPattern
lfodelay = pF "lfodelay"
lfodelaybus :: Pattern Int -> Pattern Double -> ControlPattern
lfodelaybus busid pat = (pF "lfodelay" pat) # (pI "^lfodelay" busid)
lfodelayrecv :: Pattern Int -> ControlPattern
lfodelayrecv busid = pI "^lfodelay" busid

-- | 
lfoint :: Pattern Double -> ControlPattern
lfoint = pF "lfoint"
lfointbus :: Pattern Int -> Pattern Double -> ControlPattern
lfointbus busid pat = (pF "lfoint" pat) # (pI "^lfoint" busid)
lfointrecv :: Pattern Int -> ControlPattern
lfointrecv busid = pI "^lfoint" busid

-- | 
lfopitchint :: Pattern Double -> ControlPattern
lfopitchint = pF "lfopitchint"
lfopitchintbus :: Pattern Int -> Pattern Double -> ControlPattern
lfopitchintbus busid pat = (pF "lfopitchint" pat) # (pI "^lfopitchint" busid)
lfopitchintrecv :: Pattern Int -> ControlPattern
lfopitchintrecv busid = pI "^lfopitchint" busid

-- | 
lfoshape :: Pattern Double -> ControlPattern
lfoshape = pF "lfoshape"
lfoshapebus :: Pattern Int -> Pattern Double -> ControlPattern
lfoshapebus busid pat = (pF "lfoshape" pat) # (pI "^lfoshape" busid)
lfoshaperecv :: Pattern Int -> ControlPattern
lfoshaperecv busid = pI "^lfoshape" busid

-- | 
lfosync :: Pattern Double -> ControlPattern
lfosync = pF "lfosync"
lfosyncbus :: Pattern Int -> Pattern Double -> ControlPattern
lfosyncbus busid pat = (pF "lfosync" pat) # (pI "^lfosync" busid)
lfosyncrecv :: Pattern Int -> ControlPattern
lfosyncrecv busid = pI "^lfosync" busid

-- | 
lhitom :: Pattern Double -> ControlPattern
lhitom = pF "lhitom"
lhitombus :: Pattern Int -> Pattern Double -> ControlPattern
lhitombus busid pat = (pF "lhitom" pat) # (pI "^lhitom" busid)
lhitomrecv :: Pattern Int -> ControlPattern
lhitomrecv busid = pI "^lhitom" busid

-- | 
lkick :: Pattern Double -> ControlPattern
lkick = pF "lkick"
lkickbus :: Pattern Int -> Pattern Double -> ControlPattern
lkickbus busid pat = (pF "lkick" pat) # (pI "^lkick" busid)
lkickrecv :: Pattern Int -> ControlPattern
lkickrecv busid = pI "^lkick" busid

-- | 
llotom :: Pattern Double -> ControlPattern
llotom = pF "llotom"
llotombus :: Pattern Int -> Pattern Double -> ControlPattern
llotombus busid pat = (pF "llotom" pat) # (pI "^llotom" busid)
llotomrecv :: Pattern Int -> ControlPattern
llotomrecv busid = pI "^llotom" busid

-- | A pattern of numbers. Specifies whether delaytime is calculated relative to cps. When set to 1, delaytime is a direct multiple of a cycle.
lock :: Pattern Double -> ControlPattern
lock = pF "lock"
lockbus :: Pattern Int -> Pattern Double -> ControlPattern
lockbus busid pat = (pF "lock" pat) # (pI "^lock" busid)
lockrecv :: Pattern Int -> ControlPattern
lockrecv busid = pI "^lock" busid

-- | loops the sample (from `begin` to `end`) the specified number of times.
loop :: Pattern Double -> ControlPattern
loop = pF "loop"
loopbus :: Pattern Int -> Pattern Double -> ControlPattern
loopbus _ _ = error $ "Control parameter 'loop' can't be sent to a bus."

-- | 
lophat :: Pattern Double -> ControlPattern
lophat = pF "lophat"
lophatbus :: Pattern Int -> Pattern Double -> ControlPattern
lophatbus busid pat = (pF "lophat" pat) # (pI "^lophat" busid)
lophatrecv :: Pattern Int -> ControlPattern
lophatrecv busid = pI "^lophat" busid

-- | 
lrate :: Pattern Double -> ControlPattern
lrate = pF "lrate"
lratebus :: Pattern Int -> Pattern Double -> ControlPattern
lratebus busid pat = (pF "lrate" pat) # (pI "^lrate" busid)
lraterecv :: Pattern Int -> ControlPattern
lraterecv busid = pI "^lrate" busid

-- | 
lsize :: Pattern Double -> ControlPattern
lsize = pF "lsize"
lsizebus :: Pattern Int -> Pattern Double -> ControlPattern
lsizebus busid pat = (pF "lsize" pat) # (pI "^lsize" busid)
lsizerecv :: Pattern Int -> ControlPattern
lsizerecv busid = pI "^lsize" busid

-- | 
lsnare :: Pattern Double -> ControlPattern
lsnare = pF "lsnare"
lsnarebus :: Pattern Int -> Pattern Double -> ControlPattern
lsnarebus busid pat = (pF "lsnare" pat) # (pI "^lsnare" busid)
lsnarerecv :: Pattern Int -> ControlPattern
lsnarerecv busid = pI "^lsnare" busid

-- | 
midibend :: Pattern Double -> ControlPattern
midibend = pF "midibend"
midibendbus :: Pattern Int -> Pattern Double -> ControlPattern
midibendbus busid pat = (pF "midibend" pat) # (pI "^midibend" busid)
midibendrecv :: Pattern Int -> ControlPattern
midibendrecv busid = pI "^midibend" busid

-- | 
midichan :: Pattern Double -> ControlPattern
midichan = pF "midichan"
midichanbus :: Pattern Int -> Pattern Double -> ControlPattern
midichanbus busid pat = (pF "midichan" pat) # (pI "^midichan" busid)
midichanrecv :: Pattern Int -> ControlPattern
midichanrecv busid = pI "^midichan" busid

-- | 
midicmd :: Pattern String -> ControlPattern
midicmd = pS "midicmd"
midicmdbus :: Pattern Int -> Pattern String -> ControlPattern
midicmdbus busid pat = (pS "midicmd" pat) # (pI "^midicmd" busid)
midicmdrecv :: Pattern Int -> ControlPattern
midicmdrecv busid = pI "^midicmd" busid

-- | 
miditouch :: Pattern Double -> ControlPattern
miditouch = pF "miditouch"
miditouchbus :: Pattern Int -> Pattern Double -> ControlPattern
miditouchbus busid pat = (pF "miditouch" pat) # (pI "^miditouch" busid)
miditouchrecv :: Pattern Int -> ControlPattern
miditouchrecv busid = pI "^miditouch" busid

-- | 
minutes :: Pattern Double -> ControlPattern
minutes = pF "minutes"
minutesbus :: Pattern Int -> Pattern Double -> ControlPattern
minutesbus busid pat = (pF "minutes" pat) # (pI "^minutes" busid)
minutesrecv :: Pattern Int -> ControlPattern
minutesrecv busid = pI "^minutes" busid

-- | 
modwheel :: Pattern Double -> ControlPattern
modwheel = pF "modwheel"
modwheelbus :: Pattern Int -> Pattern Double -> ControlPattern
modwheelbus busid pat = (pF "modwheel" pat) # (pI "^modwheel" busid)
modwheelrecv :: Pattern Int -> ControlPattern
modwheelrecv busid = pI "^modwheel" busid

-- | 
mtranspose :: Pattern Double -> ControlPattern
mtranspose = pF "mtranspose"
mtransposebus :: Pattern Int -> Pattern Double -> ControlPattern
mtransposebus busid pat = (pF "mtranspose" pat) # (pI "^mtranspose" busid)
mtransposerecv :: Pattern Int -> ControlPattern
mtransposerecv busid = pI "^mtranspose" busid

-- | The note or sample number to choose for a synth or sampleset
n :: Pattern Note -> ControlPattern
n = pN "n"
nbus :: Pattern Int -> Pattern Note -> ControlPattern
nbus _ _ = error $ "Control parameter 'n' can't be sent to a bus."

-- | The note or pitch to play a sound or synth with
note :: Pattern Note -> ControlPattern
note = pN "note"
notebus :: Pattern Int -> Pattern Note -> ControlPattern
notebus _ _ = error $ "Control parameter 'note' can't be sent to a bus."

-- | 
nrpnn :: Pattern Int -> ControlPattern
nrpnn = pI "nrpnn"
nrpnnbus :: Pattern Int -> Pattern Int -> ControlPattern
nrpnnbus busid pat = (pI "nrpnn" pat) # (pI "^nrpnn" busid)
nrpnnrecv :: Pattern Int -> ControlPattern
nrpnnrecv busid = pI "^nrpnn" busid

-- | 
nrpnv :: Pattern Int -> ControlPattern
nrpnv = pI "nrpnv"
nrpnvbus :: Pattern Int -> Pattern Int -> ControlPattern
nrpnvbus busid pat = (pI "nrpnv" pat) # (pI "^nrpnv" busid)
nrpnvrecv :: Pattern Int -> ControlPattern
nrpnvrecv busid = pI "^nrpnv" busid

-- | Nudges events into the future by the specified number of seconds. Negative numbers work up to a point as well (due to internal latency)
nudge :: Pattern Double -> ControlPattern
nudge = pF "nudge"
nudgebus :: Pattern Int -> Pattern Double -> ControlPattern
nudgebus busid pat = (pF "nudge" pat) # (pI "^nudge" busid)
nudgerecv :: Pattern Int -> ControlPattern
nudgerecv busid = pI "^nudge" busid

-- | 
octave :: Pattern Int -> ControlPattern
octave = pI "octave"
octavebus :: Pattern Int -> Pattern Int -> ControlPattern
octavebus _ _ = error $ "Control parameter 'octave' can't be sent to a bus."

-- | 
octaveR :: Pattern Double -> ControlPattern
octaveR = pF "octaveR"
octaveRbus :: Pattern Int -> Pattern Double -> ControlPattern
octaveRbus busid pat = (pF "octaveR" pat) # (pI "^octaveR" busid)
octaveRrecv :: Pattern Int -> ControlPattern
octaveRrecv busid = pI "^octaveR" busid

-- | octaver effect
octer :: Pattern Double -> ControlPattern
octer = pF "octer"
octerbus :: Pattern Int -> Pattern Double -> ControlPattern
octerbus busid pat = (pF "octer" pat) # (pI "^octer" busid)
octerrecv :: Pattern Int -> ControlPattern
octerrecv busid = pI "^octer" busid

-- | octaver effect
octersub :: Pattern Double -> ControlPattern
octersub = pF "octersub"
octersubbus :: Pattern Int -> Pattern Double -> ControlPattern
octersubbus busid pat = (pF "octersub" pat) # (pI "^octersub" busid)
octersubrecv :: Pattern Int -> ControlPattern
octersubrecv busid = pI "^octersub" busid

-- | octaver effect
octersubsub :: Pattern Double -> ControlPattern
octersubsub = pF "octersubsub"
octersubsubbus :: Pattern Int -> Pattern Double -> ControlPattern
octersubsubbus busid pat = (pF "octersubsub" pat) # (pI "^octersubsub" busid)
octersubsubrecv :: Pattern Int -> ControlPattern
octersubsubrecv busid = pI "^octersubsub" busid

-- | 
offset :: Pattern Double -> ControlPattern
offset = pF "offset"
offsetbus :: Pattern Int -> Pattern Double -> ControlPattern
offsetbus _ _ = error $ "Control parameter 'offset' can't be sent to a bus."

-- | 
ophatdecay :: Pattern Double -> ControlPattern
ophatdecay = pF "ophatdecay"
ophatdecaybus :: Pattern Int -> Pattern Double -> ControlPattern
ophatdecaybus busid pat = (pF "ophatdecay" pat) # (pI "^ophatdecay" busid)
ophatdecayrecv :: Pattern Int -> ControlPattern
ophatdecayrecv busid = pI "^ophatdecay" busid

-- | a pattern of numbers. An `orbit` is a global parameter context for patterns. Patterns with the same orbit will share hardware output bus offset and global effects, e.g. reverb and delay. The maximum number of orbits is specified in the superdirt startup, numbers higher than maximum will wrap around.
orbit :: Pattern Int -> ControlPattern
orbit = pI "orbit"
orbitbus :: Pattern Int -> Pattern Int -> ControlPattern
orbitbus busid pat = (pI "orbit" pat) # (pI "^orbit" busid)
orbitrecv :: Pattern Int -> ControlPattern
orbitrecv busid = pI "^orbit" busid

-- | 
overgain :: Pattern Double -> ControlPattern
overgain = pF "overgain"
overgainbus :: Pattern Int -> Pattern Double -> ControlPattern
overgainbus _ _ = error $ "Control parameter 'overgain' can't be sent to a bus."

-- | 
overshape :: Pattern Double -> ControlPattern
overshape = pF "overshape"
overshapebus :: Pattern Int -> Pattern Double -> ControlPattern
overshapebus busid pat = (pF "overshape" pat) # (pI "^overshape" busid)
overshaperecv :: Pattern Int -> ControlPattern
overshaperecv busid = pI "^overshape" busid

-- | a pattern of numbers between 0 and 1, from left to right (assuming stereo), once round a circle (assuming multichannel)
pan :: Pattern Double -> ControlPattern
pan = pF "pan"
panbus :: Pattern Int -> Pattern Double -> ControlPattern
panbus busid pat = (pF "pan" pat) # (pI "^pan" busid)
panrecv :: Pattern Int -> ControlPattern
panrecv busid = pI "^pan" busid

-- | a pattern of numbers between -1.0 and 1.0, which controls the relative position of the centre pan in a pair of adjacent speakers (multichannel only)
panorient :: Pattern Double -> ControlPattern
panorient = pF "panorient"
panorientbus :: Pattern Int -> Pattern Double -> ControlPattern
panorientbus busid pat = (pF "panorient" pat) # (pI "^panorient" busid)
panorientrecv :: Pattern Int -> ControlPattern
panorientrecv busid = pI "^panorient" busid

-- | a pattern of numbers between -inf and inf, which controls how much multichannel output is fanned out (negative is backwards ordering)
panspan :: Pattern Double -> ControlPattern
panspan = pF "panspan"
panspanbus :: Pattern Int -> Pattern Double -> ControlPattern
panspanbus busid pat = (pF "panspan" pat) # (pI "^panspan" busid)
panspanrecv :: Pattern Int -> ControlPattern
panspanrecv busid = pI "^panspan" busid

-- | a pattern of numbers between 0.0 and 1.0, which controls the multichannel spread range (multichannel only)
pansplay :: Pattern Double -> ControlPattern
pansplay = pF "pansplay"
pansplaybus :: Pattern Int -> Pattern Double -> ControlPattern
pansplaybus busid pat = (pF "pansplay" pat) # (pI "^pansplay" busid)
pansplayrecv :: Pattern Int -> ControlPattern
pansplayrecv busid = pI "^pansplay" busid

-- | a pattern of numbers between 0.0 and inf, which controls how much each channel is distributed over neighbours (multichannel only)
panwidth :: Pattern Double -> ControlPattern
panwidth = pF "panwidth"
panwidthbus :: Pattern Int -> Pattern Double -> ControlPattern
panwidthbus busid pat = (pF "panwidth" pat) # (pI "^panwidth" busid)
panwidthrecv :: Pattern Int -> ControlPattern
panwidthrecv busid = pI "^panwidth" busid

-- | 
partials :: Pattern Double -> ControlPattern
partials = pF "partials"
partialsbus :: Pattern Int -> Pattern Double -> ControlPattern
partialsbus busid pat = (pF "partials" pat) # (pI "^partials" busid)
partialsrecv :: Pattern Int -> ControlPattern
partialsrecv busid = pI "^partials" busid

-- | Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'
phaserdepth :: Pattern Double -> ControlPattern
phaserdepth = pF "phaserdepth"
phaserdepthbus :: Pattern Int -> Pattern Double -> ControlPattern
phaserdepthbus busid pat = (pF "phaserdepth" pat) # (pI "^phaserdepth" busid)
phaserdepthrecv :: Pattern Int -> ControlPattern
phaserdepthrecv busid = pI "^phaserdepth" busid

-- | Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'
phaserrate :: Pattern Double -> ControlPattern
phaserrate = pF "phaserrate"
phaserratebus :: Pattern Int -> Pattern Double -> ControlPattern
phaserratebus busid pat = (pF "phaserrate" pat) # (pI "^phaserrate" busid)
phaserraterecv :: Pattern Int -> ControlPattern
phaserraterecv busid = pI "^phaserrate" busid

-- | 
pitch1 :: Pattern Double -> ControlPattern
pitch1 = pF "pitch1"
pitch1bus :: Pattern Int -> Pattern Double -> ControlPattern
pitch1bus busid pat = (pF "pitch1" pat) # (pI "^pitch1" busid)
pitch1recv :: Pattern Int -> ControlPattern
pitch1recv busid = pI "^pitch1" busid

-- | 
pitch2 :: Pattern Double -> ControlPattern
pitch2 = pF "pitch2"
pitch2bus :: Pattern Int -> Pattern Double -> ControlPattern
pitch2bus busid pat = (pF "pitch2" pat) # (pI "^pitch2" busid)
pitch2recv :: Pattern Int -> ControlPattern
pitch2recv busid = pI "^pitch2" busid

-- | 
pitch3 :: Pattern Double -> ControlPattern
pitch3 = pF "pitch3"
pitch3bus :: Pattern Int -> Pattern Double -> ControlPattern
pitch3bus busid pat = (pF "pitch3" pat) # (pI "^pitch3" busid)
pitch3recv :: Pattern Int -> ControlPattern
pitch3recv busid = pI "^pitch3" busid

-- | 
polyTouch :: Pattern Double -> ControlPattern
polyTouch = pF "polyTouch"
polyTouchbus :: Pattern Int -> Pattern Double -> ControlPattern
polyTouchbus busid pat = (pF "polyTouch" pat) # (pI "^polyTouch" busid)
polyTouchrecv :: Pattern Int -> ControlPattern
polyTouchrecv busid = pI "^polyTouch" busid

-- | 
portamento :: Pattern Double -> ControlPattern
portamento = pF "portamento"
portamentobus :: Pattern Int -> Pattern Double -> ControlPattern
portamentobus busid pat = (pF "portamento" pat) # (pI "^portamento" busid)
portamentorecv :: Pattern Int -> ControlPattern
portamentorecv busid = pI "^portamento" busid

-- | 
progNum :: Pattern Double -> ControlPattern
progNum = pF "progNum"
progNumbus :: Pattern Int -> Pattern Double -> ControlPattern
progNumbus busid pat = (pF "progNum" pat) # (pI "^progNum" busid)
progNumrecv :: Pattern Int -> ControlPattern
progNumrecv busid = pI "^progNum" busid

-- | used in SuperDirt softsynths as a control rate or 'speed'
rate :: Pattern Double -> ControlPattern
rate = pF "rate"
ratebus :: Pattern Int -> Pattern Double -> ControlPattern
ratebus busid pat = (pF "rate" pat) # (pI "^rate" busid)
raterecv :: Pattern Int -> ControlPattern
raterecv busid = pI "^rate" busid

-- | Spectral conform
real :: Pattern Double -> ControlPattern
real = pF "real"
realbus :: Pattern Int -> Pattern Double -> ControlPattern
realbus busid pat = (pF "real" pat) # (pI "^real" busid)
realrecv :: Pattern Int -> ControlPattern
realrecv busid = pI "^real" busid

-- | a pattern of numbers to specify the release time (in seconds) of an envelope applied to each sample.
release :: Pattern Double -> ControlPattern
release = pF "release"
releasebus :: Pattern Int -> Pattern Double -> ControlPattern
releasebus busid pat = (pF "release" pat) # (pI "^release" busid)
releaserecv :: Pattern Int -> ControlPattern
releaserecv busid = pI "^release" busid

-- | a pattern of numbers from 0 to 1. Specifies the resonance of the low-pass filter.
resonance :: Pattern Double -> ControlPattern
resonance = pF "resonance"
resonancebus :: Pattern Int -> Pattern Double -> ControlPattern
resonancebus busid pat = (pF "resonance" pat) # (pI "^resonance" busid)
resonancerecv :: Pattern Int -> ControlPattern
resonancerecv busid = pI "^resonance" busid

-- | ring modulation
ring :: Pattern Double -> ControlPattern
ring = pF "ring"
ringbus :: Pattern Int -> Pattern Double -> ControlPattern
ringbus busid pat = (pF "ring" pat) # (pI "^ring" busid)
ringrecv :: Pattern Int -> ControlPattern
ringrecv busid = pI "^ring" busid

-- | ring modulation
ringdf :: Pattern Double -> ControlPattern
ringdf = pF "ringdf"
ringdfbus :: Pattern Int -> Pattern Double -> ControlPattern
ringdfbus busid pat = (pF "ringdf" pat) # (pI "^ringdf" busid)
ringdfrecv :: Pattern Int -> ControlPattern
ringdfrecv busid = pI "^ringdf" busid

-- | ring modulation
ringf :: Pattern Double -> ControlPattern
ringf = pF "ringf"
ringfbus :: Pattern Int -> Pattern Double -> ControlPattern
ringfbus busid pat = (pF "ringf" pat) # (pI "^ringf" busid)
ringfrecv :: Pattern Int -> ControlPattern
ringfrecv busid = pI "^ringf" busid

-- | a pattern of numbers from 0 to 1. Sets the level of reverb.
room :: Pattern Double -> ControlPattern
room = pF "room"
roombus :: Pattern Int -> Pattern Double -> ControlPattern
roombus busid pat = (pF "room" pat) # (pI "^room" busid)
roomrecv :: Pattern Int -> ControlPattern
roomrecv busid = pI "^room" busid

-- | 
sagogo :: Pattern Double -> ControlPattern
sagogo = pF "sagogo"
sagogobus :: Pattern Int -> Pattern Double -> ControlPattern
sagogobus busid pat = (pF "sagogo" pat) # (pI "^sagogo" busid)
sagogorecv :: Pattern Int -> ControlPattern
sagogorecv busid = pI "^sagogo" busid

-- | 
sclap :: Pattern Double -> ControlPattern
sclap = pF "sclap"
sclapbus :: Pattern Int -> Pattern Double -> ControlPattern
sclapbus busid pat = (pF "sclap" pat) # (pI "^sclap" busid)
sclaprecv :: Pattern Int -> ControlPattern
sclaprecv busid = pI "^sclap" busid

-- | 
sclaves :: Pattern Double -> ControlPattern
sclaves = pF "sclaves"
sclavesbus :: Pattern Int -> Pattern Double -> ControlPattern
sclavesbus busid pat = (pF "sclaves" pat) # (pI "^sclaves" busid)
sclavesrecv :: Pattern Int -> ControlPattern
sclavesrecv busid = pI "^sclaves" busid

-- | Spectral scramble
scram :: Pattern Double -> ControlPattern
scram = pF "scram"
scrambus :: Pattern Int -> Pattern Double -> ControlPattern
scrambus busid pat = (pF "scram" pat) # (pI "^scram" busid)
scramrecv :: Pattern Int -> ControlPattern
scramrecv busid = pI "^scram" busid

-- | 
scrash :: Pattern Double -> ControlPattern
scrash = pF "scrash"
scrashbus :: Pattern Int -> Pattern Double -> ControlPattern
scrashbus busid pat = (pF "scrash" pat) # (pI "^scrash" busid)
scrashrecv :: Pattern Int -> ControlPattern
scrashrecv busid = pI "^scrash" busid

-- | 
seconds :: Pattern Double -> ControlPattern
seconds = pF "seconds"
secondsbus :: Pattern Int -> Pattern Double -> ControlPattern
secondsbus busid pat = (pF "seconds" pat) # (pI "^seconds" busid)
secondsrecv :: Pattern Int -> ControlPattern
secondsrecv busid = pI "^seconds" busid

-- | 
semitone :: Pattern Double -> ControlPattern
semitone = pF "semitone"
semitonebus :: Pattern Int -> Pattern Double -> ControlPattern
semitonebus busid pat = (pF "semitone" pat) # (pI "^semitone" busid)
semitonerecv :: Pattern Int -> ControlPattern
semitonerecv busid = pI "^semitone" busid

-- | wave shaping distortion, a pattern of numbers from 0 for no distortion up to 1 for loads of distortion.
shape :: Pattern Double -> ControlPattern
shape = pF "shape"
shapebus :: Pattern Int -> Pattern Double -> ControlPattern
shapebus busid pat = (pF "shape" pat) # (pI "^shape" busid)
shaperecv :: Pattern Int -> ControlPattern
shaperecv busid = pI "^shape" busid

-- | a pattern of numbers from 0 to 1. Sets the perceptual size (reverb time) of the `room` to be used in reverb.
size :: Pattern Double -> ControlPattern
size = pF "size"
sizebus :: Pattern Int -> Pattern Double -> ControlPattern
sizebus busid pat = (pF "size" pat) # (pI "^size" busid)
sizerecv :: Pattern Int -> ControlPattern
sizerecv busid = pI "^size" busid

-- | 
slide :: Pattern Double -> ControlPattern
slide = pF "slide"
slidebus :: Pattern Int -> Pattern Double -> ControlPattern
slidebus busid pat = (pF "slide" pat) # (pI "^slide" busid)
sliderecv :: Pattern Int -> ControlPattern
sliderecv busid = pI "^slide" busid

-- | 
slider0 :: Pattern Double -> ControlPattern
slider0 = pF "slider0"
slider0bus :: Pattern Int -> Pattern Double -> ControlPattern
slider0bus busid pat = (pF "slider0" pat) # (pI "^slider0" busid)
slider0recv :: Pattern Int -> ControlPattern
slider0recv busid = pI "^slider0" busid

-- | 
slider1 :: Pattern Double -> ControlPattern
slider1 = pF "slider1"
slider1bus :: Pattern Int -> Pattern Double -> ControlPattern
slider1bus busid pat = (pF "slider1" pat) # (pI "^slider1" busid)
slider1recv :: Pattern Int -> ControlPattern
slider1recv busid = pI "^slider1" busid

-- | 
slider10 :: Pattern Double -> ControlPattern
slider10 = pF "slider10"
slider10bus :: Pattern Int -> Pattern Double -> ControlPattern
slider10bus busid pat = (pF "slider10" pat) # (pI "^slider10" busid)
slider10recv :: Pattern Int -> ControlPattern
slider10recv busid = pI "^slider10" busid

-- | 
slider11 :: Pattern Double -> ControlPattern
slider11 = pF "slider11"
slider11bus :: Pattern Int -> Pattern Double -> ControlPattern
slider11bus busid pat = (pF "slider11" pat) # (pI "^slider11" busid)
slider11recv :: Pattern Int -> ControlPattern
slider11recv busid = pI "^slider11" busid

-- | 
slider12 :: Pattern Double -> ControlPattern
slider12 = pF "slider12"
slider12bus :: Pattern Int -> Pattern Double -> ControlPattern
slider12bus busid pat = (pF "slider12" pat) # (pI "^slider12" busid)
slider12recv :: Pattern Int -> ControlPattern
slider12recv busid = pI "^slider12" busid

-- | 
slider13 :: Pattern Double -> ControlPattern
slider13 = pF "slider13"
slider13bus :: Pattern Int -> Pattern Double -> ControlPattern
slider13bus busid pat = (pF "slider13" pat) # (pI "^slider13" busid)
slider13recv :: Pattern Int -> ControlPattern
slider13recv busid = pI "^slider13" busid

-- | 
slider14 :: Pattern Double -> ControlPattern
slider14 = pF "slider14"
slider14bus :: Pattern Int -> Pattern Double -> ControlPattern
slider14bus busid pat = (pF "slider14" pat) # (pI "^slider14" busid)
slider14recv :: Pattern Int -> ControlPattern
slider14recv busid = pI "^slider14" busid

-- | 
slider15 :: Pattern Double -> ControlPattern
slider15 = pF "slider15"
slider15bus :: Pattern Int -> Pattern Double -> ControlPattern
slider15bus busid pat = (pF "slider15" pat) # (pI "^slider15" busid)
slider15recv :: Pattern Int -> ControlPattern
slider15recv busid = pI "^slider15" busid

-- | 
slider2 :: Pattern Double -> ControlPattern
slider2 = pF "slider2"
slider2bus :: Pattern Int -> Pattern Double -> ControlPattern
slider2bus busid pat = (pF "slider2" pat) # (pI "^slider2" busid)
slider2recv :: Pattern Int -> ControlPattern
slider2recv busid = pI "^slider2" busid

-- | 
slider3 :: Pattern Double -> ControlPattern
slider3 = pF "slider3"
slider3bus :: Pattern Int -> Pattern Double -> ControlPattern
slider3bus busid pat = (pF "slider3" pat) # (pI "^slider3" busid)
slider3recv :: Pattern Int -> ControlPattern
slider3recv busid = pI "^slider3" busid

-- | 
slider4 :: Pattern Double -> ControlPattern
slider4 = pF "slider4"
slider4bus :: Pattern Int -> Pattern Double -> ControlPattern
slider4bus busid pat = (pF "slider4" pat) # (pI "^slider4" busid)
slider4recv :: Pattern Int -> ControlPattern
slider4recv busid = pI "^slider4" busid

-- | 
slider5 :: Pattern Double -> ControlPattern
slider5 = pF "slider5"
slider5bus :: Pattern Int -> Pattern Double -> ControlPattern
slider5bus busid pat = (pF "slider5" pat) # (pI "^slider5" busid)
slider5recv :: Pattern Int -> ControlPattern
slider5recv busid = pI "^slider5" busid

-- | 
slider6 :: Pattern Double -> ControlPattern
slider6 = pF "slider6"
slider6bus :: Pattern Int -> Pattern Double -> ControlPattern
slider6bus busid pat = (pF "slider6" pat) # (pI "^slider6" busid)
slider6recv :: Pattern Int -> ControlPattern
slider6recv busid = pI "^slider6" busid

-- | 
slider7 :: Pattern Double -> ControlPattern
slider7 = pF "slider7"
slider7bus :: Pattern Int -> Pattern Double -> ControlPattern
slider7bus busid pat = (pF "slider7" pat) # (pI "^slider7" busid)
slider7recv :: Pattern Int -> ControlPattern
slider7recv busid = pI "^slider7" busid

-- | 
slider8 :: Pattern Double -> ControlPattern
slider8 = pF "slider8"
slider8bus :: Pattern Int -> Pattern Double -> ControlPattern
slider8bus busid pat = (pF "slider8" pat) # (pI "^slider8" busid)
slider8recv :: Pattern Int -> ControlPattern
slider8recv busid = pI "^slider8" busid

-- | 
slider9 :: Pattern Double -> ControlPattern
slider9 = pF "slider9"
slider9bus :: Pattern Int -> Pattern Double -> ControlPattern
slider9bus busid pat = (pF "slider9" pat) # (pI "^slider9" busid)
slider9recv :: Pattern Int -> ControlPattern
slider9recv busid = pI "^slider9" busid

-- | Spectral smear
smear :: Pattern Double -> ControlPattern
smear = pF "smear"
smearbus :: Pattern Int -> Pattern Double -> ControlPattern
smearbus busid pat = (pF "smear" pat) # (pI "^smear" busid)
smearrecv :: Pattern Int -> ControlPattern
smearrecv busid = pI "^smear" busid

-- | 
songPtr :: Pattern Double -> ControlPattern
songPtr = pF "songPtr"
songPtrbus :: Pattern Int -> Pattern Double -> ControlPattern
songPtrbus busid pat = (pF "songPtr" pat) # (pI "^songPtr" busid)
songPtrrecv :: Pattern Int -> ControlPattern
songPtrrecv busid = pI "^songPtr" busid

-- | a pattern of numbers which changes the speed of sample playback, i.e. a cheap way of changing pitch. Negative values will play the sample backwards!
speed :: Pattern Double -> ControlPattern
speed = pF "speed"
speedbus :: Pattern Int -> Pattern Double -> ControlPattern
speedbus _ _ = error $ "Control parameter 'speed' can't be sent to a bus."

-- | 
squiz :: Pattern Double -> ControlPattern
squiz = pF "squiz"
squizbus :: Pattern Int -> Pattern Double -> ControlPattern
squizbus busid pat = (pF "squiz" pat) # (pI "^squiz" busid)
squizrecv :: Pattern Int -> ControlPattern
squizrecv busid = pI "^squiz" busid

-- | 
stepsPerOctave :: Pattern Double -> ControlPattern
stepsPerOctave = pF "stepsPerOctave"
stepsPerOctavebus :: Pattern Int -> Pattern Double -> ControlPattern
stepsPerOctavebus busid pat = (pF "stepsPerOctave" pat) # (pI "^stepsPerOctave" busid)
stepsPerOctaverecv :: Pattern Int -> ControlPattern
stepsPerOctaverecv busid = pI "^stepsPerOctave" busid

-- | 
stutterdepth :: Pattern Double -> ControlPattern
stutterdepth = pF "stutterdepth"
stutterdepthbus :: Pattern Int -> Pattern Double -> ControlPattern
stutterdepthbus busid pat = (pF "stutterdepth" pat) # (pI "^stutterdepth" busid)
stutterdepthrecv :: Pattern Int -> ControlPattern
stutterdepthrecv busid = pI "^stutterdepth" busid

-- | 
stuttertime :: Pattern Double -> ControlPattern
stuttertime = pF "stuttertime"
stuttertimebus :: Pattern Int -> Pattern Double -> ControlPattern
stuttertimebus busid pat = (pF "stuttertime" pat) # (pI "^stuttertime" busid)
stuttertimerecv :: Pattern Int -> ControlPattern
stuttertimerecv busid = pI "^stuttertime" busid

-- | 
sustain :: Pattern Double -> ControlPattern
sustain = pF "sustain"
sustainbus :: Pattern Int -> Pattern Double -> ControlPattern
sustainbus _ _ = error $ "Control parameter 'sustain' can't be sent to a bus."

-- | 
sustainpedal :: Pattern Double -> ControlPattern
sustainpedal = pF "sustainpedal"
sustainpedalbus :: Pattern Int -> Pattern Double -> ControlPattern
sustainpedalbus busid pat = (pF "sustainpedal" pat) # (pI "^sustainpedal" busid)
sustainpedalrecv :: Pattern Int -> ControlPattern
sustainpedalrecv busid = pI "^sustainpedal" busid

-- | for internal sound routing
to :: Pattern Double -> ControlPattern
to = pF "to"
tobus :: Pattern Int -> Pattern Double -> ControlPattern
tobus busid pat = (pF "to" pat) # (pI "^to" busid)
torecv :: Pattern Int -> ControlPattern
torecv busid = pI "^to" busid

-- | for internal sound routing
toArg :: Pattern String -> ControlPattern
toArg = pS "toArg"
toArgbus :: Pattern Int -> Pattern String -> ControlPattern
toArgbus busid pat = (pS "toArg" pat) # (pI "^toArg" busid)
toArgrecv :: Pattern Int -> ControlPattern
toArgrecv busid = pI "^toArg" busid

-- | 
tomdecay :: Pattern Double -> ControlPattern
tomdecay = pF "tomdecay"
tomdecaybus :: Pattern Int -> Pattern Double -> ControlPattern
tomdecaybus busid pat = (pF "tomdecay" pat) # (pI "^tomdecay" busid)
tomdecayrecv :: Pattern Int -> ControlPattern
tomdecayrecv busid = pI "^tomdecay" busid

-- | Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'
tremolodepth :: Pattern Double -> ControlPattern
tremolodepth = pF "tremolodepth"
tremolodepthbus :: Pattern Int -> Pattern Double -> ControlPattern
tremolodepthbus busid pat = (pF "tremolodepth" pat) # (pI "^tremolodepth" busid)
tremolodepthrecv :: Pattern Int -> ControlPattern
tremolodepthrecv busid = pI "^tremolodepth" busid

-- | Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'
tremolorate :: Pattern Double -> ControlPattern
tremolorate = pF "tremolorate"
tremoloratebus :: Pattern Int -> Pattern Double -> ControlPattern
tremoloratebus busid pat = (pF "tremolorate" pat) # (pI "^tremolorate" busid)
tremoloraterecv :: Pattern Int -> ControlPattern
tremoloraterecv busid = pI "^tremolorate" busid

-- | tube distortion
triode :: Pattern Double -> ControlPattern
triode = pF "triode"
triodebus :: Pattern Int -> Pattern Double -> ControlPattern
triodebus busid pat = (pF "triode" pat) # (pI "^triode" busid)
trioderecv :: Pattern Int -> ControlPattern
trioderecv busid = pI "^triode" busid

-- | 
tsdelay :: Pattern Double -> ControlPattern
tsdelay = pF "tsdelay"
tsdelaybus :: Pattern Int -> Pattern Double -> ControlPattern
tsdelaybus busid pat = (pF "tsdelay" pat) # (pI "^tsdelay" busid)
tsdelayrecv :: Pattern Int -> ControlPattern
tsdelayrecv busid = pI "^tsdelay" busid

-- | 
uid :: Pattern Double -> ControlPattern
uid = pF "uid"
uidbus :: Pattern Int -> Pattern Double -> ControlPattern
uidbus busid pat = (pF "uid" pat) # (pI "^uid" busid)
uidrecv :: Pattern Int -> ControlPattern
uidrecv busid = pI "^uid" busid

-- | used in conjunction with `speed`, accepts values of "r" (rate, default behavior), "c" (cycles), or "s" (seconds). Using `unit "c"` means `speed` will be interpreted in units of cycles, e.g. `speed "1"` means samples will be stretched to fill a cycle. Using `unit "s"` means the playback speed will be adjusted so that the duration is the number of seconds specified by `speed`.
unit :: Pattern String -> ControlPattern
unit = pS "unit"
unitbus :: Pattern Int -> Pattern String -> ControlPattern
unitbus _ _ = error $ "Control parameter 'unit' can't be sent to a bus."

-- | 
val :: Pattern Double -> ControlPattern
val = pF "val"
valbus :: Pattern Int -> Pattern Double -> ControlPattern
valbus busid pat = (pF "val" pat) # (pI "^val" busid)
valrecv :: Pattern Int -> ControlPattern
valrecv busid = pI "^val" busid

-- | 
vcfegint :: Pattern Double -> ControlPattern
vcfegint = pF "vcfegint"
vcfegintbus :: Pattern Int -> Pattern Double -> ControlPattern
vcfegintbus busid pat = (pF "vcfegint" pat) # (pI "^vcfegint" busid)
vcfegintrecv :: Pattern Int -> ControlPattern
vcfegintrecv busid = pI "^vcfegint" busid

-- | 
vcoegint :: Pattern Double -> ControlPattern
vcoegint = pF "vcoegint"
vcoegintbus :: Pattern Int -> Pattern Double -> ControlPattern
vcoegintbus busid pat = (pF "vcoegint" pat) # (pI "^vcoegint" busid)
vcoegintrecv :: Pattern Int -> ControlPattern
vcoegintrecv busid = pI "^vcoegint" busid

-- | 
velocity :: Pattern Double -> ControlPattern
velocity = pF "velocity"
velocitybus :: Pattern Int -> Pattern Double -> ControlPattern
velocitybus busid pat = (pF "velocity" pat) # (pI "^velocity" busid)
velocityrecv :: Pattern Int -> ControlPattern
velocityrecv busid = pI "^velocity" busid

-- | 
voice :: Pattern Double -> ControlPattern
voice = pF "voice"
voicebus :: Pattern Int -> Pattern Double -> ControlPattern
voicebus busid pat = (pF "voice" pat) # (pI "^voice" busid)
voicerecv :: Pattern Int -> ControlPattern
voicerecv busid = pI "^voice" busid

-- | formant filter to make things sound like vowels, a pattern of either `a`, `e`, `i`, `o` or `u`. Use a rest (`~`) for no effect.
vowel :: Pattern String -> ControlPattern
vowel = pS "vowel"
vowelbus :: Pattern Int -> Pattern String -> ControlPattern
vowelbus busid pat = (pS "vowel" pat) # (pI "^vowel" busid)
vowelrecv :: Pattern Int -> ControlPattern
vowelrecv busid = pI "^vowel" busid

-- | 
waveloss :: Pattern Double -> ControlPattern
waveloss = pF "waveloss"
wavelossbus :: Pattern Int -> Pattern Double -> ControlPattern
wavelossbus busid pat = (pF "waveloss" pat) # (pI "^waveloss" busid)
wavelossrecv :: Pattern Int -> ControlPattern
wavelossrecv busid = pI "^waveloss" busid

-- | 
xsdelay :: Pattern Double -> ControlPattern
xsdelay = pF "xsdelay"
xsdelaybus :: Pattern Int -> Pattern Double -> ControlPattern
xsdelaybus busid pat = (pF "xsdelay" pat) # (pI "^xsdelay" busid)
xsdelayrecv :: Pattern Int -> ControlPattern
xsdelayrecv busid = pI "^xsdelay" busid



-- aliases

voi :: Pattern Double -> ControlPattern
voi = voice
voibus :: Pattern Int -> Pattern Double -> ControlPattern
voibus = voicebus
voirecv :: Pattern Int -> ControlPattern
voirecv = voicerecv

vco :: Pattern Double -> ControlPattern
vco = vcoegint
vcobus :: Pattern Int -> Pattern Double -> ControlPattern
vcobus = vcoegintbus
vcorecv :: Pattern Int -> ControlPattern
vcorecv = vcoegintrecv

vcf :: Pattern Double -> ControlPattern
vcf = vcfegint
vcfbus :: Pattern Int -> Pattern Double -> ControlPattern
vcfbus = vcfegintbus
vcfrecv :: Pattern Int -> ControlPattern
vcfrecv = vcfegintrecv

up :: Pattern Note -> ControlPattern
up = note

tremr :: Pattern Double -> ControlPattern
tremr = tremolorate
tremrbus :: Pattern Int -> Pattern Double -> ControlPattern
tremrbus = tremoloratebus
tremrrecv :: Pattern Int -> ControlPattern
tremrrecv = tremoloraterecv

tremdp :: Pattern Double -> ControlPattern
tremdp = tremolodepth
tremdpbus :: Pattern Int -> Pattern Double -> ControlPattern
tremdpbus = tremolodepthbus
tremdprecv :: Pattern Int -> ControlPattern
tremdprecv = tremolodepthrecv

tdecay :: Pattern Double -> ControlPattern
tdecay = tomdecay
tdecaybus :: Pattern Int -> Pattern Double -> ControlPattern
tdecaybus = tomdecaybus
tdecayrecv :: Pattern Int -> ControlPattern
tdecayrecv = tomdecayrecv

sz :: Pattern Double -> ControlPattern
sz = size
szbus :: Pattern Int -> Pattern Double -> ControlPattern
szbus = sizebus
szrecv :: Pattern Int -> ControlPattern
szrecv = sizerecv

sus :: Pattern Double -> ControlPattern
sus = sustain

stt :: Pattern Double -> ControlPattern
stt = stuttertime
sttbus :: Pattern Int -> Pattern Double -> ControlPattern
sttbus = stuttertimebus
sttrecv :: Pattern Int -> ControlPattern
sttrecv = stuttertimerecv

std :: Pattern Double -> ControlPattern
std = stutterdepth
stdbus :: Pattern Int -> Pattern Double -> ControlPattern
stdbus = stutterdepthbus
stdrecv :: Pattern Int -> ControlPattern
stdrecv = stutterdepthrecv

sld :: Pattern Double -> ControlPattern
sld = slide
sldbus :: Pattern Int -> Pattern Double -> ControlPattern
sldbus = slidebus
sldrecv :: Pattern Int -> ControlPattern
sldrecv = sliderecv

scr :: Pattern Double -> ControlPattern
scr = scrash
scrbus :: Pattern Int -> Pattern Double -> ControlPattern
scrbus = scrashbus
scrrecv :: Pattern Int -> ControlPattern
scrrecv = scrashrecv

scp :: Pattern Double -> ControlPattern
scp = sclap
scpbus :: Pattern Int -> Pattern Double -> ControlPattern
scpbus = sclapbus
scprecv :: Pattern Int -> ControlPattern
scprecv = sclaprecv

scl :: Pattern Double -> ControlPattern
scl = sclaves
sclbus :: Pattern Int -> Pattern Double -> ControlPattern
sclbus = sclavesbus
sclrecv :: Pattern Int -> ControlPattern
sclrecv = sclavesrecv

sag :: Pattern Double -> ControlPattern
sag = sagogo
sagbus :: Pattern Int -> Pattern Double -> ControlPattern
sagbus = sagogobus
sagrecv :: Pattern Int -> ControlPattern
sagrecv = sagogorecv

s :: Pattern String -> ControlPattern
s = sound

rel :: Pattern Double -> ControlPattern
rel = release
relbus :: Pattern Int -> Pattern Double -> ControlPattern
relbus = releasebus
relrecv :: Pattern Int -> ControlPattern
relrecv = releaserecv

por :: Pattern Double -> ControlPattern
por = portamento
porbus :: Pattern Int -> Pattern Double -> ControlPattern
porbus = portamentobus
porrecv :: Pattern Int -> ControlPattern
porrecv = portamentorecv

pit3 :: Pattern Double -> ControlPattern
pit3 = pitch3
pit3bus :: Pattern Int -> Pattern Double -> ControlPattern
pit3bus = pitch3bus
pit3recv :: Pattern Int -> ControlPattern
pit3recv = pitch3recv

pit2 :: Pattern Double -> ControlPattern
pit2 = pitch2
pit2bus :: Pattern Int -> Pattern Double -> ControlPattern
pit2bus = pitch2bus
pit2recv :: Pattern Int -> ControlPattern
pit2recv = pitch2recv

pit1 :: Pattern Double -> ControlPattern
pit1 = pitch1
pit1bus :: Pattern Int -> Pattern Double -> ControlPattern
pit1bus = pitch1bus
pit1recv :: Pattern Int -> ControlPattern
pit1recv = pitch1recv

phasr :: Pattern Double -> ControlPattern
phasr = phaserrate
phasrbus :: Pattern Int -> Pattern Double -> ControlPattern
phasrbus = phaserratebus
phasrrecv :: Pattern Int -> ControlPattern
phasrrecv = phaserraterecv

phasdp :: Pattern Double -> ControlPattern
phasdp = phaserdepth
phasdpbus :: Pattern Int -> Pattern Double -> ControlPattern
phasdpbus = phaserdepthbus
phasdprecv :: Pattern Int -> ControlPattern
phasdprecv = phaserdepthrecv

ohdecay :: Pattern Double -> ControlPattern
ohdecay = ophatdecay
ohdecaybus :: Pattern Int -> Pattern Double -> ControlPattern
ohdecaybus = ophatdecaybus
ohdecayrecv :: Pattern Int -> ControlPattern
ohdecayrecv = ophatdecayrecv

lsn :: Pattern Double -> ControlPattern
lsn = lsnare
lsnbus :: Pattern Int -> Pattern Double -> ControlPattern
lsnbus = lsnarebus
lsnrecv :: Pattern Int -> ControlPattern
lsnrecv = lsnarerecv

lpq :: Pattern Double -> ControlPattern
lpq = resonance
lpqbus :: Pattern Int -> Pattern Double -> ControlPattern
lpqbus = resonancebus
lpqrecv :: Pattern Int -> ControlPattern
lpqrecv = resonancerecv

lpf :: Pattern Double -> ControlPattern
lpf = cutoff
lpfbus :: Pattern Int -> Pattern Double -> ControlPattern
lpfbus = cutoffbus
lpfrecv :: Pattern Int -> ControlPattern
lpfrecv = cutoffrecv

loh :: Pattern Double -> ControlPattern
loh = lophat
lohbus :: Pattern Int -> Pattern Double -> ControlPattern
lohbus = lophatbus
lohrecv :: Pattern Int -> ControlPattern
lohrecv = lophatrecv

llt :: Pattern Double -> ControlPattern
llt = llotom
lltbus :: Pattern Int -> Pattern Double -> ControlPattern
lltbus = llotombus
lltrecv :: Pattern Int -> ControlPattern
lltrecv = llotomrecv

lht :: Pattern Double -> ControlPattern
lht = lhitom
lhtbus :: Pattern Int -> Pattern Double -> ControlPattern
lhtbus = lhitombus
lhtrecv :: Pattern Int -> ControlPattern
lhtrecv = lhitomrecv

lfop :: Pattern Double -> ControlPattern
lfop = lfopitchint
lfopbus :: Pattern Int -> Pattern Double -> ControlPattern
lfopbus = lfopitchintbus
lfoprecv :: Pattern Int -> ControlPattern
lfoprecv = lfopitchintrecv

lfoi :: Pattern Double -> ControlPattern
lfoi = lfoint
lfoibus :: Pattern Int -> Pattern Double -> ControlPattern
lfoibus = lfointbus
lfoirecv :: Pattern Int -> ControlPattern
lfoirecv = lfointrecv

lfoc :: Pattern Double -> ControlPattern
lfoc = lfocutoffint
lfocbus :: Pattern Int -> Pattern Double -> ControlPattern
lfocbus = lfocutoffintbus
lfocrecv :: Pattern Int -> ControlPattern
lfocrecv = lfocutoffintrecv

lcr :: Pattern Double -> ControlPattern
lcr = lcrash
lcrbus :: Pattern Int -> Pattern Double -> ControlPattern
lcrbus = lcrashbus
lcrrecv :: Pattern Int -> ControlPattern
lcrrecv = lcrashrecv

lcp :: Pattern Double -> ControlPattern
lcp = lclap
lcpbus :: Pattern Int -> Pattern Double -> ControlPattern
lcpbus = lclapbus
lcprecv :: Pattern Int -> ControlPattern
lcprecv = lclaprecv

lcl :: Pattern Double -> ControlPattern
lcl = lclaves
lclbus :: Pattern Int -> Pattern Double -> ControlPattern
lclbus = lclavesbus
lclrecv :: Pattern Int -> ControlPattern
lclrecv = lclavesrecv

lch :: Pattern Double -> ControlPattern
lch = lclhat
lchbus :: Pattern Int -> Pattern Double -> ControlPattern
lchbus = lclhatbus
lchrecv :: Pattern Int -> ControlPattern
lchrecv = lclhatrecv

lbd :: Pattern Double -> ControlPattern
lbd = lkick
lbdbus :: Pattern Int -> Pattern Double -> ControlPattern
lbdbus = lkickbus
lbdrecv :: Pattern Int -> ControlPattern
lbdrecv = lkickrecv

lag :: Pattern Double -> ControlPattern
lag = lagogo
lagbus :: Pattern Int -> Pattern Double -> ControlPattern
lagbus = lagogobus
lagrecv :: Pattern Int -> ControlPattern
lagrecv = lagogorecv

hpq :: Pattern Double -> ControlPattern
hpq = hresonance
hpqbus :: Pattern Int -> Pattern Double -> ControlPattern
hpqbus = hresonancebus
hpqrecv :: Pattern Int -> ControlPattern
hpqrecv = hresonancerecv

hpf :: Pattern Double -> ControlPattern
hpf = hcutoff
hpfbus :: Pattern Int -> Pattern Double -> ControlPattern
hpfbus = hcutoffbus
hpfrecv :: Pattern Int -> ControlPattern
hpfrecv = hcutoffrecv

hg :: Pattern Double -> ControlPattern
hg = hatgrain
hgbus :: Pattern Int -> Pattern Double -> ControlPattern
hgbus = hatgrainbus
hgrecv :: Pattern Int -> ControlPattern
hgrecv = hatgrainrecv

gat :: Pattern Double -> ControlPattern
gat = gate
gatbus :: Pattern Int -> Pattern Double -> ControlPattern
gatbus = gatebus
gatrecv :: Pattern Int -> ControlPattern
gatrecv = gaterecv

dt :: Pattern Double -> ControlPattern
dt = delaytime
dtbus :: Pattern Int -> Pattern Double -> ControlPattern
dtbus = delaytimebus
dtrecv :: Pattern Int -> ControlPattern
dtrecv = delaytimerecv

dfb :: Pattern Double -> ControlPattern
dfb = delayfeedback
dfbbus :: Pattern Int -> Pattern Double -> ControlPattern
dfbbus = delayfeedbackbus
dfbrecv :: Pattern Int -> ControlPattern
dfbrecv = delayfeedbackrecv

det :: Pattern Double -> ControlPattern
det = detune
detbus :: Pattern Int -> Pattern Double -> ControlPattern
detbus = detunebus
detrecv :: Pattern Int -> ControlPattern
detrecv = detunerecv

delayt :: Pattern Double -> ControlPattern
delayt = delaytime
delaytbus :: Pattern Int -> Pattern Double -> ControlPattern
delaytbus = delaytimebus
delaytrecv :: Pattern Int -> ControlPattern
delaytrecv = delaytimerecv

delayfb :: Pattern Double -> ControlPattern
delayfb = delayfeedback
delayfbbus :: Pattern Int -> Pattern Double -> ControlPattern
delayfbbus = delayfeedbackbus
delayfbrecv :: Pattern Int -> ControlPattern
delayfbrecv = delayfeedbackrecv

ctfg :: Pattern Double -> ControlPattern
ctfg = cutoffegint
ctfgbus :: Pattern Int -> Pattern Double -> ControlPattern
ctfgbus = cutoffegintbus
ctfgrecv :: Pattern Int -> ControlPattern
ctfgrecv = cutoffegintrecv

ctf :: Pattern Double -> ControlPattern
ctf = cutoff
ctfbus :: Pattern Int -> Pattern Double -> ControlPattern
ctfbus = cutoffbus
ctfrecv :: Pattern Int -> ControlPattern
ctfrecv = cutoffrecv

chdecay :: Pattern Double -> ControlPattern
chdecay = clhatdecay
chdecaybus :: Pattern Int -> Pattern Double -> ControlPattern
chdecaybus = clhatdecaybus
chdecayrecv :: Pattern Int -> ControlPattern
chdecayrecv = clhatdecayrecv

bpq :: Pattern Double -> ControlPattern
bpq = bandq
bpqbus :: Pattern Int -> Pattern Double -> ControlPattern
bpqbus = bandqbus
bpqrecv :: Pattern Int -> ControlPattern
bpqrecv = bandqrecv

bpf :: Pattern Double -> ControlPattern
bpf = bandf
bpfbus :: Pattern Int -> Pattern Double -> ControlPattern
bpfbus = bandfbus
bpfrecv :: Pattern Int -> ControlPattern
bpfrecv = bandfrecv

att :: Pattern Double -> ControlPattern
att = attack
attbus :: Pattern Int -> Pattern Double -> ControlPattern
attbus = attackbus
attrecv :: Pattern Int -> ControlPattern
attrecv = attackrecv
