Undoing the scale function

I love using off to create cannons with transposition, but often feel frustrated because I can only do this with absolute intervals, and unless I choose my notes very carefully, the only safe intervals to use are octaves

I’d love to be able to do step-wise transposition, for example, have a part that is a third higher, but have that third be major or minor depending on where it lands in the scale.

What I’ve been trying to do is to create a function that effectively undoes scale, applies some numerical function to those values, then reapplies scale to the modified values. So it might syntactically look like this:

d1 $ off 0.25 (underscale “dorian” (+ 2)) $ n (scale “dorian” “0 2 1 3”) # s “supervibe”

where under the hood

underscale name f  = scale name . f . undoScale name

Of course I realize that this (currently imaginary) undoScale function would need to somehow handle values that are not part of the output of its corresponding scale function. But some arbitrary yet consistent way of handling this, like rounding down to the nearest matching step, should work.

Does anyone have any thoughts on how to approach this? I’m frankly stuck on getting even a list of the scale intervals to operate on. If I had that I could probably figure out some (admittedly hacky) way of doing this.

1 Like

As a quick fix you could apply the off before the scale like this:

d1 $ n (scale "dorian" $ off 0.25 (|+ 2) "0 2 1 3") # s "supervibe"
1 Like

True, but I wouldn't be able compose the function with other non-numerical functions. E.g.,

d1 $ off "3s" ((|+ n 12) . (# s "superhammond")) $ n "0 3 2 5" # s "supervibe"

This post captures a problem that I always seem to run into when using tidal. @yaxu's suggestion is what I have most often done but it does force me to do all my note based thinking in one place. Later in the pattern development, when I'm thinking about stacking transformation functions on the outside of the pattern, I see an opportunity to tack on something like plyWith 6 (+| note "<2 3>") that does cool stuff to the melody but puts me in really chromatic territory with no way of getting back to diatonic land.

I've often wondered if there is some way to make an operator similar to # that transforms an existing control pattern as opposed to adding/replacing it. That way I could say: d1 $ (|~ note (scale "dorian")) $ foldEvery [2,3] (|+| note "2 1 2") $ note "0 2 <5 3> 9" #s "midi" where |~ is a made up operator that allows me to map the function scale "dorian" over the existing control pattern.

I know this made up |~ is different from |+| and the like because the |+| family are operators combining two control patterns but it does feel like forceing to scale on the "outside" of the pattern should be possible. I just can't figure out how! :slight_smile:

2 Likes