Skip to main content
Topic: Porting WinCue to Foobar2000 (Read 6735 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Porting WinCue to Foobar2000

OK, so I've decided I wanna do it (or at least try), but then I get this problem: The SDK is so poorly documented and I have no clue which of the twenty included projects I should look into to figure out how to plug my stuff into Foobar2000. Any suggestions where I should start looking?
Anders Sandvig
www.wincue.org - winamp playlist manager & minidisc recording tool

Porting WinCue to Foobar2000

Reply #1
Try to be more specific. What exactly your plugin needs to do?


Porting WinCue to Foobar2000

Reply #3
I've a had a short look at the features page on wincue.org, so here are some hints that may IMHO help you getting started with foobar2000.

foobar2000_sdk_helpers:
various helper classes and functions mostly for UI implementation (if you're creating a standard Windows UI).

database:
  • classes: metadb, metadb_handle, file_info
  • projects: foo_search_ex, foo_albumlist, foo_infobox_simple
playlist/playback:
  • classes: playlist_oper, playlist_callback, play_control, play_callback
  • projects: ? (some functions used here and there)
And don't forget to look at the classes and functions in the pfc and utf8api libraries.

Porting WinCue to Foobar2000

Reply #4
Sorry about that, I usually have a link to the site in my signature, but forgot I didn't at this board as I just registered.

For now I'm working on a general abstraction layer for controlling media players. I want to make a Foobar2000-implementation of this layer, allowing me to control the player (play, pause, stop, next, prev) and manipulate the playlist. Which part of the SDK should I look into to find information on how to accomplish this?

Once I have the implementation for Foobar2000 and Winamp I will modify the WinCue plug-in to use this abstraction layer to interface with its player instead of the Winamp-only interface used today. Next I need to make a version of WinCue that is actually a Foobar2000 plug-in.
Anders Sandvig
www.wincue.org - winamp playlist manager & minidisc recording tool

Porting WinCue to Foobar2000

Reply #5
OK, playlist manipulation functions are located in the playlist_oper interface. Playback control works through the play_control interface. Note that to use these interfaces directly (they are foobar2000 services), you'll need a foobar2000 plugin. If you want to use Windows messages to communicate with the player (for whatever obscure reason, you shouldn't need this since you want to create a foobar2000 plugin, right?  ), you should have a look at foo_remote or foo_winamp_spam. The latter implements parts of the native Winamp API, but I don't know if it is still being developed.

On a side note, I'd be interested to know what WinCue can do, that is currently not possible with foobar2000. foobar2000 has a built in database, and there already are plugins for searching in it. The effect of DelayPlay can be achieved by using foo_dsp_pause. Titleformatting is an inherent ability to foobar2000.
What seems to be missing is AutoCue and automatic playlist/directory reloading. Of course I don't know all the features of WinCue, so please enlighten me.

Porting WinCue to Foobar2000

Reply #6
Honestly, I don't know, I didn't understand the first thing of how to use the Foobar2000 interface. It's just so user-unfriendly. One of the reasons I want to port it however Is to enable the use of the tcp/ip control protocol for controlling the player and searching in the media library, also because people have asked about it.
Anders Sandvig
www.wincue.org - winamp playlist manager & minidisc recording tool

Porting WinCue to Foobar2000

Reply #7
The intent of the fb2k SDK is to be powerful, not necessarily user-friendly. It is well-designed, and very extensible, however, the cost is that it is difficult to learn. I've begun to understand it lately, but it's taken a while for someone who wasn't fluent in C++ to figure out. Oh, and it's only accessible to users of C++, I'm pretty certain.

Porting WinCue to Foobar2000

Reply #8
Quote
The intent of the fb2k SDK is to be powerful, not necessarily user-friendly. It is well-designed, and very extensible, however, the cost is that it is difficult to learn. I've begun to understand it lately, but it's taken a while for someone who wasn't fluent in C++ to figure out. Oh, and it's only accessible to users of C++, I'm pretty certain.

I wasn't talking about the SDK, I was talking about the program. Even if the SDK is bad (which I don't think, I just thinkg its poorly documented), that's sort of OK since I'll eventually get it once I bother to spend some time looking into it. The user unterface being bad is a bigger problem though, at least for me, cause I haevn't got a clue what Foobar2000 can do or how it can do it.
Anders Sandvig
www.wincue.org - winamp playlist manager & minidisc recording tool

