Add sound to specific nodes

Q&A about the latest versions
Post Reply
User avatar
lucamangano
Posts: 15
Joined: Thu Feb 15, 2018 2:12 pm
Location: Italy
Contact:

hello everyone: I would like to insert a sound only to some panoramas in sequence. The other panoramas of the tour must be without sound. The sound should not start again with each panorama of the sequence but continue from the previous one.
Ideas???
Thanks a lot
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

I've put together a little sample of what I think you are after.

https://s3-ap-southeast-2.amazonaws.com ... index.html

The project has 4 nodes, nodes 1 & 4 are independent and nodes 2 & 3 are in a sequence. Nodes 2 & 3 have a tag 'sound'.

There is a 'Click to Start' button to get around the browser issue of auto start audio.

Clicking on this sets a variable 'setAudio' from False to True. The variable value is used to hide the 'Click to Start' button and screentint and show the 'previous/next' panorama buttons.

When you start there isn't any background sound in Node 1, when you click on the 'next' node button to go to Node 2 the audio starts and when you click to go to Node 3 the audio continues where it left off. When you go to Node 4 the audio stops. If you continue on or go back the audio will continue where it left off.

The 'previous/next' panorama buttons have 3 Action attached to them. The first is a standard 'Mouse Click | Open Next Panorama' for both next and previous. They also have two more Actions the first is a 'Mouse Click* | Play Media | 1 | _background. This Action has an Action Filter 'Execute action if: Tags | contain | sound. The second Action is Node Change | Pause Media | _background (this stops the background sound from starting over).

There is also a little sound volume component that appears whenever you are on a page with the tag 'sound'

Let me know if this is what you are after and I'll post the project files.

I'd be interested to see if Hopki has an alternative way to accomplish the same effect. I'm not sure if this is the most elegant way to do it :D

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

Playing around with the first example I've created another version.

https://s3-ap-southeast-2.amazonaws.com ... index.html

This project includes a 'pause' button and a 'volume' component.

If you pause the audio you can resume it on any panorama that has the 'sound' tag associated with it.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
lucamangano
Posts: 15
Joined: Thu Feb 15, 2018 2:12 pm
Location: Italy
Contact:

Hi Tony
great job!
it's probably what I was looking for, I'd like to try it.
I have a big virtual tour of a church where there are both internal and external images and I would like to insert the audio exclusively for internal images.
In my opinion your project could work well.
Thanks a lot
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Glad you liked it.

I'm writing up a tutorial now and will publish it with tutorial files.

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
lucamangano
Posts: 15
Joined: Thu Feb 15, 2018 2:12 pm
Location: Italy
Contact:

Wow, I had not guessed who you were.
Great Tony, it's a pleasure to have been helped by you.
Congratulations on your magnificent website, it so interesting!
luca
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

Thanks for the feedback on the website I'm glad you like it. I have so much content yet to stitch and publish it's a bit daunting.

I'll try and finish the tutorial asap.

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

Finally finished the tutorial "Background Sounds Playing across Specific Nodes" and you can find it at https://tonyredhead.com/pano2vr/node-specific-bg-sounds

The tutorial comes with a set of files including a Pano2VR project and skin, CSS file and an audio file. The tutorial covers the following;
  • Defining the Nodes that will play the background sound
  • Adding a Background Sound to the project
  • Add a CSS file to the project and create a ‘Click to Start’ button to work around current browser restrictions on autoplay media
  • Adding a simple ‘previous/next’ navigation element that triggers the audio
Feedback and comments are welcomed and appreciated. I wanted to post as soon as possible so I haven't had time to double check it.

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
lucamangano
Posts: 15
Joined: Thu Feb 15, 2018 2:12 pm
Location: Italy
Contact:

Tony
what to tell you? thank you, thank you so much
As soon as I publish the work I will show you
luca
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Luca,

Glad you like it. I'll be adding an additional tutorial that includes the volume and pause controls. I'll post when it's done.

regards,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
PNutPro
Posts: 6
Joined: Mon Jul 27, 2020 10:05 am

This is an older post but I am visiting this topic on a tour that I am currently working on. The idea here is fantastic; is there a way to have the sounds play automatically in certain nodes without any interaction (button click) from the user? For example, I have a tour that has a 'lobby' with multiple nodes. I want the background sound to play in the 'lobby' but stop once they step out of the lobby. Thank you.
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Yes, if you tag the nodes you can use a container with a node changed the action to play media xxx.
This action will use the action filter, Tags Contain xxx, the container can then have many actions to turn off an on sounds.
Just remember due to browser restrictions you need to first start to have a button click to start any sounds.
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/
PNutPro
Posts: 6
Joined: Mon Jul 27, 2020 10:05 am

Thank you! I got it working using these instructions (https://tonyredhead.com/pano2vr/node-specific-bg-sounds) with some modifications.

I have the variable "Lobby_Audio" attached to an empty text-box with actions for setting the variable true or false and to play and stop the media if a specific tag is present after the "Node Changed" event. A couple of issues I am running into now...

a) Because it's tied to the "Node Changed" event the audio starts over with each move while in the 'lobby'. There are 3 nodes total in the lobby; I am trying to get the audio to not start over as you move from node to node but because it's tied to the "Node Changed" tag it starts over with each move. I tried to change the Source to "Variable Changed" with a trigger of "Lobby_Audio" being "True" hoping that the music would only start over if the "Lobby_Audio" variable changed from true to false but I believe the variable is changing/resetting with each node click? (i.e. it is not a "global" variable)

b)With that audio working (mostly) I tried to copy/paste the text-box and attach it to a new variable ("Production_Audio"), with the same actions but for a different background audio file attached to a different tag and different part of the tour, but that audio will not play.

Cheers
-T
Attachments
BG_Audio.png
BG_Audio.png (97.83 KiB) Viewed 5117 times
Post Reply