Quick Sign In:  

Forum: General Discussion

Topic: Script School - Page: 45
Thanks for clarifying your level of participation! :)

I'm not actually sure what you meant when you said, "Test for the bottom."

When you told me that partial script was browser_open_folder ? browser_open_folder off : browser_open_folder on & wait 100ms & browser_open_folder ? : browser_window songs I tried a few different things with it but it always ended in frustration because something else would happen that wasn't meant to. Like the example I mentioned above, where I was able to use the encoder push to advance the active browser window forward, but then the focus would get stuck on sideview, while at the same time making the folders open and close over on the left.

I've started reading the beginning of this entire Script School thread, and plan to slowly work through the whole thing. I've also read that short Atomix Script Tutorial. I like to think I'm a decently smart guy, but as soon as I get past a simple 2-3 part command, it begins to feel like a tricky logic puzzle. I have no programing background or anything, and I think it's going to be a very slow process to fully understand how to write more-than-basic scripts.

Thanks for bearing with me!

The one thing I've been stuck on today, is making my controller sync buttons behave the way I want them to, that being, the way they behaved in Rekordbox.

Here's how I have things right now:

SYNC: beatlock & auto_pitch_lock & ( auto_pitch_lock ? setting autoBPMMatch always : auto_match_bpm off ) (I got help from you or someone else on this)

LED_SYNC: Empty

JOG_OUT_RING: var 'CBGShift' 1 ? adjust_cbg : var 'CBGWidth' ? set_bpm : nothing (this was the default mapping)

Right now, when I press one SYNC button on my controller, it lights up (it used to be that if I pushed one, they would BOTH light up, but I somehow changed something and that is no longer happening). The beatgrids sync together, and if I scratch in a track and my timing is off, they'll still sync together. If I move the pitch slider (either one), both tracks will change tempo together. If I turn off the sync button that I had pressed, it seems to disable all of the above. So far, so good.

But then the other sync button will negate what the first one is doing. So if I have the right deck sync button on, and I hit the left deck sync button, it will change the sync settings on the right deck, even though the right deck sync button remains lit up. It's like when you have two light switches on opposite sides of the room, for the same bank of lights.

I hope this isn't as confusing as it sounds. Basically the sync buttons are linked together and I want them to be 100% independent from each other, as they are in Rekordbox.

Here's what else I want to be able to do, that I can't:

1. When I have sync enabled, I want the tempo slider to ONLY be available on the Master deck. In Rekordbox, for example, if I have the left deck playing a song, and the right-deck sync button is on, moving the right deck tempo slider has no effect on anything, but moving the left-deck tempo slider will change the BPM of both decks together. This is INDEPENDENT from the Master deck's sync button. As long as the slave deck's sync button is on, the master deck's tempo slider will control the tempo of both decks.

