In the last six weeks or so since I posted anything about this, I blew up two computers, revived one computer, and learned a hell of a lot about C programs, Unreal Engine 4, networking, and remote development.
The principle described in the previous post is sound: Spatialize the digital DJ experience by integrating the data with the physicality of the turntables. Yeah, ok, but isn’t that what Traktor and Serato do? Sort of. You’re still checking your mail on a screen. Not that my current iteration is any less awkward, but the basic idea is there.
This is what works:
- A spatial (AR) UI on the Magic Leap asks for and receives a list of tracks on a USB Stick
- The tracks are assigned to 10 visible buttons that when pressed, load the track assigned to the button into the XWax player.
- XWax plays the track in sync with the control vinyl on the physical turntable.
- Page Up/Page Down, Track Up/Track Down assign new tracks to the track buttons.
- Network Init button Activates the OSC receiver component’s event listener
- The Stop button initiates a 1-second repeating loop of polling XWax for the current track’s status: deck number, track length elapsed time, and raw position.
So basically, I walk over to the DJ rig, activate the OSC listener, and I can load tracks and play them.
This is using the Pi 4 and the Audioinjector card I was going to make a digital FX pedal from. I can still do that, and everything sounds great, but here’s the shit thing: the Pi 4 has no hardware decoding of MP3 files. This is shit, because even though the Pi4’s CPU is fast enough to decode MP3’s for playback through an audio device, it’s not fast enough to import the MP3 into XWax before the playback catches up with it.
What it does do, however, is decode MPEG 4, h.264, and AAC files in hardware. That just means if I’m using this system, I need to convert my set to AAC or OGG so the XWax importer can keep up with it.
I have a demo video I recorded, but the Magic Leap capture is execrable, so you don’t get to see it.
TO DO:
- Connect the returned status values to the UI status rings for playback.
- Work out persistence and pinning the track menu so it stays near the turntable.
- Make a better video.
TO DO LATER:
- Hand-gesture track selection and loading – dump the hand controller
- Second Pi for the other turntable