Write Current Song to TXT File?

Started by Jo Li KMC,

Jo Li KMC

If anyone's getting déjà vu, here (saga), there was a post from 2003 about this very thing.

Anyway, I'm looking for a way to get the current song from XMPlay to display on a video window.  One such solution might be to have the program, itself, write the current song information to a text file, akin to how Snap – a "music overlay" add-on for streaming software – works, then have a text overlay read from that text file.  That would, in fact, be pretty ideal, and I'd probably be Snap v6.9 – the last one to support anything other than Spotify or iTunes – if it knew what XMPlay was.

The original solution that saga came up with was a program that plopped the song title into the Windows clipboard every couple of seconds.  That... really doesn't sound useful?  Honestly, I'd rather have a teeny-tiny TXT file for my purposes.  In fact, a super-simple plugin would probably do the trick.  I could just capture the XMPlay window in my recording, but I think a text overlay would open up more possibility for customization, ya know?

Any help would be super-groovy.  As always, thank you so much!

saga

A small program that captures the currently playing song could look like this:

1. Call the WinAPI function FindWindow("XMPLAY-MAIN", 0), which returns XMPlay's window handle.
2. If the returned handle is not 0, call GetWindowText on that handle to return the current window title.
3. Goto 1 every few seconds.

This can be done as a plugin or a standalone executable (as I did back then).

sveakul

Quote from: Jo Li KMCOne such solution might be to have the program, itself, write the current song information to a text file..
Honestly, I'd rather have a teeny-tiny TXT file for my purposes.  In fact, a super-simple plugin would probably do the trick. 

This plugin does that part well: https://support.xmplay.com/files_view.php?file_id=717

Jo Li KMC

You're beautiful, sveakul.  This is exactly what I wanted.  Thank you so much!
Kinda wish it would display just the name of the file and not the entire path if that's enabled, though, ha hah.

sveakul

Good!  Mine though does NOT display the path for files, it's version 1.4.  Are you sure you can't modify that in the plugin options?  My plugin options for 1.4 are below:



This produces log entries like below, the first two are radio stations the last two are mp3 files on my PC:

2021-11-03 20:09:14  The Reverberators - Tsunami 500   -
2021-11-03 20:09:32  The Tiki Tones - Traitor Vic   -
2021-11-07 14:56:08   [MP3] 4 Strings - Take Me Away (Yuri Sky Chillmix)
2021-11-07 14:56:17   [MP3] 69 Chambers - Dead Letter Office

sveakul

BTW there is a thread for the plugin here https://www.un4seen.com/forum/?topic=19454.0 ,the developer Keltic Danor may be able to help you with an option displaying only the filename and not the path.