Retrovol 0.13.1 (Volume mixer)

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

Retrovol 0.13.1 (Volume mixer)

#1 Post by Pizzasgood »

retrovol-0.13.1.pet
source code
GitHub Repository

When you run it, it adds an icon to the tray. If you left click on it, it will pop up a slider which should be bound to the "Master" volume control, like the one currently in Puppy.

You can also scroll on the icon to manipulate the volume without having to click on anything.

If you middle-click, it will toggle the mute status.

If you right-click, it will show a menu with options to exit, configure, or open the main window. You can also re-run retrovol while it's already running to open the main window. In the main window you can see all the active controls (which is everything it can find by default). You can also go to File->Configure and adjust things like colors, dimensions, etc., along with choosing precisely which sliders to have it show and which order to display them.

Those settings will be stored in the ~/.retrovolrc file, in case you want to go in and change them manually.

Like Alsamixer, Retrovol doesn't so much let you modify the balance as adjust the left and right volumes independently. This is done by holding either the Shift key or the Ctrl key and then doing normal actions like scrolling or clicking a slider. Ctrl will allow you to only modify the left channel, and Shift will allow you to only modify the right channel. The slider will update on the side corresponding the the channel being modified.


There are still some things left to do. Mainly, I want to make it have multiple profiles of sliders shown, like alsamixer does. And I want to add the option to use gradient colorschemes in the sliders. Another thing is that it's not quite as easy as I'd like to use it without a mouse, so I plan to improve that a bit too.

But it otherwise works great.


If you want to replace absvolume with this, all you have to do (at least in Puppy 4.2) is edit /root/.xinitrc and replace the code that looks like this:

Code: Select all

if [ -f /usr/bin/absvolume ];then
 if [ "$MENU_BG" = "" ];then
  absvolume &
 else
  absvolume -bg $MENU_BG &
 fi
fi
with this:

Code: Select all

if [ "$(which retrovol)" != "" ];then
 if [ "$MENU_BG" = "" ];then
  retrovol -hide &
 else
  retrovol -hide -bg "$MENU_BG" &
 fi
fi
That way it will automatically be given the correct -bg option to match your JWM theme if you're not using the standard GTK color.

Note: As of version 0.10, if your GTK version is >= 2.16, you do not need the -bg option, and in fact it will be ignored.

