(Hopefully) Interesting snippet for making melodies

Yes, it is a transposition an octave and a major fifth below the actual root, alternating between these, just to show some more possibilities. And also gives two separate melodic lines

1 Like


d1 $ every 2 (arpeggiate) 
        $ n (scale dascale (chord + melo) + (root + "<-12 -7>")) 
        # s "superpiano"

yields interesting results

1 Like

Hi all! I really like this topic, this is my favorite one-liner:

let tonal root mode = note . (|+ root) . scale mode

d1 $ tonal "<0 3>" "major" $ "0 2 4 7"

I'm currently researching ways to use ControlMaps for this. This is what I'm aiming for:

d1 $ "0 2 4 6" # key "0:major"

The arpegiate works great with something like a arpy or supermandolin, never quite got good results with the superpiano. But this is a great starting point!

I'd be interested in the ControlMaps versions of the code. Do keep us in loop when you figure it out!

1 Like

This looks super promising!

paging @earthlydelight - I think this is something you were looking for here:

Side note, that thread was unresolved - in theory I think my stuff should've worked, but it did not sound right to my ears, I didn't dig further...

1 Like

Thank you guys, that's some great improvement on the original idea! When I saw @BongLebowski 's performance it was very interesting to see it applied in such a creative way :slightly_smiling_face:

The one-liner I currently came up with is:

let chorddeg scl root voices degree = (scale scl (voices + degree - 1) + root)

I added the -1 because I'm more comfortable using 1-based numbers for chords built on the scale degrees. It resembles more the standard roman numbers (e.g. "I IV V ii").

These two are equivalent:

d1 $ arpeggiate $ n (chorddeg "major" "c4" "'maj" "1 4 5 2") # s "superpiano"

d1 $ arpeggiate $ n (chorddeg "major" "c4" "[0,4,7]" "1 4 5 2") # s "superpiano"

You can also do something like this, alternating octaves:

d1 $ arp "pinkyup" $ n (chorddeg "major" ("c4" + "<-12 0 12>") "'maj" "1 4 5 2") # s "supervibe"

or creating melodies on the chord progression by giving structure to the arpeggio (with a pattern or a semi-random mask):

d1 $ struct "t [~ t] t@2 [t*2 ~] t" $ arp "pinkyup" $ n (chorddeg "major" ("c4" + "<-12 0 12>") "'maj" "1 4 5 2") # s "supervibe"

d1 $ mask (binaryN 8 54385230) $ arp "pinkyup" $ n (chorddeg "major" ("c4" + "<-12 0 12>") "'maj" "1 4 5 2") # s "supervibe"

So many possibilities!


I might have a small improvement on your one liner, but not enough time right now to make it right, so I'll post later.
Btw, no big deal, but your use of binaryN is a bit awkward since you cannot encode such a big number on 8 bits. The biggest number possible is 256 (or 255 depending if you're a human or not).

Yeah I know, I usually just type a big number mashing the keyboard so I can increase the first parameter and take more values without running out of digits... 8, 12, 16 ecc.

As for your improvement I'm very interested :slightly_smiling_face:

OK I see, I just discovered the function, so I was a bit puzzled.

As for the improvement, I would like to decouple the root from the octave, so probably a prime function would be worth. The only problem is the octave is embedded in the root "c4", "c5" etc ... which is a bit annoying.

I think you can just do # octave "<3 4 5>"

OK, but what I mean is the function would look like :

let chorddeg scl root octave voices degree = (scale scl (voices + degree - 1) + (root + (octave - 5) * 12)

(btw, it looks like 0 == c5 which is unusual)

But, then if you want to use it, it would look like :

(chorddeg "major" "c5" "<-1 0 1>" "'maj" "1 4 5 2")

which is confusing ... do you see my point ?

Ok I see, you're right, that could also be an option...

One option I would LOVE to see in tidal is the ability to use "do re mi" instead of alphabet.
That would solve a lot of issue regarding mini-notation (like eigth note for example)
As a side effect, I would not have to think about translation when building chords ... :slight_smile:

(chorddeg "major" "do" "<3 4 5>" "'maj" "i iv v ii")

so much nicer to my ears :wink:

1 Like

That indeed would be very nice :smile:

We got to sell to @yaxu letting him know he could then proudly wear a shirt that says:

Anti-Fa# (reversed hashtag)




I'm gonna try these out soon!

And, I am glad you enjoyed my set. It wouldn't have been possible without your initial pattern :slight_smile:


Here's a structure that allows changing the key of multiple running patterns at once (I've been finding it super useful!):

-- boot.tidal
let getGlobalMode = cS "chromatic" "global_mode"
    setGlobalMode = setS "global_mode"
    getGlobalRoot = cF0 "global_root"
    setGlobalRoot = setF "global_root"
    tonal rr mm = note . (|+ rr) . scale mm
    t = tonal getGlobalRoot getGlobalMode
    setkey root mode = do
      setGlobalMode mode
      setGlobalRoot root

-- usage
setkey "<0 3>" "dorian"

  p "mel" $ t "0 2 4 7" # s "superpiano" # pan 0.4
  p "bass" $ t "0@3 4@3 7@2" # s "superpiano" # octave 5
  p "chords" $ t "[~ [-3,0,4,6]*<2 1>]*2" # s "superhammond" # pan 0.65

-- then
setkey 4 "locrian"
setkey (-2) "major"

Calling setkey changes the global root and mode. Hope someone finds this helpful!

btw. I discuss this solution in detail here


Really nice, I am going to try that out lately.
The YT video is private, but I understand how it works, just need to try it for myself.


1 Like