New Media Player Features in DesktopX 2.4

Why you should use DXPlayer for your next media player widget

Note: This article refers to changes introduced in the DXPlayer plugin distributed with DesktopX 2.4. If you don't have that version, upgrade now! (trial version here - registered users can use the support emailer to get a link, or download via Stardock Central like ODNT subscribers)

I know a lot of skinners feel like they have to be programmers half the time. This has been especially true in DesktopX - it seems you have to know VBScript inside-out if you want to do anything really cool. One of the biggest issues people have is in the area of media player widgets - it seems like you have to do an awful lot just to play some music!

Well, the DXPlayer plugin takes the hassle out of creating a media player widget. No longer do you have to work out how to call obscure COM objects, paw through software development kits, puzzle over obscure script errors, or just look on in wonderment at the objects of people who did get it all to work, somehow. You can let DXPlayer do the hard work of talking to the player, while you work on the equally hard (but more fun!) work of making your objects look and feel just as you want them to.


Users can choose the player they wish to control with DXPlayer

But best of all, you don't have to restrict users to just using the player you've written code to support. With DXPlayer, you can make it while using your favourite player, and it works with whatever users choose to use. On your end, you choose from a selection of features, like "Play the current track", "Open a file", or "Display the time left with a gauge drawn using these images". DXPlayer then figures out what player is currently loaded, and makes it so that when the user clicks the play button, it's as if they had pressed play in the current player. If they don't like the player that it chose, they can force it to use any of the supported players installed on their system. It's that simple!

"Wait a minute!", I hear you saying, "How can one system work with all the different media players around? Don't they all do different things?". Well, no! The thing that makes DXPlayer work so well is that due to a certainly amount of what I like to call 'competitive feature-matching' in the media player market, the number of differences between player feature sets is surprisingly small.

Even more conveniently, the more popular a feature, the more likely it is that players will have it! For example, Winamp, Windows Media Player and iTunes all feature a 10-band parametric equalizer. Both Winamp and iTunes offer a pre-amp, and iTunes and Windows Media Player offer a selection of EQ presets, as well as information on the album, artist, genre and composer of a piece of music. Everything has start/pause/stop/next/previous/title/duration, and that's all you need for a basic remote. And if a feature isn't supported on a player, the failure is handled gracefully - for example, lack of volume control would just result in the volume track-thumb not appearing.

For those of you who may have tried DXPlayer and found it lacking in the style department, look again. Recent improvements have allowed the use of native DesktopX text. Yes, that's right - all you have to do is select what you want to display, and then change the DesktopX text settings - including colour, shadows and antialiasing - just as you would do for any other text object. You can convert existing DXPlayer text objects to native text just by ticking the appropriate checkbox in the DXPlayer Display settings window.

Other new features - all backwards-compatible with your old DXPlayer widgets - include:
  • iTunes support!
  • Expanded Winamp and QCD support (duration, position, volume, pan and EQ controls)
  • An internal Windows Media Player control (this means your player widgets can always load and play music, even if there is no media player running)
  • The user settings dialog allowing the selection of a preferred player - even in user mode
  • Numerous other tweaks and requested features

How do you use all these nifty features? Well, instructions on how to use DXPlayer are included in the DesktopX\SDPlugins\DXPlayer.txt file, but basically just select to Add an additional property in the Object Properties window, select DXPlayer, and then click Configure to select what you want that particular object to do - or be, in the case of gauges, displays and the like.

If there's something you want it to do that it doesn't, let me know below!
38,742 views 32 replies
Reply #1 Top
Reply #2 Top
If there's something you want it to do that it doesn't, let me know below!


Well, you asked, so. . .

I would be blissfully happy and my life would be complete (okay, so maybe I am going a little overboard here) if this thing could utilize foobar2000 as the media player.

I don't know about folks here, but there is a pretty sizable foobar2000 community, so I know there are folks who use it, it is open source, really quite customizable, and the sounds quality is second to none really. I haven't used any media player that allows as much control over the way the music sounds. Oh, very resource lite as well.

That is my only real request, some foobar2000 love around here. Thanks for the great work on this though. It has really come a long way.



Edit: This could also address one of the only complaints I have about foobar2000, no real good skin support. You can alter the way it looks to a degree, but none of the freeform stuff like you see for WMP or Winamp. Being able to make widgets that looked like whatever you wanted, and have them run off foobar2000 would really be a hit with the users I think.
Reply #3 Top
Thanks for the feedback, BlueDev! I had downloaded Foobar2000 with this idea, but got diverted. I have had a little investigation, and it seems that there is no real interface to support such remote control/information gathering. This means that someone will have to write one. I think it would have to be someone in the Foobar2000 community as I do not know the API, and really am not all that interested in writing both sides of an interface, one of which I don't know at all.

