Showing posts with label User Interface. Show all posts
Showing posts with label User Interface. Show all posts

Make a Winamp-like layout



This post explains how to proceed to set a winamp-like layout, like announced in the previous post. It will look like this, and be behaving similarly to winamp:


1. Install the component plugin foo_facets.dll

2. Import media and disable some (I think) annoying features
Go to Menu>File>Preferences, then go to the section "Media Library"


Add the folders where your music files are, and scan it (OK, that's easy)

Disable the LibraryViewer Selection Playlist
(If this is enabled, whenever you click on an item in the search results, your current playlist loses focus)

Go to the Menu>File>Playback, then:
- Enable "Cursor follows playback"
- Disable "Playback follows cursor"

3. Prepare layout
In the Media Library Section of the Preferences, go to the "Facets" section



Click on the button "Add New" on top, then enter "Title" in the first column and "[%title%]" in the second cell.

In the dropdown menus at the bottom of the page, chose:
-Selection change: None
-Double-click action: Send to the Facet playlist, start playback
-Middle button action: Add to the Facet Playlist

Comment: The Facet Playlist will replace Winamp's "playlist editor"
"Send" means that the the clicked element (artist, track, album) replaces the current content of the playlist
"Add" just enqueue the clicked element to the playlist


3. Set-up the facets
You can download a ready-made setup, but it is better to make your own at your taste to understand everything. I will describe how to make something that looks a bit like winamp.

The layout is fully customizable. To begin customize it, enable "Layout Editing Mode" :



A UI element is an element located in a frame. Replace the two elements on the top-right by the facets by right-clicking on the vertical separator, and chosing "Replace UI Element...". Then, in the "Media Library Viewers", chose "Facets"



You should now have three columns. Add a fourth one with the option "Insert new facet" in the context menu of the element. Then Right click (and chose "Facet View") on the headers of the columns (facets) to chose the content :
- 1st facet: "Genre"
- 2nd facet: "Artist"
- 3rd facet: "Multiple columns" then "Album", then "Artist"
- 4th facet: "Multiple columns" then "Title", then "Artist"

You're done! Now put any text in the search bar above the facets, and their content updates in real-time.

4. Play with the layout
To make something like me:
-Remove the big element on the bottom-right by right clicking on a tab and "cut UI Element"
-Replace the element on the left by a "Split Left-Right"
-By right-clicking in its area, replace the element on the extreme left by a "Splitter (Top/Bottom)"
-Repeat that action
-Add "selection information / album art viewer" in the left-bottom area
-Add "Playlist renderers / Playlist View" in the left-middle area
-Replace the left-top element by "Selection information / Selection Properties"
-Insert the vertical area in the middle by "Utility / Playlist manager"

You can play with the sizes and the split, tabs, and different elements such as equalizer, vizualisations... and do anything you want.
Tip: If you have split an area and want to unsplit it, right-click on the separator and replace it with an element.

Finally, in the Playlist Manager (the vertical area in the middle), double-click on "Facet selection" to display the current playlist in the Playlist View on the left.

Regarding the display of now playing information (at the top-left corner), see that post.

Done!

Jump to file


An other awesome feature of Winamp (actually a plugin) is "Jump to file".
If you type "j" in the playlist editor, or ctrl-alt-j from anywhere else (with global hoteys), you get a box performing search in the current playlist (playlist search).

It's very easily accessible in foobar2000.

Method 1: Built-in
Go to: Menu>Edit>Search
You will get this playlist-search box, which does pretty much the same thing as "Jump to". Double click on a track, it will jump to it.


You can associate a hotkey for this in Menu>Preferences, General/Keybord Shortcuts (cf dedicated post for more details). To find the action, filter with "edit search".

NB: You can make a global hotkey. However, if you are in another application and call the playlist search, the search window will not popup over your current application, and you will have to focus to foobar2000 to use it.

It is possible to have a similar search box that popups on the top of your current application with the following method.

Method 2: component
1. You will need to install the AMIP package, and most likely the AMIP configurator from the following page:
http://amip.tools-for.net/wiki/amip/download

2. Close foobar2000, then unzip and execute the exe files to install the stuff.

3. Launch the configurator, and go to the "Search/Jump" section, just below "General". Here, you can setup the shortcut you want to trigger the "jump to" box. The shortcut is global (it is active from any application)

4. It's ready to work.


[The main (or at least original) feature of AMIP is to send the "Now playing" information to any messenger/email client / IRC client. Have a look at the configurator if you want to use this...]

Conclusion
There are less options than in Winamp (notably "Move after current"), but, I think it does the job.

Global Hotkeys!



An awesome feature of Winamp is the global hotkeys (shortcuts that work even if you are focused on another application). It is more than easy to set them up in Foobar2000!

Go to the preferences (Menu>File>Preferences), then to the section General/Keyboard shortcuts.

You just have to:
-click "Add New"
-find your action with the search filter
-press your hotkeys
-tick "Global" if you want to

We didn't even have to install any component. Foobar2000 rules!

"Most Played" and "Recently played"



It's easy to create automatic playlists containing the most played or most recently played tracks.
I said it's easy, I didn't say you don't have to install a few components!

1.Install components:
foo_playcount + foo_history

foo_playcount adds automatic data fields to the tracks, including the number of plays, or playcount (%play_count%), and the time of last play (%last_played%).

2. Advanced search
If you type, for example, "night" in the search bar above your facets, all entries containing "night" in any field will be selected. But you can restrict to one field. For example:
"
title HAS night" will only select tracks which title includes night. You can use "HAS", "IS", "NOT", "AND", "OR", "GREATER", "LESS", "PRESENT", "MISSING"....
You can learn more by clicking on the triangle icon at the right end of the search bar in the facets, then go "help".


3. Adding your "most played" list
Now open a plain search box (Menu>Library>Search) and type the following search request:
%play_count% GREATER 0 SORT DESCENDING BY %play_count%
You will have guessed that this displayed all tracks played at least once, sorted by decreasing playcount.



Then select the "[...]" button at the right of the search bar, and "Create Autoplaylist"
A new Playlist has been added to your playlist manager (vertical panel in the middle), that you can rename "Most Played" or whatever.

4. Other lists
Here are other examples of syntaxes.

%last_played% DURING LAST 1 WEEK SORT DESCENDING BY %last_played%
=> Most recently played (in the last week)

%added% DURING LAST 1 WEEK SORT DESCENDING BY %added%
=> Recently added (last week)

NOT %added% IS "" SORT DESCENDING BY %added%
=> All tracks, ordered from the most recently added

TIP: If you want to disable the recording of the statistics, just untick Menu>Library>Playback Statistics>Monitor Playing Tracks

5. Write tag in the file
By default, the playcount statistics are stored in a separate file, and not in the tags of the files. If you want, you can write these data to the files (for example, if you are about to reinstall foobar, and want to keep these data. Well, you could also find the data file. Or if you want to send the file. Or make a "backup" of your stats. Whatever)
In the context menu of any track selection, just select Playback Statistics>Write Statistics to File Tags.
I let you guess what "Import statistics from file tags" does.

6. History
If you play a track several times, the track will only be displayed once in the "recently played list". To display all plays, install the "foo_history" plugin. Then, go to the Menu>Library>History menu to tick "History".

An automatic playlist has been created, showing the play history.

That's it!

Rating



Rating the tracks (from * to ***** for example) is cool, and you can do that in two clicks in Winamp. One method to do that in foobar2000 is the use of the component called foo_playcount (also used for playback statistics).


1. Install foo_playcount.

2. Hotkeys
If you want to be able to rate a track with a hotkey instead of using the context menu (that's recommended), go to the General/Keyboard shortcuts section, and Add New. Find the actions by filtering with "stat rating". Attribute a key for each rating value (like Ctrl-1, Ctrl-2, etc.)


4. Rate tracks
Select the track, then use your hotkey or go in the context-menu (right-click on the track), then Playback Statistics>Rating> and chose your value.

It's a bit complicated to find the option in the context menu. You can make this a bit handier (and more Winamp-like) by configuring the context menu (did I say say that? everything is customizable in foobar2000...)
Go to Menu>File>Preferences, Display / Context.
There you will find the element "rating" in the "Playback Statistic group". Move it in the root folder as on the picture below.


No it just appears in the context menu of any song/artist/album:

5. Use filters and autoplaylists
You create for example a playlist of best rated tracks. Open a search box (Menu>Library>Search) and use the following syntax:
rating PRESENT SORT DESCENDING BY rating (list of rated tracks ordered by decreasing rating.)
Other possibilities include:
rating IS 3 (explicit)
rating GREATER 3 (tracks rated 4 or 5)
rating LESS 3 (tracks rated 1 or 2)
rating HAS **** (tracks rated **** or *****)
rating HAS * AND NOT rating HAS *** (tracks rated * or **)
etc.

From any of these searches, you can create an automatic playlist by clicking the [...] button on the right of the search field. A list will be created in your playlists, which you can rename. It will update in real-time.

6. Make a nice display

The ratings have numeric values, but it would be good to display them in playlists with stars or whatever. For example like this:


This is easy and a good opportunity to introduce titleformatting. To add such a column, right-click on the headers (at the top of the picture above) and chose Columns>More.
(or in the facets, right click on any facet header and Preferences)

You will get a window similar to that:

Put any name in the left column. In the right column, the content of the column is described by:
$if(%rating%,$repeat(●,%rating%),o)

Which means: if %rating% is present, repeat "●" as many times as the rating is; else, display "o"
Once you got the thing, you can change it, and customize without limits. That's foobar2000!

A complete reference for titleformatting can be found here.

7. Write tag in the file
By default, the tag (as playcount statistics) are stored in a separate file, and not in the tags of the files. If you want, you can write these data to the files (for example, if you are about to reinstall foobar, and want to keep these data. Well, you could also find the data file. Or if you want to send the file. Or make a "backup" of your stats. Whatever)
In the context menu of any track selection, just select Playback Statistics>Write Statistics to File Tags.
I let you guess what "Import statistics from file tags" does.

Conclusion:
It works. The limitations of this method are:
-I don't think these ratings will be transferred in an iPod or in another media player. However, what it does is put a field in the track tag called "rating" with a value between 1 and 5. The rating wil be kept, for example, if you transfer the file to any other system using foobar with the same config. Compatilibity should be that easy...

Dynamic Library / Folder structure



There is a plugin in Winamp called Dynamic Library. It allows the display of your library with respect to the folder structure. (I don't have a picture here, but it looks similar to the foobar2000 picture below).
In Winamp, it requires hours (well, depending on the library) of scanning first.

In foobar2k, this feature is built-in.

This is in the Album List element.

You can display it in with Menu>Library>Album List, or put it in a frame in your layout (*).

Then, chose "By Folder Structure" in the "View" option at the bottom left.

(*) Menu>View>Layout>Layout Editing Mode, then right click somewhere and replace element or insert a splitter and insert the album view in the blank panel.

Smart Views (iTunes: Smart Playlists)



In Winamp you can create so called "Smart Views", which are playlist that automatically update to always contain the tracks matching a given search query, that are displayed in a configurable way.

For example, you may want a list containing rock of the 90s. The syntax will be:
genre = "rock" AND year >= "1990" AND year < "2000"

You can do the same in foobar, in which the syntax will be:
genre IS rock AND date GREATER 1989 AND date LESS 2000

To see a full syntax reference, see that post.

Now how to do that?
1. Open a Media Library search box (Menu>Library>Search, in the default_UI)
2. Type in your search syntax
3. Use the [...] button on the right of the search field
4. Chose "Create autoplaylist"

A new automatic playlist has been created. You can rename it or whatever.

However, you can't setup a specific layout for that specific playlist.
(But you can setup the order with SORT BY [field])

Again, a full list of syntax fields and operators can be found here.