Howdy, Stranger!

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

Supported by

music on open sesame

Hi, I was just wondering if I could use music in an open sesame experiment, please.

Comments

  • Hi @sarahfg,

    Open Sesame allows you to play sound files. What do you have in mind exactly? Play music in the background or play music on individual trials?

    Once you've familiarized yourself a little with Open Sesame and followed some of the tutorials, have a look at the sampler object (https://osdoc.cogsci.nl/3.3/manual/stimuli/sound/). If you program part of the experiment using code in Python, you can also implement the sampler through code (https://osdoc.cogsci.nl/3.3/manual/python/sampler/).

    Hope this helps!

    Fabrice.

    Buy Me A Coffee

  • Hi Fabrice, Thank you for your quick response.


    We are currently a group of year-two psychology students, and open sesame is completely new to us. We are currently using RStudio for analysis. We haven't come across Python yet.

    We have to do an experiment with two groups, one within-subjects and the other between-subjects. While the participants are reading words (later to be a memory task), we would like to play either dramatic/intense music for one group and calm/soothing music for the other.


    Do you think this is possible?

    Thank you so much for your help.

    Best wishes

    Sarah.

  • Hi @sarahfg,

    Thanks for your description. The task you describe seems to be a verbal recall task where you want to present background music during the encoding phase.

    Can you specify whether your task consist in the presentation of a unique list of words while music is playing, or whether, instead, you're planning to present several lists (a list per trial) with the recall test before the presentation of the next list? From your description, I understand that you only want the music presented during the encoding phase, is that correct? If so, things are quite simple, you simply need to make sure that your sound files are in the pool, and then play them using the sampler object (setting the sound duration to 0 ms: this will be interpreted by Open Sesame as a command to start playing the sound and continue executing the program, such that the music will carry on playing while the next events are presented).

    There are many issues you need to have clear in your mind before you start programming your experiment, especially regarding the design (when within, are you going to block trials by condition or are you going to present the trials from the two conditions intermixed?, etc.). This will determine how you should go about programming your experiment. Same with the response method etc. You need to take the time to get familiar with Open Sesame, go through the documentation and tutorials, and learn some basic notions first.

    To answer your initial question: yes, Open Sesame allows you to present sound in the background while presenting a series of words.

    I'll provide a basic example below, just to illustrate how to do it (you'll have adapt it to suit your particular design and needs). My description below will only really make sense once you've gone through the tutorials etc.

    In my example, I'm presenting two trials. Each trial begins with music and a 1 sec fixation cross, followed by the sequential presentation of 5 words (for one second each). After this, the word "recall" appears on the screen. I have not implemented the bit that would record the participants' responses (you0ll have to do that depending on the characteristics you want for hat phase).

    Here's the basic structure of the task:

    You can see here the loop with the variables used by the trial_sequence to present the information from the trials. You'll notice the sampler object at the beginning of the sequence:

    The sampler will use the content of the music_file column in the loop to determine which file is to be played. Your files must be loaded up into the file pool.

    You can either edit your sound files so that they have the duration required for your trial or, as I've done here, use long musical pieces and use Python code to stop the sampler one the presentation of the words is finished:

    You can download my example from this link: https://www.dropbox.com/s/7u9cp28elya0wua/Music%20in%20background.osexp?dl=0

    (the file was a little too large to post it directly here)

    To minimize the size of your experiment's file, I recommend saving your sound files in the .ogg format (saves space relative to .wav).

    Note that this example works if you execute the task through Open Sesame but will not work in OSWeb (i.e., through a browser) because it contains some Python code (see https://osdoc.cogsci.nl/3.3/manual/osweb/osweb/).

    I hope the explanations above, the example will help you program your task, together with the documentation and tutorials available on Open Sesame's web site will hep you program your experiment.

    Good luck!

    Fabrice.

    PS: when replying to posts on the forum, it is recommended to use the correspondent's handle so that the get notified of the arrival of your message. To do so, just type "@" followed by the first letters of your correspondent's handle. For example, if you type "@F", the following menu will pop up:

    Buy Me A Coffee

  • Hi @Fab


    Thank you SO much for all your amazing advice. You have been extremely helpful. As we are just currently devising our experiment, we are not entirely sure how we will be presenting every variable thus far, so you may hear from me again, sorry ;)


    Once again, thank you so much for taking the time to explain how to use Open Sesame with helpful images and links.


    Best wishes

    Sarah.

  • Hello @Fab ,

    I hope you are doing well. I ve read your answer to sarahfg in the post "music on open sesame", which made me hoping that maybe you could me with my issue.

    I am building an tapping experiment with different distraction conditions (different sounds playing in the background while participants produce 1100 1sec interval tapp). I could add the sound to the experimentpart and it is playing in the background while the tapping task is still going on - which is perfectly what I am aiming for.

    The issue is that I am showing a visual stimuli, which is not shown for the time pressing the spacebar button (to produce the tapping intervals) but comes back immediately afterwards. Now, with the sound in the background the visual stimuli is shown after several ms - which would differ from the control group. I ll add some screenshots to make it clearer (hopefully :))

    Could you help me with this issue or provide information where i can find information to fix it myself?

    Greetings from Hamburg and thank you in advance,


    Joscha


    This is shown when participants are not tapping on spacebar

    This is shown while producing a tap.

    Here the setting for the ogg audiofile.


  • Hi@Joscha,

    I'm having some trouble understanding what the issue is exactly. Could you clarify what events should be happening simultaneously and which should not? Would also be useful if you could upload your task to this forum.

    Kind regards,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab ,

    thank you for your quick reply. I ll try to explain it more precise.

    The participants have the task to create 1100 one second intervals. They have to press the space bar 1100 times. In the first condition there is no distraction effect. In the second and third condition, an audio file is to be played in the background (in the second condition with white noise and in the third condition a random metronome). The sound should run in the background and not influence the sequence.

    I ve uploaded the task for the no distraction group. Here I ve no issue with the experiment loop. The Sequence starts with an sketchpad (see stimulus). Unfortunately the task where I inserted the audiofile is too big to upload. I could send it via Mail if necessary?


    When the participant presses the space bar, the image disappears (sketchpad flicker) and reappears immediately after the button is released.

    My issue with the two distraction conditions (which are copies of the experiment No_feedback_no_distraction, with the only difference that i ve added a sampler to the sequence) is, that after the space bar is released, the sketchpad stimulus does not reappear immediately but is delayed for a few ms

    I hope this has made my problem clearer. Thanks a lot for your help!

    Kind regards and good night,

    Joscha

  • Hi @Joscha,

    Thanks for the additional information. If I interpret correctly your screen captures, you trigger a sound at the onset of the trial and want it running in the background while the other events in the trial follow their course? What exactly isn't working when you do so? Are other events delayed? I'm having some difficulty understanding what the exact problem to solve is. Could you perhaps upload an example of sound you're using using a shared Dropbox link or something similar? Perhaps if the sound is very large the system lags a little in loading it up? If this was the problem, then perhaps you'd need to look for a way to load the sound into memory ahead of the trial (just thinking out loud here, not sure how this would be done, though there must be a way). Would need to try playing one of your sounds in the task to look into it, and be sure of what the issue to solve is.

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab,

    Sorry for the difficulty in explaining my problem :) I ll send you the task with the white noise sound in the background. If you try the experiment task briefly, you will see the delay and hopefully understand what I mean. Here is the link to download the task: https://we.tl/t-YqVPioCoY4

    Thank you a lot for your efford and time.

    I wish you happy holidays with your loved ones. Looking forward to hear or read from you, you can also contact me via Mail: Joscha.Wilms@t-online.de

    All the best,


    Joscha

  • Hi @Joscha,

    Thanks for uploading your task. I now get a better understanding of your sound condition. You basically want one long (21sec) sound to play in the background while your interval generation task goes on as in the practice task.

    One issue I noticed in your task is that you play the 21sec sound on every one of the 1100 trials:

    I think this is likely to create some memory issues and slow things down, which might explain the delay you noticed. Plus the sound gets louder and louder as you start playing the white noise over itself numerous times.

    What you want to do is to start playing the long sound before you run the loop with the 1100 trials, and then have some code after that loop that forces the sampler to stop.

    Here's how to do it:

    1: the sampler is located before the _experiment loop. That way, it starts playing just as you loop runs and the sound keeps going in the background.

    2: some Python code is used after the _experiment loop to stop the sound (in case participants responded to fast and finish before the 21sec elapse). I don't know much Python but I found the necessary code to stop the sampler in this thread: https://forum.cogsci.nl/discussion/2889/play-music-randomly-as-background

    import pygame.mixer
    pygame.mixer.stop()
    

    That seems to do the trick. I tried it with the _experiment loop running just 5 cycles and the sound does play in the background, the task runs as it's supposed to (I think), and the sound stops when the trials are over.

    If you just repeat the steps described above, it should work (or you can download my version here: https://www.dropbox.com/s/efc5ykp0vcrw3hd/No_feedback_whitenoisetest%20Fab.osexp?dl=0)

    Incidentally, you might want to use a sound file with a duration superior to 21sec in case some of your participants take too long. Since code is used to stop the sound, this would ensure that white noise is present in the background throughout the trials even if participants are abnormally slow.

    Hope this helps.

    Happy holidays and Merry Xmas,

    Fabrice.

    Buy Me A Coffee

  • Hello @Fab ,

    I apologize for replying to your message so late. First of all, thank you for your great help - I will be happy to leave a coffee donation. Furthermore, I wish you much success, health and happiness for the future.

    All the best,

    Joscha

  • Hi @Joscha,

    Glad I could be of help. Many thanks for the coffee, that's a really generous gesture!

    I too wish you success, health and happiness for the future (and lots of great data from your experiments!).

    Best,

    Fabrice.

    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 http://45.77.173.118/ 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