Sie sind nicht angemeldet.

1

Montag, 7. November 2016, 18:16

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

Quellcode

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

Quellcode

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

Quellcode

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

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Montag, 7. November 2016, 19:28

Hi

This event you put in every scene xml?

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

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Dienstag, 8. November 2016, 11:48

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

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Dienstag, 8. November 2016, 12:11

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 professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

5

Mittwoch, 9. November 2016, 09:58

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

6

Sonntag, 13. November 2016, 15:11

Nobody for a little help?

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

7

Sonntag, 13. November 2016, 15:31

Hi,

i can help.

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

Quellcode

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:

Quellcode

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« hat folgende Datei angehängt:
  • audioplayer.xml (476 Byte - 123 mal heruntergeladen - zuletzt: Heute, 12:55)

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Tuur« (13. November 2016, 16:28)


8

Dienstag, 15. November 2016, 11:05

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

Quellcode

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!!!

Quellcode

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

Quellcode

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

9

Mittwoch, 23. November 2016, 19:02

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

Quellcode

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