Automatic Christmas Music Weight Control – Free Python Script

tomimatko

Active member
I came up with an idea to automate Christmas music rotation in RadioBOSS by gradually increasing the Playlist Generator weight of Christmas songs from one Advent Sunday to the next. My goal was to create a system that automatically activates every year without having to remove Christmas songs from the Music Library or manually add and remove Christmas music categories in Playlist Generator presets.

Personally, I prefer not to overwhelm listeners with too much Christmas music for an entire month. I'd rather have Christmas songs appear naturally in regular playlists, gradually becoming more frequent as Christmas approaches, instead of creating dedicated Christmas music blocks.

If you have a similar approach to Christmas programming, I've created a small Python script that automatically increases or decreases the weight of Christmas music according to the date.

For example:
  • First Sunday of Advent: occasional Christmas songs.
  • Second Sunday of Advent: slightly more frequent.
  • Third Sunday of Advent: a further increase.
  • Fourth Sunday of Advent through December 28: the highest frequency.
  • December 29–31: reduced frequency.
  • January 1–6: a further reduction until Epiphany.
Of course, you can customise the weight values for each period according to your own programming preferences.

An important note about weights: If you use multiple Playlist Generator presets, you should calculate the weight of your Christmas music relative to the combined weights of your other music categories. Since the script applies the same Christmas weight across all matching presets, make sure that the overall weight ratios are approximately the same in each preset. This will help maintain a reasonably consistent frequency of Christmas songs throughout your programming.

Remember that weight is a relative value, not a percentage.

The script automatically calculates the Advent dates every year and handles the transition into the New Year. It is designed to modify only the weights of the specified music libraries, leaving all other Playlist Generator settings unchanged.

The script is launched by RadioBOSS itself. Simply create a Scheduler event using Start a program, select the BAT file, set it to run every evening at 23:30 during the Christmas season, and configure the event to repeat every year.

Since RadioBOSS does not support a weight of zero, Christmas music availability outside the holiday season is handled through annual track availability dates. Make sure to select all your Christmas songs in Music Library and set their annual availability dates under Track Properties (for example, from December 1 to January 6). This ensures that Christmas songs are not selected outside the specified period.

And that's it – Christmas music rotation automated!

The system is already running at my radio station, although it is still in the testing phase. The idea is to set it up once and let it take care of Christmas music rotation for years to come.

You don't need any Python programming knowledge to configure it. Everything is fairly straightforward. You only need Python and a text editor such as Notepad++ or Visual Studio Code. No additional Python libraries are required.

I've also included step-by-step installation and configuration instructions.

Important: Before using the script, make sure to back up your Playlist Generator presets, as it directly modifies .genprs files. Even better, test it on a separate RadioBOSS installation before using it in your live production environment.

The script is still in the testing phase, so please use it at your own risk.

The script is free to use. Hopefully, some of you will find it useful!
 

Attachments

I'm also curious how other RadioBOSS users handle Christmas music rotation. Do you use dedicated Christmas blocks, separate seasonal presets, or gradually increase the amount of Christmas music in your regular playlists?
 
A feature request!?

For this particular use case, and other similar automation scenarios, would it be possible to allow a Weight value of 0 in Playlist Generator?

A weight of zero would simply exclude that category from playlist generation without having to remove it from the preset. This would make seasonal programming and other date-based automation much easier and more flexible.

It would also allow users to temporarily disable specific music categories while keeping their existing Playlist Generator presets intact.
 
Back
Top