Connexion rapide:  

Forum: General Discussion

Sujet Script School - Page: 37.35
locoDogPRO InfinityModeratorMember since 2013
Wow thanks, the beer fund is always open,
ThrowInToBeerFund


deck 1 effect_active vocals echo & deck 2 effect_active vocals echo
this would turn echo effect on the vocal stems
if you look up the script description for effect_stems you can see the names used for stem effect slots [except for some reason they chose "vocals" for vocal, I don't know why]
 

Posté Sun 27 Aug 23 @ 5:56 pm
Baldy68PRO InfinityMember since 2019
This didn't work, maybe since I use knobs to control it?
"deck 1 effect_active vocals echo & deck 2 effect_active vocals echo"
Probably I wasn't clear enough. My knobs shows up as sliders in mapping software.

EDIT:
Actually this did work after I restarted VDJ, lesson learned. :-D
"Deck 1 effect_slider 1 1 & effect_stems Bass on & Deck 2 effect_slider 1 1 & effect_stems Bass on"

I sent some pennies for beer, but don't get too drunk yet! lol.
 

Posté Sun 27 Aug 23 @ 7:30 pm
locoDogPRO InfinityModeratorMember since 2013
thank you very much,
I think see the problem, you're calling effect_stems after ? I think

Deck 1 effect_stems Bass on & effect_slider 1 1 & Deck 2 & effect_stems Bass on & effect_slider 1 1
maybe that
 

Posté Sun 27 Aug 23 @ 7:44 pm
Baldy68PRO InfinityMember since 2019
Tryed that also, it seemed to work for a while but no. Maybe the effects I use isn't the right ones to send to stems only? I am trying now with default Echo, Reverb and Flanger, but it affects all stems whatever I do. I give up for today. This is an example of the code I use now:
Deck 1 effect_stems Bass on & effect_slider 1 1 & Deck 2 effect_slider 1 1 & effect_stems Bass on
 

Posté Sun 27 Aug 23 @ 9:42 pm
locoDogPRO InfinityModeratorMember since 2013
I see, effect_stems is sending all fx to the designated stem

deck 1 effect_active 'bass' 'echo' on & deck 2 effect_active 'bass' 'echo' on
to send bass to echo fx


deck 1 effect_slider 'bass' 'echo' 1 & deck 2 effect_active 'bass' 'echo' 1
to control the echo fx on the bass stem slot, dial 1

you can combine these two scripts with &
 

Posté Sun 27 Aug 23 @ 10:24 pm
Baldy68PRO InfinityMember since 2019
Happens nothing with those code lines. :-/
 

Posté Mon 28 Aug 23 @ 7:40 am
Baldy68PRO InfinityMember since 2019
More peculiar things that doesn't function is the corresponding function for Bass and Instrument, since those still are Gain and Filter there are no kill function for them as with eq_kill_low/mid/high. I want a mute and solo button for each stem...



deck 1 eq_kill_filter & Deck 2 eq_kill_filter <----Doesn't work, lol
 

Posté Mon 28 Aug 23 @ 8:07 am
locoDogPRO InfinityModeratorMember since 2013
filter_activate
that turns the color dial on/off

working out gremlins here myself, will be back.
 

Posté Mon 28 Aug 23 @ 8:34 am
locoDogPRO InfinityModeratorMember since 2013
try again but use this first to see if you get movement.

deck 1 effect_show_gui 'bass' 'echo' & deck 2 effect_show_gui 'bass' 'echo'
 

Posté Mon 28 Aug 23 @ 8:47 am
Baldy68PRO InfinityMember since 2019
Thank you again, this works fine: Deck 1 filter_activate & Deck 2 filter_activate

This doesn't though: Deck 1 gain_activate & Deck 2 gain_activate

And still no movement at all with: deck 1 effect_show_gui 'bass' 'echo' & deck 2 effect_show_gui 'bass' 'echo'

No hurry man :-)
 

Posté Mon 28 Aug 23 @ 9:03 am
locoDogPRO InfinityModeratorMember since 2013
stem_pad isolate 'vocal'
stem_pad 'vocal'
 

Posté Mon 28 Aug 23 @ 9:21 am
Baldy68PRO InfinityMember since 2019
Got all mutes and solos to work, thx again. But whatever I do I can't get the FX to work on stems only. Now I need a break, I'm going mad. This isn't the most user-friendly scripting I have encountered, to say the least, lol. But I am sure it must be doable somehow! Maybe with a lot of nothing again? haha
 