2. I want to be able to use the outside ring of the jogwheel to make adjustments to the track, even if I have the SYNC button turned on. In other words, if I start using the outside ring of the jogwheel, I want the beatlock on that deck to turn off. Right now if I nudge the jogwheel, both tracks stay locked. I do want the auto_pitch_lock to remain enabled (on the master deck) in this scenario though. This is for when I have two tracks synced, need to nudge one a little (so they're audibly synced, but not synced according to the beat grids), and then make a tempo change to both tracks together (with the master deck tempo slider).

3. I want the SYNC buttons to be independent from each other. So say, for example, I have the left sync buttons on... the left deck is playing a song, and I bring in the song on the right deck with the right deck's sync button turned off, and I'm beat-matching by ear. Then eventually I put a new song onto the left deck (remember the left sync button is still on) and when I hit play, it syncs to the right deck with all my chosen sync parameters from above.

4. If possible (though not a big deal) I want each sync button's LED to behave as follows:

- On (steady) when I turn it on
- Off when I turn it off
- Flashing when the track's grids are not beatlocked
 

geposted Sat 17 Feb 24 @ 9:52 pm
locoDogPRO InfinityModeratorMember since 2013
pioneer's sync mode sounds like a mess. sorry but I have no interest in remaking it.

3 if you have one deck playing why would you need sync mode to be on anywhere? If you tell your doctor "it hurts when I poke myself in the eye" the reply will be "why do that? & Don't do that then"

2 if you have beatlock on the grids are locked, you could adjust_cbg with the wheel [conditional of sync mode being on] which would in turn move the tracks, but you'd be chasing minor grid adjustments with every new track, probably better to set the grids straight as you're cueing by ear, I posted something about 1-2 pages back to straighten out off grids on audibly sync'd tracks.

1 just seems like you need to work out the conditionals.

Pick apart the logic of this, set_deck is the only unusual thing in it and all it does is make the other deck the focus of 2nd beatlock query.
param_mod is the mathematical modulo action.

beatlock & beatlock ? auto_pitch_lock on & setting autoBPMMatch always : set_deck `get_deck & param_mod 2 & param_add 1` & beatlock ? nothing : auto_pitch_lock off & auto_match_bpm off


beatlock being on is as good as any thing to signify/query for your per deck sync mode.
 

geposted Sun 18 Feb 24 @ 12:45 am
Pioneer's sync mode in Rekordbox is actually brilliant and allows me as much, or as little, automation as I desire. I've used Traktor, Serato, and Rekordbox, and 'sync' from the latter is definitely my favourite. I just explained it in a convoluted manner.

I'm giving up on this for now. My script understanding isn't there yet!

I have another question though:

I've mapped SHIFT_BROWSE_ENC_PUSH on my controller so that it puts the focus to the search bar in VDJ: setting "onScreenKeyboard On" & wait 50ms & search & doubleclick ? clear_search & setting "onScreenKeyboard Auto"

There are three onScreenKeyboard settings in VDJ -- 'Auto', 'On', and 'Off'. If I map a button to put the focus on the search bar, the onscreen keyboard only pops up if I have that setting as 'On'. For whatever reason, 'Auto' doesn't seem to work. And as a side-note, in general usage, when I tap the search bar with my finger, the onscreen keyboard actually only pops up sometimes when set to 'Auto' mode which I'm assuming is a bug.

At any rate, my script doesn't work to change the onScreenKeyboard setting to 'On'. I've even tried just mapping setting "onScreenKeyboard On" by itself and it won't change the setting. What am I doing wrong?

A couple other things I want to change / add to my script but I can't figure it out:

1. I don't want to use doubleclick SHIFT_BROWSE_ENC_PUSH to clear the search box. I want to be able to just click it once to enter the search box, and click it once again to clear & exit the search box, putting the browser view onto 'songs'.

2. I want to have the onScreenKeyboard setting change to 'On' when I hit SHIFT_BROWSE_ENC_PUSH to search for a song (so that the onscreen keyboard is guaranteed to pop up) and then when I hit SHIFT_BROWSE_ENC_PUSH to clear the search box / switch the focus to 'songs' I want the onScreeKeyboard setting to switch back to 'Auto'.

It would simplify things if 'Auto' just worked correctly!

The reason for the onScreenKeyboard setting is that I use a Surface Pro with no keyboard attached with my DDJ-RZ. I'd be happy to leave the setting as 'On' but then when I'm prepping music with my physical keyboard attached, the onscreen keyboard constantly pops up.
 

geposted Mon 19 Feb 24 @ 3:13 pm
locoDogPRO InfinityModeratorMember since 2013
just added in klaus' video on linked tracks to my feature post.
 

geposted Fri 01 Mar 24 @ 2:13 am
mg_1978PRO InfinityMember since 2008
hi! i would button led on if in browser_window ‘folders’..folder have subfolders….and led off if it doesn’t;
my script: browser_open_folder off ? on : off

is not correct :( is there a script? thanks a lot
 

geposted Wed 06 Mar 24 @ 11:29 pm
locoDogPRO InfinityModeratorMember since 2013
no the test for the bottom as I posted earlier only works in context of moving round folders, it doesn't work as a query.
 

geposted Thu 07 Mar 24 @ 12:41 am
mg_1978PRO InfinityMember since 2008
thanks…is theren’t any solution? :(
 

geposted Thu 07 Mar 24 @ 6:23 am
locoDogPRO InfinityModeratorMember since 2013
There is one thing but it's more complicated than I can be bothered explaining in detail.

make a scroller, test for bottom, anything that opens add that header to a string variable, day to day use test if variable contains header in use.

You'd have to run the scroller any time you change folder layout.

PS please don't quote when it's obvious to whom you're replying to.
 

geposted Thu 07 Mar 24 @ 6:51 am
mg_1978PRO InfinityMember since 2008
for my request i would use script: get_browsed_scrollpos
that is 0 only when cursor is in last folder 👍 but script:
get_browsed_scrollpos & param_cast ‘text’ & param _contains ‘0’
non work correctly :( could you help me? Tuanks!!
 

geposted Thu 07 Mar 24 @ 11:16 pm
mg_1978PRO InfinityMember since 2008
get_browsed_scrollpos & param_cast ‘text’ & param _contains ‘0’ works well for my request 👍

 

geposted Tue 12 Mar 24 @ 11:25 am
mg_1978PRO InfinityMember since 2008
hi! i would all decks in beatlock with same masterdeck tempo, my script is:
-deck all beatlock on ? deck all beatlock off : deck all sync ‘masterdeck’ & deck all beatlock on

but doesn’t work :( could you help me?
thanks!
 

geposted Sat 16 Mar 24 @ 6:03 pm
locoDogPRO InfinityModeratorMember since 2013
deck all isn't great for queries, query individuals, something like this
param_equal get_decks 4 ? param_equal `param_add "param_add 'deck 1 beatlock' 'deck 2 beatlock'" "param_add 'deck 3 beatlock' 'deck 4 beatlock'"` 4 ? deck all beatlock off : deck all beatlock on : param_equal get_decks 2 ? param_equal `param_add 'deck 1 beatlock' 'deck 2 beatlock'` 2 ? deck all beatlock off : deck all beatlock on : 


or like this
deck 1 beatlock && deck 2 beatlock && deck 3 beatlock && deck 4 beatlock ? deck all beatlock off : deck all beatlock on
 

geposted Sat 16 Mar 24 @ 6:23 pm
mg_1978PRO InfinityMember since 2008
solved: my right script is:
deck all beatlock & deck 1 masterdeck ? deck 2 sync & deck 3 sync & deck 4 sync : deck 2 masterdeck ? deck 1 sync & deck 3 sync & deck 4 sync : deck 3 masterdeck ? deck 1 sync & deck 2 sync & deck 4 sync : deck 4 masterdeck ? deck 1 sync & deck 2 sync & deck 3 sync : nothing
👍

 

geposted Sun 17 Mar 24 @ 10:46 pm
locoDogPRO InfinityModeratorMember since 2013
I've asked you to stop quoting when it's clear whom you're replying to in this thread. Now I'm telling you, I will stop replying to you if I have to edit your posts again.

What's wrong with just?
deck all beatlock
It will sync from that
 

geposted Sun 17 Mar 24 @ 11:56 pm
locoDogPRO InfinityModeratorMember since 2013
DECK ALL
A useful deck specifier for when you want all decks to do something but there are logical implications.

Check the var_list after pressing this button
deck all set result1 `get_deck` & set $result1 +1 & deck 1 set result2 +1

result2's value may come as a surprise, what's happened under the hood the script actually performed is this

( deck 1 set result1 `get_deck` & set $result1 +1 & deck 1 set result2 +1 ) & 
( deck 2 set result1 `get_deck` & set $result1 +1 & deck 1 set result2 +1 ) &
( deck 3 set result1 `get_deck` & set $result1 +1 & deck 1 set result2 +1 ) &
( deck 4 set result1 `get_deck` & set $result1 +1 & deck 1 set result2 +1 )


It repeated the script for each deck so result2 is incremented 4 times

Playing with the logic, you can do something like this
make every other deck [other than the calling deck] play
set $deckvar `get_deck` & deck all param_equal `get_var $deckvar` `get_deck` ? : play_pause


Short and sweet,
If you need to use deck all for simple scripts there's no problem.
If you need deck all in more complicated scripts it's probably best to contain it in ( ) [deck specified in brackets only stay true inside the brackets]
There's probably some shortcuts here for complicated multideck scripts, just be wary, things can get confusing fast.
 

geposted Mon 18 Mar 24 @ 12:51 am
mg_1978PRO InfinityMember since 2008
locodog wrote :
I've asked you to stop quoting when it's clear whom you're replying to in this thread. Now I'm telling you, I will stop replying to you if I have to edit your posts again.

What's wrong with just?
deck all beatlock
It will sync from that


ok, i have understand, but i rewrite correct script for all users that have same request, ok? in all these pages (supreme blog for me!) i have read many and many script that have illuminated me for my personal mapper modifiers…and i think other members could make some thing…but if you don’t want these anymore, i stop post correct script, ok!
Thanks for all support Locodog 👍

 

geposted Wed 20 Mar 24 @ 9:00 am
mg_1978PRO InfinityMember since 2008
locodog wrote :
I've asked you to stop quoting when it's clear whom you're replying to in this thread. Now I'm telling you, I will stop replying to you if I have to edit your posts again.

What's wrong with just?
deck all beatlock
It will sync from that


…mmm not that i would…because ‘deck all beatlock’ sync other deck to the focused deck and not to the masterdeck..i wont masterdeck 👍 but i solved..thanks a lot

 

geposted Wed 20 Mar 24 @ 7:27 pm
locoDogPRO InfinityModeratorMember since 2013
@mg_1978
You're wrong on several levels, but if you're not going to respect my request, I don't see why I should bother replying to correct you.
 

geposted Thu 21 Mar 24 @ 1:25 am
mg_1978PRO InfinityMember since 2008
Hi!
virtualfolder_add ‘Sampler/Recordings’
why don’t work? Recordings is not a folder? 🤔 thanks a lot
 

geposted Fri 22 Mar 24 @ 5:46 pm
locoDogPRO InfinityModeratorMember since 2013
A user requested this [make beatjump wrap round an existing loop]

Senky Dragon wrote :
Is there a way to make beatjump wrap round a loop?

If I set a 32 beat loop, am currently 28 beats through the loop, and jump forward 8 beats, I would expect to be on beat 4 of the existing loop.


I thought it kind of interesting

for jumping forward in the loop things to consider;
are we in a loop ? [if not nothing special needed]
is our jump bigger than the whole loop ? [idiot check, if true do nothing],
is our current position in the loop added to the beatjump, smaller than the loop size? [if so nothing special needed] [we get our position in the loop in beats by param_multiply get_loop loop_position]
if false do some math, our loop size * -1, added to beatjump gives us the amount we need to jump back. [wrap around]

a forward button it would be like this

loop 0 ? beatjump +1 : param_bigger get_loop beatjump ? nothing : param_bigger `param_add 'param_multiply get_loop loop_position' beatjump` get_loop ? beatjump +1 : param_add 'param_multiply get_loop -1' 'beatjump' & param_cast relative & goto


Backwards is a little different
mainly our wrap check, is beatjump value smaller than current loop position.
[if it is nothing special needed]
if false, our beatjump value * -1, added to our loop size is the amount we need to jump forward [wrap around]

a backwards button like this

loop 0 ? beatjump -1 : param_bigger get_loop beatjump ? nothing : param_smaller `param_multiply get_loop loop_position` beatjump ? beatjump -1 : param_add get_loop 'param_multiply beatjump -1' & param_cast relative & goto


Case of encoders it would be something like this.
[same as above combined, but also need to deal with the implicit of the encoder]

param_bigger 0 ? loop 0 ? beatjump +1 : param_bigger get_loop beatjump ? nothing : param_bigger `param_add 'param_multiply get_loop loop_position' beatjump` get_loop ? beatjump +1 : param_multiply 0 & param_add "param_add 'param_multiply get_loop -1' 'beatjump'" & param_cast relative & goto : loop 0 ? beatjump -1 : param_bigger get_loop beatjump ? nothing : param_smaller `param_multiply get_loop loop_position` beatjump ? beatjump -1 : param_multiply 0 & param_add "param_add get_loop 'param_multiply beatjump -1'" & param_cast relative & goto
 

geposted Thu 11 Apr 24 @ 6:55 pm
96%