Porting WinCue to Foobar2000

Reply #9
Quote
The user unterface being bad is a bigger problem though, at least for me, cause I haevn't got a clue what Foobar2000 can do or how it can do it.

Erm... It's impossible to document this, because the architecture is so extensible that plugins could be theoretically coded to do anything. Literally.

Feature list (highly incomplete):
  • Plays virtually every music format under the sun.
  • Can convert to any other arbitrary format via the foo_clienc plugin
  • Allows several DSP plugins to be chained
  • Has sample-accurate seeking
  • Supports multi-track containers (ZIP files, CUE files, etc)
  • Creates and stores database of music and all related metadata.
  • Contains highly extensible title formatting language for manipulating tags (TAGZ)
  • Completely replaceable interface plugins.
  • Intelligent visualization architecture.
  • Supports ReplayGain (stored via metadata and locally in file if available).
  • Unified tagging format to allow tagging of any file regardless of tag format, transparently.
  • Supports transparent reading from remote sources (ie. HTTP).
  • Full Unicode support (and many hacks to assist in unbreaking the broken Unicode forced on files by other programs).
All its capabilities are listed in Preferences. I'm not sure what you're looking for when you "haven't got a clue what foobar2000 can do", but maybe you could add to this list what you find it can do. There isn't a hell of a lot it can't do with audio files, and even less that it couldn't do with a proper plugin.

There are two lists which contain everything that fb2k can do: Core/Context menu items and Core/Main menu items. That's every command it's capable of. Now, there are some functions which use more than one command, so you may need to think a little, but that's everything.

I'd recommend playing with the "Special" build on the bottom of the downloads page, as it's got the most features.

Porting WinCue to Foobar2000

Reply #10
I think you missed my point. I wasn't speaking of functionality, I was speaking of usability, but never mind. Here's a question I would like to know the answer to:

How can I do this in Foobar2000?

1) Set up a list of folders that will be scanned for available media files and possibly automatically rescanned/updated when any files change in any of the folders.

2) Configure a (prioritized) set of rules on how to extract (guess) metadata from the file and pathnames of the files in the above mentioned folders, given they don't have any metadata attatched to them (i.e. in tags)

3) Present the results of the above mentioned scan in a linear list ordered by custom-defined criterais (such as by path and filename, by title/description, etc.)

4) Set up customized title formatting scheme on the above mentioned list based on path, filename, file type and other metadata (like the TAGZ library mentioned earlier)

5) Perform quick(!) searches on the above mentioned list based on path, filename and title/description.

6) Perform (presumably a bit slower) searches on the above mentioned list based on metadata such as artist, album, genre, file size, track length, etc.

7) Add a selected portion (anything from one to all) of the search results to the playlist at the chosen location (i.e. after the current track, at the bottom of the playlist, replace the current playing track, etc.)

8) Present the above mentioned functionality to a possibly inexperienced user in an easy-understandable way, making the person able to control his/her music playback and selection in a simple way.

9) Limit the above mentioned user interface in a such way that regular users can not alter the playback state, delete entries from the playlist, control the volume or any other (player) operation on which the administrator (person configuring the interface) has put a restriction.

10) Control playback, volume, panning and similar functionality, manipulate playlists and perfrom searches in the above mentioned folders (Media Library) over a TCP/IP connection.

If you can do all this with Foobar2000, please let me know so I don't waste my time developing this myself!

BTW:
I know you can't do all of that with Winamp and WinCue today, but that's where I'm headed anyway.
Anders Sandvig
www.wincue.org - winamp playlist manager & minidisc recording tool

Porting WinCue to Foobar2000

Reply #11
Quote
1) Set up a list of folders that will be scanned for available media files and possibly automatically rescanned/updated when any files change in any of the folders.


Not presently implemented. Several people have expressed interest, and it's probably somewhere on the to-develop list.

