Documentation

The prerequisites to successful use of Mr. Random are a portable audio player with a capacity of up to 20 Gigabytes, and a largish collection of audio files located on a computer hard drive. The program creates a randomly generated selection of tunes that fit within the capacity of the target device and copies these tunes to the device. Selection can be restricted through the use of a filter, and a history of previously selected tunes can be kept so that repetition is controlled.

This program was designed to work with my digitized CD collection, which is organized in a single hierarchy of folders, consisting of artist folders, and below each of them, album folders containing the tunes of the album. It is not required that the source of audio files be organized in this way; the files can be arranged in any fashion but in order to use filters or selection strategy, this arrangement works best. I converted my CD collection to MP3s using the bulk ripping capabilities of LameFE 2.4, a fine freeware CD ripping program, which also tags files as it writes them. Pretty slick!

Installation

If you don't have a Java Runtime Environment version 6.0 or later, use the icon on this page to download and install one.

On Windows, run the installation program. Note that the default installation directory is C:\Program Files\Random.

On Linux, extract from the gzip archive and have at it.

Running

On Wndows, use the Desktop icon or the Start Menu icon.

On Linux, double clicking on the mr-random.jar file runs it.

Configuration

From the Options menu, select Settings. This will bring up the settings dialog.

The main display Settings dialog (cougar theme)

The Collection Folder is the list of folders on the computer hard drive where searching for audio files takes place. These are the sources of file copying.

The Device Folder is the MP3 player location in the file system, which appears as a removable drive in Windows. This is the destination of file copying. You will not be able to browse to the device unless it is actually plugged in, but you can type in the path if you know it.

The Device Type contains the supported types of MP3 players. Currently, only a Generic Player is supported, which should work for any player that appears as a removable hard drive to the operating system.

The Capacity is the capacity in megabytes of the player. This is the formatted capacity, which is different from the advertised capacity. For example, I have a Lexar JumpGear with a 256 MB USB key providing storage. The actual capacity of this device is just about 247 MB, but I set it at 246 MB capacity because if it is filled up until there is no empty space, it will refuse to work. It is best to check using Windows Explorer by locating the drive and examining its properties.

The File Types describe which kind of files to copy to the player. The last one allows you to enter a custom file type extension. Some people would like to use Mr. Random. to fill up their digital picture frames with randomly selected snapshots. Now you can do this by adding the file type 'jpg' and selecting its checkbox.

The Themes setting selects the visual theme. This product includes SkinLF software developed by L2FProd.com which allows the use of different look and feel styles. These are provided as themepacks in the themes folder under the installation folder of Mr. Random. You may find additional styles by going to the SkinLF site. Simply copy any new themepacks into this folder and select them from the Themes list. You will need to restart the program to pick up the additional themes.

The Language setting selects the language to use for the labels on the controls (certain labels created by Java Swing will remain in English, however.) In order for this setting to take effect, you will have to close the application and restart it. If your preferred language does not appear, you can volunteer to provide a translation and it will be included.

On the Decoration line is the Track Number setting which will add sequential numbers to file names copied to the device. This is handy for some players which rearrange tracks in alphabetical order. The Tooltips setting controls the pop-up tune descriptions that appear when you place the mouse over the CD picture next to a tune in the list. These can be in two styles: Artist and Album, or Artist, Album and cover art. To display the cover art, you must save a JPG or GIF image of the album cover in the same directory as the tune. The first such image in the directory will be used to display as a cover.

The Album Covers section controls how to retrieve and browse album covers. The Show checkbox works in combination with Tooltips to control whether the cover image appears in the tooltip or not. The Cover Source drop-down determines which country's Amazon server will be used to query for downloading new cover images.

Using the Program

After configuring the settings, you are ready to begin. Plug in your audio player and run Mr. Random. If your device already has content, you can clear it by pressing Clear Device, which deletes only the files on the device that have been put there by Mr. Random. If you wish to clear all files from the device, you will have to remove the others manually.

Now you want to fill the device with random selections. You can simply press Fill List and enough selections will be presented to fill the list to the capacity of your device. If you don't like the results of the selection, you can press Empty List and start again. Then, press Copy To Device and the selected files will be copied. Then disconnect the device as you would normally. Exiting Mr. Random will cause your settings and history to be saved. Note that the list is populated with content from MP3 tags, so if the files aren't MP3s then the file names are used.

