Retrovol 0.13.1 (Volume mixer)

Audio editors, music players, video players, burning software, etc.
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#151 Post by disciple »

Oh, I think I see what you mean about the mute. If you slide the volume down to zero it just turns the volume down, even though the tooltip says it is muted. To get a true mute you need to middle click on the tray icon, or uncheck the check box in the "full window".
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#152 Post by disciple »

Hey, has anyone else noticed this?:
If the volume is at 0% or 100%, scrolling the mouse wheel over the tray icon often does not have any effect. After left clicking on the icon and then clicking again to close the slider, scrolling over the icon always works. Also, if the volume is not at 0% or 100%, I think it always works.
It looks like a way to reliably trigger the problem is to disable the context menu and right-click twice on the icon to bring up the "full window" and close it again...
I'm wondering if it is anything to do with my tray or my GTK version or something - I'll see if I can investigate further.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#153 Post by disciple »

disciple wrote:Hey, has anyone else noticed this?:
If the volume is at 0% or 100%, scrolling the mouse wheel over the tray icon often does not have any effect. After left clicking on the icon and then clicking again to close the slider, scrolling over the icon always works. Also, if the volume is not at 0% or 100%, I think it always works.
It looks like a way to reliably trigger the problem is to disable the context menu and right-click twice on the icon to bring up the "full window" and close it again...
I'm wondering if it is anything to do with my tray or my GTK version or something - I'll see if I can investigate further.
I booted a version of slacko that I have around, and the problem didn't seem to occur with its retrovol. So I tried running my Arch retrovol in slacko and it did have the problem. So I think the problem is not the GTK version it is running against.
I thought maybe the retrovol in slacko was build long ago and therefore used eggtrayicon rather than gtkstatusicon. So I hacked the gtkstatusicon code out to force it to use eggtrayicon, and built it in Arch, and the problem still occurred.
I'm puzzled now. Could the problem somehow be the gtk version it was compiled against?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#154 Post by vicmz »

Retrovol has never worked on my computer, does it work for others? :lol: From Lucid Puppy to the very latest development versions of Precise, Retrovol doesn't do anything to the volume level -- or at least not in the Intel- or AMD-powered desktop computers I've used. I always rely on the volume control of Gnome MPlayer and DeaDBeeF, who wants to make a scientific investigation to rise/low volume when all they wish at the moment is to enjoy a video or their favourite music? :lol: Now seriously, this is the kind of bugs that make some windoze users say "aahhh, LINUX is crappy!" It'd be great to find a solution.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#155 Post by Henry »

error
Last edited by Henry on Sat 23 Feb 2013, 15:57, edited 1 time in total.

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#156 Post by 666philb »

vicmz wrote:Retrovol has never worked on my computer, does it work for others? :lol: From Lucid Puppy to the very latest development versions of Precise, Retrovol doesn't do anything to the volume level -- or at least not in the Intel- or AMD-powered desktop computers I've used. I always rely on the volume control of Gnome MPlayer and DeaDBeeF, who wants to make a scientific investigation to rise/low volume when all they wish at the moment is to enjoy a video or their favourite music? :lol: Now seriously, this is the kind of bugs that make some windoze users say "aahhh, LINUX is crappy!" It'd be great to find a solution.
hi vicmz

right click on the retrovol tray icon and choose 'config window' then click on the 'hardware' tab and try changeing hw:0 to hw:1 or visa versa.....

any luck?
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#157 Post by Henry »

error
Last edited by Henry on Sat 23 Feb 2013, 15:59, edited 1 time in total.

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

Re: Volume control curve

#158 Post by Henry »

Forum seems to be not working right. Anyway, I have no comment for disciple.

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#159 Post by vicmz »

666philb wrote: hi vicmz

right click on the retrovol tray icon and choose 'config window' then click on the 'hardware' tab and try changeing hw:0 to hw:1 or visa versa.....

any luck?
Nope. Everytime I do it Retrovol crashes and exits.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Retrovol 0.12 (Volume mixer)

#160 Post by L18L »

vicmz wrote:Retrovol has never worked on my computer, does it work for others? :lol:...
Sometimes but not always.

aplay /usr/share/audio/2barks.au
Clicking up and down there is no difference in Volume
aplay /usr/share/audio/2barks.au

