Accesso rapido:  

Forum: General Discussion

Topic: Has Anyone Written Scripts to automatically create cue points based on a formula? - Page: 1
Hello All,

I need some help. I have several thousand songs in my collection, most of which have cue points set from numbers 1-8 in a variety of colors. I also use remix points to mark the beginning and ends of breaks. Since VDJ can automatically create remix points, I wonder if it is possible to write a script that will automatically set permanent cue points using numbers 9-16 (in the color pink), 16 bars before all of the existing remix points? If there is a way to batch toggle something like this, that would be brilliant. I want to use this to help with phrase matching, so that I have a specific markers in every song to line up the beginning of breaks with the ends of choruses. Your assistance on this will be most appreciated.

Many Thanks..............
 

Inviato Fri 25 Jun 21 @ 3:15 am
locodogPRO InfinityModeratorMember since 2013
Can be done, it's a bit long winded a script but works as a load then single press from you,

[edited, used a better method]

hot_cue 1 remix !? nothing : goto_cue 1 remix & goto -64 & set_cue 09 & cue_color 09 'pink' &
hot_cue 2 remix !? nothing : goto_cue 2 remix & goto -64 & set_cue 10 & cue_color 10 'pink' &
hot_cue 3 remix !? nothing : goto_cue 3 remix & goto -64 & set_cue 11 & cue_color 11 'pink' &
hot_cue 4 remix !? nothing : goto_cue 4 remix & goto -64 & set_cue 12 & cue_color 12 'pink' &
hot_cue 5 remix !? nothing : goto_cue 5 remix & goto -64 & set_cue 13 & cue_color 13 'pink' &
hot_cue 6 remix !? nothing : goto_cue 6 remix & goto -64 & set_cue 14 & cue_color 14 'pink' &
hot_cue 7 remix !? nothing : goto_cue 7 remix & goto -64 & set_cue 15 & cue_color 15 'pink' &
hot_cue 8 remix !? nothing : goto_cue 8 remix & goto -64 & set_cue 16 & cue_color 16 'pink'
 

Inviato Fri 25 Jun 21 @ 5:01 am
locodogPRO InfinityModeratorMember since 2013
Try the above, it it seems in order, I could add another step to the process to make it further automated.
 

Inviato Fri 25 Jun 21 @ 9:23 am
this is very interesting. can you explain how to run this for my database?
 

Inviato Sat 26 Jun 21 @ 5:01 pm
locodogPRO InfinityModeratorMember since 2013

set 'scrollStep' 0 & browser_window 'songs' & load & repeat_start 'scroller' ? repeat_stop 'scroller' :
repeat_start 'scroller' 100ms & var 'scrollStep' 0 ?
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -64 & set_cue 09 & cue_color 09 'pink' &
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & goto -64 & set_cue 10 & cue_color 10 'pink' &
hot_cue 3 remix !? set 'scrollStep' 1 : goto_cue 3 remix & goto -64 & set_cue 11 & cue_color 11 'pink' &
hot_cue 4 remix !? set 'scrollStep' 1 : goto_cue 4 remix & goto -64 & set_cue 12 & cue_color 12 'pink' &
hot_cue 5 remix !? set 'scrollStep' 1 : goto_cue 5 remix & goto -64 & set_cue 13 & cue_color 13 'pink' &
hot_cue 6 remix !? set 'scrollStep' 1 : goto_cue 6 remix & goto -64 & set_cue 14 & cue_color 14 'pink' &
hot_cue 7 remix !? set 'scrollStep' 1 : goto_cue 7 remix & goto -64 & set_cue 15 & cue_color 15 'pink' &
hot_cue 8 remix !? set 'scrollStep' 1 : goto_cue 8 remix & goto -64 & set_cue 16 & cue_color 16 'pink' :
set 'scrollStep' 0 & browser_scroll 'bottom' ?
repeat_stop 'scroller' :
browser_scroll +1 & load


Something like that, I'm not sure how vdj or your machine would like loading a track every 200ms [might need more time on the rsi, might cope fine faster...]
just get a good amount of tracks in your songs window, press the button, if you want to bale press the button again.

word of advice, backup your database before starting.
 

Inviato Mon 28 Jun 21 @ 2:35 am
NicotuxHome userMember since 2014
@locodog:
You can do a real sync test whenever the file was loaded using by testing param_contains 'Loading' `get_status` to be sure
(even if computing stems is not ending, the script will execute correctly)
 

Inviato Mon 28 Jun 21 @ 2:57 am
locodogPRO InfinityModeratorMember since 2013
I believe cue points are the first thing to be read [straight from the xml]
So I'm not sure which is harder work for the machine, part load quickly or full load for a longer duration.
 

Inviato Mon 28 Jun 21 @ 3:40 am
locodog wrote :