List Full A List of Random Selections

Editing the List

If you find some entries in the list that you disagree with, you may select them and press Remove which will delete them. Then press Fill List again and the capacity will be topped up with fresh selections. You can select a range of tunes in the list and press Move Up or Move Down to alter the play order (and decrease the randomness!)

Strategy and Filters

You may execise finer control of how selections are made. The first is by selecting a strategy of choosing by artist or album. If a strategy of choosing by artists is in force, then equal probability of selection is accorded to the artist first. Thus, an artist with one album is chosen as frequently as another artist with eight albums. If a strategy of choosing by album is in force, the artist with eight albums is eight times as likely to be chosen.

The second method is by using filters. It is possible to filter by artist or album. Selecting either the Artist or Album radio button will change the content of the filter list accordingly. Then when an element is chosen from the drop-down list, subsequent selections will be restricted to that particular artist or album. In this way, you can choose one artist, the press Add One to select a tune, then choose another artist and do the same, then change back to Any and fill the rest of the list. Note that the same tune will not be selected more than once, so choosing an album and filling the list will result, at most, with every tune from that album being selected once.

Similarly, the Add Group button will act in combination with the filter to randomly, or selectively, add an entire artist collection, or an entire album worth of tunes to the selection list. When Mr. Random selects groups, it does not take history into consideration, nor does it pick random tunes within a group; it just starts at the beginning of the artist's tunes or the album's tunes and pulls them into the list until there are no more to select, or the device capacity is reached.

History

The History menu item allows you to control the minimum interval that a tune can be added to the list. If you have a long history, it will take several seconds before the list in this dialog is filled. Be patient!

If you turn history on and set the Days to 30, for example, then once a tune has been copied to the player, it will not be selected again for at least 30 days. Each tune copied to the device is added to the history list, which will grow over time.

The history list can be reset to empty by checking the All check box next to Delete History Entries. The history list can be 'trimmed' to a smaller size (only retaining the selections made in the history interval) by checking Older than current setting. To write the changes to the history file, click Ok.

You can view the contents of your history file in this dialog in three ways: by time, frequency, and artist.

List Recent Recent List

The Recent list shows all tune selections sorted by time, with the first element being the most recently selected, until the last element, which is the oldest tune selected. Each entry shows the tune title, followed by artist and the date on which it was selected. The tunes are numbered for no particular reason.

List Frequency Frequency List

The Frequency list shows tune selections sorted by how frequently they have been played, with the first elements being the most frequent. The number of times it has been selected is shown in square brackets.

List Artist Artist List

The Artist list shows all artists whose tunes have been selected, sorted by number of selections, with the first element being the artist with the most selections. The number in brackets is the number of tunes by that artist which have been selected.

Advanced Options

There are additional configuration options available on the Advanced Options dialog, which are accessible from the Mr. Random Settings dialog. These are the optional settings you are less likely to change.

List Frequency Advanced Options

Random Selection Settings

This contains parameters affecting tune selection. The first is a list of four different random number generators so you can try different ones if you feel that Mr. Random isn't living up to its name.

Java random
This is the standard Java Runtime linear congruential generator. It's the same one everybody uses, which probably means it isn't cool.
Mersenne Twister
This is a pseudo-random number generator that is based on a matrix linear recurrence over a finite binary field. And it has a groovy name.
R250/521
This fast little baby a uses shift register sequence with a long period. If you have more than 65,535 tunes it may not be for you, however.
www.random.org
This is a web service that produces truly random numbers by sampling atmospheric noise. Tremendous geek appeal, but there is the overhead of making http connections that means this a slower performer.

The # of Attempts controls how many times the program will attempt to pick a tune before stopping. Each attempt chooses a file, which is then tested for file type, length and whether or not it is already in the list of chosen files. It will also check the date the tune was last played, if you have History turned on. If you find that Mr. Random often stops picking tunes before filling the list, then you can increase this number.

Check for Updates

