berkon / track-suggestor

DJ tool for suggesting tracks for harmonic mixing with Traktor Pro (from Native Instruments)
MIT License
31 stars 2 forks source link

Track names not detected #2

Closed Schuppentroef closed 3 years ago

Schuppentroef commented 3 years ago

Hello,

Since this is my first post on Github, I'm not sure whether this is the right place to post it... So apologies in advance should this be the case. I just read about this project in the Traktor forum, and was very interested to try it, but I'm afraid I'm doing something wrong. So an overview of the situation:

afbeelding

afbeelding

afbeelding

afbeelding

afbeelding afbeelding

Any ideas on what I'm doing wrong? Seems the Loopmidi is receiving information from traktor, and the track suggestor clearly knows when a track is loaded, but it's unable to clearly read the name? I've also tried it with an older version of Traktor (2.11.3), since I read it was originally designed for Traktor 2, but I get the same behavior there.

Let me know if there's any additional information you would need

berkon commented 3 years ago

That's fine, this is absolutely the right place to write when you have any issue.

That's indeed very strange. It doesn't look like you're doing anything wrong. Could you please do the following: Press <ALT><CTRL><SHIFT><i>. This will open a debug window inside the tool. Then please select the "Console" tab and send the output from there to me (simply copy/paste).

By the way. Thanks for your very detailed report! I wish everyone would add so many details and not only tell "something is not working" ;-)

Schuppentroef commented 3 years ago

Nice to hear I've found the right place :)

The extract from the console tab here below, I've selected the same songs on the same decks as in the example of my first post. I've only copied the first 10 seconds of the messages, since it seems to keeps repeating the same error messages every couple seconds.

_C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:1081 [Deprecation] Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions since M77, around September 2019. See https://www.chromestatus.com/feature/5138066234671104 for more details. (anonymous) @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:1081 C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:02:144 Collection loaded successfully! C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:02:651 Connecting to MIDI port: loopMIDI Port ... C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:02:655 Found MIDI inputs: C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:02:655 [object MIDIInput] C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:02:655 State Changed for: loopMIDI Port (input) State: CONNECTED Connection: OPEN C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:05:131 Line 2 is differing! ========================= C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:05:133 line_static_str_SHADOW: |ten Unwritten | C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:05:133 tmpStr: |Unwritten| C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:05:133 line_static_str: || C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:203 Line 1 is differing! ========================= C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:203 line_static_str_SHADOW: | Toploader Toploader | C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:204 tmpStr: | Toploader| C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:204 line_static_str: || C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 22:44:06:270 Not found: | Toploader| ... ignoring! log @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 CheckArtistName @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:352 ExtractString @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:265 midiMessageReceived @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:885 C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:604 Line 3 is differing! ========================= C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:605 line_static_str_SHADOW: |eld Natasha Bedingfield | C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:605 tmpStr: | Natasha Bedingfield| C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:605 line_static_str: || C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 22:44:06:676 Not found: | Natasha Bedingfield| ... ignoring! log @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 CheckArtistName @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:352 ExtractString @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:265 midiMessageReceived @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:895 C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:743 Line 0 is differing! ========================= C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:743 line_static_str_SHADOW: | Dancing In The Moonlight | C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:743 tmpStr: |Dancing In The Moonlight| C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:06:743 line_static_str: || C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:09:688 Line 1 is differing! ========================= C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:09:688 line_static_str_SHADOW: | Toploader Toploader | C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:09:688 tmpStr: | Toploader| C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:09:688 line_static_str: || C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 22:44:09:755 Not found: | Toploader| ... ignoring! log @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 CheckArtistName @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:352 ExtractString @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:265 midiMessageReceived @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:885 C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:12:744 Line 3 is differing! ========================= C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:12:745 line_static_str_SHADOW: | Natasha Bedingfield Natasha Bedingfield | C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:12:745 tmpStr: | Natasha Bedingfield| C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:149 22:44:12:745 line_staticstr: || C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 22:44:12:816 Not found: | Natasha Bedingfield| ... ignoring! log @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:136 CheckArtistName @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:352 ExtractString @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:265 midiMessageReceived @ C:\Users\Karla\AppData\Local\Temp\1sDR34toXUxoyjgMe6FLzjfBC2c\resources\app.asar\js\renderer.js:895