set 'scrollStep' 0 & browser_window 'songs' & load & repeat_start 'scroller' ? repeat_stop 'scroller' :
repeat_start 'scroller' 100ms & var 'scrollStep' 0 ?
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -64 & set_cue 09 & cue_color 09 'pink' &
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & goto -64 & set_cue 10 & cue_color 10 'pink' &
hot_cue 3 remix !? set 'scrollStep' 1 : goto_cue 3 remix & goto -64 & set_cue 11 & cue_color 11 'pink' &
hot_cue 4 remix !? set 'scrollStep' 1 : goto_cue 4 remix & goto -64 & set_cue 12 & cue_color 12 'pink' &
hot_cue 5 remix !? set 'scrollStep' 1 : goto_cue 5 remix & goto -64 & set_cue 13 & cue_color 13 'pink' &
hot_cue 6 remix !? set 'scrollStep' 1 : goto_cue 6 remix & goto -64 & set_cue 14 & cue_color 14 'pink' &
hot_cue 7 remix !? set 'scrollStep' 1 : goto_cue 7 remix & goto -64 & set_cue 15 & cue_color 15 'pink' &
hot_cue 8 remix !? set 'scrollStep' 1 : goto_cue 8 remix & goto -64 & set_cue 16 & cue_color 16 'pink' :
set 'scrollStep' 0 & browser_scroll 'bottom' ?
repeat_stop 'scroller' :
browser_scroll +1 & load


Something like that, I'm not sure how vdj or your machine would like loading a track every 200ms [might need more time on the rsi, might cope fine faster...]
just get a good amount of tracks in your songs window, press the button, if you want to bale press the button again.

word of advice, backup your database before starting.


what button do you assign to begin script?
 

Inviato Mon 28 Jun 21 @ 9:45 pm
locodogPRO InfinityModeratorMember since 2013
any, its a down time script, keyboard key, custom button it doesn't matter.
 

Inviato Tue 29 Jun 21 @ 12:46 am
Good Evening LocoDog. Sorry for not responding sooner. I have been major busy at my day job...lol.

Your code is Brilliant! It is exactly what I needed. It executed flawlessly on a page of songs putting the pink cues right where I asked. I had no issues trying this out and (fingers crossed) I have not lost any songs. Your help and creativity is very much appreciated.
And FYI, I am a big fan of all genres of bangin' house. If you ever need some tunes, you know where to come.

Thank you!
 

Inviato Tue 29 Jun 21 @ 1:45 am
locodogPRO InfinityModeratorMember since 2013
good good, now I know it works I'll write it the not lazy way.
[longer script to write, but this will double the processing speed]


browser_window 'songs' & load & repeat_start 'scroller' ? repeat_stop 'scroller' :
repeat_start 'scroller' 100ms &
hot_cue 1 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 1 remix & goto -64 & set_cue 09 & cue_color 09 'pink' &
hot_cue 2 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 2 remix & goto -64 & set_cue 10 & cue_color 10 'pink' &
hot_cue 3 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 3 remix & goto -64 & set_cue 11 & cue_color 11 'pink' &
hot_cue 4 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 4 remix & goto -64 & set_cue 12 & cue_color 12 'pink' &
hot_cue 5 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 5 remix & goto -64 & set_cue 13 & cue_color 13 'pink' &
hot_cue 6 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 6 remix & goto -64 & set_cue 14 & cue_color 14 'pink' &
hot_cue 7 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 7 remix & goto -64 & set_cue 15 & cue_color 15 'pink' &
hot_cue 8 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1 & load : goto_cue 8 remix & goto -64 & set_cue 16 & cue_color 16 'pink'
 

Inviato Tue 29 Jun 21 @ 3:22 am
locodog wrote :


hot_cue 1 remix !? browser_scroll 'bottom' ? repeat_stop 'scroller' : browser_scroll +1


Could you tell me what '!?' does and where to find that in the documentation. Also, I enjoy seeing all your inventive solutions to problems on these forums. Thanks for posting them.
 

Inviato Tue 29 Jun 21 @ 6:24 pm
locodogPRO InfinityModeratorMember since 2013
inverted query, instead of true : false it's the other way round.
 

Inviato Tue 29 Jun 21 @ 9:14 pm
Thanks LocoDog. Every bit helps............
 

Inviato Fri 02 Jul 21 @ 3:44 am
Hello LocoDog,

Again, many many thanks for the cue point script that you wrote for me last year. That was extremely helpful in my DJing journey. Since then I have refined my mixing technique and wonder if that script could be revised to add three cue points before a remix point and one after the remix point, all separated by 8 bars between them. (Cue9...Cue10...Cue11...RemixPoint...Cue12) and repeat. In this iteration, I imagine only two remix points could be coded, given the limited number of cue points available. Your expertise and scripting prowess will be very much appreciated.

