Now Playing Export Feature

Mixxx already tracks the currently playing song. History and recording cue sheets show this.

Is there anyway to surface this? Ideally, I would love to have a simple write to text file option so that I could then read that text file in via OBS for streaming. The ultimate functionality for me would be to be able to write the currently playing song to a text file and the artwork to a generic image, both of which I could then read in, but I’d be more than satisfied with just the track title.

2 Likes

This would be useful!

I made a hacked way that works by polling the MIXXX sqlite database.

Not perfect but does it OK for my purposes… the sqlite query could probably be extended to fetch other info.

Details in this post, including the simple script.

2 Likes

That’s very interesting. Thank you. I’ll take a peek at this in more detail shortly.

1 Like

What an excellent idea!

I quickly scripted a small Java program that opens a window with the current track.
With a JDK from here:
https://jdk.java.net/14/
And a JDBC driver from here:
https://bitbucket.org/xerial/sqlite-jdbc/downloads/
Compile: javac CurrentTrack.java
Run: java -classpath “.;sqlite-jdbc-3.30.1.jar” CurrentTrack

Not really ready to use for a display yet, but still a first step…
CurrentTrack.java (3.2 KB)

grafik

1 Like

Thanks again for that. I made some quick modification on the shell script to get what I needed out of it and then I cp out the results to a file in my cloud storage. That then gets picked up on my broadcast system and read by OBS. I still need to implement it appropriately, but a proof of concept worked perfectly.

1 Like

Fine, my goal is different - to project the current track onto the wall.

1 Like

it’s great to see this little hack was of use, and is being extended.

I’ve had my MIXXX auto-DJ radio station running with this script for 61 days now in the one MIXXX session, so it seems reliable.

As far as I see does the history feature add each track only once in the daily pseudo playlist!
So the method above - to display the last added playlist track - will not work if you played a track at the same day before.
It does work with auto-dj in case you use the option to add played tracks at the end again, because auto-dj is also a pseudo playlist and you’ll fork that new playlist track.

Definitely. I think a dedicated feature to do this on song change would be ideal.

Audacious music player has this implemented as “on change run command” which is quite nice.

This was started as a GSOC project a few years ago but the branch has not been merged. IIUC there’s still work to do on it, but I haven’t followed that closely so I’m not sure what remains to be done.

I guess you could reuse variables in part of the code in the Broadcast section.
That sends artist and title to an Icecast or Shoutcast server.

On Shoutcast a GET command sends the artist and title separated by a space, dash and space.

I am thinking of a standard file that can be overwritten.

Drat.

I wrote a very simple script that pulls the currently playing song from Mixxx’s window title and writes it to a text file every 5 seconds in the format “Artist Name - Songtitle”.
It works perfectly with OBS and works perfectly on Linux and Mac!

4 Likes