• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

A tool for picking a mood, just imagine what this could do when used with RDJ

Started by Polar, May 03, 2019, 10:37:40 PM

Polar

Martin Luther King had a dream...
John Lennon imagined it...

Hear me out. MoodFuse is the word. A few sliders where you set the grade/level of "Energy", "Happiness" and "Danceability". The script goes through your database and does the magic. A Playlist is build.

This is in simple terms what MoodFuse does. The scripts is written to get the music information from Youtube and Spotify (all legally done). Now, what if it could be revamped to work with RadioDJ, without altering the structure from RadioDJ. Create a new database, let MoodFuse query the RDJ-database, and populate the new database with a copy of the records found. Then, when creating a rotation, do a SQL that searches in the MoodFuse database, and check against the RadioDJ database for conditions like "last played" or whatever is needed.

Applications I see are endless. Among other things, let's say I want to create a program for the early hours : "Low/Medium Energy" "medium Happy" "Low/Medium danceability". Noon or Friday night "Very Happy" "High danceability".

The script is open source and available for download. I'm interested in contacting the developer, but wanted to get some input from the RDJ community as well. any thoughts?

FreerunMedia

Quote from: Polar on May 03, 2019, 10:37:40 PM
Martin Luther King had a dream...
John Lennon imagined it...

Hear me out. MoodFuse is the word. A few sliders where you set the grade/level of "Energy", "Happiness" and "Danceability". The script goes through your database and does the magic. A Playlist is build.

This is in simple terms what MoodFuse does. The scripts is written to get the music information from Youtube and Spotify (all legally done). Now, what if it could be revamped to work with RadioDJ, without altering the structure from RadioDJ. Create a new database, let MoodFuse query the RDJ-database, and populate the new database with a copy of the records found. Then, when creating a rotation, do a SQL that searches in the MoodFuse database, and check against the RadioDJ database for conditions like "last played" or whatever is needed.

Applications I see are endless. Among other things, let's say I want to create a program for the early hours : "Low/Medium Energy" "medium Happy" "Low/Medium danceability". Noon or Friday night "Very Happy" "High danceability".

The script is open source and available for download. I'm interested in contacting the developer, but wanted to get some input from the RDJ community as well. any thoughts?

It is a very nice idea with only one remark. Creating another DBase for Moodfuse and copy track data to that database, searching and checking against the repeat rules in the RadioDJ DBase is a little bit of going back and forth. Let Moodfuse search the RadioDJ DBase without altering it, create the playlist and let RadioDJ play that playlist. That way MoodFuse knows what has been played for how many times. Moodfuse knows repeat rules so it doesn't have to let it checked by RadioDJ and it work a little better.

Example: Let's say Moodfuse created a playlist and a very nice one too. Send that playlist to RadioDJ and RadioDJ is checking that playlist against the repeatrules. Now there are 4 tracks that can'rt be played according to those rules. What is going to happen then? Sending the playlist back to MoodFuse and rebuild one? This could take forever going back and forth to get a good playlist.

It would be a very nice idea though to have an open source playlist generator.
Running 3 editions V1.8.2 at www.salto.nl and v1.8.2 at radio251.nl. ( NOW with 2 live studio's! )

Polar

Quote from: FreerunMedia on May 04, 2019, 10:39:47 AM
Let Moodfuse search the RadioDJ DBase without altering it, ...

The problem I foresee is if RDJ gets an update, fields are added, or renamed in the database, the entire script crashes and will need an update too. So there needs to be a way to minimize the risk. Or maybe the used RDJ database fields can be defined in a config setting in the playlist generator. Just an idea.

Let's get this conversation rollin' ladies and gents !  :cool:

stevewa

database table "songs" already has a data field/column named "mood", varchar 150 chars...

so your script simply needs to iterate thru that table,
find a match on the artist / title,
and update the mood data field with a correct description of the song / track's mood, i.e. "low energy"

then in RDJ, when you create a rotation, simply specify which keywords you want the playlist to be generated on, i.e. "morning wakeup easy energy", and let rdj algo handle the recently played data values.

the script should also output a listing of tracks that exist in the database that have no mood value, so you can manually edit those tracks and set them yourself, in case the songs you have in your library are not found in the moodfuse library.

and when you build a rotation, it will tell you how many tracks it found that match your filter parameters, so if you only have 3 songs with mood values, it won't fill an entire hour worth of music, etc.

Polar

@stevewa  : Aha ! That is was I thought too. But it isn't that simple. For starters, the various mood definitions are hard coded in RDJ. I just tested what would happen if you manually change a mood in the database in a track from "not set" to "not set - test". Restarted RDJ, but changes are not visible. Also, your suggestion would not catch the difference between low-energy-happy and low-energy-sad.

The other problem would be to assume that the MoodFuse script actually works with "word" mood definitions. Just as with the Picard MusicBrainz addon https://github.com/MTG/essentia, there is more than that meets the eye. Behind the scenes there are algorithms that are used to calculate certain values, that then again need to be interpreted by the software.

Yet something else to consider is that the script uses the Spotify Recommendations API, builds a list, and plays the videos on Youtube. IOW Spotify has a certain list based on what others are playing, or what Spotify has in its playlists (not all artists are represented on Spotify), and then filters out the ones that match your request (from the slider settings). So there needs be be some kind of inbetween check against my-local-RDJ-database-tracks vs does-Spotify-has-my-tracks. Not sure, just thinking up loud. Because, in the end, MoodFuse does not create a "real" playlist file. It presents a web based summary on a web page, and a player that fetches the tracks one by one. So here as well there is some work to be done.

It is therefore that I would suggest the least "brute-force" approach. Don't force RDJ to do something it isn't made for to do, and the same goes for MoodFuse. But find a solution in the middle that can be adapted and configured. Kind of so that 2 apps can talk to each other.

I have send an email to the MoodFuse dev. Let's hope he responds. If not, I need to find me a programmer that can go through the script. Volunteers for the greater cause are welcome :) .