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.

jprieu

Beginner

  • "jprieu" started this thread

Posts: 23

Location: France, Sorgues

  • Send private message

1

Monday, November 7th 2016, 6:16pm

no startup sound

Hello,
First of all, sorry for my bad english. I'm french and I'm a real beginner in computer language
I would like to know if you could help me for a problem. I have a music for my first pano and another that begins with the second pano and for several panos. If
I switch from first to second pano everything works fine but if I spend
the first pano and after the third by clicking on the third thumbnail, the
music does not begin. It is the second pano that starts the music !!!
so I would like my music starts whatever the pano I choose by clicking on the thumbnail
Here are the codes that I have installed.
For sound

Source code

1
2
3
4
5
6
7
8
                   <plugin name="soundinterface"
url="plugins/soundinterface.swf"
alturl="plugins/soundinterface.js"
preload="true"
rootpath=""
volume="1.0"
mute="false"
/>

for the music starts with the first piano

Source code

1
2
3
4
<events name="currentpano"
           onnewpano="playsound(bgsnd, 'sounds/horreur.mp3|sounds/horreur.ogg', 360, 0, 360, 0.8, loops);"
           onremovepano="stopsound(bgsnd);"
           />

and finally to the other music starts with the second pano

Source code

1
2
3
4
<events name="currentpano"
           onnewpano="playsound(bgsnd, 'sounds/gamma.mp3|sounds/gamma.ogg', 360, 0, 360, 0.8, loops);"
           onremovepano="false"
           />

Many thanks
JP
www.jeanpierrerieu.fr

spacerywirtualne

Professional

Posts: 919

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

2

Monday, November 7th 2016, 7:28pm

Hi

This event you put in every scene xml?

Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

jprieu

Beginner

  • "jprieu" started this thread

Posts: 23

Location: France, Sorgues

  • Send private message

3

Tuesday, November 8th 2016, 11:48am

First of all, thank you for your reply.
The answer is no, if I put this event in each xml, the music restarts at the beginning with each new pano. In my virtual tour, music starts on the first pano and a new music starts on the second pano to the eighth pano but if I move to the first pano to the third (by clicking on thumbnails) music does not start because it is the second pano which starts music.
Thank you for your help
best regards

spacerywirtualne

Professional

Posts: 919

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

4

Tuesday, November 8th 2016, 12:11pm

Hi

If you want the sound to play all the time you have to give loop = true

onnewpano="playsound(bgsnd, 'sounds/horreur.mp3|sounds/horreur.ogg', 360, 0, 360, 0.8, true);"

Post what you really want to achieve.
One sound, a few, in all panoramas or not? Keep in mind that on mobile devices soundinterface plugin can only play one sound at a time.


Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

jprieu

Beginner

  • "jprieu" started this thread

Posts: 23

Location: France, Sorgues

  • Send private message

5

Wednesday, November 9th 2016, 9:58am

Hi
thank you for taking time to help me ...
My problem is about changing musique. I have two different music. A first music on a single pano, the first. And then, a different music on all other panos (so from the second).
It is the second pano which starts the second music. If I look at the panos in order everything is ok BUT if I want to go first to fifth pano (for example), I have no music on the fifth pano because I need to go through the second pano (because it is started the next music) .
I would have, I think, a code that says, if you skip the second pano, then the music will start on the selected pano (third example)
thank you in advance
Best regards
JP

jprieu

Beginner

  • "jprieu" started this thread

Posts: 23

Location: France, Sorgues

  • Send private message

6

Sunday, November 13th 2016, 3:11pm

Nobody for a little help?

Tuur

Sage

Posts: 3,190

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Sunday, November 13th 2016, 3:31pm

Hi,

i can help.

- add in every scene where you want audio:
audio="song title.mp3"
like:

Source code

1
<scene name="scene_1" title="a1" audio="ilovekrpano.mp3" onstart=""  >


in the scenes where you don't want audio just leave the audio="" away.

- then make a folder called 'audioplayer' on the same level as the tour.xml ( or where your scenes are).
- in the audio player folder you make a folder called "audio". There you put all your audio files.
- Also in the 'audioplayer' folder you put this audioplayer.xml (download)

- in the tour.xml you include the audio player.xml like:

Source code

1
<include url="audioplayer/audioplayer.xml" />



Make sure the path of the sound interface plugin is right in the audioplayer.xml

live example:
http://www.virtualtuur.com/krpano/audio/scene/
http://www.virtualtuur.com/krpano/audio/scene/tour.xml

edit: after re-reading your post.. i think you want it a bit else.. but that should not be a too big problem.
When i have time i make another example, or minor fix for this.

edit2: new example: http://www.virtualtuur.com/krpano/audio/scene2/tour.html
xml:
tour.xml: http://www.virtualtuur.com/krpano/audio/scene2/tour.xml
audioplayer.xml: http://www.virtualtuur.com/krpano/audio/…audioplayer.xml
here i used absolute scene names !!!


Hope it helps
Tuur *thumbsup*
Tuur has attached the following file:
  • audioplayer.xml (476 Byte - 32 times downloaded - latest: Sep 9th 2019, 9:13am)
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 3 times, last edit by "Tuur" (Nov 13th 2016, 4:28pm)


jprieu

Beginner

  • "jprieu" started this thread

Posts: 23

Location: France, Sorgues

  • Send private message

8

Tuesday, November 15th 2016, 11:05am

