Songcrafters MP3 Export macro for Audacity

Started by 64Guitars, August 12, 2019, 11:47:57 PM

64Guitars

I was playing around with the macro feature in Audacity today and decided to create a macro for the members of Songcrafters. It prepares your finished song for uploading by setting the sample rate to 44100 Hz, normalizing the level, trimming the ends, showing the Edit Metadata Tags dialog, then finally the Export Audio dialog.

To demonstrate, here's a test file I made which has several typical problems.



1) This file was created with a sample rate of 32000 Hz. The macro will resample it at the more common rate of 44100 Hz.

2) The levels are much too low. The macro will normalize the song to optimize the level.

3) The start and end of the song have some unwanted silence. The macro will remove it so the song will start playing without delay. This makes our jukeboxes work better since there won't be a lot of unnecessary silence between songs if everyone uses this macro before uploading.


Macro Installation:

To install the macro in Audacity, save the attached macro file, "Export MP3 - Songcrafters - v1.0.txt", in your Audacity Macros folder. The location of this folder depends on your operating system.

  • Mac:  ~/Library/Application Support/audacity/Macros/
  • Linux:  ~/.audacity-data/Macros/
  • Windows:  Users\<username>\AppData\Roaming\audacity\Macros\

Note: The Macro feature was introduced in Audacity 2.3.0, so you won't be able to use this macro in earlier versions. I'd recommend upgrading to the latest version (currently 2.3.2). This macro was created in version 2.3.2 and hasn't been tested with 2.3.1 or 2.3.0.


Using the Macro:

Open Audacity and load your finished song which is typically a stereo WAV file, though other formats such as FLAC or MP3 will work too.

To run the macro, select "Export MP3 - Songcrafters - v1.0" from Audacity's Tools / Apply Macro menu as shown below.



In the blink of an eye, the song will be normalized and trimmed, and the Edit Metadata Tags dialog will appear.



You should fill-in at least the song title, your name and the year that the song was recorded.



The song title will be displayed in the Songcrafters MP3 player, so be sure to format it properly with standard Title Case rather than all lowercase or all uppercase. And don't add any extra information in the Track Title field. Include only the song title.

Adding your name is important to ensure that you get credit for your work. Most MP3 players will display your name somewhere. If not on the main display, then in a song info window. And you never know where your song will end up. For instance, someone could download it and give it to a friend who may think your song is fantastic. But if your name isn't included in the metadata, they won't know who this amazing artist is. So always include your name. It doesn't necessarily have to be your real name. You can use your Songcrafters name instead.


After you click OK in the Edit Metadata Tags dialog, the Export Audio dialog will appear.



You should give the file a proper name. I'd recommend including the song title, your name, and the bit rate. The reason it's a good idea to include the bit rate is that you might want to try exporting at a few different bit rates to see how the file sizes compare. For example, if your song is longer than about 5 minutes, you might find that it's too big to upload to Songcrafters. You can then try a lower bit rate to reduce the file size. Or, if your song is short, you might want to try a higher bit rate to get better sound quality. But please listen to your song at different bit rates before uploading. If the higher bit rate sounds noticeably better, then by all means feel free to upload it. But if you can't hear any difference between the 192 kbps version and the 320 kbps version, please upload the smaller file. Smaller files take less space on our server, they upload faster, and they download faster. So don't upload a bigger file just because you can. If you can't hear a difference, go with the smaller file.

After entering a good file name, set the Format Options as shown in the screenshot above. That is:

Bit Rate Mode: Constant
Quality: 192 kbps
Channel Mode: Joint Stereo

You can try other settings but those are the ones I'd recommend.

Finally, click the Save button in the Export Audio dialog to start the export process.

You should now have a nicely-trimmed and mormalized MP3 file that's ready for upload to Songcrafters.




Known Issues:

1) If you've checked the Audacity Preferences setting "Show Metadata Tags editor before export", then you'll get a second Edit Metadata Tags dialog after the Export Audio dialog, and its settings will overide the settings you made in the first one. To fix this, you can either uncheck the Preferences setting, or edit the macro to delete the line "EditMetaData" which you'll find near the end of the macro. To do that, select "Macros..." from the Tools menu. Select the "Export MP3 - Songcrafters - v1.0" macro on the left, then select the "EditMetaData" line and click the Delete button. When you click the OK button, the updated macro will be saved and you should no longer get the first Edit Metadata Tags dialog when you run the script. Instead, you'll just get it at the end after you've clicked OK in the Export Audio dialog.

2) Trimming the silence at the ends may not always work perfectly. It depends on how silent your silence is. :)  It detects silence based on a certain threshold level. If you have a lot of noise in the background, then it could be louder than the threshold value, so the macro won't recognize it as silence. Also, if you have a count-in before your song using drumsticks or a metronome, for example, the macro will detect the silence between each click and remove it, but it will leave the clicks. But for most songs, the trimming should work as expected. And it only looks at the first 10 seconds and last 10 seconds of the song. So if there are brief periods of silence in the rest of your song, they won't be affected.


If you find any other problems using the macro, please report them in this topic.

recorder
Zoom R20
recorder
Boss BR-864
recorder
Ardour
recorder
Audacity
recorder
Bitwig 8-Track
     My Boss BR website


"When one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." - Robert M. Pirsig

Flash Harry

Thanks for this 64G! 

I'll give this a whizz. I always forget to change from my usual 48/96 kHz and trimming can be missed too.


We are here on Earth to fart around. Don't let anybody tell you any different
- Kurt Vonnegut.

Pete C

Thanks 64 - I always forget how to trim on Audacity and have to strat looking through the tutorial you did n the past. I'l definitely be using this macro.

Pete
recorder
Boss BR-600
 
recorder
Boss BR-800