You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, June 14th 2010, 5:34pm

Can't stop the sound

I have composed a tour at AutoPano Tour then add soundinterface plagin.
If I transfer to another panoram via hotspot or map the sound from first panorama can't stop.
Below the code which I used.
Have someone this problem.
Can I fix it?



<krpano version="1.0.8">
<events onloadcomplete="playsound3D(auto, SvetlogorskTourdata/sounds/sound3.mp3, 120, 0, 140, 0.3, 0, 0)"
keep="false"/>




<panoview h="0" v="0" fov="90"/>
<view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" fovmin="55.88" fovmax="99" fov="90" hlookat="0" vlookat="0"/>
<preview url="SvetlogorskTourdata/SvetlogorskTour10/preview.jpg"/>
<image type="CUBE">
<left url="SvetlogorskTourdata/SvetlogorskTour10/3.jpg"/>
<front url="SvetlogorskTourdata/SvetlogorskTour10/0.jpg"/>
<right url="SvetlogorskTourdata/SvetlogorskTour10/1.jpg"/>
<back url="SvetlogorskTourdata/SvetlogorskTour10/2.jpg"/>
<up url="SvetlogorskTourdata/SvetlogorskTour10/4.jpg"/>
<down url="SvetlogorskTourdata/SvetlogorskTour10/5.jpg"/>
</image>
<hotspot name="spot0" onclick="loadpano(SvetlogorskTour37.xml);" url="SvetlogorskTourdata/graphics/spots/spot1.swf" ath="380.547" atv="1.70526"/>
<hotspot name="spot1" onclick="loadpano(SvetlogorskTour0.xml);" url="SvetlogorskTourdata/graphics/spots/spot1.swf" ath="514.606" atv="1.24654"/>
<hotspot name="spot2" onclick="action(closeallobjects);set(plugin[spot2object].visible,true);tween(plugin[spot2object].alpha, 1);" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25098" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25098" onhover="showtext(Kaiserling promenade);">
<point ath="486.776" atv="-0.865405"/>
<point ath="487.142" atv="11.7091"/>
<point ath="506.138" atv="11.6764"/>
<point ath="505.965" atv="-0.490682"/>
</hotspot>
<plugin name="spot2object" visible="false" url="SvetlogorskTourdata/graphics/spots/object0.JPG" align="center" alpha="0" onclick="tween(alpha, 0);delayedcall(0.5,set(visible,false));" onhover="showtext(Kaiserling promenade);"/>
<action name="closeallobjects">set(plugin[spot2object].alpha, 0);set(plugin[spot2object].visible,false);</action>


<plugin name="soundinterface"
url="soundinterface.swf"
rootpath="%SWFPATH%"
keep="false"
/>



</krpano>

This post has been edited 1 times, last edit by "Aleksey" (Jun 14th 2010, 7:37pm)


2

Monday, June 14th 2010, 5:50pm

Have you tried putting keep="true" so that the interface remains and can be accessed to turn off the sound?

3

Monday, June 14th 2010, 6:00pm

Have you tried putting keep="true" so that the interface remains and can be accessed to turn off the sound?
Yes, but it does not work. May be I need to put a button. But I'm sure it can be fixed by code.

esys

Intermediate

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

4

Tuesday, January 11th 2011, 11:48pm

Turn down the sound while loading the next panorama ?

Hi,

Is it possible to turn down the sound slowly when i move from a pano to an other ?

And then, turn up when the next one is loaded ? (with a different sound for each one) All that in the xml, not interactive..

Thanks. *smile*
Steph

This post has been edited 2 times, last edit by "esys" (Jan 12th 2011, 12:05am)


VN2009

Professional

Posts: 1,334

Location: Duluth MN

  • Send private message

5

Wednesday, January 12th 2011, 3:36pm

very easy

where ever you have your onclick to load the next pano add this.

onclick="loadpano(test.xml,null,MERGE|BLEND(2)); tween(plugin[soundinterface].volume, 0);"

in the onloadcomplete of the next pano

<event onloadcomplete="playsound3D(auto, nextsound.mp3, 120, 0, 140, 0.3, 0, 0); tween(plugin[soundinterface].volume, 0.75);"

esys

Intermediate

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

