Auto-DJ extension for beatmatching and harmonic mixing

This script extends Auto-DJ with basic beatmatching and basic harmonic mixing; it is not a controller preset or mapping.
midiAutoDJ-scripts.js (7.31 KB)

1 Like

Thank you for the script.

It is a great Idea to define AutoDJ transitions by JS.

Do you have fun and time to make this mature?
I am thinking to add a “Transition” Combo-box to the AutoDJ view, where you are able to select the default transition or any other transition defined by a script.

Thanks for making this script!

I’ve made some modifications to allow a smoother transition from previous track’s bpm to the next tracks, and it seems to work okay. Just wanted to share it in case anyone wants similar functionality.

It works by waiting until the fader starts moving, then lerps between prev and next bpms based on the fader’s position.
smoothAutoDJ-scripts.js (7.99 KB)

Thanks - this script is working perfectly. I hope some day this will be included in mixxx by default.

Hi. For let it work, where i’ve to put this script?
Thank’s for answering.

Greetings, dear friend of good music :slight_smile:

:arrow_right: The latest version is attached below (last updated: 2017-12-21 16:30 UTC)
It contains usage and troubleshooting instructions at the top; simply open the script in a text editor to read them.

Changelog:

  • new, configurable Quick Effect Filter fade added
  • slow, incremental, fading BPM synchronisation added
  • BPM and key adjustments are now beat synchronised
  • song selection tries to adaptively match BPM more closely
  • option to disable adjusting key of old track mid-fade
  • option to disable BPM sync and beat matching
  • option to disable track selection by key
  • bug fixes in harmonic track selection
  • bug fixes in phase matching
  • bug fixes in BPM doubling transitions
  • improved usage instructions
  • performance improvements
  • various minor things

Where you save the file is not important, because after you manually select it, Mixxx will automatically copy it to the right place. If you are interested in the details, please check out the Advanced Topics chapter of the user manual at https://www.mixxx.org/manual/latest/chapters/advanced_topics.html

Thanks to Michael mjvotaw Votaw for suggesting to make track selection by key optional. Work is being done to add functionality similar to what this script provides directly into Mixxx. If you’re curious about the progress, see, for instance, this page https://github.com/mixxxdj/mixxx/pull/1360

Registered forum users can subscribe to this topic at the very bottom of the page.
midiAutoDJ-scripts.js (19.4 KB)

We are considering, to integrate this in Mixxx as special transition scripting feature.
Do you have fun, to help here?

How could the GUI look like?

I think to a special folder where Mixxx searches for transition scripts and a combo box in auto DJ preferences which is filled with the found script titles.

Will this work?

I do :smiley: please see the private message I’ve sent you

Please join the conversation on this GitHub pull request if you are interested in this feature.

The linked PR is about selecting a track. This one is about the transition.
It look like these features should be kept separate.

On the user hand, It should feel like a seamless solution.
Any Comment is welcome.

Hmm, the track selection method and transition method should be able to be mixed on matched. However, the desired transition method may depend on the track selection method…

Forgive my ignorance, but I am on Linux and I didn’t see anything in this thread, or the wiki, or the links provided in this thread, that tells me how to install and try out these scripts.

The thread says to select the file manually, but Mixxx doesn’t want to open anything that isn’t a music file. I don’t see any place in the preferences to enable addons, and I put this in ~/.mixxx/plugins/soundsource/, but I don’t see anything different in Mixxx, after restarting.

Can someone tell me how to get this script installed on Linux, and then how to test it out? Thanks.

:slight_smile: Please open the script in a text editor; you’ll find instructions, help and options at the top of the file :slight_smile:

I want to add something in this conversation what I noticed before

Using AutoDJ, tracks don’t load/start on negative cuepoints assigned earlier.
So I can’t let a track start on a point on the beatgrid, before the beginning of a track, witch should be useful for the autofader beatmatching.
Is there an easy way to implement such feature?
(220-alpha-pre)

OK, so do the cue points need to be set properly for this script to work? I have been using hotcue 1 to mark the start of my tracks, and ignoring the main cue.

However, I will put both cues on the first beat, if the script needs the default cue to know where to start.

Imagine this script as a MIDI device, which reacts to particular Mixxx states by pressing particular buttons in the normal Mixxx interface. This means the script cannot do anything you wouldn’t be able to do manually, if you just pressed those same buttons in the same order with the same timing. Therefore, the way Mixxx behaves is best described by explaining which buttons the script presses at which time.

As far as cue points and the beatgrid are concerned, it uses Quantize on both decks; it enables this function once, right after you press the [Enable Auto DJ] button. This “aligns Hot-cues and Loop In & Out to the next beat from the current position” such that “all cues, hotcues, loops, and beatloops will be automatically quantized so that they begin on a beat” and thereby “Quantize will ensure that the beats are perfectly lined up.” After enabling it, the script will blindly assume Quantize to be on.

If bpmSync is set to 0 (zero), nothing else will be done. The new track will start with it’s first beat synchronised, but the tracks will diverge, due to BPM differences.

If bpmSync is set to 1 (one) and bpmSyncFade is set to 0 (zero), the script will search for the next beat of the old track (and may miss a few while searching). When it found one, it will immediately (enable Follower Sync on the deck of the old track, which you do not usually need to do manually,) enable Master Sync on the deck of the next track, then click the sync button of the old track’s deck once. This will match the old track BPM abruptly to the BPM of the new track, and beats should stay synchronised.

If bpmSync is set to 1 (one) and bpmSyncFade is set to 1 (one), the script will adjust the BPM of the new track to match the old track. Then, (the new track’s deck is set to Follower Sync, which you do not usually need to do manually,) the old track’s deck is set to Master Sync, and the new track’s deck Sync button is clicked once. After that, the old track’s BPM is adjusted smoothly to match the original BPM of the new track. Thus, eventually both tracks will play at the proper BPM of the new track, and beats should stay synchronised.

Additionally, Mixxx’s Quantize and Master Sync should handle situations nicely, where BPM of one track is double that of the other, by matching two beats to one, and the script should not interfere in this. To repeat, Mixxx should behave as if you clicked all those buttons manually.

Thanks for your explanation

I can’t seem to get the MIDI settings to appear.

I’m starting the exe with --developer mode after it in the CMD line but it isn’t showing up.

Please check developer mode is active; it is active, when the menu bar contains the Developer section, between Options and Help.
The script currently targets Mixxx version 2.0; please confirm the version you are using.

Hi guys,

I have Developer mode enabled (opened the app with the –developer flag and Developer shows between Options and Help in the menu) but still can’t see Midi Through Port.

Am I missing something? I’ve been searching online for 45 minutes but can’t find any solution…

  • Macbook Air (macOS Mojave 10.14.5)
  • Mixxx 2.2.1 (build 2.2 r6690), fresh install just a few hours ago with nothing else
  • No plugins or anything else

Screenshot of my Preferences: imgur.com/a/f7K22h6

PS: I see some people dump their system logs here, if that helps I can add them too (although I’m not sure where to get those, Developer Tools > Logs?)

Thank you!


UPDATE: Found a solution! I had to create a virtual MIDI Port. For those wondering how to do so, check out this step-by-step guide.