Howdy, Stranger!

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

Supported by

reproduction paradigm

Hi,
How can I record response for reproduction paradigm(in this paradigm sound will be played for particular duration then it will stop and again sound will be played, participates have to stop the sound as the perceived duration elapsed).

Comments

  • Hi again,

    Now I get it. That's rather simple. You need two samplers (or however you choose to play the files). In the first one, you set the duration to sound. In the second you set duration to keypress. In this way, the response of how long participants think the first recording lasted will be recorded, but I'm not sure whether the sound will stop playing and this time. Would you mind trying it? If not you will probably be able to fix it with a work around (I can help).

    Good luck.

    Eduard

    Buy Me A Coffee

  • Hello eduard,

    First I would like to thank that you replied. My problem still exist, I added two sampler though in the second sampler I set the duration as 'keypress' but the sound is not getting stopped when I am pressing the key.
    There is one more problem,in the first sampler I have to play the sound for three different durations (6000ms,12000ms,18000), for that I set the duration as variable [stim_dur] but still every time the complete file is getting played and that is overlapping with the second sampler. Second sampler starts but in the background first sound is keep playing.

    regards,
    Srishti

  • Hi Srishti,

    The duration field in a sampler is only specifying how long OpenSesame will wait after the sampler began to play before it proceeds with the next item in your sequence. It does not influence the duration of the sound being played. Basically, once the sound starts playing, it continues until its over. And the duration only specifies how long Opensesame waits before executing the following item in the sequence. Usually, these two durations correspond to each other, but not always.

    Second sampler starts but in the background first sound is keep playing.

    This is what I was afraid of. I suppose for this scenario you will have to do some python scripting and access the playback modules directly. Consider this script for example:

    import pygame
    
    # sound initialization
    pygame.mixer.init()
    
    # load a sound file
    sound = pygame.mixer.Sound(pool['<filename>.wav'])
    sound.play()
    clock.sleep(6000)
    sound.stop()
    
    # or 
    sound.play(maxtime= 6000)
    

    This script you would have to put in an inline_script which replaces the sampler item. If you need more information on how the pygame commands work, check out their documentation.

    Hope this helped.
    Eduard

    Buy Me A Coffee

  • Hi eduard,

    One more question, as I am a python beginner may I know that like I have to play the same sound for three different durations randomly the same script I have to write again and again for all three durations (6000ms,12000ms, 18000ms) or this is possible in one line script simultaneously.

    thankyou!

    regard'
    srishti

  • hi,
    I am also facing problem adding two different sound files which I want to play randomly for multiple specific durations.Like for canvas we can give the variable name which we create having different images,what about the many sound files,how can I give all file names in inline script.

    Please help I am close to my solution.Thank you so much for the help you have given so far.

  • hi,
    plz some one help me in this ,how I can write script if I want to play two sound files randomly, because we need to give the path for sampler, how I can add two paths for .ogg file which I wand to play for three multiple durations, kindly let me know how can write script for playing both the sound file for three different durations randomly.

    Its very urgent, so far I am keep getting help from eduard and I am very thankful to him.
    @eduard @sebastiaan

    Most of the time question put up regarding canvas only, my this question may be very helpful for those as well who are working on sampler and would provide clarity regarding this.

    waiting for reply
    regards,
    Srishti

  • hi Sristhi,

    Sorry for the delay, I have been quite busy recently. I'm afraid, I don't quite understand what your problem is exactly. Would you mind rephrasing?

    As far as I understand, you wonder how to randomly define the filenames, filepaths, and durations of the sounds? If so, you can simply keep them in the loop table as usual and pick whichever you need.

    Edaurd

    ~~~

    Buy Me A Coffee

  • Hi,

    What mistake am I doing .It is still showing error in prepare phase.
    Here I am uploading my experiment kindly check it out.

    Thankyou in advance
    Srishti


  • Hi Srishti,

    Without an error message and knowing how your variables var.my_dur and var.stim_type look like, it is virtually impossible to say what is the issue. Would you please add this information?

    Eduard

    Buy Me A Coffee

  • edited January 2017

    Hi,

    Thanks for being so nice for naive researcher like me. Thankyou for immediate reply that maintains my motivation. stim_type here shows ambi.ogg= ambiguous sound and mean.ogg=meaningful sound, these are the two auditory stimulus I am using in my experinment.These two (stim_type,my_dur) are the variables.

  • Hi,

    Alright, that looks fine. So, which error message do you get?

    Buy Me A Coffee

  • Hi,

    Here is the image I am uploading.


  • Hi,

    In the run phase I am getting this error message.

  • edited January 2017

    Hi,

    Though I replaced the sound.stop(var.my_dur) with clock.sleep(var.my_dur) error message is there when I am running the inline script :(

  • Hi,

    in the first script you wrote pygame.mixer.sound(..). Instead it should be a capitalized Sound, like so: pygame.mixer.Sound().

    Does it solve it?

    Eduard

    Buy Me A Coffee

  • Hi,
    No it doesn't.

  • I thought we talked about it. How am I supposed to help you if you don't provide me with any information?
    The first error message you had should be gone by now. At least if you implemented the changes that I suggested correctly. So, again, please show me what you changed and what the new error message looks like.

    Eduard

    Buy Me A Coffee

  • Hi,

    Now no error message is showing over there but the things are not working the way I defined it eg:- time duration of the sound is not according to the variable I defined it . I have uploaded my experiment just have a look since it's a larger file I have uploaded it in google drive.

    https://drive.google.com/file/d/0B1H1_usmB7ibQ1JjSU1JczktclU/view?usp=sharing

    Thankyou

    Srishti

  • Hi,

    I changed your experiment. Is it now doing what you want it to do?

    Here the link: http://www.filedropper.com/timeexperiment

    Btw. your meaningful sound is too short. It stops after 8 seconds.

    Let me know if anything is unclear.

    Eduard

    Buy Me A Coffee

  • Hi,

    File is not getting open, showing error the link you sent me.

  • Hi,

    Forgot to inform you the version (opensesame 3.0, python 2.7, Pygame 1.9.1 )

    srishti

  • Hi eduard,

    Now I have understood the problem, kindly send me the corrected file once again so that I can download it from explorer. Because once I have already downloaded it is not getting download again.

    thankyou

    Srishti

  • edited February 2017

    Hi Srishti,

    The file was uploaded correctly. Just download it with the internet explorer and you should be good. No need to send it again.

    Eduard

    Edit: Oh, I just see that the link is down. http://www.filedropper.com/timeexperiment
    Here it is again.

    Buy Me A Coffee

  • Hi,

    If possible upload it on google drive if there isn't any issue, so I easily can download. I tried with explorer but error message remain the same. So please I request you that upload it on google drive.

    Sorry for disturbing you so much and thankyou for your patience.

    srishti

  • Alright,

    Here is the new link: http://www.filedropper.com/timeexperiment2osexp

    I wrapped the Opensesame file first into an archive (.zip), so before you can use it, you have to unzip it. But I tested it now, and it works.

    Eduard

    Buy Me A Coffee

  • Hi,

    Thankyou so much Eduard for your help and patience.Now its working properly. :smile:

    Srishti

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