Sign In:     


Forum: General Discussion

Topic: Script School - Page: 49.65
hi!
is there a script for button that make on/off stemfx “vocal” and “instruments”? i would use channel filter in vocal and instruments at same time, thanks a lot!
 

Not a hugely important topic but this verb is very under-documented, so I best quick fill in the gaps
The verb
get_date

verb description wrote :
get the current date (use 'get_date "format"' to get the date in a specific format. format can include %Y, %m, %d for year, month and day, %A for weekday)


I saw that and I thought "those format specifiers look very much like some C/C++ I know",
so I just tried some stuff that I guessed might work, and it does work. So it's not just date, it's all things time in pretty much any format you'll need.
After confirmation from the devs, it works how I guessed it works [get_date passes the format specifiers to the C++ function I thought it was]

Here's the full list of format specifiers available and the output.

Format Specifier 	Description 	Example
%a Short representation of the weekday Fri
%A Full representation of the weekday Friday
%b Short representation of the month name Dec
%B Full representation of the month name December
%c Full date and time representation Fri Dec 17 14:30:01 2023
%C Century (equivalent to taking the first two digits of a 4-digit year) 20
%d Day of the month with leading zero 09
%D Date representation equivalent to %m/%d/%y 12/17/23
%e Day of the month with leading spaces 9
%F Date representation equivalent to %Y-%m-%d 2023-12-17
%g 2-digit week-based year (week-based years start at the beginning of a week) 23
%G 4-digit week-based year (week-based years start at the beginning of a week) 2023
%h Short representation of the month name (equivalent to %b) Dec
%H 24-hour format of an hour 14
%I 12-hour format of an hour 02
%j Day of the year (from 0 through 365) 351
%m Numeric representation of a month 12
%M Minutes within an hour 30
%n A \n new line character
%p AM or PM PM
%r Full 12-hour time format 02:30:01 PM
%R 24-hour time format equivalent to %H:%M 14:30
%S Seconds within a minute 01
%t A \t tab character
%T Full 24-hour time format equivalent to %H:%M:%S 14:30:01
%u Numeric representation of a day of the week (from 1 to 7 starting with Monday) 7
%U Week of the year starting at 0, with week 1 beginning on the first Sunday of the year 51
%V Week of the year starting at 1, with week 1 beginning on the first Monday of the year and any day in January before the first Monay belonging to the previous year 50
%w Numeric representation of a day of the week (from 0 to 6 starting with Sunday) 0
%W Week of the year starting at 0, with week 1 beginning on the first Monday of the year 50
%x Locale-based date representation 12/17/23
%X Locale-based time representation 14:30:01
%y 2-digit year representation 23
%Y 4-digit year representation 2023
%z Numeric timezone offset +0000
%Z Timezone name GMT
%% A % character %
 