There is a recent forum posting on the subject. I would highly encourage you and anyone else who wishes for Foobar2000 support to be in DXPlayer to chime in there. The more users want it, the more incentive there is for the Foobar2000 community to develop such an interface.

For the time being you may find the foo_winamp_spam or foo_remote plugins of use (to pretend that it is Winamp), but I understand that support for this interface is limited - the plugins do not implement everything. Having tried foo_winamp_spam quickly I can say that you are not able to set progress or read/write volume with it, but you can control what music is playing which may be enough . . . for now.
Reply #4 Top
Thans for the reply GreenReaper. Not knowing that much about it I just figured it was worth tossing out. I will head over there and try to drum up some more support for it from the community.
Reply #5 Top
It was indeed worth your time.

I get the feeling that the community there is pretty responsive and eager to get new users and please existing ones if possible - I guess we'll have to see how it turns out. For now, the foo_winamp_spam plugin seems to work well enough for most things.
Reply #6 Top
What I really would like to have when playing media is a cd-cover plugin or some script like there is for samurize. http://www.samurize.com/modules/mydownloads/singlefile.php?cid=18&lid=1373
Reply #7 Top
Hmm. Well, I know iTunes can have artwork associated with a track, as can WMP (although it's a bit more tricky to get it out with that). I'll have a look at the plugin and see what it does, and see if it's possible to add something like it (looks like it checks directories and the internet too - the "search the internet" thing might not be so possible for legal concerns, but files on your disk are fair game).

The end result if implemented would probably be an object that had the picture property of the current state set to the current album each time it changed.

Thanks for the suggestion!
Reply #8 Top
Thank you for the great info
Reply #9 Top
Only request I'd make is to be able to rate and show song ratings in an object. This is an excellent plugin!
Reply #10 Top
Good idea. I had that on my personal list already, had just ran out of time. Do you have any suggestions as to how to show it? I was thinking of just having it as another gauge (and you could make an image that was 5 stars wide) but I am open to suggestions.
Reply #11 Top
I would suggest a 2 image bit strip of star (for example) just showing on and off state, it might make it easier to rate songs via the plugin and would also allow for more or less than 5 stars.
Reply #12 Top
I tink it is possible to have the lyrics in the metatags of some media formats (.wma and maybe some mp3). Can the current DXPlayer have access to it? If not, I think it could be an interesting addition.
Reply #13 Top
Well, it would probably work the way gauges do now - you would provide two images, a background and a foreground, and the foreground would used linearly from 0 to 100% - so wherever you clicked it would be rated that good. So whether there are 5 or 10 or no stars would be up to the designer and it could be whatever size they wanted - the images just have to fit. However it might decide to only take input or show output in (say) 10% chunks - so that it could give 3 or 4.5 stars but not 1.242 stars. I figure an 11-point rating system (0 to 10) is enough for most people.
Reply #14 Top
paxx: There are indeed the WM/Lyrics and even WM/Lyrics_Synchronised attributes. The former may be available as part of a CD track. I don't know how widespread they are, though - I will have to have a look.
Reply #15 Top
I like the new "internal" use of WMP - but the only problem there is the lack of a playlist editor. I noticed that it does create it's own playlist, so I guess we could create our own proprietary editor's - but it would be very cool if it was integrated into the plug-in somehow (don't even know if that is possible).

Having said that, this is a great step forward for this plug-in and after dilly-dallying around with scripting for the wmp activex control I am looking forward to creating a dx media player using it.

One other thing - wouldn't it be cool to be able to pass parameters to dx widgets and then we could associate file types with them and have them run automatically, or add files to a playlist, by clicking on the music files directly from windows explorer?
Reply #16 Top
Mmm, the playlist problem is an issue. One possibility is that I just make one big object that has one. I don't think that's a particularly good idea, but it's an option. Another is that I make "Current Playlist Object +/- 0/1/2/3 . . ." text objects. These would change text each time you modified the playlist or moved around in it (including automatic progression). You could scroll up and down either with buttons or a slider/gauge, and clicking on an item would probably select, double-clicking would play (or maybe just one of those would be possible, in which case I'd probably have it select and play it). Does that idea sound reasonable, or are there any flaws that you can see in it? (note that there are already move up/down/delete item buttons)

I like the parameter idea, I don't think DX does anything like that right now but I'm sure it would be possible . . . will suggest it.
Reply #17 Top
I am not sure I fully understand what you mean about the "Current Playlist Object +/- 0/1/2/3 . . ." text objects. Is the "current playlist object" seperate from the "currently playing object"? I agree tho that componentized method of playlist depiction would offer the greatest degree of flexibility in overal design.

If it's possible I would go with click to select and double click to play - it would facilitate editing the playlist order and deleting playlist items without constantly skipping to a new track. Maybe the playlist objects could have a number of different states such as: "unselected", "selected", "playing" and "playingselected" so we could define font charecteristics for each of those seperate conditions, if that makes sense.

Another usefull feature in a media player is the ability to drag and drop files to add to/replace the current playlist. This is the method by which I prefer to populate my playlists whichever media player I happen to be using.

And finally back to the parameter idea - this feature would basically enable us to turn widgets into proper little apps. The implications are not just limited to media players. For example we could create a "todo list" widget with the ability to save data to it's own specific file extension and subsequently load those lists automatically from explorer at any given time. Or we could save lists of wallpapers from our "wallpaper changing widgets", or appointments from calendars, or... etc.

Anyway, I appreciate your efforts in developing the media plug-in and your willingness to engage with the community. Thanks alot.
Reply #18 Top
What I meant with the current playlist was that if you look at a playlist it is basically something like this, where each of the objects had the DXPlayer display type and state in the parentheses:

(Selected - 2) Pink Floyd - Money
(Selected - 1) Kermit - It's Not Easy Being Green
(Selected+Playing state) Various - The Crystal Method
(Selected + 1) REM - Losing My Religion
(Selected + 2) Spirited Away - Chihiro's Theme

The Crystal Method is selected here. If we moved onto the next track (either with a "shift playback to next track" button or automatically), it would go onto:

(Selected - 2) Kermit - It's Not Easy Being Green
(Selected - 1) Various - The Crystal Method
(Selected+Playing state) REM - Losing My Religion
(Selected + 1) Spirited Away - Chihiro's Theme
(Selected + 2) Art Garfunkel - Bright Eyes

If you clicked on the one behind the currently playing one, it would probably change to:

(Selected - 2) Pink Floyd - Money
(Selected - 1) Kermit - It's Not Easy Being Green
(Selected) Various - The Crystal Method
(Selected + 1 + Playing state) REM - Losing My Religion
(Selected + 2) Spirited Away - Chihiro's Theme

I agree with the states idea, if it can be done that way.

Drag and drop . . . hmm. May be possible. I will ask. Right now I think that would involve subclassing the window which is something I'd like to avoid if possible, but it may not come to that. Right now the Playlist window for the WMP object is drag-droppable onto, I could just make it show that in all cases, not just when the playlist is empty.
Reply #19 Top
hehe, interesting example playlist you came up with there btw

In your first example above, let's say you click on Pink Floyd (and why wouldn't you as it's a great song?) and it was the first song in the playlist. Would then selected-1 and selected-2 become empty strings? Maybe there could be another object state, "undefined", in which we could place a string of our choosing such as "******" or an empty string or whatever?

As for drag-dropping - your preferred solution sounds totally fine, just as long as we can drag into something it doesnt particularly matter what it is.
Reply #20 Top
That's just a random selection of songs from my playlist.

Typically empty strings (or rather, invalid strings) become --- in DXPlayer, but setting an undefined state is another possibility.
Reply #21 Top
I'm glad to see anti-aliasing of text is finally incorporated into DXplayer. This was one of the major drawbracks (in my opinion) of previous versions which got me started using Tiggz's brilliant WMP script. Another reason was his implementing of the drag-and-drop of playlists. I'm with Tiggz in the need for this feature to be added to DXplayer. With that included I believe DXplayer will be a great little sub-program.

Thankyous to all involved with DesktopX and the continuing development of it and DXplayer. I'm off to try out the update.
Reply #22 Top
OK. I have implemented clip rating as gauges, sliders, faders and text display. This feature is supported by iTunes, WMP (internal) and Winamp 5.04+ (with the Media Library), although there is a bug in the Winamp handling of setting - DXPlayer-altered ratings will only show up correctly in the media library after restarting Winamp.

Using either 5 or 10 stars works well for gauges (there are 11 "notches", from 0 to 10). If not set manually, the WMP rating will be derived from the number of times the clip has been played.

This feature will be in release 1.63 of DXPlayer and higher.
Reply #24 Top
sranshaft: Given the comments above, I've looked at it. I think I know how I would go about it. I have other projects that I am working on currently, and the visualization/video window container is the first thing I intend to add when I resume work on DXPlayer, but it's not been forgotten.
Reply #25 Top
I don't know if this is doable, but I'd really appreciate to be able to set DXPlayer as my default player, so that when I click on any media file, it opens directly using my widget. So I would need a script function able to detect when the player is fired or not...
I hope you'll have your visa very soon GreenReaper, you have so much work to do
Good luck for you,
Best regards