Quote
2) Configure a (prioritized) set of rules on how to extract (guess) metadata from the file and pathnames of the files in the above mentioned folders, given they don't have any metadata attatched to them (i.e. in tags)


Easy using TAGZ.

Quote
3) Present the results of the above mentioned scan in a linear list ordered by custom-defined criterais (such as by path and filename, by title/description, etc.)

4) Set up customized title formatting scheme on the above mentioned list based on path, filename, file type and other metadata (like the TAGZ library mentioned earlier)


Takes next to no work using TAGZ. What you'd do is retrieve TAGZ data at the beginning, and this would all be easy.

Quote
5) Perform quick(!) searches on the above mentioned list based on path, filename and title/description.

6) Perform (presumably a bit slower) searches on the above mentioned list based on metadata such as artist, album, genre, file size, track length, etc.


Use TAGZ and the DB, and you can search for both categories without any difficulty nor any speed decrease.

Quote
9) Limit the above mentioned user interface in a such way that regular users can not alter the playback state, delete entries from the playlist, control the volume or any other (player) operation on which the administrator (person configuring the interface) has put a restriction.


I doubt this is possible with fb2k. Period. Limiting the user is not what fb2k's about at all.

Quote
10) Control playback, volume, panning and similar functionality, manipulate playlists and perfrom searches in the above mentioned folders (Media Library) over a TCP/IP connection.


That could be cool, although completely separate from the rest of your design goals.

It looks like there are two elements that you want to design: one is a folder auto-scanner. The best way to code this would be to auto-scan the folders, and add to the DB, which essentially contains all the functionality you'd need for a media library and more. I wouldn't mind seeing something like this myself.

The other element is a user-interface to the auto-scanner. Perhaps there are sub-elements to the auto-scanner, like some sort of auto-tagger. I'm pretty confident the Masstagger could be back-ended to something like that to provide a lot of the functionality you want. There's also a search/display/sorter for the information the scanner provides. Stuff like that's very easy to implement, especially with TAGZ.

Really, after the auto-scanner is coded and implemented, it would be a walk in the park to add everything else. (The tag guessing stuff may be more difficult, depending on how you want it done specifically.)

The end-user limitation stuff may be more difficult to do.

Most people around here would prefer if you kept the two separate, as your user-interface ideals seem to focus on user-friendliness, rather than on functionality and power.

Edit: The user-interface is better than any other media player out there. It mimics Windows' own behaviour. There's a menubar with playback controls, seekbar, etc, adding files is done through the menubar, select and right-click on files to do things with them...

It's Winamp's interface that's bizarre. Hokey, non-standard widgets for every single function, playlist buttons that pop-up menus, buttons with two or three letter functionality explanations on them, if there is any explanation at all, rather than some arcane symbol... I know this is the way most media players look, but that doesn't mean it's either functional or straightforward.

Porting WinCue to Foobar2000

Reply #12
Quote

Quote
1) Set up a list of folders that will be scanned for available media files and possibly automatically rescanned/updated when any files change in any of the folders.

Not presently implemented. Several people have expressed interest, and it's probably somewhere on the to-develop list.

Cool, but I'll make it anyway though.

Quote
Quote
2) Configure a (prioritized) set of rules on how to extract (guess) metadata from the file and pathnames of the files in the above mentioned folders, given they don't have any metadata attatched to them (i.e. in tags)

Easy using TAGZ.

How? AFAIK know TAGZ can only be used for formatting already obtained metadata, not create metadata. Am I wrong? What I'm aming at is the possiblity to do this:

Files
\\rocky\mp3\albums\Everything But The Girl - Temperamental (160kbps)\\10 - The Future Of The Future (Stay Gold).mp3
\\rocky\upload\mp3\Chris_De_Burgh-Far_Beyond_These_Castle_Walls-Remastered-2003-EVIGHET\02-the_key-evighet.mp3

Turning Into
Artist: Everything But The Girl
Title: The Future Of The Future (Stay Gold)
Album: Temperamental
Track #: 10

Artist: Cris De Burgh
Title: The Key
Album: Far Beyond These Castle Walls (Remastered)
Track #: 02
Year: 2003