hi! i have slip problem with this script; this script is Kontrol S8 TOUCHJOG modofied about me for scratch, and it works, but with slip on…slip don’t work :( could you help me? thanks!!
 

Hi
I have an Akai LPD8 (8 pad colour controller) that I have been reprogramming to use as a sampler pad that will play samples taking into account what sample page is selected.
Quite simply I've set the controller to be on deck 5 so it doesn't effect my left or right decks and mapped custom buttons to cycle up and down the sample pages for deck 5.
'sample_pad 1' etc works fine for every page,
& 'sampler_pad 1 ? blink ? sampler_color 1 : off : sampler_color 1' etc will show the correct colours for each pad on the selected page.

I have 2 queries:

1. Sampler volume
The LPD8 also has 8 volume knobs but 'sampler_volume_nogroup 1' ALWAYS adjusts sample slot 1 regardless of what the sample page you are on.
I have programmed in
'param_equal `sampler_pad_page` "1 to 8" ? sampler_volume_nogroup 1 :
param_equal `sampler_pad_page` "9 to 16" ? sampler_volume_nogroup 9 : ' etc
but with 8 pages to script for 8 buttons, I wondered if there was a more efficient way to adjust the sampler volumes, perhaps that would follow the sampler page but still use 1-8.

2. Is there a way to CYCLE through the sampler_pad_pages, I can have 2 buttons, 'sampler_pad_page +1' and '-1' but when you get to the end (or beginning) it will stop rather than revert back to '1 to 8', I know I can script it to check if I am at the end but wondered if there was a way to specify to automatically cycle.

Anyway, it does work OK but since samples have changed dramatically recently I wondered if there were improvements (perhaps not yet documented) I could use to get the script more efficient.
Thanks.
 

No you're pretty up to date with your methods.
 

hi all.
it´s possible to get and show in custom button name case the live count of a repeat_start "x"
My idea is play a sampler in periodes of X time.
and if i could would be very nice view a counter in button who display time remining for next sampler play.
i´m playing with script long time but aresome things i can´t reach understand.
i´m tried some fool scripts like this whitout success:
`get_text ´get_var "kuñas" ``
`get_text ´get_var "kuñas" & param_cast ``
i supposse had to add a repeat for live update time, but first need to get the time value, and convert ms to min & seg, last thing hope do it with explanations on the "repeat" chapter of school...
lot of work yet for make it...
thanks
 

There's nothing in the repeat_start verb that does that, there's nothing stopping you setting your own variable and displaying that.
 

Btw I have been able to achieve good results for simple scripts with ChatGPT.
 

hi, do you think is a little bug that sampler_pad if it’s in a little sintax like photo doesn’t work? work only if script is only “sampler_pad”
 

Hi
I've been playing to no avail so any help or pointers would be appreciated.

I am trying to add to my skin 2 video_fx buttons & 2 video_fx sliders, to modify the current video fx directly
I can add the buttons & sliders and they work fine but I am having trouble labelling them.

The manual lists the verb 'get_video_fx_slider_label' but I can only get it to display the label of the first slider no matter what. I have been testing using a custom button and `deck master get_video_fx_slider_label 2` etc, returns the 1st slider label for the selected video effect and ignores the number, so I am not sure what I am doing wrong.

Also, I have been looking for a way to get the video_fx button label but that doesn't seem to exist.

So is there a way in vdjscript to create (eg) 'video_fx_button 2' and 'video_fx_slider 2' and get the labels for those buttons/sliders to display in the skin.
Thanks
 

Yeah the get_ verb is missing params for element number
Go the more old school way by using the video slot
get_effect_slider_text video 2
 

locoDog wrote :
Yeah the get_ verb is missing params for element number
Go the more old school way by using the video slot
get_effect_slider_text video 2


Testing it on a custom button it returns the VALUE of the slider not the LABEL of the slider, have I missed something.
I think this is going to be one of those 'no can do' scenarios if button labels are the same.

EDIT:
Sorry you probably misunderstood me (or were pointing me in the right direction without giving it away) and I didn't check the verb you were referring to but 'get_effect_slider_label video 2' does the trick, and the same with the button names, I had forgotten about adding the 'video'.
All working
Thanks

 

I'm turning in circles with something very simple. I want to duplicate the CFX level from deck 1 to deck 2. If it is 0.6 on deck 1, I'd like to copy that to deck 2 "deck 2 filter 0.6". I am able to set a variable $toto to 0.6, confirmed with VAR LIST but I have no clue how to apply the variable to "filter", and I guess I will also be unable to fill $toto with the actual "filter" value on deck 1. So what is the proper syntax to achieve "filter $toto"?
 

param_cast is what you use to put a variable on the end of a verb

get_var $toto & param_cast & deck 2 filter


to set a variable to a script action value, the set verb allows script actions as a parameter when the action is wrapped in ` `

set $toto `deck 1 filter`
 

Thanks, it works fine.
 

Q: can VDJ script be written as structured code?

I'm 51 years as a software developer, and the run-on "everything on one line" makes me squirm.

Is there a line continuation character or ?? that allows for writing more structured code?

Thanks in advance.
 

bgavin wrote :
run-on "everything on one line" makes me squirm.


return chars and tabs are understood as spaces.
 

Writing in structured form, this works correctly.
I use the 4-deck skin

set '%Src' 2 &
set '%Dst' 1 &
set '%Fader' 0.0

var_list shows these variables are correctly instantiated, but still show on [d3] even though created on [d2]
It is my understanding that percent types are local to the deck they are created on.

What is failing entirely is using the deck object with these variables.
deck %Src play
deck '%Src' play
deck `%Src` play

All fail.
I am puzzled, and cannot find any examples or cures out in Google land.

 

you want set_deck to do that kind of thing, deck verb doesn't accept script action as a parameter or as a cast.

vars created on wrong deck, must be something your end no problems here.
 

Hi
I have got a lightweight controller I use for some simple gigs but there are a few things it doesn't have for VDJ including an easy way to move around the browser panels without repurposing buttons I already need,
so I've reprogrammed the Track knob to include this when shifted:

'shift ? browser_window "folders,songs,sideview" & browser_window "folders" ? show_splitpanel 'Folders' on : show_splitpanel 'Folders' off : browser_scroll'

However when I scroll forward it works fine and moves between the different panels in order but when I scroll backwards it always goes from 'sideview' back to 'folders' then 'sideview' again, missing out the 'songs' panel.
Is this a parameter problem, with the back scroll decreasing a bit too much with each click and missing a step, if so, is there a way with some fancy math to reduce it so that when you scroll backwards it will allow it to work properly.
I don't mind if you have to turn the wheel more to achieve this.
 

95%