Skin with volume control

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

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 1435 times
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/
User avatar
Laurent B
Posts: 79
Joined: Wed Aug 25, 2010 11:33 am
Location: France
Contact:

thank you :D
Laurent BIZIEN Photographies
MacBook Pro 2,6 GHz Intel Core i7 : Mojave 10.14.6 - 6.1 beta3b pro
Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

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

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: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

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 460 times
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/
Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

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: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

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
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/
Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Okay,
thank you!
User avatar
mark
Posts: 39
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

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: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

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
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/
User avatar
mark
Posts: 39
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

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