Watch out for Feature Bloat
I wanted to build a great player with a minimalist approach, with useful capabilities that are found to be in the right place, rather than one that had every conceivable feature, bell and whistle. Bloated software can become convoluted and heavy, resulting in complexity, usability problems, and poor performance. One of the advantages of software-based systems is the ability to make flexible use of components that are specialized for the job they do. FreyPlayer is a high fidelity digital music player. It is not a file system, or an ID3 Tag editor, a general purpose Codec transform, or a CD ripper. Neither does the player, on its own, provide complex digital signal processing features. The player is built to deliver digital samples to a high quality DAC as directly as possible so that it can do its magic. This player is intended to work in conjunction with complimentary applications and tools such as the ID3 Editor, X Lossless Decoder (XLD), studio grade pluggable audio units, good old Google Search, and other tools that are best of breed in what they do.
At first, I was tempted to be a high definition snob and support only lossless formats. I then realized the utility of supporting a limited number of compressed audio formats as well, namely Apple’s AAC and standard MP3. In addition to Linear PCM, FLAC was a must since is has become such a popular format for distribution. I am a big fan of the emerging HD media download sites, such as Tidal.com (and the now defunct Pono store), which delivers FLAC as a preferred distribution. Decoding of FLAC source material is accomplished with the use of the open source FLAC library (libFlac) - Copyright (c) 2000-2009 Josh Coalson, 2011-2014 Xiph.Org Foundation.
You will notice that I have not yet introduced support for DSD. I may change my mind on this, but for now I have not introduced DSD support.
Real time resampling of the source material is provided as an option in the player. In addition, sample rate targets can be specified as player preferences. FreyPlayer also dynamically sets the target sample rate in the output unit configured and in use at the time the material is played. Of course, only sample rates supported by the output unit are used, irrespective of the target user sample rate preference. Out of band changes to the sample rate in the configured output unit, such as is possible with the OS X Audio Midi Setup application, are detected and represented accurately in the FreyPlayer UI. Of course, no resampling is also viable option.
FreyPlayer makes use of the SoX Resampler Library (libsoxr) - Copyright (c) 2007-13, firstname.lastname@example.org. This is high quality, one-dimensional sample-rate conversion library. It aims to give fast and very high quality results for any constant (rational or irrational) resampling ratio. Phase-response, preserved bandwidth, aliasing, and rejection level parameters are all configurable. This is a great piece of software.
The FreyPlayer implementation makes use of the “very high quality” and “linear phase response” configuration settings for all of the resampling done in the player. In addition, the player only resamples to rates greater than that of the source material being played (generally no down sampling). In addition, FreyPlayer will only resample to a rate, which is a rational multiple of the sample rate of the source material. This offers far better performance than resampling to an irrational multiple. The player supports the popular sampling rates from 44.1 kHz to 384 kHz.
Audio Unit Plug-ins
This is one of the player’s best features. Even though many audio purests will opt for as little signal processing between the source and the ears as possible, there are times when a little help is needed. The FreyPlayer provides the ability to configure up to 8 audio unit signal processors in the audio chain between the source and the output unit. Selectable audio units must be installed in the OS X system and must be valid and conform to the Apple specifications for pluggable audio units. Installed Aus are selectable in the player preferences panel.
With respect to digital sample manipulation, FreyPlayer takes a minimalist approach. Rather than hardwiring lots of DSP options in the player, the design point offers the option to configure studio quality plug-ins from other software providers. Even signal gain, limiting, and metering features are best supplied by software providers who specialize in building accuracy and performance into these tools. This design approach enables a consistent method for tailoring the tools in the audio processing chain, and allows for maximum flexibility and user choice in selecting the best plug-ins for his/her needs.
There are a number of AUs pre-installed as part of OS X. Additional higher quality AUs may be obtained and installed from other providers. Two of my favorites are the FabFilter Pro-Q 2 and the FabFilter Pro L. FabFilter Pro-Q 2 is a top-quality EQ plug-in with great analog modeling, linear phase processing and a gorgeous interface. FabFilter Pro-L is a feature-packed limiter plug-in for mastering and mixing, with multiple advanced limiting algorithms and very accurate metering. Great plug-ins are also available from iZotope, SoundToys, Hofa, Sonoris, Waves, and many others. All user state from each of the configured plug-ins is made persistent and is re-established in the plug-in when the player is started.
One of the nice features of the player is the ability to edit AU settings on the fly, and save the AU configuration and settings for individual tracks, for all tracks in an album, or as a base default set in the player itself. This allows a user to do a little “remastering”, and save away the audio settings even for individual tracks within the library.
No iTunes Dependency
FreyPlayer has no dependency on iTunes. The player was designed with its own library system, indexing, search, resampling, and player controls independent of the iTunes application. This eliminates the need to use iTunes internal interfaces that are subject to frequent change, which can result in fragility and unpredictable player behavior. In addition, since FreyPlayer implements its own independent library system, digital audio chain processing, and UI controls, the player is able to provide features not available in iTunes such as the use of 3rd party professional audio unit signal processors, track-specific audio unit settings, soft fading for mute/un-mute functions, track-specific user tagging for search, and user selectable resampling.
With some players, Gapless playback must be set explicitly as an option. And often, a gapless playback option is accompanied by other usage constraints in the player. For example, gapless only works in playlist mode, etc.
With FreyPlayer, all playback is gapless. No constraints. No optional settings. Just gapless playback of all tracks queued for playback, period.
Performance of a music player is critical along a number of dimensions. First, sufficient resources, specifically memory and CPU, must be allocated, and optimized, so that playback of the music material is smooth and uninterrupted. In addition, a good player will also provide a snappy user interface that scales well with the number of albums and songs in a library. All UI functions, specifically scrolling, are performed in a “lazy” way to ensure only elements that will actually be displayed in the UI at a given moment are accessed from the library structures.
Multiple CPU threads are used to increase parallelism and provide isolation between critical tasks such as digital sample rendering, and the user interface functions of the player. Multiple threads often need to be serialized to prevent concurrent processing threads from stepping on each other. And of course, locking to provide the serialization must be efficient and not create unnecessary contention in the system that would result in delays and stalls in the player, or undesirable delays in the UI responses.
To prevent degradation and delays resulting from disk accesses, FreyPlayer makes liberal use of memory to cache the metadata and indexing structures needed to navigate the library with high performance. All album and track navigation, selection, scrolling, etc is accomplished through use of the in-memory library structures loaded and initialized when the player is launched.
Before tracks are played, they are pre-loaded into internal memory buffers so that no disk I/O is needed when the track is ready to be played. Limits on the amount of memory used for track buffering may be user specified. These user supplied limits (as player preferences) regulate the use of memory for the buffering of the tracks. Tracks that are too large for an individual internal buffer are carved up into multiple track extents, which populate multiple buffers for playback. As the buffers are emptied, new extents are staged on parallel asynchronous processing threads to ensure material is ready when it is to be rendered. The player uses multiple in-memory buffers to ensure smooth, gapless playback, and a listening experience you should expect from a digital music player.
Library load and save times are best optimized on a system with solid state disk drives (SSDs). And of course, systems with good CPU and memory capacity will provide better overall player performance.
Playlists are Albums
User defined playlists are an essential feature of any digital music player. For most players, a playlist is implemented as a simple but special collection of songs selected by the user from the library that can be played and managed as a group. In most players, playlists are treated as special lists in the way they are created, navigated within the player, presented in the UI, and played. In most players, the way the user deals with a playlist is distinct in many ways from how a user deals with albums in the library. FreyPlayer takes a different approach. FreyPlayer treats a playlist simply as a user-created album. When you think about it, an album is simply a pre-defined playlist in which the songs and their order within the list was determined when the album was mastered. Conceptually a playlist is an album of songs, and an album of songs is a pre-defined playlist. FreyPlayer was designed to treat user-defined playlists just as it treats any other album in the library.
The treatment of a playlist as an album has several advantages. First, all of the player controls, navigation, search capabilities, album specific audio unit settings, CD burn function, web integration, and even cover art capabilities of albums also apply to playlists in exactly the same way. There is a consistency in the treatment of playlists and albums that simplifies and converges the concepts of playlists and albums in the library.
When a playlist is created, the tracks added to the playlists are actually independent copies of the source tracks. This means that track specific AU settings and tagging can be set to the tracks in albums and “playlists” independently. FreyPlayer provides the ability to display only the “playlist” albums. And of course, playlists can be made of other playlists as well. It’s your “album”. It can hold whatever tracks you want it to hold, for whatever reason you decide. In the end, you have another album that is integrated and displayed with all the rest in the library.
By way of example, let me illustrate the power of playlists as albums. Have you noticed that the original Beatles albums released in the UK are different than the albums released in the US? If you grew up in the US listening to the Beatles albums, you got a surprise when the studio albums were finally released on CD. The CDs were the original UK albums, but the content and sequencing of the US releases were not made available on CD. What if you wanted the US albums in your digital collection? Well, with FreyPlayer playlists, you can construct the US albums, which can even include the US album cover art, and presto, you have the Beatles collection as it was released in the US. Want to create your own boxed set, just create your playlist.
Integrated Message/Error Logging
FreyPlayer is equipped with an integrated message log. Messages are written to the log during the operation of the player and may be viewed at any time by the user. The log display may be filtered based on the severity class of the messages contained within the log. Three classes of messages may be recorded in the log during operation of the player. The classification of the message within the log having the highest severity (most critical) is displayed as alert status in the FreyPlayer UI.
Informational messages are logged when the state of the player, its configuration, or any of the library is changed or updated. These messages reflect the normal operation of FreyPlayer, but are written to provide an audit of user actions that have caused the state of the player or the library to be changed.
Warning messages are written to the log when unusual circumstances are encountered, when user configuration settings prevent an intended action, or when an event occurs within the player that warrants user attention. Warning messages typically indicate an exceptional condition in the player, but not one that limits or prevents the proper functioning of the player. For example, a warning message might indicate a song could not be imported because a user specified preference prevented its inclusion in the library.
Error messages represent severe conditions within the software that are preventing the proper operation of the player.
As a convenience, the Mac OS system log can also be launched from the message log panel.
Streaming Music From Other Audio Applications
Streaming (stream-through) support was introduced in version 3.0. The motivation for the enhancement was to enable the use of the capabilities of the FreyPlayer playback engine, such as resampling and AU plug-in support, when using other music player applications, for example, internet streaming players such as Tidal. With the streaming support, it is now possible to capture the music from an internet streaming service, such as Tidal, and to direct the playback of the stream through the FreyPlayer playback engine to take advantage of it’s high fidelity playback and audio unit plug-in support.
The ability to play streams from other applications is not limited to, or specific to, a particular streaming service. For example, I would not characterize this enhancement as “Tidal Integration”, even though the playback of Tidal streams was a primary motivation. Any audio application capable of directing its musical output to a user selected output device on the Mac (any output device represented in the System Preferences Sound Panel) may be used as a music source for the FreyPlayer playback engine.
In the case of streaming, for example with the Tidal application, the user interface, internet catalog, and player controls of the Tidal application are used to select and initiate the playback of the media streaming from the Tidal application. FreyPlayer is simply used to catch the media from the source application so that its playback engine capabilities can be used to render the music to the ultimate output device, such as a USB connected DAC.
In order to make use of the stream-through capability, a virtual audio device must be used which presents itself as an output device to the source application, and as an input device to the FreyPlayer application. Consistent with the overall FreyPlayer design approach, the FreyPlayer application depends on the use of virtual software devices from 3rd party software providers which specialize in virtual loopback devices. SoundFlower, Loopback Audio, and Sound Siphon are excellent examples of virtual software sound devices that may be used with (and have been tested with) FreyPlayer to achieve streaming. For more information of the streaming support, and for assistance in setting up devices for streaming, refer to the FreyPlayer User's Guide.