Get URL and Traktor metadata
-
Hi folks, looking for an odd function that doesn't seem to have been addressed previously in either software communities.
My aim is to extract the audio file's metadata (artist & track title) Native Instrument's Traktor, and project these onto a screen. Traktor isn't able to do it directly, so one workaround I found was using an application called Now Playing (NP), which extracts the metadata while Traktor's broadcast is engaged.
From what I understand, NP sends the text out as an image at a specific address local host address, and one of the examples on their website is to connect it with OBS' browser function. While I managed to successfully get OBS to display that image, trying the same address on the "Get URL Text" actor did not work, as it simply outputs an HTTP error message when in Post mode, and a very long string of code in Get mode, which frankly I can't say I understand very well..
Hope the above explanation made sense, happy to provide more details and/or screenshots if it helps.
Any pointers on this specific issue, or any other ways of getting track metadata out of Traktor would be much appreciated.
-
Could you share the link that you are using in OBS
and
the response text that you got from the actor
-
I'd just name the files so they contain the artist and track title in the file name separated by a delineator character such as "@", e.g. "Rick Astley@Never Gunna Give You Up.wav" then use the Get Media Info actor to pull the name into Isadora as a string, then use JavaScript to parse the file name into whatever form it is that you need to output. The delineator character would be used so that in the JavaScript actor you can parse everything before that character and output it as the artist, and parse out everything after that character to output as the track name. You could also use the JavaScript actor to remove the file extension from the end.
-
Thanks for the quick reply, see attached images.
The first image shows NP and OBS, with the prescribed address inputed in OBS, which received the artist and track name.
The second image is the izzy patch, with the Get URL actor get at get.
The string of text to come out of that is about 4 pages long. When set at post (form or raw), the result is:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /</pre>
</body>
</html> -
Thanks for the quick reply. That's not a bad idea, but firstly, it would mean renaming an entire catalogue of music, which I'd rather avoid, and secondly, it still needs pulling from when Traktor is loading a track, which I can't see a way of doing. Or perhaps I didn't understand what you meant? Thanks!
-
My previous suggestion was just about how I'd do it if I was playing the media from Isadora.
Different idea:
Does Traktor have a similar thing to media numbers like in Isadora? If so, if you can output whatever media number is playing in that software via OSC, you can use that to recall a line number in a Data Array actor in Isadora that's looking at a text file where each line has the corresponding artist and track name for each media number in Traktor.
Example gif: https://recordit.co/ewajQ2vZPy
File from gif: artist-and-track-name.zip
-
@moriaty said:
Cannot POST /
This tells me the URL the software provides doesn't accept a http POST request, so your only option here is with GET. Unfortunately, that won't return an image.
You may be able to get the image data using the TCPIP actors, however I have never tried this. I wrote a tutorial on using these for text data some years back (Using data from web APIs in Isadora: part 1 (dusxproductions.com) that would need major updates to accept the image data.
We have a solution for this coming with our next release of Isadora, unfortunately that is still some time away.
-
Annoying thing is, Traktor does have playlists with numbered items, it just cannot output it, so stuck really on this. But I appreciate the help with the gifs and patch!
My rough solution will be to just screen grab the deck's header with the track info and add this as an image
-
Thanks for the help. I waiting to hear back from the NP developer. The app does get the information as text, but then outputs it as an image, I wonder if there is an option to see the original Traktor data instead.
I'll give the TCPIP approach a try. Thanks again for all the help!