Howdy, Stranger!

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

Supported by

Stop sampler after participant finishes action

edited December 2020 in OSWeb

Hello!

I'm trying to make my experiment OSweb friendly so I'm converting my python scripts into inline_javascripts.

I have the following setup:

  • Sampler (duration: 0)
  • Sketchpad (duration: 0)
  • Keyboard_response
  • inline_script (python)

In the inline script i have the following code:

items['my_sampler'].sampler.stop()

This works as intended, making the Sampler stop playing after the Sketchpad is 'dismissed' by pressing a key. Any timing solution would not work as the participant has to read the content of the sketchpad and only then stop the sampler.

How can I convert the script to an inline_javascript? I tried multiple ways but everything failed.

Thank you in advance!

Comments

  • Hi Josh,


    Stopping a sound file is indeed tricky in OSWeb, so I don't see an easy solution for your issue. Sorry about that...


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

Sign In or Register to comment.