Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Play sound with 25% chance

Hey everyone,

For some of you this might seem a simple question, but I can't figure it out. I have 32 trials and during those trials I want a 25% chance on a sound being played.

Maybe I am overthinking it, all help is very much appreciated.

Comments

  • Hi,

    1) create a list with eights ones and 24 zeros:

    play_sound = [1]*8 + [0]*24

    2) Put inside your sampler's run if statement the current value of that variable. If it is one it will run it, of it is zero, it won't.

    =play_sound[trial_no]==1

    Do you understand the logic?

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.