Is there any syntax to specify random parameters for the chop function?

Hi~ I just started to learn tidal :smiley:
Is there any syntax or way to specify random parameters for the chop function?
I tried to use the range function to give a distance. eg.
d1 $ chop (range 1 5 $ sine) $ s "bd"

• No instance for (Fractional Int) arising from a use of ‘sine’
• In the second argument of ‘($)’, namely ‘sine’
In the first argument of ‘chop’, namely ‘(range 1 5 $ sine)’
In the expression: chop (range 1 5 $ sine)

Then I get this error, I think maybe chop only accepts integers?

As for irand, it is a feasible method, but the parameters always start from 0, and the sound doesn‘t change too much.
eg. d1 $ chop (irand 100) $ s "bd"

Or use sometimes and often, but they can only set a fixed parameter too.
eg. d1 $ sometimes (chop 20) $ s "bd"

d1 $ chop (irand 100) $ s "bd"

is the correct way, but bd is too short to hear some differences, try something longer like sitar.
to avoid irand starting from zero you can do:

d1 $ chop (irand 100 + 1) $ s "sitar"
1 Like

I see ! your replies in other articles have also helped me a lot, thanks so much!

1 Like