Readit News logoReadit News
djaychela · a year ago
Used mixxx to do the djing for my wedding last year. Created a collaborative music voting site for the guests, then got all the music and made a mix which worked really well, even going between genres. Had a lot of fun playing with it getting everything ready and it worked with a couple of DJ controllers bought cheaply without any issue.

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.

jesprenj · a year ago
Can you share the program that reads the now playing track? We use Mixxx at a student radio station and we could maybe try using something like this to show the now-playing track on the website.
raphman · a year ago
Not sure whether that's the correct way but it seems to work. AFAICT, there is no "now_playing" field in the sqlite db - but tracks that start playing are added to the `PlaylistTracks` table. That means that if you started two tracks and then pause one or the other and restart it, no row will be added. Only adding a track from the library and then playing it will add to the PlaylistTracks list.

(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...

djaychela · a year ago
I will see... Not being evasive but I'm experiencing terminal illness at the moment so I'm all over the place. It wasn't a complex bit of code though, but I'll see what I can find.
Sn0wCoder · a year ago
I have not used Mixxx nor do I have it installed, but might download to check it out.

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.

btown · a year ago
What did you use for the collaborative music voting - or did you make something yourself? For different use cases, I've seen everything used from collaborative Spotify playlists to Google forms, to those "pay a dollar to bump your song request" kiosks in bars! The parallels to ranked-choice voting in politics are relevant too - as well as how you give people a feeling of agency, even if you as the DJ inevitably have veto powers.

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!

djaychela · a year ago
I made something custom. I can't share the code for it (see my other reply for why), but here's the general deal:

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...

apt-get · a year ago
Been using it for the past few years, nothing bad to say about it, lovely piece of software. Vendor lock-in is very present in this field, with different brands of controllers supported by a myriad of proprietary DJ applications all more interested in onboarding you to their music subscription services rather than implement useful features or support open protocols.

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.

input_sh · a year ago
To be fair, every commercial competitor (like Rekordbox and Traktor) also supports mapping MIDI devices that are not officially supported.

But in my experience, you'll never be able to control the jogwheel as precisely as in officially-supported hardware-software combo.

bfmalky · a year ago
In Rekordbox's case Pioneer have restricted the jogwheel mapping to Pioneer hardware only. So, you pretty much need Pioneer hardware to use Rekordbox. And seeing as Pioneer decks are almost industry standard in clubs and you need Rekordbox to organise your playlists, they have the DJ hardware market sewn up. Which is very frustrating because Rekordbox has to be the most resource intensive (& therefore inefficient) DJ software available.
shermantanktop · a year ago
Is it latency? Or granularity? MIDI has upper limits on both…or is it a more subtle quality like ballistics?
noman-land · a year ago
I tried it many years ago and this didn't work. Can Mixxx be used with the Rane mixers used with Serato back in the day?
Mashimo · a year ago
Does the mixer speak midi? In that case probably.

Is there already a mapping for you device? Check the manual https://manual.mixxx.org/2.5/en/

Deleted Comment

quesomaster9000 · a year ago
I'm really happy that 2.5 added 'beats until next marker', which together with a USB controller from Numark I have pretty much feature complete DJ setup for under $500 (including cost of laptop & controller) without having to rely on Windows, Mac, subscription licenses or feature-crippled 'lite' versions.

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.

perfmode · a year ago
Which controller do you have?
starkparker · a year ago
Mixx is sneaky good as a TTRPG soundscape mixer. You can queue layer multiple ambiance tracks over tempo-matched music, build soundboards, and hook it all to hardware controls.

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.

VagabundoP · a year ago
I've been looking for something like this.

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.

apt-get · a year ago
Mixxx can stream to an icecast output or similar, you'll need to setup the stream server separately though.
ghomem · a year ago
Mix is absolutely awesome. One of the most carefully organized open source projects that I've seen.

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 :-)

tmountain · a year ago
I've been using this to make mix tapes at home (bought a vintage tape player). It has awesome cross fading capabilities, and it does volume normalization out of the box, so it's a very nice piece of software for those features alone. Playlist and library management is also solid. My only complaint is that the UI isn't very intuitive for a non-DJ, and it took me some time to figure out how to do basic stuff, but it's all there in the docs, so you can certainly figure it out.
ThatMedicIsASpy · a year ago
I've been setting up a few radio stations with playlists for azuracast for home use. The auto DJ with auto cue is amazing. Next stop is create a radio with a raspberry pi maybe with an amp hat as well.
radley · a year ago
How does the auto DJ compare to something like Pacemaker?
cies · a year ago
I've been using this for the few DJ sets I do per year. Very complete software, very stable also.

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.

diggan · a year ago
> And RekordBox does not run well on Linux

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.

quesomaster9000 · a year ago
I considered renting out some Pioneer equipment to add RekordBox playlist writing support, mainly because I'm in a similar situation. Mixxx does have support for reading USBs & SD cards, but not writing ;_;

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.

helboi4 · a year ago
Somehow Rekordbox seems to run much better on my Ryzen 5 8gb ram windows laptop from 2019 than on my i7, 64gb ram macbook. It seems to only like windows?
poopsmithe · a year ago
I used mixxx to DJ my brother's wedding. I think it was 2013 or 2014. The moment I got the signal to switch to a specific track for the bride's first dance with her Father, mixxx locked up my laptop. Guests were staring at me, one offered a hushed, "they're waiting!" Completely unresponsive, I had to hard reboot my locked up computer and boot back into Ubuntu. Then I opened VLC where I played the tracks for the rest of the evening. Probably not mixxx's fault, but I will never forget that moment.
hlzhs · a year ago
Mixxx dev here. I'm sorry you had a bad experience. We are spending a lot of effort on making Mixxx rock stable.

Considering that this was more than a decade ago, I'm pretty sure that this bug has been fixed by now.

sambf · a year ago
I do have a similar story with the 2.4.1 or 2.4.2 version unfortunately. Didn't take the time to debug it or fill an issue yet but when the library (between 100 and 200G) is on a USB stick it regularly hangs for 10-15s when browsing. It always came back to normal but made me sweat every time.
mixmastamyk · a year ago
Yep, that can happen when computers are involved, and why one needs to practice with a new setup beforehand. Goes for performances or rocket launches.

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.

encom · a year ago
>I guess a smart phone could do that duty today

Not since they bravely killed off the headphone plug.

magicalhippo · a year ago
Went to a concert recently where the supporting band was a two piece which relied on a MacBook for live sequencing the drums as well as some MIDI inputs for various effects and such.

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.

chromatin · a year ago
That stinks. I know professional DJs often have a backup music player for this very reason. Even hardware can fault.