Howdy, Stranger!

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

Supported by

Randomised sound loop simultaneously with separate video


I've run into a bit of a problem as I need to get opensesame to play a 1.5 minute video while a stream of 420 sound files play in random order in the background. I'm not sure how to do this, as I can't get it to work with the coroutines function. I also can't just edit the video outside of opensesame to have the sound files playing in it, as I need the order of the sounds to be randomised for each participant. Most likely I'll have to do some scripting to make this work, but I'm not very good at writing inline script, so I'd be very grateful if someone could point me in the right direction of how to get started.

Thank you!


  • Hi Hannah,

    Yes, I am afraid you need to do some inline scripting. Following advice:

    1) For video presentation, use OpenCV2:

    It is a quite straightforward python library to interact with videos (Note: you need to install it first!)

    2) Use a while or for loop to playback the sound files

    Before the loop you can randomize and load them. In the loop just play them one at a time.

    3) Learn coding ?

    The beginning might be a little tough and slow, but it is definitely worth the investment. It will make your life much easier in the future and usually you also start to understand better what is actually happening in your experiment.

    Try to get started on that, but once you get stuck don't hesitate to ask a question here (the more specific the better)


    Buy Me A Coffee

  • edited February 2020

    Hi Eduard,

    Thanks for your help. I am already in the process of learning how to code so I do know how to code some and have already written some inline script for other parts of my experiment, but I’m just not very good at it and tend to make mistakes that take a long time to solve. Hence I was hoping someone could let me know a rough skeleton of how to go about coding this part as I need to finish the experiment on a very short deadline.

  • HI again Eduard,

    I've tried using OpenCV2 but the video doesn't play, and I just get a blank screen that lasts for a few seconds before it says that the experiment has finished successfully.

  • Hi,

    What have you tried. If you need help, please provide the code that causes the problem. Otherwise I can't really do much. (And please also a little video that I can try running!)


    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games