I even made a little program to read the now playing track from the sqlite database which then allowed the lights to follow the music (for complex reasons I don't have time to explain).
Most importantly it worked on the night without missing a beat.
(Is there a simpler solution I missed?)
import sqlite3
import time
from pathlib import Path
home = Path.home()
con = sqlite3.connect(f"{home}/.mixxx/mixxxdb.sqlite")
cur = con.cursor()
def get_track_name():
global cur
trackid = cur.execute("SELECT * FROM PlaylistTracks WHERE id=(SELECT max(id) FROM PlaylistTracks);").fetchall()[0][2]
trackname = cur.execute(f"SELECT * FROM library WHERE id={trackid};").fetchall()[0][2]
return trackname
now_playing = get_track_name()
print(now_playing)
while True:
if (np := get_track_name()) != now_playing:
now_playing = np
print(np)
time.sleep(1)
Edit: FWIW, unbox [1] uses the same approach.
Edit 2: yes, I should have cleaned up my SQL statements.[1] https://github.com/erikrichardlarson/unbox/blob/2182f227a0fc...
Also, your channel is fantastic. You’re a good teacher and your voice is excellent.
Someone has posted something similar, but it was literally just about 10 lines of python that read the right key in the dictionary and then posted that to a flask web page that another part of the system read to know what track was being played. I'm not a great programmer and it took me maybe 15 minutes to do, so it should be easy enough!
But..... If its always in a SQLite DB you should be able to use DB Browser for SQLite to inspect the DB Schema and then write a bash/python (whatever) script to pull the info out.
RESULTS=$(sqlite-utils "data.db" " SELECT song, artist, duration, FROM my_table WHERE song = 'CURRENT';")
RESULTS=$(sqlite3 data.db <<EOF SELECT song, artist, duration, FROM my_table WHERE song = 'CURRENT'; EOF )
I have no idea what the schema looks like but those are just some examples of how straightforward it might be. Run it on CRON (whatever) update as needed. https://cronitor.io/guides/python-cron-jobs
Once you have the Schema an LLM could most likely do the rest if you are not a programmer, but still need someone to get it added to the site.
I'm not surprised that startups haven't tackled this, as you inevitably run headfirst into licensing issues - but I'm curious what exists in the open-source world for this!
Wedding website was a django site, with accounts for everyone I invited. I had a separate part of it where the guests could choose an RGB colour, and then choose tracks by searching. I used a spotify API for this, so when they chose a track, if someone chose a similar one (say a specific mix) then they could see this and vote for that. Each guest could choose 10 tracks. I used some HTMX for this as well (first time) and it generally worked pretty well. Database stored the spotify ID/UUID/whatever for each track
Once everyone had voted, I then bought all the tracks which we were going to play - reason being that I couldn't rely on WiFi on the day, and wanted to be 100% sure it would work, plus I couldn't "DJ" from spotify tracks.
All of the tracks were then renamed including their spotify ID/UUID/whatever, so the system knew who had voted for a specific track.
I then made the playlist up in Mixxx, and trimmed tracks to fit better, and made it work musically (my wife is excellent at this, she made it really work, mix wise). Made sure it all played OK.
The other part of the system was a custom light setup, with sound-reactive LED bars I made up (using ESP8266 and WLED firmware with 150 LEDs per 'stick') with them all being controlled by a custom controller. This system read the track from the Mixxx system (via HTTP request to a flask app I wrote that read the sqlite dB from mixxx to know what track was playing), and then coloured the lights with the colours of the people who had voted for the tracks. Also if you went onto the dancefloor you could 'swipe in' via an RFID label which was in the wristbands, which also reacted to lights and were colour-controlled over DMX.
The light patterns were sometimes random, or if one was good for a specific track then I programmed that into the system.
It was all spaghetti code, and the first time I used FastAPI. The code is terrible, and I'm only making it public as I thought it might be useful to someone.
https://github.com/djaychela/wedding_controller
I've just had a terminal cancer diagnosis and am no longer doing anything other than trying to stay alive. So please, no grief about the code! I'm sharing this to try to help someone else if they ever want to do something like this...
Wishing you all the best, and thank you for contributing to the community with this, especially under such difficult circumstances.
Dude, that is the true hacker spirit - I am a programmer and frankly that setup you described is more creative than anything I have ever made.
Fight on and keep at it - best wishes to you and your family!
Meanwhile, Mixxx allows you to write your own adapter scripts for any controller you have (as long as it outputs MIDI), and there's a built-in library featuring scripts for the most common commercial controllers and MIDI devices out there.
But in my experience, you'll never be able to control the jogwheel as precisely as in officially-supported hardware-software combo.
At one point they were the industry standard but they shot themselves in the foot with their reluctance to release a CD turntable until after Pioneer had already got themselves into nearly every club.
Though I can’t say I’m surprised. I never thought 1210s was a particularly good vinyl turntable either.
Is there already a mapping for you device? Check the manual https://manual.mixxx.org/2.5/en/
and if not there, the forum might have one: https://mixxx.discourse.group/c/controller-mappings/10
I notice that HID is also supported: https://manual.mixxx.org/2.5/en/chapters/controlling_mixxx#c...
And it's surprising how quickly people adapt to it when they're used to other setups, within an hour a few people have gone from 'oooh, can I have a go' to showing me their own tips, tricks and different styles.
Especially combined with a youtube & soundcloud downloader running on a different workspace, I can get pretty much any track into the library within a minute or two.
It's overkill, but a lot of similar tools either lock you into a media ecosystem, lack some power-user functionality, have a subscription, or don't work at all on Linux or macOS.
Is it possible to stream it for an online game? I do both and need something for my creepy Call of Cthulhu game. Music and sound effects work really well with 1920s Call of Cthulhu.
E: I did look at it before but got intimidated by the screenshots.
Some years ago I made a Mixxx demo video with a DYI "integrated controller". It demos Linux boot to Mixxx, touch screen, beatmatching and some modest effects:
https://www.youtube.com/watch?v=DjHvW4OsQ2Y
Mixxx devs: if you are reading this... cheers :-)
I haven't tried that myself, but used the AutoDJ feature of Mixxx a couple of times. It's fairly basic, you have a playlist, setup how you want it to fade, and how fast, hit Play and off it goes matching the beatgrids and whatnot.
Considering that this was more than a decade ago, I'm pretty sure that this bug has been fixed by now.
Two and a half songs in the MacBook died and wouldn't come up after reboot, and that was that.
Felt bad for them, but using a laptop as critical infrastructure is usually a bad idea.
During my DJ sessions (and while dabbling in digital audio files from a computer), I usually brought an old Sony Discman loaded with my best tracks on a burnt CD. Kept ready at moments notice in case disaster struck. Sadly crashes weren't uncommon at all in the bad old late 90s when consumer OSs were unstable crap.
I guess a smart phone could do that duty today, but you'll still need to have an adapter plugged into the mixer beforehand/ready to go to minimize disruption.
Just looked it up - I had no idea it's from 2001 - this puts it in a small group of long-active FLOSS
It was cool getting to explore features like the ability to stream to radio websites that others would follow a link to, to hear the music( something done in the first few years of COVID to facilitate DJ'ed music for 'online ' dances, which were a thing for a while.
I tout it heavily and enjoy it, and it is pretty incredible that it provides all that it does for free and in a open source manner . I hope it continues to grow. I run into a few others who use Virtual DJ and hope that Mixxx eventually picks up the few things they do it does not yet do
Music has fallen out of my life since then, but I am glad Mixxx is going strong.
Can Mixxx do this?
I find the mouse-cursor drag very clunky.
No it does not. It will try to push it on you, but you can export to USB without account or subscription.
Create a playlist with your tracks, insert USB, right click on the playlist and export to USB.
Mixxx is entirely community driven: There is no company behind it, everything is done by unpaid volunteers.
Some Lights are buggy and the fix is not yet out.
Also Highlighting Tracks based on a fitting Key is only availible in the Alpha Branch of the software, which obivously has lots of other issues.
Besides that its an easy software which can handle all of my other feature requirements and it runs really nice.
So i would really recommend it ;)
Sadly I have to use RekordBox now that I want to not bring the laptop + DJ controller, but just a USB stick. And RekordBox does not run well on Linux (tried VirtualBox and Wine, both failed attempts).
Sadly there's no RecordBox clone, or "export to RekordBox USB" feature on Mixxx.
RekordBox doesn't even run well on Windows, so hard to imagine what worse looks like.
But yeah, if Mixxx (or other FOSS software) could offer writing playlists into USB sticks, I'd get rid of RekordBox yesterday because few software out there works as bad as RekordBox.
Unfortunately it's far down my priority list given the cost, my unfamiliarity with Mixxx development and that I rarely do anything without Mixx.
But this is absolutely what ecosystem grants/bounties should be for.
* https://github.com/kimtore/rex
* https://github.com/Holzhaus/rekordcrate (Current status of export: https://github.com/Holzhaus/rekordcrate/pull/103 )
BTW, the DJ collective I'm with has Pioneer CDJ. If anyone need use the hardware let me know. I'm trying to get them to start using open FOSS software, but it is hard.
The whole point is that the DJs in my collective are used to play vinal, so the pioneer CDJs just feels nice on the hand.
Yes some of the newer dj controllers r quite nice, but rekorbox just got to all the clubs first, so it's everywhere. Kinda like how Adobe is the defector for graphics.
I have only tried it with traktor, but AFAIK it should also work with mixxx. Pi, laptop, whatever. And you can keep using the screens on the CDJs.
And the next user can keep using the USB, no hardware or software modification necessary. Much easier then coding a new firmware.
Mixxx, Algoriddim DJay, Traktor, Rekordox, probably Virtual DJ. Connect CDJs and mixer via USB and off you go. If you have an mixer with no build in audio interface, you would need a external sound card (a hassle because a lot of cables) or aggregate all the CDJs into one virtual card.
I'd be down to fund a bounty/grant for this (and I'm clearly not alone), if anyone is looking for booty :)
Without the Rekordbox beat analysis, you'd only be getting track names, and you can achieve similar functionality on the Pioneer side by just putting the files for a each playlist in a separate folder.
There's a kaitai bin format parser config file for the usb db file but kaitai isn't expressive enough to read it properly from that.
Pioneer (err Alphatheta)'s stranglehold on the industry is a shame due to lack of interoperability, among other issues with Rekordbox.
Without beat grids have to best match by ear but that’s par for the course for many DJ scenarios.
But Pinoeer can be weird and there's a lot of old (even ancient) equipment out there, so sometimes it's a case of finding the lowest common denominator and sticking to that.
[1]: https://cdn.rekordbox.com/files/20200410160904/xml_format_li...
Back then Mixxx didn't feel like a finished product, everything was not ready to actually use it in a "production" setting.
Then I found xwax [1], which uses the same timecode library as mixxx iirc. Very unspectacular UI, no mouse support, but super stable and easily as good as the commercial Serato Scratch Live. Just needed a 4i4o audio interface for around $100 and it was good to go, awesome software!
https://www.numark.com/product/dj2go2-touch
I've got a cute little portable setup using it, a Raspberry Pi 5 with a 1TB m.2 SSD, 15" portable USB-C monitor and a Keychron low-profile keyboard and bluetooth mouse. Works amazingly well.
I'm betting that just about any controller would be worth a shot.
Everything works! Even the display in the middle of the jogwheels, that comes with the '4 deck' version, which shows BPM, time left, rotation indicator, shift amount/mode.
At this point almost all buttons & knobs on it are in regular use, although some of the deeper menu combos accessible via buttons aren't fully intuitive but don't seem to matter.
Personally, I use the Roland DJ-505: https://manual.mixxx.org/2.5/de/hardware/controllers/roland_...
Its kind of a nuisance that, as a requirement to build Mixxx on MacOS, ones has to use foreign binaries, disable Gatekeeper, run a 'first build', and from that point on .. can treat the project as a regular CMake project. Re-enable Gatekeeper after the 'first build'.
Hmm.
What are the custom binaries for? Surely not cmake. Not having - yet - done this myself (until I can put it in a VM), I'm nevertheless kind of curious about this necessity.
Any Mixxx/MacOs devs care to describe the contents?
https://github.com/mixxxdj/vcpkg
The same binary-backed build process is present on Windows, too, presumably to keep people from needing to go through dependency hell to contribute to the project.
Another reason that we'd like to reduce the maintenance burden by using a similar setup for windows and macOS deps. Our dev team is small, and almost all of us use Linux. For macOS in particular we don't have anyone on the core team that uses it as their daily driver, which may also play a role when talking about the DX in macOS.
It's one of several options for software licenses a developer or team can use when distributing a piece of software to help ensure that it and its derivates stay free and open-source.
It's the legal jiu-jitsu that has enabled Linux and countless other "Open Source" projects to remain free by preventing people from taking the code for free but then locking it back down.