Difference between revisions of "smash"

From TidalCycles userbase
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:smash}} Type: <source inline>smash :: Pattern Int -> [Pattern Time] -> ControlPattern -> ControlPattern</source> '''smash''' is a combinati...")
 
(adding smash' to smash page)
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
 
d1 $ slow "<2 3 4>" $ striate 3 $ sound "ho ho:2 ho:3 hc"
 
d1 $ slow "<2 3 4>" $ striate 3 $ sound "ho ho:2 ho:3 hc"
 
</source>
 
</source>
 +
 +
= smash' =
 +
[[Type signature|Type]]: <source inline>smash' :: Int -> [Pattern Time] -> ControlPattern -> ControlPattern</source>
 +
 +
'''smash'''' is <source inline> smash </source> but based on [[chop]] instead of <source inline>striate</source>.
 +
 +
Compare
 +
<source>
 +
d1 $ smash 6 [2,3,4] $ sound "ho ho:2 ho:3 hc"
 +
</source>
 +
to
 +
<source>
 +
d1 $ smash' 6 [2,3,4] $ sound "ho ho:2 ho:3 hc"
 +
</source>
 +
 +
or 
 +
<source>
 +
d1 $ smash 12 [2,3,4] $ s "bev*4"
 +
</source>
 +
vs
 +
<source>
 +
d1 $ smash' 12 [2,3,4] $ s "bev*4"
 +
</source>
 +
for a dramatic difference
  
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 23:31, 24 December 2020

Type: smash :: Pattern Int -> [Pattern Time] -> ControlPattern -> ControlPattern

smash is a combination of spread and striate - it cuts the samples into the given number of bits, and then cuts between playing the loop at different speeds according to the values in the list.

So this:

d1 $ smash 3 [2,3,4] $ sound "ho ho:2 ho:3 hc"

Is a bit like this:

d1 $ slow "<2 3 4>" $ striate 3 $ sound "ho ho:2 ho:3 hc"

smash'

Type: smash' :: Int -> [Pattern Time] -> ControlPattern -> ControlPattern

smash' is smash but based on chop instead of striate.

Compare

d1 $ smash 6 [2,3,4] $ sound "ho ho:2 ho:3 hc"

to

d1 $ smash' 6 [2,3,4] $ sound "ho ho:2 ho:3 hc"

or

d1 $ smash 12 [2,3,4] $ s "bev*4"

vs

d1 $ smash' 12 [2,3,4] $ s "bev*4"

for a dramatic difference