Posté Mon 28 Aug 23 @ 12:30 pm
Baldy68PRO InfinityMember since 2019
Ok, I did a quick sketch to show how my "proof of concept" looks like for the moment. This layout is only to test if the concept is even possible to do on VDJ only. If it is I will make a proper hardware controller (Dubstation). The picture is absolutely horrible, I couldn't get the grid or straight lines to work in GIMP image editor. LOL But hopefully you will understand what I am after. I got everything to work except the 5x3 (15) knobs with Stem in the label that effect the full song for the moment, and not the specific stem as I want it to do.
 

Posté Wed 30 Aug 23 @ 1:17 pm
locoDogPRO InfinityModeratorMember since 2013
yeah that can be done.
 

Posté Wed 30 Aug 23 @ 1:21 pm
Baldy68PRO InfinityMember since 2019
Got it to work with your latest contribution! Thank you so much Locodog! :-D
working-----> deck 1 effect_active "Vocals" "echo" on & deck 1 effect_slider "Vocals" "echo" 1
 

Posté Wed 30 Aug 23 @ 1:40 pm
Baldy68PRO InfinityMember since 2019
After "stresstesting" I noticed the effects hangs pretty often, and I must use "reset all" to get the effects to stop. Can this have anything to do with that I use this line for the FX to activate with a knob and control the intensity:
deck 1 effect_active "Vocals" "echo" on & deck 1 effect_slider "Vocals" "echo" 1 & deck 2 effect_active "Vocals" "echo" on & deck 2 effect_slider "Vocals" "echo" 1

And that I use this script for the other parameters (3 extra knobs for every effect) for the effect:
Deck 1 effect_slider 1 2 & Deck 2 effect_slider 1 2

If I remove the "effect_active" from the first script and enable the effect from a button with the script: Deck 1 effect_active 1 & Deck 2 effect_active 1 Then it enable the effect in the slot, and when I use the knob the effect affect all stems instead of only one. This is very confusing.
 

Posté Fri 01 Sep 23 @ 5:16 pm
locoDogPRO InfinityModeratorMember since 2013
to turn switch effect for stem slot by button

deck 1 effect_active "Vocals" "echo" & deck 2 effect_active "Vocals" "echo"
 

Posté Fri 01 Sep 23 @ 7:38 pm
Baldy68PRO InfinityMember since 2019
That kind of works, but then I must have 15 on/off buttons (5 stems*3 FX) not very intuitive. Hmm...
 

Posté Sat 02 Sep 23 @ 11:59 am
locoDogPRO InfinityModeratorMember since 2013
The implicit, what is it? where is it used? why can it be annoying? how do you tame it?

The implicit is really useful, for simple basic script you don't even realise it's there because it's that intuitive.
Get a bit more involved with script and you end up fighting it, either by choice or it choosing you [that actually happens, it picks a fight with you]

So what actually is it? It's the value of a HW slider [0.0 to 1.0] or an encoder [-1 or +1, encoders can give other values but most spit out -1/+1]
Most case that's fine, a custom_button slider also has an implicit too.
Let's see it in action,
set b & loop 0 ? loop : loop_length

add this to a real HW slider or custom_button slider and move it about,
bring up, var_list click the refresh check box,
to watch that variable change,

so what's this script doing?
Imagine the value of the slider is 0.42 and imagine that value is inserted after every script verb, so our script will look like
set b 0.42 & loop 0 0.42 ? loop 0.42 : loop_length 0.42

set variable b simple enough, query loop 0 0.42 ? well loop 0 is like saying no loop active so the 0.42 is ignored because loop only accepts 1 param [length as beats, length as ms, or length modifier with %]
So is loop 0 ?
yes then turn loop 0.42 on :
no, loop is on so change it's size 0.42 beats

All very basic and boring, let's get interesting
set b & param_multiply 4 & loop 0 ? loop : loop_length & set d

so b will set between 0.0 - 1.0, but our loop length goes from 0.0 to 4.0
the param_multiply has changed the implicit, see the value of d it too receives the modified implicit.

set b & param_multiply 4 & loop 0 ? loop : get_var b & param_cast & set c & loop_length & set d

look at this, you expect the value of b to be cast to var c, but it doesn't happen, the implicit gets in there first,
now you have a fight.
once there's an implicit if you need to cast anywhere, you have to use the implicit to do it.