Hi ...
Thank you so much for looking at my problem.
What I want is exactly your new example: http://www.virtualtuur.com/krpano/audio/scene2/tour.html (the music goes from pano two to three without stopping).
What misery ... I can't do that for my virtual visit. This one comprises 26 panos so I made a virtual visit with three panos to better understand.
This is my tour.xml

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<krpano version="1.19" title="Virtual Tour">

	<include url="skin/vtourskin.xml" />
   <include url="audioplayer/audioplayer.xml" />

	<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
	

	<!-- startup action - load the first scene -->
	<action name="startup" autorun="onstart">
		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
		loadscene(get(startscene), null, MERGE);
		if(startactions !== null, startactions() );
	</action>


	
	<scene name="scene_Atelier" title="Atelier" audio="gamma.mp3" onstart="" havevrimage="true" thumburl="panos/Atelier.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/Atelier.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="4160" tiledimageheight="4160">
				<cube url="panos/Atelier.tiles/%s/l3/%0v/l3_%s_%0v_%0h.jpg" />
			</level>
			<level tiledimagewidth="2112" tiledimageheight="2112">
				<cube url="panos/Atelier.tiles/%s/l2/%0v/l2_%s_%0v_%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<cube url="panos/Atelier.tiles/%s/l1/%0v/l1_%s_%0v_%0h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/Atelier.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->

	</scene>

	<scene name="scene_Cellule_18" title="Cellule 18" audio="oligouttes.mp3" onstart="" havevrimage="true" thumburl="panos/Cellule_18.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/Cellule_18.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="4160" tiledimageheight="4160">
				<cube url="panos/Cellule_18.tiles/%s/l3/%0v/l3_%s_%0v_%0h.jpg" />
			</level>
			<level tiledimagewidth="2112" tiledimageheight="2112">
				<cube url="panos/Cellule_18.tiles/%s/l2/%0v/l2_%s_%0v_%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<cube url="panos/Cellule_18.tiles/%s/l1/%0v/l1_%s_%0v_%0h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/Cellule_18.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->

	</scene>

	<scene name="scene_Cellule_21" title="Cellule 21" audio="oligouttes.mp3"  onstart="" havevrimage="true" thumburl="panos/Cellule_21.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/Cellule_21.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="4160" tiledimageheight="4160">
				<cube url="panos/Cellule_21.tiles/%s/l3/%0v/l3_%s_%0v_%0h.jpg" />
			</level>
			<level tiledimagewidth="2112" tiledimageheight="2112">
				<cube url="panos/Cellule_21.tiles/%s/l2/%0v/l2_%s_%0v_%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<cube url="panos/Cellule_21.tiles/%s/l1/%0v/l1_%s_%0v_%0h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/Cellule_21.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->

	</scene>


</krpano>

In your third scene you did not write audio = "song title.mp3"? I tried with or without and the result is the same ?
I then created a folder and in it I put a folder with my music and a file audioplayer.xml
With this one I have no music!!!

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<krpano>



<plugin name="soundinterface" 
		keep="true" 
		url="../plugins/soundinterface.js" 
		preload="true" 
		rootpath="" 
		volume="1.0" 
		mute="false"
		/>
		
		
<events name="audio" keep="true" onnewscene="PlayAudio" />

<action name="PlayAudio">
	
	
	
	if(scene[get(xml.scene)].name == scene_Atelier,
		set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
		playsound(sound1,get(_audio));
	);
	
	if(scene[get(xml.scene)].name == scene_Cellule_18,
		if((_audio == null) OR (_audio == 'audioplayer/audio/gamma.mp3'), 		
			set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
			playsound(sound1,get(_audio));
		);
	);
	
	ifnot((scene[get(xml.scene)].name == scene_Atelier) OR (scene[get(xml.scene)].name == scene_Cellule_18),
		if((_audio == null) OR (_audio == 'audioplayer/audio/gamma.mp3'), 		
			set(_audio, calc:'audioplayer/audio/' + scene[scene_Cellule_18].audio);
			playsound(sound1,get(_audio));
		);	
	);
	
	
	</action>
</krpano>

And with this one, I have music but
It starts again with each new pano

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<krpano>



<plugin name="soundinterface"
		keep="true"
    	url="../plugins/soundinterface.js"
    	preload="true"
    	rootpath=""
    	volume="1.0"
    	mute="false"
    	/>	
	
	
<events name="audio" keep="true" onnewscene="PlayAudio" />

<action name="PlayAudio">
	set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
	if(scene[get(xml.scene)].audio,
		playsound(sound1,get(_audio));
	,
		stopsound(sound1);
	);	
</action>

</krpano>


I must be really bad to fail to reproduce your codes *confused* .
Thanks in advance for telling me where the problem comes from.
Best regards
JP

jprieu

Beginner

  • "jprieu" started this thread

Posts: 23

Location: France, Sorgues

  • Send private message

9

Wednesday, November 23rd 2016, 7:02pm

I,
Although I make all the possible modifications, I do not arrive at the good result.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if(scene[get(xml.scene)].name == scene_Atelier,
		set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
		playsound(sound1,get(_audio));
	);
		if(scene[get(xml.scene)].name == scene_Cellule_18,
		if((_audio == null) OR (_audio == 'audioplayer/audio/gamma.mp3'), 		
			set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
			playsound(sound1,get(_audio));
		);
	);
		ifnot((scene[get(xml.scene)].name == scene_Atelier) OR (scene[get(xml.scene)].name == scene_Cellule_18),
		if((_audio == null) OR (_audio == 'audioplayer/audio/oligouttes.mp3'), 		
			set(_audio, calc:'audioplayer/audio/' + scene[scene_Cellule_18].audio);
			playsound(sound1,get(_audio));
		);	
	);

The music changes from pano 1 to pano 2 ... It continues from pano 2 to pano 3 but
if I go back to pano two it starts again at the beginning
I can not get this... http://www.virtualtuur.com/krpano/audio/scene2/tour.html
Best regards
JP