Howdy, Stranger!

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

Supported by

Variable volume in OSWeb sampler / file pool URL

Hi,

I'd like to have a loop at the beginning of an experiment where the participant can adjust the volume to their liking, then have this applied to all samples. My idea is to set an initial value for volume in vars, then the participant can adjust this up and down via keypresses, playing a test sound in between for feedback.

This volume value will then be applied to all subsequent samples.

I created an experiment with an inline_javascript containing only

vars.vol = 0.5;

in the Prepare tab and a sampler with an example WAV file and changed

set volume "[vol]"

in the script view.

This pops up an alert "TypeError: console.warning is not a function"

Going into the console and tracking down the error, the code for this is:

console.warning("Unable to apply volume or gain",t)

As a workaround I looked at adding an audio element to the page using inline_javascript, but got stuck on trying to find the URL for the sound file in the file pool. (That's not essential of course, it could be hosted elsewhere, but it would be nice to keep it with the rest of the experiment).

So, it would be great if anyone had any pointers for either:

  1. Variable volume on samplers in OSWeb (though maybe it's just not supported yet, which is fine of course!)
  2. How to get the URL for a file in the file pool, then I'll add an audio element using inline_javascript.

Thanks!

Comments

  • p.s. just checked and this does work with an external file URL for the sound using JS audio:

    const beep_url = "http://myserver.example.com/static/beep.ogg";
    const audio = new Audio(beep_url);
    audio.addEventListener(
        "canplaythrough",
        function () { audio.play(); }
    );
    

    It would still be nice to use the file pool, though not essential of course!

  • Hi,

    wrt to your first point, I don't see a reason why it shouldn't work/be implemented, so my guess would be this is a bug (at least I can confirm that the problem occurs). @sebastiaan what do you think?

    Eduard

    Buy Me A Coffee

  • Hi @alisdt and @eduard ,

    Sorry for the slow response—this fell off the radar for a bit. But indeed, there are two bugs here, and I just created an issue for them. Should be fixed in OSWeb 1.3.14, which should be included with OpenSesame 3.3.10!

    — Sebastiaan

  • Many thanks @sebastiaan , good to know!

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