Right klick > Config window > tab between main and hardware (don't see it in English at the moment) > 3rd row

change from wrong
32: Master Playback Volume
to
9:PCM Playback Volume
Apply

and sound volume becomes different

Glad for being able to control sound volume now :lol:

hi vicmz
using that
any luck?

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

Re: Retrovol 0.12 (Volume mixer)

#161 Post by Henry »

L18L wrote:Glad for being able to control sound volume now :lol:
Some of us are easily pleased, happy to have the thing work. Then there's me. . . I just reread this thread through from the beginning. It's been an interesting and arduous path with seemingly most everyone chipping in with pizzasgood to get here. Well, we're not there yet.

In response to a recent question given me by disciple:
Henry wrote:
"That the curve is so crowded at the top is perhaps not so bad as the lack of a true mute."

It has a "true mute" as far as I can tell. Am I missing something, or are you?
As I see it there are two things still wrong with retrovol:

1. It has a linear "taper," not logarithmic. Nearly every volume control has a curve such that it "gives an approximately equal change in perceived volume for each equal slider increment."

2. It has a false mute indication, the red x popping up at the lowest visual segment, but not at zero volume.

When I pointed this out to pizzasgood in Feb 2012 he said:
"If anybody is interested in having it changed right now, there are only two lines of source code that would need adjusting. Otherwise, you'll have to wait until I get around to adding it proper, which is more work since I want it to be optional - I'm kind of busy lately so I might not work on it for a week or two. Also, this hasn't been tested thoroughly - it is possible that in some situations near the maximum and minimum volume levels you might have trouble getting it to completely max (or min) out. I will test that more rigorously when I implement it for real.

Anyway, the changes are to the alsa_classes.cpp file. The lines to change are 161 and 167, in the scale_out and scale_in functions.

Here is the original code: Code:
//this is used internally to scale a number to be from 0-100
int Element::scale_out(int num){
if(max-min==0){ return(num); }
return(ceil(100.0*(num-min)/(max-min)));
}
//this is the inverse of scale_out; it's used to take a 0-100 number and put it
//into the proper scale for the element to understand
int Element::scale_in(int num){
if(max-min==0){ return(num); }
return(floor((num*(max-min)/(100))+min));
}


And here is the modified code: Code:
//this is used internally to scale a number to be from 0-100
int Element::scale_out(int num){
if(max-min==0){ return(num); }
return(ceil(pow(100.0, (num-min)/(double)(max-min))));
}
//this is the inverse of scale_out; it's used to take a 0-100 number and put it
//into the proper scale for the element to understand
int Element::scale_in(int num){
if(max-min==0){ return(num); }
return(round((log(num)/log(100)*(max-min))+min));
}



And here is the diff, if you prefer that format: Code:
--- src/alsa_classes.cpp (revision 181)
+++ src/alsa_classes.cpp (working copy)
@@ -158,13 +158,13 @@
//this is used internally to scale a number to be from 0-100
int Element::scale_out(int num){
if(max-min==0){ return(num); }
- return(ceil(100.0*(num-min)/(max-min)));
+ return(ceil(pow(100.0, (num-min)/(double)(max-min))));
}
//this is the inverse of scale_out; it's used to take a 0-100 number and put it
//into the proper scale for the element to understand
int Element::scale_in(int num){
if(max-min==0){ return(num); }
- return(floor((num*(max-min)/(100))+min));
+ return(round((log(num)/log(100)*(max-min))+min));
}
//this will grab the highest value in the element
int Element::get(){

If you wanted some other scaling formula, these two functions are where you'd define it.
Too bad he didn't do it if it was so simple. (I am not a coder, sorry.)

In the screen slider it's desirable for the end limits to represent zero (mute) and maximum sound level. If it's not possible we shouldn't say so.
Last edited by Henry on Mon 25 Feb 2013, 11:20, edited 1 time in total.

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

Re: Retrovol 0.12 (Volume mixer)

#162 Post by vicmz »

L18L wrote: Right klick > Config window > tab between main and hardware (don't see it in English at the moment) > 3rd row

change from wrong
32: Master Playback Volume
to
9:PCM Playback Volume
Apply

and sound volume becomes different

Glad for being able to control sound volume now :lol:

hi vicmz
using that
any luck?
Wow :shock: :shock: :shock: :shock: :shock:
Thank you :lol: :lol: :lol:

Now the BIG question is: if this is how Retrovol is supposed to work, why is Puppy using another setting as default? Or different CPUs have different settings? :?: :?: :?: :?: :?: :?:
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

Re: Retrovol 0.12 (Volume mixer)

#163 Post by Henry »

vicmz wrote:Wow :shock: :shock: :shock: :shock: :shock:
Thank you :lol: :lol: :lol:

Now the BIG question is: if this is how Retrovol is supposed to work, why is Puppy using another setting as default? Or different CPUs have different settings? :?: :?: :?: :?: :?: :?:
It's not as serious as that. Retrovol works well except for these human factors considerations. I use it a lot.

Pizzasgood has been with puppy since the beginning and has done some great stuff, including retrovol. He has not been on the forum for about a year. I keep hoping he will check in again.

Hint: The retrovol source is available at the begining of this thread.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Re: Retrovol 0.12 (Volume mixer)

#164 Post by disciple »

vicmz wrote:
L18L wrote: Right klick > Config window > tab between main and hardware (don't see it in English at the moment) > 3rd row

change from wrong
32: Master Playback Volume
to
9:PCM Playback Volume
Apply

and sound volume becomes different

Glad for being able to control sound volume now :lol:

hi vicmz
using that
any luck?
Wow :shock: :shock: :shock: :shock: :shock:
Thank you :lol: :lol: :lol:

Now the BIG question is: if this is how Retrovol is supposed to work, why is Puppy using another setting as default? Or different CPUs have different settings? :?: :?: :?: :?: :?: :?:
I think you have a weird sound card, or something is weird about your system - maybe the linux driver that is used for your chip doesn't quite know enough about it and thinks that it has controls that it really hasn't. With most cards "master playback" is the best choice.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#165 Post by disciple »

BTW, if you don't use your Line/Mic/CD inputs etc., using the PCM volume control should be fine. Otherwise you might want to set up a "Master" software volume control (the normal volume controls are hardware volume controls) - there is a howto for this on the alsa wiki. Or you might not ;)

Incidentally, Henry might also want to try configuring retrovol to control "PCM" rather than "Master". I have read that on many sound cards the master playback control is logarithmic but the PCM control is linear (or the other way around, depending on how you interpret that statement).

Also, Henry, I'll post back again when I have time - I think you have some misunderstandings/misconceptions which we should clear up.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Retrovol 0.12 (Volume mixer)

#166 Post by L18L »

disciple wrote:I think you have a weird sound card, or something is weird about your system - maybe the linux driver that is used for your chip doesn't quite know enough about it and thinks that it has controls that it really hasn't. With most cards "master playback" is the best choice.
I agree about "best choice", my only issue is that I did not know where and what to use .

In Racy 5.4.93 now
both Master Front Playback Volume
and PCM Playback Volume work.

:idea:
The sound Wizard asks:
Presumably you are here because sound does not work ?
If so, here are....

This should be enhanced by
:arrow: or because sound volume control does not work
and then hints what to try....
:idea:

... a task for sound wizard 8)

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#167 Post by disciple »

You might want to take that suggestion somewhere else where it is more likely to be seen... 
But I would have thought someone would naturally look in the retrovol settings if volume control wasn't working, not in some wizard. So the main thing would be getting retrovol not to crash.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Retrovol 0.12 (Volume mixer)

#168 Post by L18L »

disciple wrote:You might want to take that suggestion somewhere else where it is more likely to be seen...
:arrow: 3rd post at Suggestions: Wishlist for next release

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#169 Post by Pizzasgood »

Hi, long time no type :P

I just uploaded a new version. I think I fixed all of the issues that have been brought up. Summary:
  • Three options for volume scaling - linear, logarithmic, exponential
  • Auto-mute when set to 0%, can be optionally disabled
  • Does not use the muted icon unless actually muted (note to themers: added a fifth icon for 0% but unmuted: audio-volume-none.png)
  • No longer crashes if the soundcard is missing or misconfigured
  • Now updates tray slider every second just like main-window sliders
  • No more level resetting if you change the volume and then scroll on the tray icon
  • No more getting stuck at 0% and 100%
  • Now using own git repository at GitHub
NOTE: As I speak neither German nor French, the bundled localization files have not been updated with translations for the new strings that have been added. If/when somebody posts updated files, I'll release a version 0.13.1 with them included (assuming I haven't made enough changes in the meanwhile to warrant jumping to 0.14; I don't have anything planned though).

I also didn't bother to build a separate package for 4.x. The package I uploaded was built on Precise Puppy (a version or two behind the latest, if it matters). If people need it compiled for something different, well, they are more than welcome to grab the source package and see to it ;) If ./configure complains about aclocal-1.13 being missing, you can probably get things working happily by simply running autoreconf --force and then trying again. Puppy Precise used 1.11, but my Arch Linux install uses 1.13 and it bitches at me if I leave it set for 1.11. So.

If there are any issues, let me know. Or use the issue tracker on the GitHub repository.

Would-be issue posters: Please remember that if you are having issues using retrovol, try using alsamixer. If it doesn't work with alsamixer either, then it isn't an issue with retrovol, but rather your overall audio configuration.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#170 Post by Karl Godt »

No longer crashes if the soundcard is missing or misconfigured
:)
Was looking forward for it.

Works, if the main kernel driver (snd_hda_intel in my case) is unloaded when retrovol is launched .

But does not work if /usr/sbinalsaconf or /etc/init.d/[10]*alsa stop are launched, which would both unload all or most sound modules . :D
terminal1 wrote:# retrovol
Control hw:0 open error: No such file or directory
Segmentation fault
terminal2 wrote:# alsaconf ##hit first dialog cancel to quit program
# lsmod | grep snd
snd_page_alloc 4765 0

Looking forward for 0.14 :D

Nevertheless retrovol is the mixer of my choice, especially to enable the front speakers .
8)

Post Reply