This sets whether or not to connect to mr-random.net to find out if a newer version of the program is available. On starting the program, a dialog box will pop up informing you of the new release, if one exists. It will only do this once, however, as it remembers that you have been informed. There is no start-up delay involved in enabling this feature, since the check is performed in the background. The Connection Timeout setting is the number of seconds it will wait while attempting to connect. You can increase this if your network connection is unreliable.

last.fm Settings

last.fm is a free, music-oriented social networking web site that allows users to post their music choices so that they can discover new music that matches their own tastes, and find out what other people with similar tastes are listening to. It normally works by installing a plug-in to your desktop computer audio player, such as WinAmp, QCD or Amarok, which submits the identity of each tune you play so that last.fm can create a profile of your taste in music.

In order to use this feature, you must first have a last.fm profile, which you can create by registering at their site. Once you have done that, check the Enable box and enter your last.fm Username and Password. Now, when you fill your player with newly selected tunes, they will also be submitted to last.fm to contribute to your profile.

Note: last.fm tests submissions and will reject them as spam if they are not accurately time-stamped. That means it won't accept more than one tune played between 5:10 and 5:12 PM on this Tuesday. This presents a problem when Mr. Random tries to submit 100 tunes totalling 8 hours worth of listening selections in one attempt. The way it does this is to pretend that you started listening to the 100 tunes 8 hours prior to the current time (9:10 AM on Tuesday in this example) and listened to each one is succession at different times. The problem occurs when you have also been listening to and submitting tunes to last.fm within this period. last.fm will detect that you already submitted a tune for a specific time and reject the second submission. When this occurs, Mr. Random will report that a certain number of tunes submitted were rejected. You will also see a notice on your last.fm Recent Track list that some submissions triggered spam detection. As far as I know, there is no penalty for doing this.

Album Covers

Cover Images

In each album directory, the first (alphabetically speaking) GIF or JPG image is assumed by Mr. Random to be the image representing the album as its cover. This image is displayed in tooltips (if you select Show in the Tooltips section in Options), is used in the cover browser and is copied to Sansa e200 series device to display on its groovy little screen when the song is playing. If the wrong image is showing, then rename the right one so it appears as the first image in the directory.

  The Cover Images dialog

The Cover Images dialog displays the albums in the current collection, along with the currently selected cover image (hover over the CD image next to the name) and the name of the image file. You can remove or replace these images in this dialog. To add an image, select an album and press Fetch Image. The program will attempt to search Amazon for likely cover images and present them for you to choose one. This takes some time, but you might be able to speed it up by selecting an Amazon server closer to you in the Options dialog.

  The Cover Selector

Pressing Fetch Image presents you with the Cover Selector with which you can browse the top 100 (or fewer) images similar in title to the album you selected. Pressing Previous and Next traverses the available image collection. If you find one you like, press Select to copy this image to your album directory. The image file will have the name of the album, so it is still possible it won't be chosen as the representative image for this album if there is an alphabetically prior image in the directory - so renaming may be necessary!

Cover Browser

Remember how you used to decide what to listen to? You would flip through physical albums, looking at the covers, and see one that you had forgotten about and thought, "Oh yeah! I remember this one." Well, now you can rest your flipping finger and let Mr. Random do the flipping for you. If you had previously set up your cover images and also selected Show in the Options dialog then you can use the Cover Browser to present randomly chosen (or sequential) cover images. When you see one you like, click on the image and a random tune is selected from that album and automatically added to your device list.

  The Cover Browser

The slider on the left controls the speed of the display. The first drop-down controls the style of display: totally random, random but displayed sequentially from left to right and top to bottom, or sequential from the beginning to the end of the collection. The second drop-down controls what you get when you select an image: Choose One puts a single tune in your list, whereas Choose All will put ALL tunes from that album in your list.

Automatic Operation

Fast Option

If you would like Mr. Random to just get to work without having to make any decisions, there is a command line option, -fast, which will clear the device, pick tunes and fill the device all without requiring user input.  To enable this option, edit the Windows shortcut (by right-clicking on it, and selecting 'Properties') and add the '-fast' option to the Target line, as indicated below:

 

F.A.Q:

Q:What about foreign language support?

A:If you are willing to create a translation, email me and I'll send you a small file of text to translate and I'll add it to the release.

Future Development:

There are no further enhancements planned.