Hi All,
I’m
pleased to release the latest update of my Music Sorting & Backup Analysis
app – Version 8.1.
https://www.dropbox.com/s/g6piekjcfpbuo82/b2%2BBackUpSort8.1.zip?dl=0
To
existing users, this release adds a few bug fixes and some extra features such
as the ability to group Artists and Albums together under Themes, such as
<Party> or [Holidays] etc.
To
any who are new to this, it’s a freeware app compiled using QB64.org that
enables you to sort the order in which your music library plays and hence the
order in which it is displayed by the GUI. It’s much more comprehensive than
the b2’s built-in A-Z Sorting command. You use it by downloading the b2db file
from your b2, reordering it in your Windows PC using this app and then
reloading b2db & rebooting. There are full instructions in the Read Me file.
It works for all versions of Windows from XP onwards.
It
arranges your artists and albums (within a given artist) to display and thus play
alphabetically by default. You have the option to override this so it plays in
a different chosen order, e.g. chronologically or thematically or in any other
order you choose. On average, the app takes less than 30 seconds to analyse
& reorder your b2db file ready for it to be reloaded into your b2.
------------------------------------
Additionally & very usefully, it can also analyse a recent b2 Backup on an external HDD or SSD by comparing it with the b2’s current library to see how ‘fit for purpose’ it is. The problem is that b2’s Export function is incremental and so any renaming of your library causes additional copies of that music to be backed up under their new names, but the originals are not deleted. Therefore you effectively have 2 copies of the same music in the Backup but you likely have forgotten all your edits so don’t know what to delete. This app solves that by also exporting a text file telling you where the unwanted duplicates are in the Backup.
This
means you no longer have to completely delete an older backup and start again,
you can instead analyse it and then manually edit it on your PC using the data
my app provides. This saves having to commit to a time-consuming new full
Backup and also saves on rewrite cycles if using an SSD (as they have a limited
number of these by design).
One
other thing it does whilst analysing your Backup is to record the duration of
each album and track for your information.
--------------------------------------
For those who generally play their libraries in a random order or use lots of playlists, the Sorting part of this app is probably not of much use. But, for others like me who don’t do these things, it will hopefully improve yet further your enjoyment of your b2.
And the Backup verification feature is useful to every user who likes to know they have a Plan B in place should their b2’s HDD go AWOL.
Would you please consider writing a program that would read the B2 database and output a tab-delimited file (preferred, or a CSV format) that would import correctly into Microsoft Excel to columns for sorting—or pivot table summary. I’m certainly hopeful you could re-use some of your existing coding. The minimum data to have included in each text record output into the tab-delimited file:
SONG TITLE <tab> TIME DURATION <tab> ARTIST <tab> ALBUM TITLE
(The order of these fields left-to-right would not matter because of Excel provisions for manipulating the data. I’d prefer tab-delimited over CSV but either would be fantastic. Possibly adding a field containing True|False or Yes|No for album COVER ART would be great too.)
I propose this because it would help B2 users in multiple ways: you could see how many versions of particular “songs” you have, many different Excel-enabled filters, sorts & searches, and possibly do some other useful pivot-table summaries or tabulations.
Frankly, the most compelling reason for such an output file may be: I want to build playlists with durations that can fit a pretty narrow window or length of time. Another benefit would be merging track-level info from the file your coding would produce with tag info from elsewhere. Then use pivot tables to make other Playlists that take duration, genre, recording date, etc (from whatever tag source) into consideration.
I would be willing to try donating an XLSX file that uses the data, copes with the Time Duration maths—for at least some of the stated purposes. I once made a file something like this that used data from iTunes--before pivot tables came along...
Many thanks for your consideration!
Warren
My recommendation or preference for a .CSV extract is a first step, with (best?) consistency with B2 implementation,
To expedite matters, defaulting all sorting to Excel seems vastly superior (or other software B2 users might read the .CSV file with). For a second later step, doing something more with Playlists might be a benefit? I would rather not see the first (.CSV extract) delayed for this bit. I do show (below) how I want to work up Draft playlists within Excel.
I'm attempting to attach several screenshots from Excel. "INPUT" tab shows data imported in and the Time formatted. "data" tab is an expansion on INPUT with additional data added--Plus I have presumed an assumption to strip away ".flac" from track names but to populate that into a separate column (only because some B2 users might like that?--I personally have no opinion on that). Then a couple more columns to support building a new Playlist. The other two shots show a couple Pivot Tables, one that summarizes which have missing cover art plus one where a Playlist has been attempted to fit a one-hour target.
I'm hoping I've not confused...? (the attachments may not be in the proper order)
Cheers,
Warren
AndyC and all:V8.7 looks to be great work, congratulations--more to the point, Thank You! A few comments and questions follow...I did not have focus on or strong interest in the "sort" elements of your prior work but the duration info has been of strong interest to me, if you recall, for making Playlists that are good groupings BUT also fit into a variety of predetermined overall durations. Surprises from my first use of V8.7 included the amount of issues resulting from tracks or albums with "peculiar" embedded characters. Honestly, that was something I had not yet been concerned over as I'm much too new to the B2 specifically and mass ripping in general. I'd ripped selected CDs in the past, but had never had the ambition of ripping the entirety till buying the B2.I am going to need to understand what's driving missing durations. Well over a thousand tracks affected for me...Do compact discs have track duration data stored on them?--within each track or in some overall header-level?or do devices determine/calculate that--surely not?And what for files stored as mp3? m4a? wav?And as I am using pivot tables in Excel, I think the album durations will not matter to me as the tracks will be summed for me.If eliminating the "problem" characters will eliminate loss of track duration data, then I'll be OK. If there are more issues, I need to understand.Thanks AndyC!Best regards to all the other addicted music lovers,Warren
Hi All,
I’m pleased to release the latest version 9.1 of my music sorting and backup checking program:- https://www.dropbox.com/s/bi19ca0i62nbz8s/b2%2BBackUpSort9.1.zip?dl=0
For anybody who doesn’t know what this is, it’s a free Windows program that adds a few ‘bells & whistles’ to managing your music library in your b2 & increasing the pleasure of b2 ownership. It’s been in existence for about 5 years now, works with Windows XP, 7, 8 & 10 and I’m adding more features with each release. It mainly does the following:
1. It sorts your whole library (as it appears in the central column of the UI) into A-Z order + a few tweaks beyond that to let you really personalise the order. (This of course is the b2’s ‘master’ playlist.)
2. It generates a Clean Up.txt file that identifies any unknown Artists, Albums and Tracks to aid editing (for CDs that aren't in the MusicBrainz database) & tells you where any non-FLAC tracks are.
3. It provides comprehensive text files of all your Albums and Tracks & other library statistics.
4. It provides a spreadsheet-friendly CSV file of your whole music library’s contents.
5. If you plug a recent external HDD Back Up into your PC, it will also tell you of any problems with the completeness of the Back Up - either missing tracks or excess tracks left over from previous editing sessions. (In the event of having to a Restore from the Back Up, this is pretty important.)
6. It records the track & album times (such as you often get on the back of CD cases). This is especially useful if planning playlists etc. with specific total playing times in mind. These times also appear in the CSV file. (This time data isn't 100% complete due to problems trying to read artist, album & track names that contain 'unrecognised' characters - generally from foreign languages. For more info, see below!)
7. The ZIP file includes 32 & 64 Bit versions of the program, plus a comprehensive Read Me file explaining it all. (RTFM!)
NB: It’s not to everyone’s taste and your b2 works fine without it. However I like it and am pleased to freely share it with anyone else who is like minded. If you like it too and want other features adding, please email me and I’ll see what I can do.
-----------------------------------------------------------------------------
Since the previous release (Version 8.7), I’ve been working on the problem of the difficult-to-recognise characters in the names of Artists, Albums and Tracks. These are typically French, German or Gaelic letters with accents on them – such as “Déjà vu” in French. These letters are rendered differently as they pass through operating systems (via encoders) and thus the character string describing the Artist\Album\Track of a piece of music in a Back Up is different from that in the b2’s database. Therefore, an attempt to verify that a track is successfully Backed Up by comparing the 2 character strings always returns a negative, even when the track IS actually successfully in the Back Up.
(Incidentally, I was amused recently to see that this problem is commonplace. I paired my iPhone with the infotainment system of a brand new Volvo XC60 and the Volvo OS screen said “Andy’s iPhone paired successfully”. The couple of sub-menus later, the next screen was where my phone was actually chosen to be accessed: It asked “Select Andy*^#s iPhone?”, where 3 weird symbols replaced the simple apostrophe!)
Firstly, I solved the problem of Back Up verification via character string comparison by appreciating that any Artist\Album\Track string has a lot of redundant information in it. Therefore, if it is compressed by deleting all potentially unrecognised characters, there’s still more than enough information left to make a unique positive verification that a Back Up track exists. This also neatly gets round the other problem that Volvo's OS illustrated – that a single byte character such as an apostrophe is often rendered as a new character of 2 or 3 bytes (in extended ASCII), thereby altering the character string length. Comparing unequal length strings will always return a negative; however, by deleting all the ‘dodgy’ bytes, the strings end up equal in length again & this problem is got round very simply.
-------------------------------------------
A completely separate but associated problem concerns reading the time duration of each track. This is done by accessing information in that track’s header in the Back Up. In previous versions of the program, the Artist\Album\Track string came from b2’s internal database, the b2db file & numerous tracks with unrecognised characters in their names couldn't be accessed. In an early attempt to fix this in a recent unreleased beta of my program, I tried reading the time data from the b2’s internal HDD using NAS. However the results weren’t much better (most unread tracks remained unread) and, worse still, the process was about 20x slower than using an external HDD – it actually took 4 hours to read about 20,000 tracks instead of the usual 10 - 15 minutes. So I abandoned the NAS route – I have to say I wasn't at all unhappy about this turn of events as I wasn’t totally comfortable accessing data from within the b2 whilst it was busy doing other things & might have got upset by the intrusion! As another Forum member might say – “Here Be Dragons!”
So I went back to using the Back Up. In my next attempt to fix this, I assumed that if I read this Artist\Album\Track string from the FAT of the external Back Up HDD instead of b2db, the unrecognised characters might just be rendered the same and so each previously unreadable track in the Back Up could now be read successfully. To do this, I had to make a major rewrite of the core of the program. As programmers know, such a core rewrite invariably affects other processes being run within the program and this also has to be debugged. So it took a bit longer than expected – as usual!
Eventually, I got the new core working OK and launched the program expecting to see most of the missing time data filled in on the Album & Track lists. No such luck! The problem remained exactly the same – reading the FAT of the HDD via Windows and then using the exact same information to open the track in it failed 100% because at some point an encoder or 2 in my PC still changed the unrecognised characters and shuffled things up again. This really was an ‘Aaaaarghh’ moment when I thought the whole crazy encoder system had beaten me.
Another explored avenue was to create a look up table of all the encoders, so
that unrecognised characters can be converted back again – a sort of
reverse-encoder process. The problem is there aren’t just one or two encoders,
there are dozens if not hundreds and more are being added so it just gets too unwieldy. Another failure!
I suppose all this was to be expected as there’s a truism that goes – “Any problem worthy of attack, shows its worth by fighting back!” So I thought about this problem some more and have now come up with a fix: It’s not a 100% fix but it has remedied the vast majority of the problem & enables the times of most of these tracks to be read now using Version 9.1.
The QB64 language in which my program is written allows access to the DOS shell (i.e. the old DOS Command.exe command line program which is still there, even in Win10). The DOS command COPY allows wildcards (* & ?) in file (i.e. track) names. So, to read a previously unreadable track, I simply had to copy it using the wildcards to obscure the unrecognised characters and name the copy file as something readable. Then this copy file could be read.
Therefore
“COPY /Y Artist\Album\01*.flac g:\tempfile.flac” gives a readable new file
located in the root directory of the Back Up HDD well away from the actual
music library. It is deleted straight after reading to tidy things up and leave
the HDD as it was found. (The program of course firstly checks that the Back Up
HDD isn’t write-protected before proceeding.)
Most of the unrecognised character problems are likely to be found in the Track names, so hopefully this solves at least 80% of the issues. The program already outputs a Clean Up text file as described in Bullet Point 2 above: It now also lists the locations of tracks whose times were read successfully but which have unrecognised characters in the track names only. This aids any user who wants to edit them via the UI to make a Restore of the library using the Back Up a more robust process.
Sadly,
this method isn’t a complete solution as COPY won’t allow wildcards in
directory names, so this technique can’t be used for unrecognised characters in
Artist & Album names. Therefore the time data of albums such as CSNY’s
album ‘Déjà vu’ currently remains unreadable unless the owner replaces the 1st
2 vowels with their English equivalents.
I’m exploring a few other ideas to tackle this issue and hopefully they’ll appear in Version 9.2 fairly soon. Meanwhile, I hope you enjoy using the program. (Incidentally, whilst I was rewriting the core, I also improved the on-screen layout to improve the presentation of information too. There's lots to watch whilst it's running!).
As ever, please let me know of any issues that crop up during use of this program. (My email address is in the Read Me file)
All the best, AndyC