What if

Hello guys,
I'm here to bother you again about something that I can't understand how to accomplish.

Suppose I want to do something like, using a randomness function like in the rand example, on pan.
How can I use that number in a complementary way?
Example:
on D1 pan becomes 0.2
So in D2 It becomes pan 0.8

Just a simple subtraction between the 1 and the first.

And another thing: is it possible to do If x==1 then y=0?
Something like, if in d1 it happens to have a C note, then d2 must play a E note.

Very sorry for my topic, way too long, way too badly explained.

Cheers

    let pRand = 0.8
         sRand = 1 - pRand
         d1 $ s "hh*8 ~ " # pan (pRand)
         d2 $ s "~ linnhats*8" # pan (sRand) # gain 0.79
1 Like

something like that maybe is what i would do

You could also try something like (1 -) <$> randpattern, ie mapping the "one minus" function over the pattern (which has the advantage to work on all patterns).

I have no idea about your second question, but I'm interested in the answer!

2 Likes

Thanks to both of you for your answer!
I hope someone knows the answer to the other question too... I post it again :sunglasses:

Is it possible to do If x==1 then y=0?
Something like, if in d1 it happens to have a C note, then d2 must play a E note.