Given the files don't have ID3 tags or any other metadata embedded within them. We are currently using a list of regular expression to do this sort of matching.

Quote
Quote
9) Limit the above mentioned user interface in a such way that regular users can not alter the playback state, delete entries from the playlist, control the volume or any other (player) operation on which the administrator (person configuring the interface) has put a restriction.

I doubt this is possible with fb2k. Period. Limiting the user is not what fb2k's about at all.

Well, it FB2K is really fully programmable I don't see any reason why creating such a user interface shouldn't be possible.

Quote
Quote
10) Control playback, volume, panning and similar functionality, manipulate playlists and perfrom searches in the above mentioned folders (Media Library) over a TCP/IP connection.

That could be cool, although completely separate from the rest of your design goals.

Yes, and no. One of my design goals for this project is to create flexibility in control, that be through a local user interface or a remote computer (possibly running another user interface).

Quote
It looks like there are two elements that you want to design: one is a folder auto-scanner. The best way to code this would be to auto-scan the folders, and add to the DB, which essentially contains all the functionality you'd need for a media library and more. I wouldn't mind seeing something like this myself.

Yes, but I'm going tu use my own DB as this Media Library will be portable and not only used in FB2K.

Quote
Most people around here would prefer if you kept the two separate, as your user-interface ideals seem to focus on user-friendliness, rather than on functionality and power.

Yes, I will keep it all separate, you can have one or the other, all of it or nothing at all, it' really up to you. My plan is anyway to make this system available for a wide range of players, not just FB2K.

Quote
Edit: The user-interface is better than any other media player out there. It mimics Windows' own behaviour. There's a menubar with playback controls, seekbar, etc, adding files is done through the menubar, select and right-click on files to do things with them...

Might be true, but different users and different situations have different requirements for a user interface, I'll leave the decision to the user/developer and provide a flexible and extendable architecture to develop user-interfaces for.

Quote
It's Winamp's interface that's bizarre. Hokey, non-standard widgets for every single function, playlist buttons that pop-up menus, buttons with two or three letter functionality explanations on them, if there is any explanation at all, rather than some arcane symbol... I know this is the way most media players look, but that doesn't mean it's either functional or straightforward.

Yes, but that's just a matter of visual looks. Some love it, some hate it, I don't care.

Anyway, my plan is to develop an architecture that provides the possibility of all the bove mentioned items in any player. What I'm working on is a portable abstraction layer for media players, a portable media library and a general command line (i.e. "telnet") interface to controll it all. The abstraction layers and media library will also be available as C++ interfaces and classes so people can implment it in the way they like for their favourite player. The whole project is of course open source
Anders Sandvig
www.wincue.org - winamp playlist manager & minidisc recording tool

Porting WinCue to Foobar2000

Reply #13
Quote
Quote
Quote
2) Configure a (prioritized) set of rules on how to extract (guess) metadata from the file and pathnames of the files in the above mentioned folders, given they don't have any metadata attatched to them (i.e. in tags)

Easy using TAGZ.

How? AFAIK know TAGZ can only be used for formatting already obtained metadata, not create metadata. Am I wrong?

Canar meant that TAGZ can be used to extract this information from the path/filename to display it, it cannot be used to update metadata in the database. IMHO this is easy only for experienced users; it is probably out of scope for new fb2k users without programming skills.

Quote
Quote
Quote
9) Limit the above mentioned user interface in a such way that regular users can not alter the playback state, delete entries from the playlist, control the volume or any other (player) operation on which the administrator (person configuring the interface) has put a restriction.

I doubt this is possible with fb2k. Period. Limiting the user is not what fb2k's about at all.

Well, it FB2K is really fully programmable I don't see any reason why creating such a user interface shouldn't be possible.

Plugins can request a preferences page to be opened. This request is processed by the core, not by the currently running user interface, which makes it impossible to intercept. Of course you can circumvent this by not installing these plugins.
Edit: blocking access to preferences would be required to keep the user from changing the user interface, which would remove all those limitations the administrator has set up.

 
SimplePortal 1.0.0 RC1 © 2008-2019