2010.01.16: Updated to 0.2
2010.03.09: Updated to 0.3
2010.03.09: Updated to 0.4
2010.04.08: Updated to 0.5
2010.05.02: Updated to 0.6
2010.05.16: Updated to 0.7
2010.06.06: Updated to 0.8
2010.11.06: Updated to 0.10
2011.10.07: Updated to 0.11
2012.02.06: Updated to 0.12
2013.05.10: Updated to 0.13
2013.05.10: Updated to 0.13.1
--
Attachments
main.png
(11.94 KiB) Downloaded 21979 times
tray.png
(18.12 KiB) Downloaded 21866 times
Last edited by Pizzasgood on Wed 15 May 2013, 01:31, edited 13 times in total.
[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
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#2 Post by jemimah »

This is awesome! It actually detects which mixer interfaces you have. I will put it it Puppeee straight away!

One minor quip, the mixer window doesn't resize if you have too many interfaces to fit.
Attachments
retrovol.jpg
(24.18 KiB) Downloaded 15774 times

magerlab
Posts: 739
Joined: Sun 08 Jul 2007, 20:08

#3 Post by magerlab »

there is Configure option in File dropdown menu and it's possible to set window size and active channels

very nice app

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#4 Post by trapster »

Sweeeet. Awesome
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#5 Post by BarryK »

Pizzasgood,
Really nice!

I posted about Retrovol on my blog:

http://bkhome.org/blog/?viewDetailed=01325

I also made a request, quoted here:
I would like to make a request. Could you add a commandline option to bring up the mixer immediately -- and it would have to run with some other name than "retrovol" so that it doesn't get swallowed by the JWM tray. That would be really neat, then I can have a menu entry for the mixer.
[url]https://bkhome.org/news/[/url]

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

#6 Post by Pizzasgood »

Alright, will-do. I've been intending to do something like that anyway. Actually, I was thinking of setting it up so that instead of running another instance it would just activate the main window's visibility (which is all that happens when you right-click the icon). Then there wouldn't be an issue with names.

I'm on the final stretch of my vacation ATM and will be spending tomorrow on a bus, so I might not get to it until sometime next week. Probably Tuesday.

Glad to see people like it.
[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]

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

#7 Post by disciple »

Almost what I always wanted :wink:
Thanks so much.

There seems to be a bug in the window size configuration. e.g. I have specified a size of 459x179, but the resulting window is 411x85.

You might like to consider adding the ability to toggle between showing all the controls and just showing the ones selected in the Hardware tab... although maybe a better approach would be to have the ability to switch between multiple profiles.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

#8 Post by Pizzasgood »

Yeah, that's on my todo list too. I want to add something like alsamixer has, to show all input, all output, or both, plus a fourth choice that uses the user's custom settings.

I'll have to take a look at the window size code. It's been a while since I wrote it, so maybe something broke.
[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
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#9 Post by HairyWill »

It works for me, very nice. I see that you allow the user complete control over the colours. As you are using gtk anyway, how about an option to just use the gtk theme colours?
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

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

#10 Post by Pizzasgood »

Aye aye cap'n!
[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]

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#11 Post by Sylvander »

Downloaded the pet file and checked it was OK using verifypet.
Installed retrovol-0.1 in BoxPup-413-k2.6.25.16

Installation seemed to go well.
Used "Ctrl+Alt+backspace->xwin" to restart window manager.
Saw no sign of retrovol.
Opened a terminal, entered the command retrovol and got the result shown in the screenshot below.
Attachments
00.jpg
(12.97 KiB) Downloaded 14910 times

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

#12 Post by Pizzasgood »

It doesn't automatically set itself up to autostart (nor disable absvolume, the one that Puppy ships with). If you go back to my first post, I gave instructions on how to adjust the /root/.xinitrc script. It's an easy cut and paste job.

The output you paste is fine: it looked to see if you had a configuration file, couldn't find it, and told you that it would use the defaults instead. Then it merrily ran. If you look in the system tray at that point, you should see it there.

Normally it would be run from the .xinitrc script as X starts, with an ampersand after it so that it runs in the background. That's what my instructions help you set up.

Alternately, you could probably symlink the binary into /root/Startup/, and then just edit .xinitrc to not run absvolume (since that would be redundant).



I'm going to have to delay working on Retrovol for a couple days. I severely underestimated how much work it's going to take to get back up to speed in Japanese. After I got out of my first Japanese class in a year and a half, I felt the need to reallocate the time I was going to spend coding to instead spend it studying frantically and kicking myself in the rear for not studying harder over break. :lol:

I'll work on Retrovol some more this weekend.
[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]

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#13 Post by Sylvander »

1. "I gave instructions on how to adjust the /root/.xinitrc script. It's an easy cut and paste job"
Too hurried, failed to notice that.
I'm running BoxPup-413, and the /root/.xinitrc file doesn't have that code to replace.
Here's all it has on absvolume [beginning on line 106]:

Code: Select all

absvolume -u 1000 &
[ -e /root/.clip_on ] && parcellite &
sleep 0.5
Should I replace that with your code?

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

#14 Post by Pizzasgood »

Yeah, but only the first line. The other two are something else, so leave them in.
[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]

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#15 Post by Sylvander »

Did as instructed; the program appears to be now working well. :D

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

#16 Post by Pizzasgood »

@disciple: I assume you got the dimensions from JWM rather than measuring them yourself? It appears that JWM lies when it comes to retrovol (or maybe GTK is lying to JWM for some reason). If you try to resize it (manually) to the smallest possible, it will call that 0x0, even though it isn't really 0x0. The numbers it shows are indexed from there, which explains why you got numbers smaller than you expected.

Try making a screenshot and measuring it that way (take into account that the dimensions you choose set the interior, not including the window decorations).


@Barry: I implemented what you wanted tonight - it will only run one instance now, and any attempts to start a second instance will just pop up the main window and then return. I haven't made a new package yet, because I want to get the i18n stuff wrapped up first. I'll probably do that tomorrow. (Of course, what's done so far is already in the SVN.)

Plus I noticed some GTK error messages today that I want to sort out. But that might just be because the GTK installation in the Puppy I'm running right now is a little iffy.
[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
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#17 Post by Pizzasgood »

Version 0.2 is uploaded, see the first post.

Changes:
  • Set it to only allow one instance.
    Adjusted configure.in so that src/gettext.h is included in dist tarballs.
    Finished tagging all strings for gettext i18n.
    Updated the pot file to include those strings.

If you look at the program's --help output, you'll see a -show option. Ignore that. I've decided that I did it backwards. The -show behavior should have been the default, and there should be a -hide option instead. I'll correct that with version 0.3 whenever I get around to that. But I'm too tired to do anything else tonight. Worked all day on my side-job. Good pay though. Better than you cheapskates give me ;).

Hmm, I need to give it a -v option sometime too.


Oh, and those errors I mentioned above only happen in that installation. I don't see them in a normal Puppy. Apparently in the version of GTK I'm using, one of the features I used has been deprecated. Will have to look into that for 0.3 also.
[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]

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

#18 Post by disciple »

(or maybe GTK is lying to JWM for some reason)
I think maybe it is a JWM issue. xwininfo tells me the same size as in the Retrovol settings.

For some reason I thought you said we could control the balance by right-clicking or shift-clicking on the slider or something. But I think I might have imagined it; I can't find any way to control the balance with Retrovol. Is that right?
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

#19 Post by disciple »

Interesting... it survives through `jwm -restart`, but unlike parcellite it doesn't survive if I exit jwm and then restart it (Without exiting X of course).

Code: Select all

(retrovol:7181): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkWidget'

(retrovol:7181): Gtk-CRITICAL **: gtk_widget_get_display: assertion `GTK_IS_WIDGET (widget)' failed

(retrovol:7181): Gdk-CRITICAL **: gdk_xid_table_lookup_for_display: assertion `GDK_IS_DISPLAY (display)' failed

(retrovol:7181): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkWidget'

(retrovol:7181): Gtk-CRITICAL **: gtk_widget_get_display: assertion `GTK_IS_WIDGET (widget)' failed

(retrovol:7181): Gdk-CRITICAL **: gdk_x11_display_get_xdisplay: assertion `GDK_IS_DISPLAY (display)' failed
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

#20 Post by Pizzasgood »

Nope, no balance yet. That's one of the next things I intend to do (I have my rear speakers hooked up to an amp, so I adjust their balance there, but I have to do my front speakers through software. So I need this too.). I'll see if I can figure out the JWM survival thing sometime too.

For now though I'm taking a break from Retrovol and instead focusing on QwikLinK - a simple program to let me load programs onto the microcontroller boards we use in the "Embedded Microcontrollers" class I'm a TA for. I have two boards from there, but currently I have to use the Windows program QwikBug that a former student wrote to program them (or I could use the PicKit 2 programmer, which I believe there is Linux software for, but it would be simpler to just use the serial port like QwikBug). QwikBug requires the .net framework and I don't feel like loading that beast onto my already cramped laptop and trying to get it running in Wine. So I grabbed the source code and I'm working on reimplementing the basic features (not the debugging stuff) in C++. As of tonight I think I have it mostly done, it just needs some more safeguards. Except I don't have the chip with me to test with so I'll have to wait until Monday (visiting my grandparents this weekend.)
[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]

Post Reply