berkon commented 3 years ago

There is a strange thing I found.

Let me shortly explain how the tool works: Unfortunately receiving the track/artist names via the DENON HC-4500 MIDI plugin of Traktor is not really straight forward (but unfortunately the only way to get track/artist information from a deck). The physical DENON HC-4500 controller is quite dumb. It can only display 2 * 12 characters (2 lines) for the track and the artist name. Thus it cannot scroll strings. To scroll strings through the display, Traktor has to "scroll" the string and send an update every second (I guess) to simulate such a scrolling effect. This can lead to situations where the transmitted bytes contain the last few characters of a string and also the first characters at the end like this:

1  2  3  4  5  6  7  8  9  10 11 12
p  l  o  a  d  e  r           T  o

Unfortunately there is no real start/end marker. The only way to find the start/end of a string is to search for three consecutive blanks (positions 8, 9 and 10 in the example above).

Now back to the issue. What I expect is a string like this one (dots mean blanks):

...STRING...

what I see in your case is this:

.STRING.

The strange thing is, that the mechanism correctly detects 3 consecutive blanks at start and end. So I assume this is just a logging issue. I can't explain why. When loading exact the same track into my Traktor (2.11.0) I get the correct representation with 3 blanks at start and end. Anyway ... let's assume this is fine.

The remaining issue is now, that for whatever reason there is one additional (4th) blank in front of the string, which does not make any sense (I guess you don't have a blanks in front of your artist names). So this is very unusual and unexpected there. Thus that blank is not removed and the comparison with the string from Traktor's database of course fails because of the additional blank.

I'd suggest you drop me a mail to bernd@konnerth.de. I will then create a debug build of the tool which removes these blanks in front of those strings. I'll then share the build via my Google Drive with you. Once I find the final solution I will update the issue here and let all others know about the bugfix.

berkon commented 3 years ago

OMG!!! HTML can be really annoying sometimes. The issue with the not displayed 3 blanks is caused by HTML!! When looking at the HTML code of this page I can see all blanks. But when looking at your post as displayed on this page, there is only a single blank instead of 3 (or 4 in this case). HTML obviously removes all blanks but one. So what I now can see is this:

....STRING....STRING....STRING.... and so on ...

So somewhere there must be a blank too much. I wouldn't expect that blank to be at the beginning of the artist name, because in your Traktor screenshot it looks like the track and artist names are properly aligned to the left, but it's hard to tell exactly. So, can you please check whether there are blanks at the beginning or end of the artist names? Or maybe send that snippet from your XML collection.nml file which contains one of these two problematic tracks?

Anyway, I think I can solve the issue by trimming those blanks away.

Schuppentroef commented 3 years ago

Bernd, your enthousiasm is contagious :)

I’ve done some more testing, and I found that there are songs which it does recognize!

afbeelding

Also the recommended playlist is created the moment the first song is recognized, I can access it in Traktor. I've also tested it on a Windows 7 with Traktor 3.5.0, same behavior. Here below the snippet of the Collection file for the 4 songs mentioned so far.

afbeelding

afbeelding

While writing this, I do see that the problematic songs have a space at the end of the artist field and the 2 correctly functioning ones don't! I removed this space and now the song recognition is working!

afbeelding

Apparently this is something that has changed in my Mp3Tag command for automatically generating artist and song name based on file name. I've let Mp3Tag do a batch rename of these tagfields, and now it seems all tracks are correctly recognized. I've played with it for half an hour, loading one track after the other, and all tracks are recognized correctly.

Thanks for the hint for looking at the amount of spaces!

berkon commented 3 years ago

That's very good new! Nevertheless I will add that modification, so blanks are stripped at the beginning and the end of the track/artist strings, to avoid that other users run into this issue.

;-) yes, I'm very happy to hear that people are using my little tool(s). Its very nice to get such positive feedback. Thanks a lot! And so I'm addicted to creating good and useful software. ;-)