6

Sunday, January 23rd 2011, 11:06pm

Hi,

Thanks for your answer VN2009.

It works great! *tongue* (just "event(s)")

I can also down the sound slowly (with your code *smile* ) and then start an other one:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
	<hotspot name="Le-Port"
	         url="hotspots/Bouee_Rouge_Fleches.swf"
                  ....
	         onclick="tween(plugin[soundinterface].volume, 0.15);
	                        looktohotspot(get(name), 55,linear(25));   
                                loadscene(scene_Eglise, null, MERGE, BLEND(2));
                                tween(plugin[soundinterface].volume, 0.1);
                                wait(LOAD);
                                tween(plugin[soundinterface].volume, 0);     
			        oninterrupt(break);
	                        wait(BLEND);"
	                        devices="all"
		                />

	<scene name="scene_Eglise" title="Eglise" 
                     onstart="... >

     <events onloadcomplete="playsound2D(Eglise,%SWFPATH%/music/Eglise.mp3,0.9,0.0,0); tween(plugin[soundinterface].volume, 0.9);" />


Also, i'd like to set the same thing when clicking on the thumbnails. Problem is when you change pano via the thumbnails, first sound is still running while the second one's starting. *huh*
I've tried in "openthumns" action (with your tween code)'. No success..

Any help ? *smile*

Thanks
Steph

This post has been edited 2 times, last edit by "esys" (Jan 24th 2011, 1:09am)


esys

Intermediate

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

7

Monday, January 24th 2011, 12:26am

sound volume setting

Hi again,

I can see that the volume of my three songs is just sensible between 0.3 and 0 !
Over 0.3 i can't hear the difference! I added a "volume=1" to my plug in, then changed the setting in my scene events, still the same.

Also, i can't find an example with a "playsound2D" code to understand the "pan" setting. It would be in accordance with my pano if
when you turn to 180° on the left or right hand side of the pano, step by step, the sound looks like coming from behind. But not dissapear.

I've tried the 3D but i can't find the way to keep a little bit of volume when turning to 180°.
Any idea ?

Source code

1
2
3
4
5
6
7
        <plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf" keep="false" volume="1" onloaded="" />      
	<plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" />
	
     <events onloadcomplete="stopsound(Eglise); stopsound(Afrique); 
                              playsound3D(Mouettes,%SWFPATH%/music/sf_port.mp3,32.83,7.94,180,0.9,0); 
                              playsound3D(Port,%SWFPATH%/music/port_voiliers_mat_vent.mp3,32.83,7.94,180,0.9,0); 
                              tween(plugin[soundinterface].volume, 0.9);" />


Thanks *smile*
Steph

This post has been edited 2 times, last edit by "esys" (Jan 24th 2011, 1:05am)


VN2009

Professional

Posts: 1,334

Location: Duluth MN

  • Send private message

8

Monday, January 24th 2011, 11:51pm

I can see that the volume of my three songs is just sensible between 0.3 and 0 !
Over 0.3 i can't hear the difference! I added a "volume=1" to my plug in, then changed the setting in my scene events, still the same


no idea here maybe open your audio in Audacity and see if there is any clipping. maybe the track itself is preventing the audio from getting louder?

I've tried the 3D but i can't find the way to keep a little bit of volume when turning to 180°.
Any idea ?


i know the videoplugin has a outofrangevolume="0" that can be changed i cant remember of the 3d sound does. open it in the editor and you will see any missing options.

Also, i'd like to set the same thing when clicking on the thumbnails. Problem is when you change pano via the thumbnails, first sound is still running while the second one's starting.
I've tried in "openthumns" action (with your tween code)'. No success..


cant remember what your talking about i have a terrible memory! to fix that just add a stopallsounds(); before every playsound(); then no matter what is play it will stop that before starting the next.

9

Wednesday, February 2nd 2011, 12:17am

stoping sound

I had same problem, and added onclick="loadscene(pano4,merge,blend(4));stopsound(sound)" so that sound was killed when you clicked on link to next pano. this works on ipad but not on iphone which may be to do with how iphone plays mp3.



Tim

VN2009

Professional

Posts: 1,334

Location: Duluth MN

  • Send private message

10