Sincerely, LZ...
 

Inviato Wed 11 May 22 @ 2:19 am
locodogPRO InfinityModeratorMember since 2013
there's no limit on the number of hotcues, you could have hundreds if you want.

what more do you need? it's all there, you've got goto, set_cue and cue_color

 

Inviato Wed 11 May 22 @ 3:51 am
LocoDog,

Thank you very much for providing a solid foundation. Given your encouragement, I played around with your code and modified it to achieve what I needed, albeit in an un-elegant way. However, my modification does not run in batch mode and only works on one song at a time. Could you please fix the error in the code to make it robust and more practical. Also, whilst I appreciate your point about the number of cues which can be created, I was unable to make this code work on any more than cues numbers 9-16. If it possible to apply cue points to at least one more remix point, it would be very much appreciated.

Again, thank you very much for your help.

set 'scrollStep' 0 & browser_window 'songs' & load & repeat_start 'scroller' ? repeat_stop 'scroller' :
repeat_start 'scroller' 100ms & var 'scrollStep' 0 ?
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -96 & set_cue 09 & cue_color 09 'pink' &
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -64 & set_cue 10 & cue_color 10 'pink' &
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -32 & set_cue 11 & cue_color 11 'pink' &
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto +32 & set_cue 12 & cue_color 12 'pink'&
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & goto -96 & set_cue 13 & cue_color 13 'pink' &
hot_cue2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & goto -64 & set_cue 14 & cue_color 14 'pink' &
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & goto -32 & set_cue 15 & cue_color 15 'pink' &
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & goto +32 & set_cue 16 & cue_color 16 'pink' : set 'scrollStep' 0 & browser_scroll 'bottom' ?
repeat_stop 'scroller' :
browser_scroll +1 & load


 

Inviato Thu 12 May 22 @ 3:46 am
locodogPRO InfinityModeratorMember since 2013
good going, not the most of direct ways but you had a go and you got a working result and speed wise there'd be no difference

I won't paste out a full script but instead of repeating a block like this, which it looks like you did [valid strategy when you're unsure]

hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -96 & set_cue 09 & cue_color 09 'pink' &

you could have used positive goto s to mark your 64 and 32 to remix point, and not have to keep jumping back to the remix point

......
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix &
goto -96 & set_cue 09 & cue_color 09 'pink' &
goto +32 & set_cue 10 & cue_color 10 'pink' &
goto +32 & set_cue 11 & cue_color 11 'pink' &
goto +32 & set_cue 12 & cue_color 12 'pink' &
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & ......

but full marks for just going for it, nobody is born knowing script, you just start like you did, try expand something and get a feel for it
 

Inviato Thu 12 May 22 @ 8:49 am
locodog wrote :
good going, not the most of direct ways but you had a go and you got a working result and speed wise there'd be no difference

I won't paste out a full script but instead of repeating a block like this, which it looks like you did [valid strategy when you're unsure]

hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix & goto -96 & set_cue 09 & cue_color 09 'pink' &

you could have used positive goto s to mark your 64 and 32 to remix point, and not have to keep jumping back to the remix point

......
hot_cue 1 remix !? set 'scrollStep' 1 : goto_cue 1 remix &
goto -96 & set_cue 09 & cue_color 09 'pink' &
goto +32 & set_cue 10 & cue_color 10 'pink' &
goto +32 & set_cue 11 & cue_color 11 'pink' &
goto +32 & set_cue 12 & cue_color 12 'pink' &
hot_cue 2 remix !? set 'scrollStep' 1 : goto_cue 2 remix & ......

but full marks for just going for it, nobody is born knowing script, you just start like you did, try expand something and get a feel for it


Sensei, those are very kind words, especially coming from YOU! Thank you for the nudge, forcing me to try. Also, I do appreciate your revision, which is much cleaner and has improved logic. That said, now that I have this very useful tool, I realize that I now need to revise how I have marked my entire library. Is there a global batch eraser which can erase all existing remix points and cues 9-16? Asking for a friend...lol.

Again thank you very much for your generous help.

Sincerely, LZ......
 

Inviato Fri 13 May 22 @ 6:49 am
locodogPRO InfinityModeratorMember since 2013
I'd probably do something like that at the xml level but if you don't know a bit of regex it might be harder that way.
something like this. just extend the lists..... of things to delete, remix point can only be deleted by name I think.

set 'scrollStep' 0 & browser_window 'songs' & load & repeat_start 'scroller' ? repeat_stop 'scroller' :
repeat_start 'scroller' 100ms & load & delete_cue 9 & delete_cue 10 & .........
delete_cue 'remix 1' & delete_cue 'remix 2' & .........
browser_scroll bottom ? repeat_stop 'scroller' : browser_scroll +1
 

Inviato Fri 13 May 22 @ 1:11 pm
95%