How do you work round it?, given this script again how do you cast the val of b to var c and still get the loop length behaviour we want?
set b & param_multiply 4 & loop 0 ? loop : get_var b & param_cast & set c & loop_length & set d

you mangle the implicit until it's the number you want and then turn it back.

set b & param_multiply 4 & loop 0 ? loop : param_multiply 0 & param_add 1 & param_multiply 'get_var b' & set c & param_multiply 4 & loop_length & set d
multiply by zero so our implicit is zero
add one so our implicit is 1
multiply by the value we want [var b]
set c then multiply by 4 to get our loop_length behaviour back


Mostly implicit is HW sliders & encoders so mostly no bother... until it picks a fight with you with some other input, it shouldn't happen but it can with scripting a certain way.
I can't explain exactly what that scripting is but if you seem to be getting odd results and suspect a implicit has turned on in your script, add this in your script to check
& set test &
if it sets to 1.000 you probably don't have an implicit issue, but any other value then you do.


Right those were the entrée, now for the main meal;
All very easy with example cases but real world you might need to cast text or a number or a percentage, so I'll show you this, my arranged fight with the implicit

firstly I only set 4 vars to a value directly
I set a var called clock, to the clocktime string with `get_clock`
I set a var called "2.5bt" to a string value of "OgI" [a stupid name for a var for a stupid trick later]
I set var othervar to 4.2
And I set initImplicitTime to 100

then I use a trick to create an implicit on a custom_button script that aren't supposed to have an implicit. [the trick is casting to a rsi time, I believe because the rsi is expecting "name" time repeatCount, and it doesn't get everything it expects the implicit happens... or it could just be gremlins]

After that, it's just me bashing about the implicit into all kind of forms, percent, time, bool, text, adding text, a blank text sting, clocktime, another blank text sting, back to numbers, and the last one is for my stupid trick.

you should look at var_list and read the script, you'll learn stuff.
param_invert to an int is like X*-1. but
param_invert to a float is like 1-X
blank a text implicit with, param_cast 'text' 0


remember & set test & from earlier? & set aTime & is my version here, I didn't directly pass a value to this var but it got a value other than 1.000

action_deck 1 ? set clock `get_clock` & set_var "2.5bt" "OgI" & set othervar 4.2 & set initImplicitTime 100 & get_var initImplicitTime & param_cast 'ms' & repeat_start_instant 'name' & repeat_stop 'name' & set aTime & nothing & param_multiply 0.5 & set anotherTimeMultiplied & param_cast 'integer' & set anInt & param_1_x & set recipFloat & nothing & param_multiply "get_var othervar" & set intMultiplied  & param_1_x  & set justApositiveFloat & param_cast 'boolean' & set FloatTobool & param_add -2.5 & set 'trueBoolminus2.5' & param_mod 1700 & nothing & set modWithNegNumbers & param_cast 'frac' & set_var aFrac & param_multiply 0 & param_add 1 & param_cast 'percentage' & set percent & param_multiply 0.75 & param_cast 'percentage' & set percentageMultiplied & param_cast 'integer' & set percentToInt & param_invert & set intInverted & param_invert & param_cast 'float' & set IntInvertedTurnToFloat & param_invert & set invertedfloat & param_cast 'text' & nothing & set_var text & param_add 'SSS' & set_var textAdded & param_cast 'boolean' & set bool & param_invert & set invertedbool & param_cast 'text' & nothing  & set_var boolToText & param_add "123" & set_var moreAddedText & param_cast 'text' 0 & set_var blanktext & param_add `get_var clock` & set clocktime & param_cast 'text' 0 & set_var antherblanktext & param_add "4" & set_var numberAsString & param_cast 'float' & set numberAgain & param_multiply 0.625 & set confirmedNumber & param_cast 'beats' & set readItAsBeats & param_cast 'text' & set setNewVarToValueOfAnotherByImplicitString



Is this the full story on the implicit? Nope

*edit minor update with `get_clock` example
 

Posté Sat 02 Sep 23 @ 6:02 pm
Baldy68PRO InfinityMember since 2019
Wow, at the same time as I am extremely grateful for your knowledge and time spent ....I don't know what to say or do, for the moment this is WAY over my head!

Now I just feel like giving up this project...but I don't want to, I love what I got working so far!

I will try to comprehend what you typed after the weekend I think, right now I get uncomfortable flashbacks from the math lessons at University many years ago, lol.
 

Posté Sat 02 Sep 23 @ 6:30 pm
80%