Installing beets to Manage My Audio Tags

Yesterday, I spent a long time learning how to use MusicBrainz Picard. Today, I discovered beets on Reddit. So, I decided to install it on Windows.

  1. cinst -y python
  2. python -m pip install –upgrade pip
  3. pip install beets
  4. Type beet at the command prompt to make sure everything’s in order.

Now just type beet at the command prompt to use it.  Read the documentation for more information.

Also, download beets.reg and modify it for your system to add a Windows shell extension that imports tracks into your beets database.

  1. Note: The shell extension only works on directories.
  2. Verify that the shell extension is installed by running:

Now read through the documentation.

https://beets.readthedocs.io/en/stable/guides/main.html

Find your configuration file using:

Edit your configuration file using:

Change the first path below to a directory where you’d like to keep your music. Then, for library, choose a good place to keep a database file that keeps an index of your music. (The config’s format is YAML. You’ll want to configure your text editor to use spaces, not real tabs, for indentation. Also, ~ means your home directory in these paths, even on Windows.)

The default configuration assumes you want to start a new organized music folder (that directory above) and that you’ll copy cleaned-up music into that empty folder using beets’ import command (see below). But you can configure beets to behave many other ways:

To keep your current directory structure and to not correct files’ tags: leave files completely unmodified on your disk. (Corrected tags will still be stored in beets’ database, and you can use them to do renaming or tag changes later.) Put this in your config file:

Importing Your Library

To take the fast, un-autotagged path, just say:

Note that you just need to add -A for “don’t autotag”.

Adding More Music

If you’ve ripped or… otherwise obtained some new music, you can add it with the beet import command, the same way you imported your library. Like so:

This will attempt to autotag the new album (interactively) and add it to your library. There are, of course, more options for this command—just type beet help import to see what’s available.

Seeing Your Music

If you want to query your music library, the beet list (shortened to beet ls) command is for you. You give it a query string, which is formatted something like a Google search, and it gives you a list of songs. Thus:

To import all of the files in the current directory, I tried:

beet import -A .

