Page 1 of 1

Skin with volume control

Posted: Thu Jan 09, 2014 6:50 pm
by Hopki
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

Re: Skin with volume control

Posted: Fri Jan 17, 2014 10:53 pm
by Laurent B
thank you :D

Re: Skin with volume control

Posted: Thu Feb 28, 2019 12:30 am
by Goshi
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

Re: Skin with volume control

Posted: Thu May 30, 2019 12:56 am
by Goshi
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

Re: Skin with volume control

Posted: Thu May 30, 2019 9:58 pm
by Hopki
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

Re: Skin with volume control

Posted: Fri May 31, 2019 11:18 am
by Goshi
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!

Re: Skin with volume control

Posted: Fri May 31, 2019 4:02 pm
by Hopki
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

Re: Skin with volume control

Posted: Sat Jun 01, 2019 2:34 am
by Goshi
Okay,
thank you!

Re: Skin with volume control

Posted: Sun Jun 02, 2019 7:06 pm
by mark
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)

Re: Skin with volume control

Posted: Mon Jun 03, 2019 1:32 pm
by Hopki
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

Re: Skin with volume control

Posted: Mon Jun 03, 2019 8:04 pm
by mark
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.