mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.38k stars 1.26k forks source link

Status Lines in logfile #12823

Open Eve00000 opened 6 months ago

Eve00000 commented 6 months ago

Feature Description

Hello, Is it possible to add concrete (readable) statuslines for plateractions in the logiles? Type of Date/Timestamp - Deck/Sampler[NR] - Action (Loaded/Start Play/Stop Play/Eject) - Track (Artist/Title) Thank you

Swiftb0y commented 6 months ago

hey there. Lets look at this from a usecase perspektive. From what I could gather from your various forum posts and comments on issues/PRs is that you want to send the name of the currently playing/loaded song of deck to your hardware and you're currently working around shortcomings within mixxx by inspecting the log. Wouldn't you agree that it would be better to fix the shortcomings within mixxx instead of requesting features that would hack around it?

The functionality you want (accessing the players from the javascript mapping engine) is already partially implemented for QML (see mixxx::qml::QmlPlayerManagerProxy). All that's really needed to do is figure out how to make the QmlPlayerManagerProxy accessible from plain Javascript as well. Would you agree that this is suits your needs better?

ronso0 commented 6 months ago

Dupe of #10790

I assume you want to use it for displaying the track data on your Denon player https://mixxx.discourse.group/t/explanation-logfiles-sending-tracktitle-to-controller-lcd-need-help/28986/2

I think parsing the log is a okayish but brittle hack, a more robust / easier solution would be to write the state changes to individual files (per deck). Please check #3483. That PR is huge and does a lot more than writing files, but it contains the building blocks for watching play/pause changes and writing per-deck files, incl. preferences options where to put those files.

Eve00000 commented 6 months ago

Hi, thank you for answering. First of all: off course it would be better to transmit the data directly from within mixxx. I'm not so familiar with github and pull requests etc. Could you please explane what happens when later a new version 'main' comes out, does that include all the work people did on pull requests or is all the work gone... FYI I had already another workaround with screenshot -> define areas -> ocr -> combine ocr text with variables to new javascript file. For what I know javascript is and will always be blocked for accessing local files on pc, this for security reasons. That is why parsing to javascript / including local files is impossible. I think there are 2 solutions possible: A: using an ' object'-type. For changes in my itynes-library I use the itunes-object. B: using a simple webserver. I'm not sure but I think this will always cause installation problems.

So please can you explane me first how working with pull request really works? Thank you

ronso0 commented 6 months ago

Could you please explane what happens when later a new version 'main' comes out, does that include all the work people did on pull requests or is all the work gone...

main is the development branch. PRs are targeting a certain branch (version) and the new feature / bugfix will be available as soon as that version has been released. No work is gone, not sure what you mean.

ronso0 commented 6 months ago

FYI I had already another workaround with screenshot -> define areas -> ocr -> combine ocr text with variables to new javascript file.

Sounds like a great hack : p

Swiftb0y commented 6 months ago

Maybe lets start from the beginning. What controller are you using? Is there already a mapping in mixxx? How do you communicate with it (midi&sysex)?

evelynnev commented 6 months ago

Is there a way to communicate directly? fi chat or so? I have a denon hc4500, I've found a midi file on the board here from 10 years old that I'm tweaking

Oh i downloaded github again (after a long time) and it recognized my old username :-) I downloadad the PR as you call it, I can't find the architecture-map in it do you have a map?

evelynnev commented 6 months ago

IMG_8888

this does the trick:

/// nircmd to take printscreen F:\Download\Downloads-i7\nircmd-x64\nircmd.exe cmdwait 1000 savescreenshot "A:\MIXXX\Screen\mixxx-screen.png" ///image magick to crop to 4 areas magick convert mixxx-screen.png -crop 545x25+125+220 Title1.jpg magick convert mixxx-screen.png -crop 635x30+125+245 Artist1.jpg magick convert mixxx-screen.png -crop 535x25+1165+220 Title2.jpg magick convert mixxx-screen.png -crop 635x30+1165+245 Artist2.jpg /// tesseract makes text from the areas "c:\program files\tesseract-ocr\tesseract" artist1.jpg artist1 "c:\program files\tesseract-ocr\tesseract" artist2.jpg artist2 "c:\program files\tesseract-ocr\tesseract" title1.jpg title1 "c:\program files\tesseract-ocr\tesseract" title2.jpg title2 /// commands for combine into first part of midi.js set "lineA=/*" set "lineB= Denon DN-HC4500 controller script for v2.5" set "lineC= by Evelynne 02/2024" set "lineD= /"

set "line1=var ArtistArray = ["AIT1", "AIT2"];" set "line2=var TitleArray = ["TIT1", "TIT2"];" set "line3a=var Deck1Title = " set "line4a=var Deck1Artist = " set "line5a=var Deck2Title = " set "line6a=var Deck2Artist = "

for /f "delims=" %%a in (title1.txt) do set "line3b=%%a"&goto :stop :stop

for /f "delims=" %%a in (artist1.txt) do set "line4b=%%a"&goto :stop :stop

for /f "delims=" %%a in (title2.txt) do set "line5b=%%a"&goto :stop :stop

for /f "delims=" %%a in (artist2.txt) do set "line6b=%%a"&goto :stop :stop

echo %lineA% > textok.txt echo %lineB% >> textok.txt echo %lineC% >> textok.txt echo %lineD% >> textok.txt echo %line1% >> textok.txt echo %line2% >> textok.txt echo %line3a%"%line3b%" >> textok.txt echo %line4a%"%line4b%" >> textok.txt echo %line5a%"%line5b%" >> textok.txt echo %line6a%"%line6b%" >> textok.txt

///combine new 1st part (above) with static 2nd part (functions etc) type textok.txt Eve-Denon.txt > OKOKOKOK.txt //// copy to original place copy OKOKOKOK.txt "C:\Users\Evelynne\AppData\Local\Mixxx\controllers\Denon DN-HC4500 NEW.midi.js"

-> midi.js file has new values for vars Artist1 Artist2 Title1 Title2 ;-) -> updated in mixxx on-the-fly and displayed directly -> script is run every 5 or 10 sec :-)

evelynnev commented 6 months ago

Dupe of #10790

I assume you want to use it for displaying the track data on your Denon player https://mixxx.discourse.group/t/explanation-logfiles-sending-tracktitle-to-controller-lcd-need-help/28986/2

I think parsing the log is a okayish but brittle hack, a more robust / easier solution would be to write the state changes to individual files (per deck). Please check #3483. That PR is huge and does a lot more than writing files, but it contains the building blocks for watching play/pause changes and writing per-deck files, incl. preferences options where to put those files.

I have been reading a lot, looking at code .... How can I compile this version to try it? (I am not good in github stuff, sorry)

Swiftb0y commented 6 months ago

Is there a way to communicate directly? fi chat or so?

yes, you're welcome to open a new topic at https://mixxx.zulipchat.com/#narrow/stream/113295-controller-mapping

I downloadad the PR as you call it, I can't find the architecture-map in it do you have a map?

I don't have a mapping, but you're welcome to add one. If you want to add the feature you want (reading out data from the decks from the JS), you'll need to do a little C++ coding though. I already gave you the appropriate pointers above (with the QMLPlayerManagerProxy). I encourage you to check out the Controller Mapping docs and the developer docs. Both should help you to get started developing and submitting this feature.