Control Sound on Node Change

Q&A about the latest versions
Post Reply
SantiagoIlustre
Posts: 2
Joined: Tue Jul 11, 2023 4:27 pm

Hi,

I'm working on a tour of a plaza with some buildings around. I have a background sound to play on the plaza, and some other background sounds for the buildings. I need the sound of the plaza, that has several nodes, to pause when entering a building, so the apropriate sound can play, and resume when getting back to the plaza. To achieve this, I created variables to check whether the current node is a node on the plaza or a particular building, and separate actions to play / pause the corresponding sound element according to the variable.

The problem that I'm facing is that when I change nodes whithin the same space, the action to play the sound is running and thus restarts the playback of the sound from the beggining.

How could I go about two consevutive play media actions being run not restarting the sound?

I'm in the version 7.0.4a of Pano2VR.

PS: I'm running this actions on a random element on the skin editor. Is there any way to set actions that are not linked to a specific element of the skin such as this node change?

Thanks in advance.
User avatar
Hopki
Gnome
Posts: 13029
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi SantiagoIlustre,
The easiest way to do this is just to add the background sound to each node.
As you change nodes it will play the background sound for that node, if two nodes have the same background would it will play without interruption.
You would need to add the sound to each node as you may have a menu that means you can jump to a node.

Or you have Project Background sound, then using tags lower the volume when not in the plaza, so using a Node Changed action to set the volume to say 0.2 if the tag is Not Equal to the plaza.
Then a second action, Node Changed to set the volume to 1.00, if the tag does Equal plaza.
Put this in a container with the ID "sound_controul" so you know where the actions are that control the sound.

You can then use similar actions to trigger play and stop/pause sounds for the individual locations.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
SantiagoIlustre
Posts: 2
Joined: Tue Jul 11, 2023 4:27 pm

Hi Hopki,

Thanks for your reply, the option to add the background sound to each node seems to be working OK (with the exception of the sound being stopped and played from the start when coming back from a node with a different background sound) and is the option that I'm leaning towards.

However I also tried to add sounds for individual locations and it doesn't work as intended, since for some reason the actions that were set-up are not working as intended and would like to understan why. I'm sharing a video and locations of the nodes to better illustrate whats happening: https://youtu.be/64B28CKimGs?t=8
nodes_locations.jpg
nodes_locations.jpg (43.73 KiB) Viewed 4150 times
The sound element of the plaza is added on node 1. Then I have another sound element added to node 15 that's supposed to play on nodes 14, 15, 16, 17 and 18, with actions configured to that end; however, the sound will only play if the node 15 has been visited. Actions seem to be working properly only after that.

Here's a picture of how the actions are set:
actions.jpg
actions.jpg (134.56 KiB) Viewed 4150 times
So why is the sound element on node 15 not playing when entering a different node (say node 17) when the action is set-up to play said element if the node has the tag?

Sorry if this post is overly long and thanks for your time, Hopki.
User avatar
dePassage66
Posts: 86
Joined: Mon Mar 20, 2023 11:19 am

Hi SantiagoIlustre,

I'm facing the same problem.
Did you solve it?

Regards, Jean-Paul.
pour Visites Guidées Panoramiques https://www.visitespanoramiques.com/index.html
(sorry, no translation available yet!)
Post Reply