Ingreso rápido:  

Forum: General Discussion

Tema: Script School - Page: 40
You know about the database backup from the "Browser Options" menu dot ?
(can create a backup as often as one wishes, there)
 

Mensajes Fri 06 Oct 23 @ 10:35 pm
locoDogPRO InfinityModeratorMember since 2013
@Mr T a l 0
automatically looks like it's just called on startup and if today's date exists it doesn't make a back up, despite making the setting 0.00000001 days

currently as IIDEEJAYII says, manually is the only way.
probably for the best.
 

Mensajes Fri 06 Oct 23 @ 10:41 pm
Thanks both. Manual it is then.
 

Mensajes Fri 06 Oct 23 @ 10:45 pm
Another challenge. Let's assume you have several tracks playing. If you want to manual increase the tempo of the currently selected track, how can you speed up the other tracks at the same rate to match the tempo change.
 

Mensajes Sun 08 Oct 23 @ 5:47 pm
Is:

deck all pitch XX%

what you are wanting to do with the script?
 

Mensajes Sun 08 Oct 23 @ 5:53 pm
locoDogPRO InfinityModeratorMember since 2013
pitch_lock on

move slider, deck whatever pitch +/- %

pitch_lock off

or that way IDJ said
 

Mensajes Sun 08 Oct 23 @ 5:56 pm
Thanks both, "deck all pitch +1%" looked like what I wanted but it appears to increase the track by the percentage of the tracks analysed root BPM, rather than the currently playing tempo e.g 110 BPM. If one track is originally 98bpm, another 100 and another 110 then the increase in tempo is less than the others when pushed to 120bpm. Perhaps this can't be done via script?
 

Mensajes Sun 08 Oct 23 @ 6:30 pm
locoDogPRO InfinityModeratorMember since 2013
if they're out to start with, what where you expecting?

try
pitch +0.1 bpm
 

Mensajes Sun 08 Oct 23 @ 7:20 pm
or using Locodogs first suggestion.. (as I am not sure what you are wanting)

Does:
pitch_lock on & deck all pitch +1% & pitch_lock off

work for your button?

PS
that may be redundant with pitch_lock and deck_all pitch
 

Mensajes Sun 08 Oct 23 @ 7:23 pm
Thanks both. Deejay that is perfect and equivalent to what I was trying but didn't work "deck all pitch +1% BPM" (unless I messed it up somehow).
 

Mensajes Sun 08 Oct 23 @ 7:46 pm
Hey scripting Gurus !

Is it possible to query a specific Cue position like we do with Song position ?

Example: I use :
songpos_remain 10000ms ? blink 250ms
to blink a LED when it remains less than 10 seconds to a track. That's usual stuff already done on jogs wheels. Now, what I'd like to do is change the color or blink a specific Cue pad, but when the played track is approaching that cue location, a bit like a :
cue_pos_remain
(I know this one doesn't exists as is..) Is that something that can be done in any way with the existing :
cue_pos
?
 

Mensajes Thu 12 Oct 23 @ 2:24 am
locoDogPRO InfinityModeratorMember since 2013
Working It Out


beataddict wrote :
Is it possible to query a specific Cue position like we do with Song position ?


Seems a question worthy of a lesson
Let's work this one out, cue_pos indeed looks like the thing we'll use

list of verbs wrote :
"cue_pos 1" returns the position of cue point #1 as a percentage "cue_pos 1 msec", "cue_pos 1 sec", "cue_pos 1 min" returns the position of cue point #1, msec, sec and min parts "cue_pos 1 mseconly" returns the position of cue point #1 in milliseconds "cue_pos 1 beats" returns the position of the cue point in number of beats from first beat


put this as a custom_button name, it will show you what it returns
`cue_pos 1`

it returns a percentage..., song_pos returns a percentage too, but that gets messy, 5% of 1 minute is going to give different results to 5% of 2 minutes. So let's not use that.

try this as the custom_button name
`cue_pos 1 mseconly`

cue_pos 1 mseconly that returns milliseconds, BUT One thing about cue_pos is that it returns ABSOLUTE values, it doesn't take pitch into account, we can prove this by moving the pitch slider around and our custom_button name stays the same,
That's going to mess us up too, a few hundred ms this way or that way might not matter but we can do better, cue_pos 1 beats, seems best

Let's look at getting our beat position
in the script window since we want to get something a good idea is type

get_
lot of verbs in that list, let's narrow it down
get_beat
still a few to chose from, looking at each description
get_beatpos is what we want.

Ok now we're comparing apples to apples, how are we comparing

Thinking out loud
if get_beatpos is bigger than (cue_pos beats - 16) [ 16 beats before]

That as script
get_beatpos & param_bigger 'cue_pos 1 beats & param_add -16' ?

Also thinking out loud
but also get_beatpos is smaller than cue_pos beats

That as script
get_beatpos & param_smaller 'cue_pos 1 beats' ?

put them together

get_beatpos & param_bigger 'cue_pos 1 beats & param_add -16' ? get_beatpos & param_smaller 'cue_pos 1 beats' ? on : off : off

put it on a custom_button and move the playhead around to test the LED logic.
It works!

There are other ways to do the compare but they take more typing, but if you were being fussy to only have 1 question mark [more advanced]

param_equal `get_beatpos & param_bigger 'cue_pos 1 beats & param_add -16' && get_beatpos & param_smaller 'cue_pos 1 beats'` 1 ? on : off

what does the bit before the && evaluate as, and what does the bit after && evaluate as, if both are the same, [and this case only both being true is possible for them to be the same] then the stuff inside the ` ` will return true, aka 1

Another way, over complicated for this case, more for queries of some of a few

param_equal `param_add "get_beatpos & param_bigger 'cue_pos 1 beats & param_add -16'" "get_beatpos & param_smaller 'cue_pos 1 beats'"` 2 ? on : off
 

Mensajes Thu 12 Oct 23 @ 4:31 am
Wow that was so much help, thank you !

I ended up having to add another " : " at the end to make that work on my DDJ-RZX Cue pad the way I wanted it. For my workflow, I only want a visual reminder when my Cue #7 is getting close (16 bt is fine). The way it's now set up, the pad color is steady lit with the cue default color, but flashed black -16 beats before it is reached. Yeah !

get_beatpos & param_bigger "cue_pos 7 beats & param_add -16" ? get_beatpos & param_smaller "cue_pos 7 beats" ? blink 500ms ? color "black" : cue_color 7 : cue_color 7 : cue_color 7


Thank you so much for your help :-)
 

