Author Topic: LikeADJ - Hue lighting and more...  (Read 3717 times)

DJC👽D

  • Newbie
  • *
  • Posts: 9
As I am a MIXXX user and want sometimes to listen my music at home with MusicBee (mixing genres smoothly, having a nice transition, disco 💡, and 🐝 in my sofa...):

I wrote a little plugin which automix your 'nowplaying' playlist according to:
  • BPM (Beats Per Minute)
  • Initial Key (only Camelot and/or Open Key notation)
  • Energy
  • Ratings
  • Genres
  • Hue lighting (with beat detection based on spectrum data, if you want good results 320k Constant BitRate or Variable BitRate for each song required)

Of course (depending on what you want to use):
  • and/or 'BPM'
  • and/or 'Initial Key' (only Camelot and/or Open Key notation)
  • and/or 'Energy'
  • and/or 'Track Rating'
  • and/or 'Genre'

tags must be filled in order to use this plugin correctly, but you can use too this plugin ONLY for Hue lighting (with beat detection) : no tagging required for this feature.

If you use 'Hue lighting', you have before to verify/update firmwares on your Hue bridge and your Hue lights via the official Hue application available on Android or IOS because I use directly REST/JSON requests embeded in the Hue Bridge to pilot Hue lights and lastest firmwares are required for better responsiveness (firmwares update take a while, so be patient).

If you use 'Harmonic Mixing', you have to create a 'custom tag 1'  into MusicBee->Edit->Edit preferences->Tags (1) like this :
Custom 1:  Display Name: Key  Save to music file as tag: Initial Key

If you use 'Energy', you have to define a new tag into MusicBee->Edit->Edit preferences->Tags (1)->Define New Tags like this :
Identifier: Energy id3(.mp3): EnergyLevel
and you have to create a 'custom tag 2'  into MusicBee->Edit->Edit preferences->Tags (1) like this :
Custom 2:  Display Name: Energy  Save to music file as tag: Energy

To understand Camelot notation see Harmonic Mixing.
For BPM and 'Initial Key' tagging see TuneXplorer or MixedInKey or Mixxx.
For Energy tagging see MixedInKey.
For 'Track Rating' and 'Genre' tagging MusicBee is perfect.

Download mb_LikeADJ.dll in your MusicBee\Plugins directory, activate the plugin and configure it.
Once it's done, shuffle your entire collection and the next song will be auto mixed following your choices and so on…

Code source on GitHub.
Latest version of mb_LikeADJ.dll on GitHub (see commits).
If you're interested, help for code optimization, bugs fixing or adding new features is welcome.

In 2.0.3 Beta, you can now select lights you want to use + an infinite loop detection if no next song is found.
In 2.0.4 Beta, the timer of beat detection is now configurable (I recommend 750ms) + if no ini file found LikeADJ is able to create a new one + you can disable logging of beat detection and lights color change + minor fixes.
In 2.0.5 Beta, just some fixes.
In 2.0.6 Beta, Energy and Genres have been added.
In 2.0.7 Beta, improvements concerning beat detection (subband) (I recommend henceforth 200ms).
In 2.0.8 Beta, brightness range of lights (on beat detection) added, code cleaned.
In 2.0.10 Beta, well I am back after one year :) BIG BIG bug fixed if MusicBee is installed (not in the portable version), because if UAC is activated LikeADJ has not all privileges to write ini and log files, sorry for that but I use the portable version. Now you can generate playlist based on your choices and save songs played via LikeADJ into a playlist.
In 2.0.11 Beta, just a few corrections regarding the checkcombobox that loses focus when saving checked genres.
In 2.0.12 Beta, just some fixes concerning playlist generation.
In 2.0.13 Beta, now I check if MusicBee is installed or portable and write LikeADJ files in the right location.
In 2.0.14 Beta, various improvements. Next version will be Release Candidate, I think. GitHub created for LikeADJ.
In this new 2.0.15 RC, only one DLL mb_LikeADJ.dll, no more interference with others Newtonsoft.Json dll in the same directory. Code released on GitHub.
And since..., see commits on GitHub.

For better results in your mix with MusicBee, don't forget to activate into MusicBee->Edit->Edit preferences->Player:
  • 'crossfade track for:' (I use 5 seconds)
  • 'fade in new track' (I use 0,5 seconds)
  • 'normalise volume of tracks with replay gain tags' (MusicBee is able to analyse and write this tag)
  • 'use logarithmic volume scaling'
  • 'remove silence at start and end of each track' (You can use too mpTrim to remove digital silence forever in your mp3s)

Prefer 'WASAPI' or 'ASIO' (if you have a controller and drivers) output for a better sound.

Have a l 8) 8) k to the REALTIME logfile mb_LikeADJ.log to see more informations (accessible directly via the LikeADJ plugin configuration panel or via 'Right Click' -> 'View the mb_LikeADJ.log' on the main panel of MusicBee).

