Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Script Idea from chatgpt for similar Tracks to automix
Hello, i want that chatgpt try to Script a function to Look after the Last 3 played Tracks and Take 20 of this in the Automix section.

While this really Works?

// Get the IDs of the last three played tracks
var track1 = history.getItem(0).getId();
var track2 = history.getItem(1).getId();
var track3 = history.getItem(2).getId();

// Search for similar tracks to the last three played tracks
var results1 = search.similar(track1, 20);
var results2 = search.similar(track2, 20);
var results3 = search.similar(track3, 20);

// Combine the results into a single array
var combinedResults = results1.concat(results2, results3);

// Get the top 20 unique tracks from the combined results
var uniqueTracks = [];
combinedResults.forEach(function(result) {
if (!uniqueTracks.includes(result.getId())) {
uniqueTracks.push(result.getId());
}
});
uniqueTracks = uniqueTracks.slice(0, 20);

// Add the top 20 tracks to the automix section
automix.addTracks(uniqueTracks);
 

Posted Mon 09 Jan 23 @ 6:33 pm
locoDogPRO InfinityModeratorMember since 2013
I can't event tell the language used, maybe .js, it's incomplete even as a snippet.
that wouldn't work with vdj as it is.
 

Posted Mon 09 Jan 23 @ 8:34 pm
I also should warn you that I have done a few experiments with ChatGPT to create playlists and it suggested songs that were completely inappropriate for the format I requested. For example it suggested "My Chemical Romance - Welcome To The Black Parade" in a list of 10 disco songs.

It isn't completely useless in that it gives some okay suggestions, but I find that the suggestions are obvious enough that I would have been able to come up with them myself. Perhaps if you're playing a format you're unfamiliar with?

A great tool for playlists (far better than ChatGPT imho) is The Playlist Miner: http://playlistminer.playlistmachinery.com/
You can put in a few search terms and it searches Spotify for playlists with those terms, then aggregates those playlists and finds the top songs that appear across all the playlists in the search results.

As for your idea with ChatGPT, it's doable but you'll need to do it in either Visual Studio or XCode and compile it as a VDJ plugin.
 

Posted Mon 09 Jan 23 @ 11:37 pm
My idea is,
to press a hot button,
maybe to got to toilette, talk to a guest on a wedding or
if i forgot to put a new track in the other deck,
a few seconds before the last track ist finished.

Over the ideas u get a good but simple overview for next tracks.

Press the button, vdj collect 20 similar tracks and put to automix and start it.

Its maybe the next big step for vdj, okay later u didnt need a dj,
but the ai cant read the public and work individual at this moment.
 

Posted Tue 10 Jan 23 @ 7:11 am
HardyHardwich82 wrote :
Press the button, vdj collect 20 similar tracks and put to automix and start it.
Its maybe the next big step for vdj, okay later u didnt need a dj,
but the ai cant read the public and work individual at this moment.


But these features already exist in VDJ, and they don't need AI
They are either based on your own history or the history of other DJs
That is more than enough for these kind of suggestion engines

And as a side note:
The IT-consultant company I work for as my day job works with ML and AI as part of suggestion engines and tasks (pre)processing
But in 90% of all cases, old-school decision engines based on word scoring and case / if-then-else structures work better than ML/AI does.
And in some of the cases where ML/AI gives something extra, it's so obvious what have caused the decisions, that we convert it to case / if-then-else structures

However ML and AI is great for image recognition and - like we have seen with VDJ - audio recognition, which have now given us STems separation :)
 

Posted Tue 10 Jan 23 @ 9:07 am
Hi Klaus,

how can i build a script that use this function, what i write?

The Toilette button?

 

Posted Tue 10 Jan 23 @ 9:13 am
locoDogPRO InfinityModeratorMember since 2013
20 songs is an hour, are you going to the toilet at home?
I've got 2 flavours of this, one pulls from one or several filter folders.
the other pulls from a playlist, but it needs tweaking slightly because it was a to deck thing not to automix list.

the pic here, 19,000 chars it took to make the filter version work


I already embedded this video recently so I'll just link it
https://www.youtube.com/watch?v=ED5viNgRb4A
 

Posted Tue 10 Jan 23 @ 11:50 am
Loco i love your freaky stuff.

The 20track only was an example,
but its also good for a privat party mode.

Okay u say how long it has to take.

But if the script is only using the ideas
and only 5 tracks for the great job on the toilette this will be nice.
 

Posted Tue 10 Jan 23 @ 4:13 pm
locoDogPRO InfinityModeratorMember since 2013
the filter version is finished, people are using it, have been for a year.
 

Posted Tue 10 Jan 23 @ 4:56 pm