Mensajes Thu 12 Oct 23 @ 3:25 pm
locoDogPRO InfinityModeratorMember since 2013
No problem, it just seemed like one of those were the full thinking process could be spelled out.
The figuring it out from documentation and not getting hung up on every verb or nested queries.

I've added it in to the page 1 of links in this thread just after doing bigger smaller comparisons [~800 post difference in time, but as topics go they follow each other quite well.]
 

Mensajes Thu 12 Oct 23 @ 3:54 pm
locoDogPRO InfinityModeratorMember since 2013
Well another EA release dropped and I'm behind on reporting the additions so I guess I'll work backwards, some points might get their own topic in future

BUILD 7716 (2023-10-16)

-"effect_disable_all mic", "effect_disable_all aux" and "effect_disable_all sampler" scripts added
-"scratchbank_load" without parameters opens a menu to select the bank
-scratchbank_load accepts absolute index or name as parameter as well
-loop_move allows moving loop up to 30 seconds before start or after end of song

Pretty straight forward there, loop_move has been a long time in waiting, scratchbank_load stuff is because of me recently deep diving into scratchbanks [3 years late, 2020 was a blur] and the devs thought my suggestions weren't terrible.

I never discussed effect_disable_all, [and I use it all the time] neither did I get in the single fx slots for mic, sampler, aux, [not often I use them, I just set and forget on the sampler.] I'll maybe ad something somewhere, but they do what it says on the tin.

moving on

Stuff from a little earlier.

set_deck vdjscript to execute script on deck based on another script. The use case for this will have me prattling on for ages. It's a easy script you'd use for complicated scenarios, A quick easy case would be doing stuff across several decks, it's able to pick a deck to be the script default.
I'll do a post on this one, because if you start getting complicated it's useful.

get_automix_song supports column names "artist_before_feat", "feat_after_artist", "title_before_remix" and "remix_after_title"

something mainly for video skin making, automix list has same formatting options the loaded song does.
Also for the skin makers
-sampler_drop, sampler_loop and sampler_mic available as sysicon for skins.
defaultIcons page updated. i1 - 3 if you're interested.


Add 'Full Path' database field for use in scripts.
it's not a real database field, it's a mashup between get_loaded_song "drive" & get_loaded_song "file path". To actually get a real navigable path you had to mash the two together, then still add in a check for online sources.
Now there's "full path" so the old way still works but the new way is cleaner.


-Filter folders can use `` to include script as values to compare to
script in filters, worth it's own topic, you can now get some value from a track and use it in a filter.
I think I'll demo a circle of 5ths filter.

I think that's everything.
 

Mensajes Mon 16 Oct 23 @ 5:40 am
mg_1978PRO InfinityMember since 2008
Hi at all: is there a script like virtualfolder_add ‘my_folder’? Because this script add a track focused only if folder ‘my_folder’ is a playlist or sampler_bank….if my_folder is a normal folder in my pc? I could add a track with script?
Thanks a lot
 

Mensajes Mon 23 Oct 23 @ 10:21 am
locoDogPRO InfinityModeratorMember since 2013
Nope, you can't move files around with script, you can place references like how playlists and virtual folders work, but you can't move actual file locations with script.
You could with a plugin.
 

Mensajes Mon 23 Oct 23 @ 10:30 am
Thanks everyone for your help so far. I've mapped shift and EQ to to change EQ frequency for low mid high. Using ez remix on the pro skin. However when I adjust it, it didn't show the EQ panel I'm adjusting it. What script do I need to add to momentarily show the EQ panel whilst adjusting it, and then to revert back to the EZremix EQ panel?
 

Mensajes Fri 27 Oct 23 @ 9:01 am
locoDogPRO InfinityModeratorMember since 2013
YOUR THING & setting eqMode "Frequency" ? : set_var $myEQMode `setting eqMode` & setting eqMode "Frequency" & repeat_start eqRevert 1000ms 1 & get_var $myEQMode & param_cast & setting eqMode
 

Mensajes Fri 27 Oct 23 @ 1:51 pm
"Hello, beloved DJ software users! Can you tell me how to make the pad blink in different colors? The function is assigned to pad №1: var “$shift” ? effect_stems ‘kick’ : effect_stems ‘vocal’. With pad №1, I turn on FX:Kick+Vocal and I need the pad to light up alternately in red and blue when this double FX stem is turned on. If I turn on only FX:Vocal, then the pad lights up blue, if I turn on FX:Kick, then the pad lights up red, if FX:Kick+Vocal, then the pad should blink alternately blue and red, when FX: is off, then the LED is gray.

I wrote such a script, but with errors: effect_stems ‘kick’ ? blink 600ms ? color ‘red’ & effect_stems ‘vocal’ ? blink 600ms ? color ‘blue’ : effect_stems_color

Please correct my script.
 

Mensajes Sun 29 Oct 23 @ 10:02 pm
85%