Gmusicbrowser 1.1.8 RC. Ubuntu 11.10 64 bit (Gnome Shell & Unity)

Question 1: when changing the default text font size, the entire widget gets proportionately larger or smaller (including the cover art), but the number of characters in the Title, Artist & Album fields does not increase or decrease. The number of characters remains constant regardless of the font size chosen. For example, I would expect that reducing the font size from say Sans 13 to Sans 10 would result in more characters fitting on each line, but that's not the case. Is there a reason for the behavior?

Question 2: Is there a way to keep the cover size from changing when altering the default text font size?

Question 3: What is the purpose of the "Minimum Size" option which is set at 1 x 1. It seems to increment in steps of 10: 1,11, 21, 31, 41, but nothing changes in the desktop widget?

Thanks. Happy New Year.

Question 3 : Yes it's not very clear :(   In fact it's very simple, desktop widgets are just like other widgets, but you can't mode or resize them like other layouts, so the plugin settings allow you to choose it's position and size.
The minimum size is just a way to resize the layout, but like other windows, you can't resize the window pas a minimal size : the size requested by its widgets. So the actual size of the desktop widget is the maximum of the size that it requests (depends on the content of the desktop widget) and the "minimum size" that the user choose.

Question 1: The Title, Artist & Album widgets (btw don't confuse "desktop widgets" that is just a layout type, and regular gmb widgets are the component of layouts) have a default minimal size of 20 characters, that can be changed by editing the layout and using the option minsize (that can be put in pixel like minsize=200p that way it would not depend on the font)
But really, that minimum size is meant as a minimum that should most of the time be bigger, what you should do is simply resize the desktop widget so that it has more room, see Question 3.

Question 2 : If you give the desktop widget more room the cover size won't depend on the size of the text widgets. Otherwise you'll have to edit the layout, you can give the Cover widget a minimum and maximum size in its options, you can also change the packing of the widgets so that the Cover widget size is not linked to the size of the text widgets. Let me know if you need help editing the layout.


Quentin,

After reading your answers, my brain exploded. :'(
I feel like the old man in the film "Moonstruck" when he says "I'm confused". Great film if you haven't seen it.

I think the attached screenshot of the "nowplaying" screenlet in the "Screenlets" package of widgets best illustrates the text size I am hoping for in the GMB widget, in contrast to the snapshot of GMB's widget. In the Screenlet's widge the text appears to be half the size, I'm guessing the first line of text is about 10pt bold and the remaining 2 lines are 8 point italic and bold. All the lines automatically scroll to show everything on each line - something a snapshot can't show. But, that's irrelevant to my point about the size of text in GB being too large. It's too bad the Screenlets developers don't include GMB in their list of supported music players.

As for your suggestion to make your widget larger to get more text, I can't do that because the overall size of your widget is constrained by the overall size (width) of my Conky data column, which is about 240 pixels wide. I need them to line up along the right side of my screen.

Sorry, I wasn't very clear, and I've made typos (mode=>move, pas=>past) :(
Just change the "minimal size" setting to something like 240x1, and set the default font to ~8, and you will get more characters.
In this desktop widget, the size of the cover depends on the size of the whole layout, which depends on the width the Title element requests, which is 20 characters (and use size big, so a bit bigger than the default size you choose). By setting the minimum width to 240, the layout will be at least 240 pixels wide, even if you select a small font size.

as a bonus, here is a very quick desktop widget inspired by the nowplaying screenlet
[nowplaying_screenlet]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= _Cover(forceratio=1) Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)

Quentin,

Thanks for the code. I wasn't expecting that. It's very good. Since you're on a roll here. I thought I should point out that the "Screenlets" NowPlaying widget is more functional than the snapshot I included in my prior post: it contains a hidden set of control buttons that only appear when you mouse over the cover art area. Unfortunately, those transport control buttons only include back, play/pause, forward. There is no stop button and for me that is critical, so that when using ALSA, hw:0.1, I can stop playback and answer a Skype call. I believe "stop" temporarily disconnects "exclusive" audio control from the media player. In "pause" mode exclusive control of the audio is retained by the media player and I can't answer the call with Skype audio functioning properly. This is one of many reasons I prefer GMB and your widget to all other Linux based music players. ;D

So now the question becomes, is it possible for you to modify the code above so that your modified NowPlaying widget has the last track, stop, pause, next track buttons either invisible until you mouse over the cover art, or visible on top of the cover art and the track title, artist, album and play time beneath the cover art. One last suggestion, instead of showing the time in numbers, how about a thin (2 pixel?) bright green line between the bottom edge of the cover art and the track title which slowly progresses across the width of the cover art to depict the playing time. I think that would look more elegant than numbers and still provide good time feedback.

On a down note, I'm still occasionally seeing an ALSA playback error where the program stops playing between tracks saying its lost ALSA sink. Clicking play usually starts playback. I have no idea why this is happening. Screenshot of error attached, if it helps. I'm using the GMB RC.

Lou Rizzo


[nowplaying_screenlet2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)

[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= Prev Stop Play Next

[nowplaying_screenlet3]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next


nowplaying_screenlet2 pops-up a layout (nowplaying_screenlet2_popup) with prev/stop/play/next buttons when the mouse is over the cover, unfortunately currently there is no way to configure where the popup appear, it is positioned below the cover (or above/next to it, if there is no place below) Maybe I'll add options to change this.

nowplaying_screenlet3 always shows the buttons
nowplaying_screenlet4 is the same as nowplaying_screenlet3 but with centered buttons.

About the playing bar, these simply shows a progress bar with the minimal height, that may depends on your gtk theme. It is possible to skin the time bar, but currently only when using a handle, so it won't help for what you want.

QuoteOn a down note, I'm still occasionally seeing an ALSA playback error where the program stops playing between tracks saying its lost ALSA sink. Clicking play usually starts playback. I have no idea why this is happening. Screenshot of error attached, if it helps. I'm using the GMB RC.
With gstreamer, selecting the gap-less mode option might help (though it's possible it doesn't make any difference when using a random mode)
Other than that I don't know. Nowadays you really should be able to play multiple streams at the same time, why do you use "ALSA, hw:0.1" exactly ?
For me, using alsa without pulseaudio, with a simple audio chip from a ~5 years old motherboard, I can still play multiple streams. For some reason, since I disabled pulseaudio, pulseaudio doesn't want to detect my audio chip anymore, only the audio from my graphic card which I don't use. I haven't really looked into it, but I'm just thinking maybe your pulseaudio configuration could be improved.

squentin -

I took that code and made a couple of tweaks to the nowplaying_screenlet2... I put the Title/Album/Artist up top and then added menu items..


[nowplaying_screenlet2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) TimeBar

[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= 7Prev 7Play 7Next 7BMSettings
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")

[nowplaying_screenlet3]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next


Thanks for posting this as it gave me a bunch of new ideas..

I dev VSIDO

Quote from: Quentin Sculo on January 11, 2012, 21:04:48

nowplaying_screenlet2 pops-up a layout (nowplaying_screenlet2_popup) with prev/stop/play/next buttons when the mouse is over the cover, unfortunately currently there is no way to configure where the popup appear, it is positioned below the cover (or above/next to it, if there is no place below) Maybe I'll add options to change this.

O.K., I'm impressed. ;D  My personal preference is for "nowplaying_screenlet2 popup". I've attached another screenshot of all 3 variations you just coded. You can't see the popup transport controls in the first image; they appear over the area where the Title, Artist, Album text is located. They are a little hard to see until you mouse over each button and then the white outline box that appears helps visualize the selected button. Perhaps the outline color could be changed from "white" to match the color of the scrolling time bar which, in my case, is Ubuntu orange? 

QuoteAbout the playing bar, these simply shows a progress bar with the minimal height, that may depends on your gtk theme. It is possible to skin the time bar, but currently only when using a handle, so it won't help for what you want.

The time playing bar is fine, but I just had a thought - could you include the numeric time "time remaining/total time"  within the time playing bar in small, but visible type? "Time remaining" on far left of bar and "Total time" on far right.

Quote
With gstreamer, selecting the gap-less mode option might help (though it's possible it doesn't make any difference when using a random mode)

I tried gapless mode, it's only a little better. The downside to GMB gapless, is that it seems to clip off the end of too many tracks I play.

QuoteNowadays you really should be able to play multiple streams at the same time, why do you use "ALSA, hw:0.1" exactly ?

Pulse audio (which I'm not alone in disliking) down samples ALL hi-res audio to 16/44.1 or 48. It either doesn't have the ability to switch audio bitrate and depth on the fly or none of the distros (Ubuntu, Red Hat, Debian, etc., care enough to code this into their distributions. Removing Pulse Audio, as you've noted, seems to screw up everything and make things worse.

I have invested in quite a few hi-rez 24/96 and 24/192 albums purchased from HDTracks. The only way to play these hi-rez tracks at their correct resolution, intermixed in playlists with standard CD res tracks, is to set GMB to ALSA and advanced settings to hw:0,1 .  This way I bypass Pulse Audio and the software mixer and I get bit perfect output from my Asus Xonar STX digital output to my external DAC digital input. Everything plays the way it should (minus the intermittent GMB alsa sink crash). My other alternative, is to use Quod Libet as a player set up for ALSA hw:0,1 just like GMB. It works flawlessly. Unfortunately, Quod Libet while very good, isn't GMB in terms of features I need and want from a music player.

Here is he code with a Time Slider and the time how you want it...  I think this looks better

[nowplaying_screenlet2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBTime
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= 7Prev 7Play 7Next 7BMSettings 7VolumeIcon
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIcon

[nowplaying_screenlet3]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next


Here is he code with a TimeBar and the time the way you want it...  It has the total time on the left and remaining on the right that is click able to show how much time is remaining or elapsed (This is on both of these)

[nowplaying_screenlet2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBTime
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeBar(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= 7Prev 7Play 7Next 7BMSettings 7VolumeIcon
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIcon

[nowplaying_screenlet3]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next


I have also moved the Title/Album/Artist to the Top

Edit - I also added a VolumeIcon and made it scrollable to adjust the volume
I dev VSIDO

VastOne,

Sorry but I couldn't get your version of the code to work. The text layout file I put the code in "nowplaying2b_popup.layout" is not seen by GMB in the list of available widgets to add. Not sure why.


[nowplaying_screenlet2b_popup]
Window = transparent=1
HBmain= 7Prev 7Play 7Next 7BMSettings
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")


rizlaw

Can you post the file?  and the name of the file?  It is most likely due to the 2 files (your original from squentin) and mine having the same names in them and I will check them out

I dev VSIDO

With Time Slider

Name it

vastone-timeslider.layout


[nowplaying_screenlet2_vastone]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBTime
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

[nowplaying_screenlet2_popup_vastone]
Window = transparent=1
HBmain= 7Prev 7Play 7Next 7BMSettings 7VolumeIcon
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIcon

[nowplaying_screenlet3_vastone]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4_vastone]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next


With TimeBar

Name it

vastone-timebar.layout

[nowplaying_screenlet_vastone2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBTime
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeBar(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

[nowplaying_screenlet2_popup_vastone2]
Window = transparent=1
HBmain= 7Prev 7Play 7Next 7BMSettings 7VolumeIcon
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIcon

[nowplaying_screenlet3_vastone2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4_vastone2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next


These should work for you

Copy the content of these and save them to the file names and you should be good to go
I dev VSIDO

VastOne,

I did slightly rename the popup version of the file so as not to be confused with Quentin's popup work. BTW, I'm only interested in the code for the hidden popup transport buttons version.  Adding all the versions together is a bit confusing. :) I'll try again with your naming convenion and see what happens.

Edit: O.K., since what I said above, I've tried it again with the same results. I've attached both files with your recommended filenames.

I would just use the top two sections of those files then
I dev VSIDO

VastOne,

O.K. finally got the top versions to work. Here's a screen shot of both:
(top shot) nowplaying_screenlet2_vastone
(bottom)  nowplaying_screenlet_vastone2

I think the top is better, however, as you will notice, the remaining time on the far right is obscured by the white triangle in the right lower corner. Otherwise, nice work. :) As a matter of personal preference I do prefer the text info on the bottom along with the time info the way Quentin did it. But I do prefer your time slider visually, particularly because the transport button are easier to visualize without them being superimposed over the text. I guess, for now, it's a trade-off with the popup buttons: text on top makes the buttons easier to see on the bottom and text and slider on the bottom makes the buttons a little harder to see.