Skin with volume control

Post Reply
User avatar
Hopki
Gnome
Posts: 9354
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Skin with volume control

Post by Hopki » Thu Jan 09, 2014 6:50 pm

Hi,
Been asked about volume control and sound.
Please find attached a project that uses a set of rectangles with one being used to display the volume level.
You will see that the volume up and down buttons not only increase/decrease the volume by 0.2 each click they also move the the rectangle volume_meter side to side using the change relative position action.
A node marker has been used with an init action to set the main sound channel to volume level 0.4. which is where the volume_meter rectangle starts. Otherwise the sound level and meter would be out of sync.

The Play, Pause and Stop buttons actually reference the sound file rather then the main sound channel. So if you had other sounds they would not be effected by the buttons but the volume level would be.
The container Controls can be copied and pasted in your own project and uses the simplex button scheme.

Regards,
Hopki
Attachments
HTML5_sound.zip
(3.21 MiB) Downloaded 706 times

User avatar
Laurent B
Posts: 76
Joined: Wed Aug 25, 2010 11:33 am
Location: France
Contact:

Re: Skin with volume control

Post by Laurent B » Fri Jan 17, 2014 10:53 pm

thank you :D
Laurent BIZIEN Photographies
MacBook Pro 2,6 GHz Intel Core i7 : Sierra 10.13.6 - Pano2VR 6.0 beta 3 pro.

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: Skin with volume control

Post by Goshi » Thu Feb 28, 2019 12:30 am

Hi Hopki,

this is exactly what I was looking for, helped a lot. Is there also a possibility to display a progress play-bar of the sound file, so the use can scrub through the file (jump to different points). I have audiofiles which are kind of long and sometimes what the user want is to jump to the middle of the soundfile.

Thanks for support or help
Greetz G0shi

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: Skin with volume control

Post by Goshi » Thu May 30, 2019 12:56 am

So here is how I solved my problem above,
I was adding progress bar with controlls. It works fine when the node is loaded, it auto starts to play, the controls are working you can pause and continue, nice! But when the progress bar reaches the end, it doesn´t jump to the beginning, but the sound is starting from the beginning. This is bad for the user, because often they loosing orientation in the long audio files.

Any idea how to fix this? I´m playing it via _background (there is my narrator located, whose is mutable)
Greetz Goshi

User avatar
Hopki
Gnome
Posts: 9354
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Skin with volume control

Post by Hopki » Thu May 30, 2019 9:58 pm

Hi Goshi,
Hmmm odd, if the seek bar has the background sound selected then it should jump back when it restarts.
Please find attached a project that has two nodes and two different background sounds, all be it the same but one is mono and the other is stereo.
Regards,
Hopki
Attachments
BgSound.zip
(745.71 KiB) Downloaded 21 times

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: Skin with volume control

Post by Goshi » Fri May 31, 2019 11:18 am

Hi Hopki,
this is the way how I implemented it in my tour.

In your example, the audio starts autoplay and also loops (That´s the way I want it, too), but if the audio finishes the playhead of your seekbar is on the end and doesn´t jump back to the beginning. (But the audio starts from the beginning)
in Firefox

I tested on ie, there it works
I tested it on chrome, there it works
I tested on mobile safari, there it works

So it seems to be a problem with firefox, any tip or hint to solve this?
Thanks for your help!

User avatar
Hopki
Gnome
Posts: 9354
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Skin with volume control

Post by Hopki » Fri May 31, 2019 4:02 pm

Hi Goshi,
I can confirm this is only on Windows, Firefox on the Mac works ok.
I will bug track back to our developers but I suspect its a bug in Firefox on the Windows build.
Regards,
Hopki

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: Skin with volume control

Post by Goshi » Sat Jun 01, 2019 2:34 am

Okay,
thank you!

User avatar
mark
Posts: 34
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

Re: Skin with volume control

Post by mark » Sun Jun 02, 2019 7:06 pm

I was looking for an updated sound component and found this thread. I downloaded Hopkis latest BGSound and on my Mac with Firefox here the Sound is played automatically if i uncheck the SecurityFunction in Firefox (Autoplay Audio at Start) but the Sound won't be looped. If the security option is checked sound starts only after first mouse interaction.

On safari the same project starts and loops the sound but also only after first interaction.

I hoped to finally integrate sound control in my simplex-skin...

Mac: 10.14.5
Firefox: 67.0
Safari: 12.1.1 (14607.2.6.1.1)

User avatar
Hopki
Gnome
Posts: 9354
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Skin with volume control

Post by Hopki » Mon Jun 03, 2019 1:32 pm

Hi Mark,
Can I check with you, you are saying with Firefox set to autoplay the sound plays but does not loop.
Deselect the security function in Firefox, the sound will not play until you have started it with the mouse but it then loops?
Regards,
Hopki

User avatar
mark
Posts: 34
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

Re: Skin with volume control

Post by mark » Mon Jun 03, 2019 8:04 pm

Just to be sure i tried it again: With deactivated security function i need to interact first, then the sound starts automatically but doesn't loop. Activating the security function i have to interact and then it also doesn't loop.

With safari the sound starts and loops as intended.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest