Howdy, Stranger!

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

Supported by

[solved] problem with sound sampler

edited March 2016 in OpenSesame

Guys,
I've been banging my head for the last hour trying to solve a problem I have with an experiment. It's not urgent and I actually found a workaround already (...so no need to waste your Saturday night too on this!). But for the sake of my mental health, I need to understand what was causing the problem!

Basically, my trials are like this. First, a fixation is presented for 2s, then a blank screen (duration: 0) followed by a sampler item that plays a sound (duration: sound). Then I have an inline script that displays on a canvas the instruction "press and hold down a key" and once participants do, a second canvas is presented with the sentence "key pressed" (see pic below). All works like a charm from the second trial onwards. In the first trial however, the "press and hold down a key" canvas appears while the sound plays (in all trials it appears after the end of the sound). Does anyone see any flaw in what I did that can explain this behavior?

My workaround was to delete the sketchpad and the sampler and just use code in the inline to play the sound while a blank cavnas is shown. Works as it should. But I need to understand what was causing the problem with my initial implementation. Any ideas?
Cheers,
marios

image

Comments

  • edited February 2016

    In the first trial however, the "press and hold down a key" canvas appears while the sound plays (in all trials it appears after the end of the sound).

    In all other trials (except the first) it appears after the end of the sound, you mean probably? So the problem is that the sampler doesn't block on the first run (which it should if duration is set to 'sound'), while it does block on all subsequent runs. Do I understand that correctly?

  • edited 1:32PM

    Hi Sebastian, yes...what you understood it correctly. In all trials, except the first, the sound finishes and then the instruction to "press and hold the key" appears. In the first trial, this instruction appears while the sound plays.
    marios

  • edited 1:32PM

    I've experienced something similar (with two consecutive sounds playing simultaneously), which I just reported in a separate post:

    http://forum.cogsci.nl/index.php?p=/discussion/1882/sounds-in-consecutive-samplers-play-simultaneously-on-first-time-around-the-loop

  • edited 1:32PM

    I am trying to reproduce this on a Mac and will come back to your shortly.

    Buy Me A Coffee

  • edited 1:32PM

    I just came across this post. After I had documented something similar here:

    http://forum.cogsci.nl/index.php?p=/discussion/1880/bug-timingduration-issue-on-very-first-trial-of-experiment#Item_1

    Thank you very much for your help with this issue --the only thing left on my way to complete my first experiment design on OpenSesame, also an amazing piece of software in several respects!

  • edited 1:32PM

    Ok, I can confirm this issue. Is appears to be a bug in the sound sampler. The first time it plays a sound it doesn't block the experiment for the duration of the sound. All following times it plays a sound it does block as intended.

    We will try to solve this as soon as we can, but in the meantime, a workaround is to place all sampler items (as linked copies) at the beginning of the experiment too, so that they play their samples (likely simultaneously) when the experiment starts, and then just show the intended behavior in the rest of the experiment.

    Buy Me A Coffee

  • edited 1:32PM

    This doesn't seem to occur if a fixed duration is given (rather than just "sound", which admittedly is probably the most common case). So if your sounds are all the same duration, this would also serve as a workaround.

    I suspect this may also point the way to the bug, I'm not too familiar with the OpenSesame code yet but I'll take a look!

  • edited 1:32PM

    Hi guys,

    It's indeed a bug (#401), and it will be fixed in the next maintenance release (3.0.7). For now, a workaround is the following: Add an inline_script item just before the sampler or synth item, and add the following line to the run phase (replace 'my_sampler' by the name of the sampler or synth item):

    items['my_sampler'].sampler.block = True
    

    Cheers,
    Sebastiaan

  • edited 1:32PM

    Sebastiaan, many thanks for the speedy fix! I have already applied this in isolation to our teaching lab (running 3.0.6 + a fixed sampler.pyc for this bug). It seems to work well -- this is great as I'll be teaching a session to beginners which focuses on presentation of sounds, and explaining the workaround would slow us down.

    (To be clear I'm not generally in favour of ad hoc patching as it confuses bug reports on versions, but this did look like a very simple isolated change).

  • edited 1:32PM

    Adding another round of thanks here. Everything works perfectly with Sabastiaan's inline_script fix. We'll remove it from our experiment when 3.0.7 gets released.

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