Now running beet ls showed this:

Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Gambler (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Slide It In (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Slow An’ Easy (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Love Ain’t No Stranger (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Give Me More Time (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Standing in the Shadow (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Hungry for Love (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – All or Nothing (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Spit It Out (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Guilty of Love (UK Mix) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Need Your Love So Bad (Single B-Side) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Gambler (7′ Eddie Kramer Mix 1983) [2019 Remaster]
Whitesnake – Slide It In: The Ultimate Edition (2019 Remaster) (Disc 2 – Original UK Mix) – Guilty of Love (7′ Eddie Kramer Mix 1983) [2019 Remaster]

And beet stats showed this:

Tracks: 13
Total time: 50.6 minutes
Approximate total size: 343.0 MiB
Artists: 1
Albums: 1
Album artists: 1

To list all files containing “love”:

beet ls love

To list all files other than those containing “love” (at cmd.exe):

beet ls ^^love

To do the same in PowerShell:

beet ls ^love

Override my “don’t update tags” setting when importing:

beet import -w .

Show tags as written to files (uses the info plugin):

beet info whitesnake

beet import -W: when autotagging, don’t write new tags to the files themselves (just keep the new metadata in beets’ database)

Album Art

Then add fetchart and embedart to plugins.

Note: if there is already a cover.jpg file in this folder, it may not download new art and then write it into your file.

Lyrics

pip install requests

Then add lyrics to plugins.

Genre

After you have pylast installed, enable the lastgenre plugin in your configuration.

Importing Tracks

  1. Using “K” for keep both when you are adding tracks to an albums creates a second directory for the album. Don’t use this!

Set Specific Fields

Note that Tag&Rename seems to set the month and day fields to “00” when you update the comments field.

Search for File Type

beet stats format:MP3

beet stats format:FLAC

Search for Bitrate

beet stats bitrate:128000

beet list format:MP3 bitrate:128000

Search and Display Specific Fields

Show More Verbose Information

Update Your Database to Remove Deleted Files

Remove a Custom Field (Created by Accident)

Add to an Existing Comments Field

(beet ls smokey  -f '$track//$title//$comments' | sort) | % { beet modify "$($_.split('//')[2])" comments="Purchased from Amazon Music in MP3 format on 08/29/2020.`n`n$($_.split('//')[4])" }

$tracks = beet ls smokey  -f '$track' ; $titles = beet ls smokey  -f '$title' ; $comments = beet ls smokey  -f '$comments' ; for ($count = 0; $count -lt $tracks.Length; $count++) { beet modify smokey track:"$($tracks[$count])" title:"$($titles[$count])" comments="Purchased from Amazon Music in MP3 format on 08/29/2020.`n`n$($comments[$count])" }

C++ Glossary

There are a number of C++ acronyms that I seem to forget over and over, so i decided to start maintaining a glossary here. I hope others find this useful, as well.

AcronymDefinitionComments
CTADClass Template Argument DeductionIn order to instantiate a class template, every template argument must be known, but not every template argument has to be specified. See
https://en.cppreference.com/w/cpp/language/class_template_argument_deduction.

Also see
How to Use Class Template Argument Deduction https://devblogs.microsoft.com/cppblog/how-to-use-class-template-argument-deduction/ from Microsoft.

Convert WAV files to FLAC


The easiest way that I’ve found to convert your WAV audio files to FLAC format so they’re compressed without losing any audio quality is to do the following:

  1. Make sure you have Chocolatey installed (which should be on every machine already. ?).
  2. Open an elevated PowerShell prompt and run the following command:
  3. Now change to the directory containing your WAV files and run the following command:

I found this solution here.

Rob

This post was migrated from https://blogs.msdn.microsoft.com/rob/2016/12/23/convert-wav-files-to-flac/.

Upgrading from TFS 2013 to TFS 2017

I was running TFS 2013 Update 4 on top of SQL Server 2012 SP3 and was unable to upgrade to TFS 2017 because this version of the SQL database is not supported.  So, I ran the SQL Server 2016 installer from the ISO and used the SQL Upgrade tool.

I then uninstalled SQL Server 2012 by double-clicking on the “Microsoft SQL Server 2012 (64-bit)” entry in Control Panel’s Programs and Features and selecting “Remove”.  I clicked the “Select All” button, clicked the Next button, clicked the Next button, and lastly clicked the “Remove” button.  This started the uninstall of SQL Server 2012.

Note that I did not uninstall Microsoft SQL Server 2012 Native Client.  When I attempted to do so, I got the following dialog box:

Then I installed TFS 2017 from the ISO and ran the Team Foundation Server Configuration Wizard.

I selected “I have existing databases to use for this Team Foundation Server deployment” and clicked Next.

Then I selected my (only) SQL Server Instance, selected my (only) database, and checked the box stating that I have a current backup.  Make sure you do before proceeding!  I then clicked Next.

Then I selected “Production Upgrade” and clicked Next.

Then I entered the service account name under which the TFS Windows Service will run.  Click the Test link to make sure you have the password correct before proceeding.  Click Next.

You may now wish to update your website settings to use SSL/TLS so that web-based connections to TFS are secure.  I did not, so I accepted the existing values.  You can also check the box to enable SSH (Secure Shell) connections to TFS; it was checked by default for me.  You may also update the location of the File Cache used by TFS.  Click Next.

The next step allows you to enable Search across your repositories.  It defaults to unchecked; I chose not to install it at this time.  You can always install it later.  Click Next.

You may now configure reporting for TFS.  I didn’t have it installed before, so configuring it now was not an option.  Click Next.

You may now configure SharePoint for TFS.  I didn’t have it installed before, so configuring it now was not an option.  Click Next.

You are now presented with the Settings Confirmation page.  You may click the Verify button or just click Next.  I clicked Next.  It will automatically run through the verification process.

If everything verifies as successful, you will see a screen similar to the following.  If all was successful, click Configure to Upgrade your previous installation of databases and TFS to 2017.

Rob

This post was migrated from https://blogs.msdn.microsoft.com/rob/2016/12/22/upgrading-from-tfs-2013-to-tfs-2017/.

Sending eBooks to the iPad Wirelessly

My coworker, Mark, asked me how I get eBooks onto my iPad today. I told him I had never read an eBook on my iPad and he said I needed to correct this.

Since I store all of my eBooks in my OneDrive account and then manage them with calibre, I will sometimes just open PDFs from the caliber folder using the OneDrive iPad app and read them in Acrobat Reader on the iPad, but it seemed like there should be a better way to read eBooks. I also wanted a good way to read epub files on the iPad.

It turns out that the calibre team already figured out how to do this, so I am leaving the steps I tried here so I will remember them in the future:

  1. Launch calibre on your PC/Mac.
  2. Turn on the Content Server by clicking the Connect/Share button and leave calibre running.
  3. Start the Safari browser on the iPad and type in the IP address and port of the computer running the calibre server, like this:
    1. http://192.168.1.2:8080/
  4. You will see a list of books in Safari, just click on the epub link for whichever book you want to read, Safari will then prompt you to open it with iBooks.
    1. I had to click the Get button on the calibre web page for the specific book I wanted to transfer to open the book in iBooks.

That’s it! Happy reading.

Load more