tidalcycles / Tidal

Pattern language
http://tidalcycles.org/
GNU General Public License v3.0
2.27k stars 255 forks source link

Add dagoarp #1050

Open yaxu opened 12 months ago

yaxu commented 12 months ago
dagoarp :: (Num a, Eq a) => Pattern Int -> Pattern a -> Pattern a
dagoarp ipat pat = squeezeJoin $ (\l -> (octavise l) <$> ipat) <$> collect pat
   where octavise xs i = (xs !! (i `mod` length xs)) + (fromIntegral $ 12 * (i `div` length xs))
yaxu commented 12 months ago

I think strudel might have something similar to this

gamar3is commented 1 month ago

Usage (pasted from yaxu's comment on Discord):

d1 $ dagoarp "0 [4 2] 3 <1 4>" $ n "c'maj'5 c'min'5 e'maj'5" # sound "superpiano"

(by the way, what/who's dago?)

hellocatfood commented 1 month ago

Something strange is happening the the following pattern

d1
$ dagoarp "9 0 2 3 5 2 1 2"
$ note (slow 4 $ "e6'sus2 cf5'13 d5'minor7 d5'minor7 ")
# sound "bass1:2"
# legato 1.4

By the time it reaches d5'minor7 it, for some reason, plays the bass1:1 sample instead of bass1:2.

Is dagoarp picking the sample instead of the note?

yaxu commented 1 month ago

Hmm try this:

d1
$ note (dagoarp "9 0 2 3 5 2 1 2" $ slow 4 $ "e6'sus2 cf5'13 d5'minor7 d5'minor7 ")
# sound "bass1:2"
# legato 1.4

Otherwise I think it will indeed default to working on 'n' and not the notes.

yaxu commented 1 month ago

(by the way, what/who's dago?)

Dago is Dagobert Sondervan who asked for this feature :) It probably needs a more descriptive name if it's going into tidal

hellocatfood commented 1 month ago

How about:

arpList arpIndex arpArray

gamar3is commented 1 month ago

arp' ?

geikha commented 1 month ago

arpFrom ? arpPat ?