--- title: Tidal Workshop | Different kind of patterns date: 2024-11-20 10:11:21 categories: ['Tidalcycles'] tags: --- # Tidal Workshop | Different kind of patterns ## [循環 / 重複](https://tidalcycles.org/docs/patternlib/tutorials/workshop/#cyclic--repetitive) 我們可以使用 `n` 從資料夾中選擇 sample,也可以直接套用 pattern: ```haskell d1 $ n "0 1 2 3" # sound "arpy" ``` `run` 是連續 sample sequence 的簡寫: ```haskell d1 $ n (run 4) # sound "arpy" -- 或是 d1 $ n "0 .. 3" # sound "arpy" ``` --- ## [Polymetric / polyrhythmic sequences](https://tidalcycles.org/docs/patternlib/tutorials/workshop/#polymetric--polyrhythmic-sequences) 使用 `[ ]` 一次播放兩個 pattern: ```haskell d1 $ sound "[voodoo voodoo:3, arpy arpy:4 arpy:2]" ``` - 使用 `[]` ,兩邊的 pattern 都會被納入一個 cycle(polyrhythm)中。 - 使用 `{}` ,由左邊的 pattern 決定節奏,然後疊加右邊的 pattern(polymeter): ```haskell d1 $ sound "{voodoo voodoo:3, arpy arpy:4 arpy:2}" ``` > [!NOTE] 延伸閱讀 > - [POLYRHYTHMS vs POLYMETERS - YouTube](https://www.youtube.com/watch?v=htbRx2jgF-E) --- ## [Euclidean rhythm/Bjorklund](https://tidalcycles.org/docs/patternlib/tutorials/workshop/#euclidean-rhythmbjorklund) 在 sample 後面的括弧中給出兩個數字,tidal 會運用一些算法嘗試把第一個數字的「note」分配到第二個數字的 「step」中(詳見 [Euclidean rhythm](https://en.wikipedia.org/wiki/Euclidean_rhythm)): 也可以加入第三個參數,它可以「rotate(旋轉)」pattern,讓它從不同的 step 為起始點: ```haskell d1 $ sound "bd(5,8,2)" ``` --- ## [隨機性](https://tidalcycles.org/docs/patternlib/tutorials/workshop/#randomness) [Randomness](https://tidalcycles.org/docs/reference/randomness/) 可以幫助我們快速地在 pattern 中加入一些特色和變化。有時候 `random` 的作用有點像 `every`,但它不會在固定的次數循環發生,而是以隨機的狀態出現: ```haskell -- 50% d1 $ sometimes (# speed "2") $ sound "drum*8" -- 75% d1 $ often (# speed "2") $ sound "drum*8" ``` `irand` 會產生一個隨機整數,最多到指定的數字: ```haskell d1 $ sound "arpy(3,8)" # n (irand 16) -- 0 ~ 1 d1 $ sound "tink*16" # gain rand ``` 使用 `degradeBy` 來移除隨機 sample。數字表示 sample 播放的可能性: ```haskell d1 $ degradeBy 0.2 $ sound "tink*16" -- degradeBy 0.5 = degrade d1 $ degrade $ s "bd*16" ``` 或者,可以使用 `?` 表示有 50% 的機率會播放 sample: ```haskell d1 $ sound "bd sn:2? bd sn?" ``` --- [返回目錄](/pkjsPlfsQSaAbQfgv2v5fw) 上一篇:[Tidal Workshop | Transforming patterns](/w9R4wWSCSraDD3I9zpbvHg) 下一篇:[Tidal Workshop | Manipulating samples](/Zo_swqbGSkGEpL6F4xAi1A) --- # References - [Workshop | Tidal Cycles](https://tidalcycles.org/docs/patternlib/tutorials/workshop/#different-kind-of-patterns)