Combining Samples, Iterations, and dice or one_in

Hi everyone, I am new to this forum, so forgive me if this is suppose to be in an existing topic.

However, I encounter this yesterday as I am learning about dice and one_in. So that got me to think if it is possible to combine the element with interations such as amps, rate, pan, etc.

To my surprise that my code didn’t work. I find hard to understand while my logic told me it should make sense. I have tried to have if one_in(5) and rate: 0.1 to swap position. yet this didn’t work.

what you do guys think? Thanks a bunch

Hi,

I’ve always used it like this:

sample :ambi_piano, rate: 0.1 if one_in(4)

The ‘rate’ part is an option of the sample command,
and needs to be directly next to it to work.

Eli…

Thanks a bunch, it works now!