Sound regulation for differents mp3

  • Hello.


    I would like to know how can i change the volume for differents mp3 wich are playing at the same time. (Not the initial volume). For example sound(1) and sound(2) are playing and when I click on a button the sound(1) volume must set to 0.1 but the sound(2) still sound with volume=1.


    Regards.

  • Hi,

    that's currently not possible, but it will in the next version (1.0.8.14),
    then there will be sound[id] objects which allow changing the sound properties (like volume) dynamically,
    e.g. then it will be possible to write codes like this:

    Code
    set(sound[s1].volume, 0.1);

    or:

    Code
    tween(sound[s1].volume, 0.1);

    best regards,
    Klaus

  • Hello.


    I have to do a job and I need to know if I can include this option in the virtual tour. Then I would like to know if it is possible about the date in wich it would be possible.


    Regards.

  • Hello again.


    I downloaded the last beta version. And I am trying this line:


    onclick="stopsound(sound[1]);tween(sound[100].volume, 1);set(plugin[play-pause].alpha,0);set(plugin[play-pause].enabled,false);set(plugin[resume].alpha,0);set(plugin[resume].enabled,false);set(plugin[play].alpha,1);set(plugin[play].enabled,true);"


    it makes all ok but sound 1 doesn´t stop playing. And if I try with this:


    onclick="stopsound(1);tween(sound[100].volume, 1);set(plugin[play-pause].alpha,0);set(plugin[play-pause].enabled,false);set(plugin[resume].alpha,0);set(plugin[resume].enabled,false);set(plugin[play].alpha,1);set(plugin[play].enabled,true);"


    it takes an error:


    remove - unknown array item - 1


    Regards.

  • Hi,

    here a pre-release of the 1.0.8.14 soundinterface plugin documenation:

    https://krpano.com/plugins/soundinterface/#top

    I hope it makes it more clear how to use the sound[name] objects,

    when you play a sound then that sound will get a name,
    and this name must used to when using the sound[name] objects,
    NOTE - numbers are not allowed as names!

    e.g.

    Code
    playsound(snd1, file.mp3);
    ...
    tween(sound[snd1].volume,0.5);
    ...
    stopsound(snd1);

    best regards,
    Klaus

  • Sound object is a very usefull enhancement ! *thumbsup*

    I have implement it, to share a same sound with changing volume and polar coordinates between different panoramas.
    Here a "caving" example

    Nevertheless, it seems that, for a same and unique sound, sound[name].volume and plugin[soundinterface].volume doesn't provide the same effect.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!