Happy MIXING and a lot of thanks to Steven for MusicBee.

Two algorithms have been implemented (simple and subband) for BEAT detection + a red alert of ending song + lights changes when track change.

I have 19 Hue (lights, lightstrips and bloom) (MAX 20 per Hue bridge) and it is the maximum for my Hue bridge. More Hue lights you have, lesser is reactivity.

Report bugs in this thread... I am currently improving the beat detection (actually better for disco, techno, deep house, electro... in short with BEATS) and other things...

Keep in mind Hue lights are not a DMX solution so responsiveness is lesser but acceptable for a party with friends...

You 👍/👎 this plugin ? Found a bug ? Want more features ? You do not know what this plugin is for ? More precisons, more help ?
Tell me (même en français)... Leave a reply in this post... Your welcome (bad or good replies).
Last Edit: May 19, 2020, 02:16:15 PM by DJC👽D

boroda

  • Hero Member
  • *****
  • Posts: 3520
you need to make a new post (rather than updating existing) to others see that there is something new without opening this board (also new post will move your thread to the top).

MC_K3NNA

  • Newbie
  • *
  • Posts: 11
Hi!
THX for your Plugin.  But how do i use it?
Is there a Window with the recomended Tracks?
Im a total newbee with MB.
So i have no idea how to get your Auto DJ started.
And whats with Philips Hue? Do i need an additional Plugin to use them?
how does this even work?

Thx!

DJC👽D

  • Newbie
  • *
  • Posts: 9
Hi MC_K3NNA

For Hue, no additionnal plugin is required, LikeADJ is able to control your Hue Lights with JSON requests.

You have to fill tags on yours MP3 with required informations like (BPM, Initial Key on so on...) to use this plugin fully.

And activate features you want to use via the plugin configuration panel.

Read carefully my procedure in the first post, it's perhaps a little bit complex the first time.

Once it's done, shuffle your library and LikeADJ do the rest...

Take time, if you are a newbie with this superb software which is MusicBee, to know how to use it.

Another version is coming, with auto playlist generation and playlist saving.
But I am a little bit busy for now...

Stay tune ;)

Regards
Last Edit: September 23, 2018, 02:41:37 PM by DJC👽D

mafiadysio

  • Newbie
  • *
  • Posts: 5
Hi. I am wondering if anyone faces the problem of this plugin causing musicbee to steal focus whenever the next song is played (when this plugin is enabled). When I am fullscreen in another application, my screen will be forcefully directed to musicbee upon the start of the next song. It's annoying, and I wonder if there's a way to fix that?

DJC👽D

  • Newbie
  • *
  • Posts: 9
Hello

I don't arrive to reproduce this problem (for now but I investigate). The only window that can be annoying is when LikeADJ is trying to find the next music.

Regards
Last Edit: May 06, 2020, 12:52:37 PM by DJC👽D

mafiadysio

  • Newbie
  • *
  • Posts: 5
Hi, thanks for the reply.

I suspect the window that pop ups (the 'trying to find next song') whenever the next music starts to play is the cause of the problem here. Full-screen application aside (it was a Steam game btw), even when using another another program (like Google Chrome), the appearance of that window will just pop up even when Musicbee is minimised. That alone is annoying, even if it appear for like a fraction of a second every time the next song plays.

I wonder is it possible to make it such that the windows doesn't appear?

Thanks for the plugin by the way. I liked it a lot!

DJC👽D

  • Newbie
  • *
  • Posts: 9
Hi

I added an option to allow/disallow the scanning message box.

Download the latest mb_LikeADJ.dll and tell me when the message box is not allowed if the problem persist.

Have a nice day
Regards

mafiadysio

  • Newbie
  • *
  • Posts: 5
Hi, it seems to me that the Configuration window is missing an 'OK' button. I can't confirm my settings to try out the new change.

DJC👽D

  • Newbie
  • *
  • Posts: 9
I am currently fixing this problem. You can however enlarge the window with your mouse for now.
Last Edit: May 08, 2020, 01:22:28 PM by DJC👽D

mafiadysio

  • Newbie
  • *
  • Posts: 5
Ohh. I did not think to enlarge the window! That was dumb of me. Sorry about that.


But yeah, the problem is resolved now. The window does not appear any longer, and Musicbee does not steal focus from full-screen applications whenever the next song comes. Thanks for continuing to develop this plugin!

DJC👽D

  • Newbie
  • *
  • Posts: 9
I think the bug is fixed

Download the latest mb_LikeADJ.dll.

And of course happy you like my little contribution, Thanks :) and for Steven too +100000² 👍
Last Edit: May 14, 2020, 12:35:25 PM by DJC👽D

mafiadysio

  • Newbie
  • *
  • Posts: 5
Yep, I see the 'Save' and 'Cancel' buttons now. Everything seems to be going smoothly. Thanks a million!!