Connexion rapide:  

Forum: General Discussion

Sujet Script School - Page: 35.85
djkrysrPRO InfinityMember since 2010
There is also a command 'dy=' for padding text in a textzone, does that also only work for vertical text?
In essence, is there anyway to have a group of text items within a textzone align with themselves along the bottom of the line rather than the top?
 

Posté Sat 22 Apr 23 @ 4:26 pm
SveninoPRO InfinityMember since 2009
in a Browser with many Songs, how to scroll exact in the middle with just one touch of a button?

Hi everybody, to reach the first song of a browser I use browser_scroll "top"
and to get to the end browser_scroll "bottom".
But how to come in the middle?
First we would need the number of all songs in that browser window. ($NmbOfSongs)
Then we had to divide this by 2 ($HalfNmbOfSongs)
Now we would move to the top ("browser_scroll "top")
And go down the needed number of lines with browser_scroll + "$HalfNmbOfSongs"

It's actually quite easy, but what's the syntax for it?
Any help is appreciated...
 

Posté Wed 26 Apr 23 @ 4:24 pm
locoDogPRO InfinityModeratorMember since 2013
file_count is your number,
param_multiply 0.5 for half
param_cast 'integer' because file count could be an odd number and I don't know if browser scroll would work with a float
param_cast 'relative' as we need a signed value +/-

file_count & param_multiply 0.5 & param_cast 'integer' & param_cast 'relative' & browser_scroll
 

Posté Wed 26 Apr 23 @ 4:51 pm
SveninoPRO InfinityMember since 2009
By the way: Is there a variable that shows if a browser_sort is upwards or downwards?
I want to have a button lighting, if my browser is sorted by BPM.
I tried
browser_sort "bpm" ? color pink : color black

But the pink color comes only, when the bpm is sorted upwards.
With reverse sorting the color is black.

Best option would be:
If I choose Browser sorted by BPM upwards, then the corresponding column in the browser gets green.
(Or the bpm-numbers inside of the column)
When it is sorted by BPM downwards, then the color of the column gets pink...
Would something like that be possible?
 

Posté Wed 26 Apr 23 @ 4:52 pm
SveninoPRO InfinityMember since 2009
locodog wrote :
file_count is your number,
param_multiply 0.5 for half
param_cast 'integer' because file count could be an odd number and I don't know if browser scroll would work with a float
param_cast 'relative' as we need a signed value +/-

file_count & param_multiply 0.5 & param_cast 'integer' & param_cast 'relative' & browser_scroll


Thanks Locodoc, this works fine. Just added browser_scroll top at the start.
By the way, its great to get the solution with explanations. Its a good way to learn...
 

Posté Wed 26 Apr 23 @ 5:03 pm
locoDogPRO InfinityModeratorMember since 2013
Svenino wrote :
By the way: Is there a variable that shows if a browser_sort is upwards or downwards?


see the browser_sort script definition, + or - as the first char of the field will give you specific sort order
browser_sort "+bpm"
 

Posté Wed 26 Apr 23 @ 5:13 pm
SveninoPRO InfinityMember since 2009
uups... got it now. Thanks
 

Posté Wed 26 Apr 23 @ 9:15 pm
Hello friends how are you? I hope I don't bother you, I want to check if you can help me with a script, what I want is to reproduce the event scheduler automatically, I already managed to do it with the keyboard omnit, automatically when opening the program the event scheduler opens but what I want the program to know what day of the week it is and the event of the day opens in the event scheduler, that is, if today is Monday, the program knows that it is Monday and the Monday event opens in the scheduler, I don't know if I know can
 

Posté Sat 20 May 23 @ 11:55 pm
locoDogPRO InfinityModeratorMember since 2013
This will give you a number between 0 & 6, zero = sunday

set $day `countdown '2023/01/01 00:00' '%DD' & param_cast 'int_trunc' & param_mod 7`


so imagining you have events named as the day of the week, then oninint could look something like this
set $day `countdown '2023/01/01 00:00' '%DD' & param_cast 'int_trunc' & param_mod 7` & var $day 0 ? eventscheduler_start 'sunday' : var $day 1 ? eventscheduler_start 'monday' : var $day 2 ? eventscheduler_start 'tuesday' : ... 


I'll leave you to fill the rest of the days.
There are other ways this could work but it depends on how eventscheduler is configured.
 

Posté Sun 21 May 23 @ 12:47 am
is it possible to fully disable split pages (without ´select split page none´)

my pads keep enabling the split mode over and over again

https://youtu.be/F8UAE8op7cg

something like

press button1 page1
hold button1 page1


sorry im a total newb to this
 

Posté Fri 26 May 23 @ 2:21 pm
Has anyone had any luck with scripting a broadcast to a shoutcast server? I want to connect/broadcast to a shoutcast server at a specific time, play a playlist, and end the session and disconnect from the broadcast at a specific time? I cant seem to find anything via search on here. I would really appreciate the help.
 

Posté Thu 01 Jun 23 @ 9:00 am
locoDogPRO InfinityModeratorMember since 2013
everything is accessible via setting script
setting broadcastServer "PRESET" for the preset
& broadcast radio to start.
 

Posté Thu 01 Jun 23 @ 8:21 pm
Thanks for your reply, I realised where I was going wrong. I was preparing the script in me word on my Mac. Word uses different ‘ and “ quotes to vdj script so it was ignoring my commands. It’s now doing what I want and I’m adding more to the process. Thx again
 

Posté Fri 02 Jun 23 @ 9:53 am
SveninoPRO InfinityMember since 2009
If the key of a song is changed, I want to slowly return to the original key with a script.
The process should take about 15-20 seconds per semitone.
I tried the following script wich unfortunately doesn't work:

repeat_start 'KRwait' 500ms & deck left key_smooth +0.02 & 
deck left key_smooth 0 ?
repeat_stop 'KRwait'


I don't know how to check if the original key has already been reached.
In addition, KEY_SMOOTH must be +0.00x if the key has been set lower beforehand.
Otherwise, KEY_SMOOTH would have to be -0.00x...

Unfortunately, I program too rarely to find the solution on my own.
Can anyone help?
Thanks in advance
 

Posté Sat 22 Jul 23 @ 4:23 pm
locoDogPRO InfinityModeratorMember since 2013
key_smooth is between 13 whole semitones -6 to +6, across a dial 0.0 to 1.0, 0.5 being the natural key

deck left key_smooth 0 ?

this won't work as a comparison, key_smooth is a little weird how it works compared this way, it only compares key_move [whole semi tones from neutral]

This would be the correct comparison for accurate natural key
deck left param_equal `key_smooth` 0.5 ?

So lets work out some numbers

1 is our key_smooth dial range, 13 keys, 20 seconds, 2 steps every a second

1 / 13 / 20 / 2
~0.001923 per step

we're dealing with small floats [that have been rounded] we get rounding errors, we might not get back to exactly 0.5, so we'll deal with that
NEUTRAL KEY + 1 STEP
0.5 + 0.001923
0.501923

NEUTRAL KEY - 1 STEP
0.5 - 0.001923
0.498077

param_smaller `key_smooth` 0.501923 ? WE ARE MORE THAN 1 STEP ABOVE NATURAL, GO DOWN :
WE ARE BELOW NATURAL param_bigger `key_smooth` 0.498077 ? WE ARE MORE THAN 1 STEP BELOW NATURAL, GO UP :
WE ARE LESS THAN 1 STEP AWAY FROM NATURAL key_smooth 0.5 & repeat_stop 'KRwait'

repeat_start 'KRwait' 500ms & param_smaller `key_smooth` 0.501923 ? key_smooth -0.001923 : param_bigger `key_smooth` 0.498077 ? key_smooth +0.001923 : key_smooth 0.5 & repeat_stop 'KRwait'

I'll invoice you later XD
 

Posté Sat 22 Jul 23 @ 8:06 pm
SveninoPRO InfinityMember since 2009
Thank You very much Locodoc, changed the parameters a bit so that the reseting is a bit slower, and the other deck is changing together (If 2 songs are playing in sync):

deck right repeat_start 'KRwait' 250ms & 
deck right param_smaller `key_smooth` 0.50041667 ? deck right key_smooth -0.00041667 &
deck left key_smooth -0.00041667 :
deck right param_bigger `key_smooth` 0.49958333 ? deck right key_smooth +0.00041667 &
deck left key_smooth +0.00041667 :
deck right key_smooth 0.5 & deck right repeat_stop 'KRwait'


This works fine but now a new problem arises:

Even with
repeat_stop 'KRwait'

on another button, 'KRwait' cannot be stopped. It goes on and on. Sometimes, however, I also want to change a key WITHOUT it slowly receding on its own. This is no more possible at the moment. I change the Key of deck right (and want to keep this for a longer time) and after 30 secs the key is back at the original.
What is the problem now?
 

Posté Sat 22 Jul 23 @ 9:42 pm
locoDogPRO InfinityModeratorMember since 2013
Don't know, I can't see what you're doing.
I'd guess that repeat_stop needs the deck specifying.
 

Posté Sat 22 Jul 23 @ 11:14 pm
adjnuPRO InfinityMember since 2005
I have 2 NVII W/4chs, i would like to assign controller 1 to decks 1 and 2 only and assign controller 2 to decks 3 and 4 only.
 

Posté Sun 23 Jul 23 @ 9:38 pm
locoDogPRO InfinityModeratorMember since 2013


see the "deck" drop down, do it there.
 

Posté Sun 23 Jul 23 @ 9:43 pm
Can a professional help me create a script for (2 Items);
+ When a new TRACK is LOADED, disengage BEALOCK if engaged.
+ When enabling PTCH LOCK, check if BEAT LOCK is active, if YES, Disengage BEATLOCK and Keep PITCH LOCK ACTIVE.

 

Posté Mon 21 Aug 23 @ 2:27 pm
76%