Skip to content

Commit

Permalink
number alias for n, fixes #839
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Nov 12, 2021
1 parent 5d2ce7d commit ac0be63
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/generate-params.hs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ aliasParams =
("f", "lpf", "cutoff"),
("f", "lpq", "resonance"),
("f", "lsn", "lsnare"),
("note", "number", "n"),
("f", "ohdecay", "ophatdecay"),
("f", "phasdp", "phaserdepth"),
("f", "phasr", "phaserrate"),
Expand Down
7 changes: 5 additions & 2 deletions bin/params-header.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,16 @@ pStateList name sName xs = pure $ Map.singleton name $ VState statef
pStateListF :: String -> String -> [Double] -> ControlPattern
pStateListF name sName = pStateList name sName . map VF

pStateListS :: String -> String -> [String] -> ControlPattern
pStateListS name sName = pStateList name sName . map VS

-- | Grouped params

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

sTake :: String -> [Double] -> ControlPattern
sTake name xs = pStateListF "s" name xs
sTake :: String -> [String] -> ControlPattern
sTake name xs = pStateListS "s" name xs

cc :: Pattern String -> ControlPattern
cc = grp [mF "ccn", mF "ccv"]
Expand Down
3 changes: 3 additions & 0 deletions src/Sound/Tidal/Params.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3128,6 +3128,9 @@ ohdecaybus = ophatdecaybus
ohdecayrecv :: Pattern Int -> ControlPattern
ohdecayrecv = ophatdecayrecv

number :: Pattern Note -> ControlPattern
number = n

lsn :: Pattern Double -> ControlPattern
lsn = lsnare
lsnbus :: Pattern Int -> Pattern Double -> ControlPattern
Expand Down

0 comments on commit ac0be63

Please sign in to comment.