Sonica version 0.4.9 The latest version and additional information is available at: http://www.bobsplace.com/sonica/ Sonica is a digital music player application compatible with the Roku PhotoBridge HD1000/HD1500** This version is built and tested against firmware version 2.0.34. It should work with firmware revisions 2.0.24 and later. This is an alpha release. It is not yet feature complete and bugs do exist in some of the current features. Features (mostly working) * Ability to specify the location of music files. * Provides a sorted, tree view of music - by title - by artist/album - by genre - by genre/artist/album - by playlist - by artist - by album - by album/artist - by year - by year/artist/album * Dynamic song queue - Composed of any subtree from above views down to individual songs. * New items can be added to song queue at any time. * Items can be removed or re-arranged in song queue. * The song (playing) queue can be cleared. * Display information on currently playing title and title next in queue. * Support for all audio codecs installed on the HD1000. * Can browse, play, and scan simultaneously. * Song information can be displayed in browse mode using the "info" button. * Shuffle play can be turned on/off (default is on). * Settings are restored from the standard (/etc/rokucascade/settings) area. * Many settings can be modified using the GUI. * Scanned data is saved and restored in a "database" file for faster startup. * Command line options allow playing of individual songs. * Full support for playlists (.pls and .m3u formats). * Most functions can be controlled with ECP commands (see below). * Command line only (no GUI) mode for integration with other front-ends. * Song duration is available for most audio file formats. * Support for playing HTTP streams i.e. Internet Radio. New in this release + Added display of mp3 bitrate to the status bar. 0.4.9 release changes + WMA tag reading speedups (4-5x) + Fixed a potential bug when reading APE tags. + Read embedded images from WavPack files. + Read embedded art within ASF tags. 0.4.8 release changes + Added image/jpg as an embedded image type in tags. + Added Options screen (menu button on remote) that: * Change values in settings file via the checkboxes. * Re-scan the file system for changes and update the database. + Added locking around state changing code to improve stability. + New button graphics. + New browse/edit graphics. + Updated track time displays to include hours if length is more than 100 minutes. + Fixed bug in status display that would sometimes crash program when play was first pressed. 0.4.7 release changes + Updated tag reading code so it can handle ASF tagging, which is what WMA files use. 0.4.6 release changes + Fixed a bug that would cause a crash when a scan was performed in background mode (option -b). + Added audio device error messages to the status bar to provide feedback when an error occurs. + Changed APE tag processing to case insensitive compares (soiaf) 0.4.5 release changes + Fixed bug in browse mode where pressing play on a selection would add it to the play once queue but mark it as enqueued on the playlist queue. + Changed the main playing loop to us it's own variable to determine when the song has finished instead of the audioplayer's IsStopped() method. IsStopped() was randomly hanging. 0.4.4 release changes + Fixed a couple of bugs related to playlist parsing. + Added FAQ document to website. + Added copy of default settings file to website. 0.4.3 release changes + Added ability to display embedded PNG and JPEG album art from most tag formats that support embedded artwork. + Added support for PNG album art files (cover.png and folder.png). + Added support for .jpg cover art file. + Added the ability to change the location of the database (see configuration section below). + Added the ability to save and restore playlist entries in the database. + Added ECP command to list songs in current active queue. + Added timer to aboutbox to keep song count updated. + Added -z option to reset settings to default and then exit. + Bug fixes: - Fixed bug in ID3Lib based tag parser that was causing a crash when unicode fields were encountered. - Fixed bug in song info album art display where it would replace the currently playing song's artwork. - Fixed and AAC typo in the settings file. This would cause AAC type files to not be recognized as valid music files. - Fixed a bug in the Album/Artist menu that was causing a crash. - Fixed a bug in the Album menu so that it sorts properly by track number. 0.4.2 release changes + Added menu item Album/Artist. Not enabled by default. (see menu config below for details). + Added display of song year to main display and song info display. + Added ability to get embedded jpeg album cover from MP3's. + Added a play count value to each song. It's not yet persistent. + Improved playlist parsing, now handles '\' path separators. + Updated song info display. + Changed memory debugging output to me more readable (and useful?). + Bug fixes: - Fixed bug where ecp song info was not for the correct song. - Fixed bug in move item up/down in queue could cause infinite loop. - Fixed bug in playlist parsing, would only work for ../, not ../.. 0.4.1 release changes + Title and Album have switched places on the main screen when displaying song info. + Added memory info dumps to debug output. + Added ability to fetch .pls playlists from a URL. + Bug fixes: - Fix bug where pressing play when no songs in any queue (crash). - Moved numeric genre conversion to validate_tags to try and fix for all file types. - Fix AAC tag parsing memory leak fix. - Fixed bug in %T-%t parsing. It wasn't working at all. - Changed url fake extension to not interfere with .url files. 0.4.0 release changes + New layout for main window. + Status bar layout improvements. Moved song count to info screen. + Added repeat button (and indicator). + Added stop button (different from pause). + Previous button (and ECP command) now goes back to previous song when in non-shuffle mode. In shuffle mode, it's still random forward and back. + Browse/Edit mode scrolling is circular. You can get to the bottom of the list by going "UP" from the top. + HTTP URL's are accepted in place of files on the command line. + HTTP URL's are accepted in place of files in playlists. + Meta data in playlist files is now supported. + When browsing, items can be de-queued from the play list along with en-queuing them. + Track duration is working for most file types. + Added ECP command "CoverArtFile" to get the name of the cover art file for the currently playing song. + Added ECP command "Append" to add songs to a running version of the program. + Transport control (play/pause/next/previous) now work when in the browse/edit windows. If a song (not artist/album/etc) is highlighted, the play button will cause the cause that song to play immediately. + Playlist files can be specified on the command line with the '-f' switch and all songs/streams in the playlist will get loaded. + Added Genre display to song information on main screen. + Sonica mimics the built-in music player's ECP commands. This means that the SongInfo screen saver will work with Sonica. + Bug fixes: - Fixed background mode '-b' so it should be working now. - Fixed a bug where using select or menu in an empty browse/edit window would crash the program. - Fixed a bug where if a song was added to the play queue and "play" was activated, that first song would be repeated. - Fixed a bug where genre numbers were being displayed and used instead of the actual genre name. - String matches for containers (albums, genres, etc) are no longer case sensitive so genres "Rock" and "ROCK" are the same. - Fixed a bug in the startup script so it now handled shares/directories with spaces correctly. - Fixed the main song list to be sorted to match the browse display. Previous version had the song list in a random order so even non-shuffle play of the main list would be random. Limitations in this release - Scanning a large number of files can take a while. The current rate is probably 500 - 600 songs per minute. - If Sonica crashes, it may cause your network shares to become unavailable for a few minutes or may require a reboot. - Needs file write permission in the same directory as the app to save and restore song info. - The settings file must be manually edited. The default settings are written the first time the program is run but they are never changed by the program. NOTE that it may be possible to crash the program by putting invalid data in the settings file. - Selecting "Song Info" from the edit menu gets Sonica in a strange state. Hitting the "Exit" button the remote 1 or 2 times should back out and restore the screen. Usage Unzip the files into a mounted share or a compact flash card. You should end up with a couple of files and an image subdirectory with images. After rescanning you should see the "Sonica.roku" application. By default, the application will scan all mounted file systems for music files. If you want to scan a specific location only, you can modify the "Sonica.roku" file and add a command line option. There is an example line commented out. You will need to use an editor that doesn't change the line endings (vi, textpad, etc.) -- DO NOT USE Notepad! When Sonica starts, it will display it's main screen and immediately start scanning for files. Pressing the Play/Pause button on the remote will start it playing randomly from the files scanned. There are five buttons on the main screen: "Browse", "Edit", "Shuffle", "Repeat", and "Stop". "Browse" allows you to browse the music collection and select songs/albums/collections/etc. for playback. Use the navigation keys to browse. The right arrow drills down deeper in the tree and the left arrow backs up the tree. The select button will put the highlighted item on the play list (and all items underneath!) so if you select a top level item like "All Tracks" All tracks will get added to the play list. While browsing, the zoom in/out can be used to page up/down. The "Edit" button works almost the same as the "Browse" but navigates around the current play list. Selecting an item with select or with the menu button will bring up a small menu. From the menu you can move or delete the highlighted item. The "Shuffle" button turns shuffle play on and off. There is an indicator on the status bar showing the current state. When shuffle is on, songs are randomly selected from either the play queue (if songs have been added to it) or the full list. It tries to play every song at once before repeating. The "Repeat" button turns repeat play on and off. There is an indicator on the status bar that appears when repeat is off. When repeat is off and the end of the list is reached, playing stops. If in background, mode, Sonica will exit. The "Stop" button stops playback. Unlike "Pause", pressing "Play" will start the next song in the queue. When you start adding songs to the play list, the program will switch to only playing songs from the play list. If all songs are deleted from the play list, it will switch back to playing songs from the full browse list. Songs can be added, deleted, and re-arranged on the play list at any time. However, there may be situations that will result in the program crashing, such as deleting the currently playing song. While songs are playing you can pause and resume using the play/pause button on the remote. The next track button will stop the current song and move to the next song on the list. The previous track button will move back to the previous song played (ONLY IF SHUFFLE is OFF). If shuffle is on, previous goes to a random song. The info button on the remote will bring up a window with information about the program. The menu button on the remote will bring up a window with program options and configurable settings. The "Scan Directory" button will re-scan the filesystem and update the internal menus with any changes, additions, or deletions. If the database file is not being ignored, it will also get updated with the changes. All the checkbox buttons allow changing of the settings used when the program starts. Shuffle, when checked, will start Sonica with shuffle (random) mode enabled. Repeat, when checked, will start Sonica with repeat mode enabled. Play On Start, when checked, will start Sonica playing immediately Alternate ID3, when checked, will use the alternate (slower) ID3 library for reading ID3 tags from MP3 files. The various menu buttons, when checked, will enabled those top-level menus in the browse mode. When the "Save Settings" button is pressed, the settings are saved to the settings file to be used the next time Sonica starts. You have to restart Sonica to see the effects of changing these settings. Note that the settings are overridden by command line options. The exit button will stop the song and exit the player. Command line usage The following switches can be used on the command line to control the behavior of the program. See the sonica.roku script for example usage. -s -r Start with shuffle mode on -n Skip file system scan if database file exist -b Start in non-GUI mode (control via ECP commands) -p Start playing songs as soon as a song is found while scanning -d set the debug level (between 0 and 10) -a Use alternate ID3 parsing code (slower but better) -i Ignore the saved database file -f | -h print a usage message. There can be up to 10 "-s " arguments to specify different directories to scan. There can be up to 10 "-f " arguments to specify different songs to play. When using the -f options the behavior is the same as specifying -p, -n & -i. Configuration using the Settings file The operating system maintains a "settings" file for application specific settings. The settings file for Sonica can be used to set all the user-configurable options and have them used each time the program is run. The settings file is located in the /etc/rokucascade/settings directory and is called com.bobsplace.sonica.settings. Of particular interest is the ability to set a format string for parsing meta data from the path/file name for files that don't include tags or have missing tags. The default format string is specified in the settings file as: FileFormats:String:%a/%A/%t The following format specifiers are parsed: %a - for artist %A - for album %t - for title %T for track (with some limitations) %y - for year %g - for genre Directory separators are always '/' %T can be combined with %t in the following combinations only: "%T %t", "%T-%t", or "%T - %t" The check starts with the last component and works forward. So given the default format string above, it needs a path something like this: /music/artist/album/title.xxx The menus that are displayed in the browse mode are configurable via the settings file. For each menu, there is a line in the settings file that is either set to '1' or '0'. Setting a menu to '1' enables it. The following menus are available: MenuArtist:Integer:0 MenuAlbum:Integer:0 MenuGenre:Integer:0 MenuPlaylist:Integer:1 MenuYear:Integer:0 MenuArtistAlbum:Integer:1 MenuGenreArtist:Integer:0 MenuGenreAlbum:Integer:0 MenuGenreArtistAlbum:Integer:1 MenuYearArtist:Integer:0 MenuYearArtistAlbum:Integer:0 MenuAlbumArtist:Integer:0 MenuAllTracks:Integer:1 The location for the database that stores the results of a file system scan can be configured. By default it is set to the same directory where the Sonica application resides. It can be changed to a different directory or share by changing the DatabasePath value. ECP Commands Sonica now understands a few ECP commands. This support is still preliminary and the commands and formats may change in future versions. The following commands are currently working: ECP sonicaApp help - List supported commands with descriptions. ECP sonicaApp pause - Pause the currently playing song. ECP sonicaApp play - Start playing after pause or stop. ECP sonicaApp stop - Stop playing. ECP sonicaApp next - Skip to the next song in the queue. ECP sonicaApp previous - Skip to the previous song in the queue. ECP sonicaApp info - Return information about the currently playing song. ECP sonicaApp shuffle - Toggle shuffle play on/off. ECP sonicaApp repeat - Toggle repeat play on/off. ECP sonicaApp append - Add a song to the play queue. ECP sonicaApp dump - List the songs in the currently playing queue. ECP sonicaApp exit - Cause Sonica to exit. ECP sonicaApp version - Return version number of the program. ECP sonicaApp count - Return the number of songs loaded so far. ECP sonicaApp volume - set the output volume to a specific level. ECP sonicaApp PlaybackPosition - display the current elapsed time. ECP sonicaApp CurrentFile - display the current file name. ECP sonicaApp CurrentTitle - display the current song's title. ECP sonicaApp CurrentAlbum - display the current song's album. ECP sonicaApp CurrentArtist - display the current song's artist. ECP sonicaApp CurrentGenre - display the current song's genre. ECP sonicaApp CurrentYear - display the current song's year. In addition, all of the commands supported by the built-in player are recognized. Any scripts that were used to control the built in player should be able to control Sonica too. Bug Reporting: Because this is an alpha release with known and probably many unknown bugs, full debugging output is enabled. If you run the application from a command line prompt, you will get many (thousands) of lines of debugging output. If you encounter a crash not listed above, please run the application from a telnet session, document the steps needed to re-create the crash, and cut-n-paste the last screen-full of debugging output and email me at sonica@bobsplace.com. Using the -d option you can control how much debugging information is displayed. "-d 0" will turn off most of it while "-d 10" will display all of it. The default level is currently equivalent to "-d 1" Acknowledgments: A special thanks to Peter McQuillan (soiaf on the forums) for providing code to parse tags from the different file formats and for creating a number of different audio codecs for the PhotoBridge. Sonica program and graphics copyright (C) 2005 Robert Paauwe **Other names and brands may be claimed as the property of others.