Wednesday, February 2nd 2011, 12:53am

RE: stoping sound

I had same problem, and added onclick="loadscene(pano4,merge,blend(4));stopsound(sound)" so that sound was killed when you clicked on link to next pano. this works on ipad but not on iphone which may be to do with how iphone plays mp3.



Tim


i use stopallsounds(); that stops any sound reguardless of ID. it also works on the iphone. even using the iphone user agent in safari it still detects that you are using a PC.

esys

Intermediate

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

11

Tuesday, February 8th 2011, 3:33pm

Bugs with soundinterface !!

Hi,

I still have problems with the sound in my Vtour.

Thanks again VN for your tween code (works great with the hotspots), but it doesn't work with the thumbnails. I've tried this :




<action name="openthumbs">
if(%1 != NEXT,
set(i,0);
set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );
);

if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
openthumb(get(thumbname));
set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); tween(plugin[soundinterface].volume, 0.0, 2); loadscene(get(linkedscene),null,NOPREVIEW,BLEND(2)); );
inc(i);
openthumbs(NEXT);
);
</action>




or this :



set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); stopallsounds(); loadscene(get(linkedscene),null,NOPREVIEW,BLEND(2)); );




It works for both of them but brutally whatever the code is.!

if i do with set function, it works also but when you come back on your first pano for the second time, no sound comes out.!
I'd like it down slowly like my hotspots :

<hotspot name="marina"
........

onclick="tween(plugin[soundinterface].volume, 0.15);
tween(alpha, 0.3,2.5);
tween(plugin[Texte-Torre].alpha, 0.0, 2);
tween(plugin[google].alpha, 0.0, 2);
looktohotspot(get(name), 65,linear(25));
tween(plugin[soundinterface].volume, 0);
stopallsounds();
loadscene(scene_Marina-Santa-Teresa, null, NOPREVIEW, BLEND(1.5));
wait(LOAD);
oninterrupt(break);
wait(BLEND);"
devices="all"
/>

Thanks. You can check this thread also to stop and play the sound with buttons,(i still got to keep a bug!):

pause and play button bug !

Thanks everybody. *smile*
Steph

esys

Intermediate

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

12

Wednesday, February 9th 2011, 4:47am

bug with soundinterface

Hi again,

I've checked this thread to get the sound before the "moveto" :

Sound that starts immediately

The problem is, i've created two buttons 'pause and play' (in the skin xml) and it worked when i started the sound from the events (after the "moveto" so) :

<scene name="scene_Marina-Santa-Teresa" title="Marina Di Santa Teresa" onstart="wait(LOAD); oninterrupt(break); moveto(-15.52,15.89, smooth(100,50,10));" thumburl="Marina-Santa-Teresa.tiles/thumb.jpg">
......
<events onloadcomplete="set(plugin[Texte-Torre].visible, true); playsound2D(Cigales,%SWFPATH%/music/cigales.mp3,0.9,0,0); playsound2D(Vent,%SWFPATH%/music/vent.mp3,0.4,0,30);" />


But when i write it in "onstart", the sound begin before the move but the buttons don't work :

<scene name="scene_Marina-Santa-Teresa" title="Marina Di Santa Teresa" onstart="wait(LOAD); playsound2D(rieuse,%SWFPATH%/music/rieuse.mp3,0.8,0,9); playsound2D(Port,%SWFPATH%/music/port_voiliers_mat_vent.mp3,0.9,0,9); oninterrupt(break); moveto(-15.52,15.89, smooth(100,50,10));" thumburl="Marina-Santa-Teresa.tiles/thumb.jpg">

Any idea ? include the two plugin "pause and play" buttons in the main xml ?

Thanks. *smile*

]Edit: Sorry Solved ! A mistake in my code ! *unsure*
Steph

This post has been edited 2 times, last edit by "esys" (Feb 9th 2011, 6:46pm)


HansNyb

Professional

Posts: 852

Location: Denmark

Occupation: Photographer

  • Send private message

13

Thursday, February 10th 2011, 1:59pm

If anyone still have problems with stopallsounds() not working make sure that all you files are updated to the last beta and alpha beta versions.

I just found that this was why It did not work in one of my first test of the new soundinterface.

Hans

Similar threads