Python Script for Ripping Vinyl with Audacity

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
scottchi
Posts: 10
Joined: Fri Nov 27, 2020 12:51 am
Operating System: Linux *buntu

Python Script for Ripping Vinyl with Audacity

Post by scottchi » Tue Mar 23, 2021 3:05 pm

Hi all,
This is my best guess for a location to post about the availability of this script. If it would work better somewhere else, please let me know.

I have written a python script that helps with some of the process of ripping a vinyl album to do "export multiple" in Audacity. The way it works is as follows:
  1. Record an album with Audacity (all sides, one recording).
  2. Find the album's track list on discogs.com
  3. Run this python script. It scans the track list and generates two files: the labels text file, and the tags XML template file for the album.
  4. Import the labels file into Audacity, and fine tune the label positioning as needed.
  5. Import the tags file to the Audacity metadata editor, and verify that they are correct.
That's it. Run Audacity's export multiple process and you're done.

I wrote this because I inherited a large pile of vinyl records, and wanted to rip several of them to a more portable format. It's available on GitHub as https://github.com/ScottCh1/vinyl-ripper-helper.

It works pretty well! However, I have noticed that a small percentage of the track list pages on Discogs have errors. I've been adding error correction as I go along. If anyone is interested in trying this out and would like to help improve it, please read the CONTRIBUTING document.

Please share this info with other people who use Audacity to rip vinyl or tape, if you're willing.

Thanks, Scott C.

steve
Site Admin
Posts: 81248
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Python Script for Ripping Vinyl with Audacity

Post by steve » Tue Mar 23, 2021 3:15 pm

Looks like a useful script. Thanks for sharing.

scottchi wrote:
Tue Mar 23, 2021 3:05 pm
This is my best guess for a location to post about the availability of this script. I
As good a place as any :)

scottchi wrote:
Tue Mar 23, 2021 3:05 pm
Import the labels file into Audacity, and fine tune the label positioning as needed.
You could probably automate that step if you wanted. Rather than creating a label text file first, generate the labels directly into the Audacity project.
(See: https://manual.audacityteam.org/man/scripting.html)

Unfortunately "Export Multiple" is not yet supported by Audacity's scripting interface, so it's not (yet) possible to automate the whole thing.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

scottchi
Posts: 10
Joined: Fri Nov 27, 2020 12:51 am
Operating System: Linux *buntu

Re: Python Script for Ripping Vinyl with Audacity

Post by scottchi » Tue Mar 23, 2021 3:30 pm

It was difficult to decide whether to make the script automated, or "batch" vs interactive.
In the current incarnation it is half and half. It prompts for user input but provides default values, so the user can hit <enter> and accept the default.
The next release will have command line params so that it can run to completion without input.
So it doesn't require Audacity to be running, and you can prestage several albums for ripping if you like.

It would be cool to give the user the option of auto-loading the labels though. I'll check it out, thanks!

Scott

steve
Site Admin
Posts: 81248
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Python Script for Ripping Vinyl with Audacity

Post by steve » Tue Mar 23, 2021 3:32 pm

scottchi wrote:
Tue Mar 23, 2021 3:30 pm
So it doesn't require Audacity to be running, and you can prestage several albums for ripping if you like.
Yes, certainly some advantages of doing it that way.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14662
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Python Script for Ripping Vinyl with Audacity

Post by waxcylinder » Tue Mar 23, 2021 4:23 pm

Looks cute - but sadly came far too late for me ...

I did all my vinyl rips a dozen or so years ago - my labeling for song exports was all manual hard labour :(

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

scottchi
Posts: 10
Joined: Fri Nov 27, 2020 12:51 am
Operating System: Linux *buntu

Re: Python Script for Ripping Vinyl with Audacity

Post by scottchi » Tue Mar 23, 2021 6:20 pm

Thanks! I ripped a lot of my collection that way too, very time consuming.
What changed for me was that I inherited several more albums, and I retired recently. So now programming feels less like going back to work ;-)

JohnWalker
Posts: 1
Joined: Wed May 05, 2021 2:13 pm
Operating System: Linux *buntu

Re: Python Script for Ripping Vinyl with Audacity

Post by JohnWalker » Wed May 05, 2021 2:27 pm

Scott,
I've also been working on the same problem but with some differences: my code is in C++ not Python, and I process .json output obtained from the Discogs database (obtained, for example, by curl https://api.discogs.com/releases/1138433 > rabbit.json). I've got working code, and have used it for a few albums. One feature I had to add was specific to quite a lot of classical recordings, where works are split into sub-tracks. I note from your post on Mar 23 that you are still working on your code - would you be interested in collaborating on this? I'd be happy to share my code with you, for example - I've recently registered with GitHub.

jahway603
Posts: 18
Joined: Sun May 09, 2021 12:04 am
Operating System: GNU/Linux other

Re: Python Script for Ripping Vinyl with Audacity

Post by jahway603 » Sun May 09, 2021 4:15 pm

This looks really cool. I'll have to use this for my large vinyl collection. Thanks for creating this :)

Post Reply