Discussion about virtualFX
A special thanks to P.Roma for the mac port [port coming soon after NYE], and inspiring me to update this.
This might change things for you, it might not. This is the bare bones of a plugin, you add the meat.
It actually, in a way, reflects how c++ plugins work.
Read on and it'll start making sense.
free to use, but if this is something you'll use regularly, You could buy me a beer.
[beer makes stupid ideas stupid realities!]
ThrowInToBeerFund
Feel free to try before you consider donating.
***Edit there are 3 ways to "program" a virtualfx,
1 by writing to the .ini outside of vdj
2 by writing to the effect_strings inside vdj
3 asking me and I'll provide an .ini or help to make it on your own
***EDIT 2 new intro/guide
Virtualfx guide.
Most people won't use everything here, some people will find a lot of this obvious, I'm writing for everybody here.
What is virtualfx?
virtualfx is a plugin that on its own does nothing, it holds scripts and saves them for later use. You write the scripts and it performs the script, that could be anything - turn other fx on, move dials, perform beatjumps, call loops, tag database stuff. It can do any script.
Because it's a plugin you can just make and rename copies of the fx and have as many as you want all doing different kinds of script jobs, and the nice bit is - it is called just like any effect.
What it can't do: It just does script, it can't do anything else, it can't change the sound, but it can control other plugins that can change the sound.
Let's look at it from a fresh install, it does nothing until you "program" it
quick overview, 3 dials, 3 buttons, 1 more button named "clear" and 3 effect_strings that are called when an events happen, those events are onStart, onStop, buffer. We'll work thru all of this.
Clear
a double click of the clear button will erase all the scripts, that would take the virtualfx back to the default stated, there's no undo. You clicked it twice in 100ms, your fault.
The 3 effect_strings for events.
When I say effect_strings and you don't get what that means, it's just the space to hold a script. Like I said earlier, onStart, onStop, Buffer.
This is how real coded plugins work, they actually have these events.
onStart/onStop is what is done when the fx starts or stops.
Buffer, buffer is called when the fx is on and is called every time the plugin has to process a new chunk of sound, it seems to be called about every 10ms, when the plugin is off it's not called.
The 3 buttons, each of these 3 buttons has its own effect_string.
when you press a button there's 2 things that happen, first the button with change state - off to on, on to off. Second the script is called, the script knows nothing about the state of the button the only thing the script knows is the button was pressed.
The 3 dials, similar to buttons - each has it's own effect_string. Similar to buttons the script knows nothing about the dial state other than the dial was just touched.
To go with the 3 dials we have 3 labels [labels to show something under the dial like; 24% or some text] again these labels have their own effect string.
That's the introduction, there's 2 ways to "program" a virtualfx, there's writing the .ini file directly which is easiest, the other way you can use custom buttons inside vdj to "program" the virtualfx while vdj is running, this is a bit harder but it can do some interesting things.
let's look at a blank ini
so I best tell you which "thing" is tied to which number
0 - you don't set that, it what the 1st dial was saved by vdj and it's what the dial will be set to next time you fresh use the fx
1 - this is the effect_string for the 1st dial
2 - this is the effect_string for the 1st dial label
3 - you don't set that, it what the 2nd dial was saved by vdj and it's what the dial will be set to next time you fresh use the fx
4 - this is the effect_string for the 2nd dial
5 - this is the effect_string for the 2nd dial label
6 - you don't set that, it what the 3rd dial was saved by vdj and it's what the dial will be set to next time you fresh use the fx
7 - this is the effect_string for the 3rd dial label
8 - this is the effect_string for the 3rd dial
9 - you don't set that, it what the 1st button was saved by vdj and it's what the button will be set to next time you fresh use the fx
10 - this is the effect string for the 1st button
11 - you don't set that, it what the 2nd button was saved by vdj and it's what the button will be set to next time you fresh use the fx
12 - this is the effect string for the 2nd button
13 - you don't set that, it what the 3rd button was saved by vdj and it's what the button will be set to next time you fresh use the fx
14 - this is the effect string for the 3rd button
16 - this is the effect_string called onStart
17 - this is the effect_string called onStop
18 - this is the effect_string called when the buffer wants to update
Why are we missing 15? That's the "clear" button, but unlike the other buttons which are latching switches, clear is a momentary button that has no savable state so isn't included in the .ini
the only detail about writing .ini files is keep each entry on one line, don't use "RETURN" key
Programming the virtualfx inside vdj, you send text to the effect_strings each one has a number and they're numbered like this
effect_string 1 - when dial 1 touched
effect_string 2 - dial 1 label
effect_string 3 - when dial 2 touched
effect_string 4 - dial 2 label
effect_string 5 - when dial 3 touched
effect_string 6 - dial 3 label
effect_string 7 - when button 1 touched
effect_string 8 - when button 2 touched
effect_string 9 - when button 3 touched
effect_string 10 - onstart
effect_string 11 - onstop
effect_string 12 - buffer
so example case, you made a copy of virtualfx and called it "basicThing" this is how you would "program" with a vdj skin custom_button the 1st fx button to work as play_pause
effect_string "basicThing" 7 "play_pause"
press that vdj skin button and our button is "programmed"
Thing of note I used " " around "basicThing", if your name does not contain spaces you do not need to wrap the fx name in " ", it is benificial to NEVER use spaces in names
Right we're getting to the juicy stuff now.
F.A.O theSoundInsurgent
I'll talk thru a real case that one person reading wants and give both a .ini example and how you would do it in vdj
Case: User wants the two dials on the cut effect swapped round
First make a copy of the .dll/.bundle and the .ini, we'll name these
virtualFXCut
we'll do the buttons first
our button 1 wants to control cut effect_button 1, string 7
effect_button cut 1
don't worry that they could be out of phase with each other now we'll fix that onstart
our button 2 wants to control cut effect_button 2, string 8
effect_button cut 2
next dials, remember how I said the script doesn't know anything about our dials other than it was touched recently, so our dial 1 we want to pass [cast] this value to cut dial 2, string 1
effect_slider virtualfxCut 1 & param_cast & effect_slider cut 2
same story with our dial 2 but controlling cut dial 1, string 3
effect_slider virtualfxCut 2 & param_cast & effect_slider cut 1
similar with our dial 3 controlling cut dial 3, string 5
effect_slider virtualfxCut 3 & param_cast & effect_slider cut 3
now the 3 labels, strings 2,4,& 6
get_effect_slider_text cut 2
get_effect_slider_text cut 1
get_effect_slider_text cut 3
onStart we want make sure the cut effect matches our virtual fx then turn the cut effect on
the dials are given an automatic poke as part of the c++ code so we don't worry about them but buttons need to be considered, string 10
( effect_button virtualfxCut 1 on ? effect_button cut 1 on : effect_button cut 1 off ) & ( effect_button virtualfxCut 2 on ? effect_button cut 2 on : effect_button cut 2 off ) & effect_active cut on
onStop we want to turn the cut effect_off, string 11
effect_active cut off
this is how the ini should look
And if you wanted to "program" the fx from inside vdj with a custom_button the script to do this would look like below
effect_string virtualfxCut 1 "effect_slider virtualfxCut 1 & param_cast & effect_slider cut 2" & effect_string virtualfxCut 2 "get_effect_slider_text cut 2" & effect_string virtualfxCut 3 "effect_slider virtualfxCut 2 & param_cast & effect_slider cut 1" & effect_string virtualfxCut 4 "get_effect_slider_text cut 1" & effect_string virtualfxCut 5 "effect_slider virtualfxCut 3 & param_cast & effect_slider cut 3" & effect_string virtualfxCut 6 "get_effect_slider_text cut 3" & effect_string virtualfxCut 7 "effect_button cut 1" & effect_string virtualfxCut 8 "effect_button cut 2" & effect_string virtualfxCut 9 "" & effect_string virtualfxCut 10 "effect_active cut on & ( effect_button virtualfxCut 1 on ? effect_button cut 1 on : effect_button cut 1 off ) & ( effect_button virtualfxCut 2 on ? effect_button cut 2 on : effect_button cut 2 off )" & effect_string virtualfxCut 11 "effect_active cut off" & effect_string virtualfxCut 12 ""
So that's the first example done controlling another fx, now some stuff that you might find useful for your own creations
we'll name the dll/bundle & ini
boringFX
maybe you want a dial that picks 1,2,4,8,16,32,64 for beat lengths
or if programming inside vdj with a custom_button
effect_string boringFX 1 "set boringFXLength `param_pow 'effect_slider boringFX 1 & param_multiply 6 & param_cast int_trunc' 2`"
what we're doing here is taking our dial value [which is 0.0 to 1.0] multiplying by 6, and then dropping the stuff after the decimal place, we're then doing 2 to the power of that value.
so we could have 2^0 =1 2^1=2... 2^6=64
and all that is part of how we make a variable called boringFXLength
ok we have that let's display it on the label but we'll also post fix it with ' bt'
or if programming inside vdj with a custom_button
effect_string boringFX 2 "get_text '`get_var boringFXLength` bt'"
give it a test
Lets do another dial but this one goes from 1/8th to 64, same idea but this time we multiply by 9, do the 2 to the power thing then divide the number by 8 [or *0.125]
And the label, with a couple of checks if number is 0.125, actually show 1/8 bt
lets do something with this boringFX, lets make it turn itself off after the number of beats you set
[inside vdj] effect_string boringfx 10 "set boringFXstart `get_beatpos` & set boringFXend `get_var boringFXstart & param_add & get_var boringFXLength`"
[inside vdj] effect_string boringfx 12 "`get_var boringFXend` `get_beatpos` ? : effect_active boringFX off"
we make a variable for the start point, we make another variable for our end by adding our dial variable to our start variable
then the buffer script ; if our current position is smaller than our end, do nothing, if not smaller turn our fx off
That's auto off, give it a try. Let's make it move the filter over the duration
[inside vdj starts, I hope you're getting the difference between ini and in vdj by now] effect_string boringfx 12...
yeah, it gets involved, really all we're doing is converting our current position to a value between 0.0 and 1.0, in relation to our start and end points, we take that value and multiply by 0.5 and add 0.5, and pass the result to the filter, so our filter will move from 0.5 to 1.0 over our duration.
and because we don't want filter left on once our boringFX turns off
[inside vdj is] effect_string boringfx 11...
I don't expect everybody to get all of this, just that it can be done, I'm around to answer questions
This is just an example, moving the slider in different directions, different scales, different curves, is just a matter of maths
The button scripts
like I said the script knows nothing about the state of the button, it just knows it was pressed
if you want different actions for button on against button off you need to program that
effect_string boringFX 7 "effect_button boringfx 1 on ? play : pause"
Using time;
Earlier examples I used position as the determining factor for auto off and to power the external slider movement.
Position might be what you want, even when in a loop (have the slider oscillate) , but it might not be. We can use beats worth of time instead.
We'll call this one
timeExample
make your copies, rename appropriately.
our dial 1 script, will do 1,2,4,8,16,32,64,96,128
take note how we got 96 & 128,
set teLength `param_pow 'effect_slider timeExample 1 & param_multiply 8 & param_cast int_trunc' 2` & var teLength 128 ? set teLength 96 : var telength 256 ? set teLength 128 :
for onStart, we're be using stopwatch [SW] for our timing, but different plugins you make might be using stopwatch at the same time so we just can't reset it.
But it's also useful if ours is the only one using stopwatch to reset it to zero on start.
The bit in ( ) deals with that, a common var for all plugins using SW, if this is the only one, great - reset SW, if something else is using SW save the value of SW now make it negative to subtract from further readings [named as teOffsetSW].
Next bit, work our our target SW time, how many ms/beat, how many beats.
Last bit just initialising some fx
effect string 11/onStart
( var $usingSW 0 ? & set $usingSW +1 & stopwatch_reset & set teOffsetSW 0 : set $usingSW +1 & set teOffsetSW `param_multiply stopwatch 1000 & param_cast int_trunc & param_invert` ) & set teTargetSW `get_bpm & param_1_x & param_multiply 60000 & param_multiply 'get_var teLength' & param_1_x` & effect_slider 'filter lp' 1 0.0 & effect_active 'filter lp' on & effect_slider distortion 2 0.0 & effect_active distortion on & effect_show_gui distortion on & effect_show_gui 'filter lp' on
onStop, we're just turning stuff off and subtracting 1 for our common SW variable to let it know we aren't using SW any more
effect sting 11 / OnStop
effect_slider 'filter lp' 1 0.0 & effect_active 'filter lp' off & effect_slider distortion 2 0.0 & effect_active distortion off & effect_show_gui distortion off & effect_show_gui 'filter lp' off & var $usingSW 0 ? : set $usingSW -1
Buffer, it gets mathy...
(current SW time - any offset ) * ( 1/ our target time )
that gives us some value between 0.0 and 1.0
param_pow is useful for different curve types, I'll show a pic in a minute
multiply by 0.8 as that's the value we want by the end of the fx
cast it to the filter lp dial
then we do a second dial, the same teSweep variable is still 0.0-1.0
a different param_pow value, a different multiplier, sent to distortion dial
last bit has our teSweep variable exceeded 1.0 ? yes, turn the fx off
effect sting 12 / Buffer
set teSweep `param_add 'stopwatch & param_multiply 1000 & param_cast int_trunc' 'get_var teOffsetSW' & param_multiply 'get_var teTargetSW'` & param_pow 0.333 'get_var teSweep' & param_multiply 0.8 & param_cast & effect_slider 'filter lp' 1 & param_pow 2 'get_var teSweep' & param_multiply 0.6 & param_cast & effect_slider distortion 2 & param_smaller 1 'get_var teSweep' ? : effect_active timeExample off
curiosities sake, param_pow 0.333 gives the blue curve, param_pow 2 gives the green curve.
More example sweeps
From 100% to 0% linearly
... & param_pow 1 'get_var teSweep' & param_multiply 1.0 & param_add 0.0 & param_invert & param_cast & effect_slider distortion 2 & ...
From 100% to 25% linearly
... & param_pow 1 'get_var teSweep' & param_multiply 0.75 & param_add 0.0 & param_invert & param_cast & effect_slider distortion 2 & ...
From 80% to 20% linearly
... & param_pow 1 'get_var teSweep' & param_multiply 0.6 & param_add 0.2 & param_invert & param_cast & effect_slider distortion 2 & ...
From 80% to 20% fast curve, run 4 times over teSweep
... & param_pow 0.333 'get_var teSweep & param_multiply 4 & param_cast frac' & param_multiply 0.6 & param_add 0.2 & param_invert & param_cast & effect_slider distortion 2 & ...
oscillations
the last curve example was a sawtooth like oscillation to get more sine like smooth up & down oscillations, it gets a bit more mathy.
As the curve functions get complex you have to use intermediate values
oscillate from 30% to 90% and back 4 times over the duration
... & set intVal0 `param_multiply 'get_var teSweep' 4` & set intVal1 `param_bigger 'get_var intVal0 & param_cast frac' 0.5 ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2 ` & param_pow 0.5 'get_var intval1' & param_multiply 0.6 & param_add 0.3 & param_cast & effect_slider distortion 2 & ...
oscillate from 25% to 75% and back over 4 beats
... & set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.25'` & set intVal1 `param_bigger 'get_var intVal0 & param_cast frac' 0.5 ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2 ` & param_pow 0.5 'get_var intval1' & param_multiply 0.5 & param_add 0.25 & param_cast & effect_slider distortion 2 & ...
This isn't easy, just know it's possible
A few more oscillations
linear up down
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.25'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & param_pow 1.0 'get_var intval1' & param_multiply 0.5 & param_add 0.3 & param_cast & effect_slider distortion 2 ) &...
◝ ◜ N-E, W-N [think north to east, dial does down slowly to start with]
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add 1 'get_var intVal1 & param_pow 2 & param_multiply -1'` & set intVal3 `param_pow 0.5 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
◜◝ W-N N-E
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add -1 'get_var intVal1' & param_pow 2 & param_multiply -1 & param_add 1` & set intVal3 `param_pow 0.5 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
◞ ◟ S-E W-S
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add 1 'get_var intVal1 & param_pow 2 & param_multiply -1' & param_pow 0.5 & param_multiply -1` & set intVal3 `param_add 1.0 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
◟◞ W-S S-E
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add -1 'get_var intVal1' & param_pow 2 & param_multiply -1 & param_add 1 & param_pow 0.5 & param_multiply -1` & set intVal3 `param_add 1.0 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
complicated curve, slow climb, fast climb, slow plateau , slow drop, fast drop slow drop
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75' & param_mod 3` & ( param_smaller 1 `get_var intVal0` ? param_pow 3 'get_var intval0' & param_multiply 0.3 & param_add 0.0 & param_cast & effect_slider distortion 2 : param_smaller 1.5 `get_var intVal0` ? set intVal1 `param_multiply 'get_var intVal0 & param_cast frac' 2` & param_pow 0.333 'get_var intval1' & param_multiply 0.5 & param_add 0.3 & param_cast & effect_slider distortion 2 : param_smaller 2.0 `get_var intVal0` ? set intVal1 `param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2 ` & param_pow 0.333 'get_var intval1' & param_multiply 0.5 & param_add 0.3 & param_cast & effect_slider distortion 2 : set intVal1 `param_multiply 'get_var intVal0 & param_cast frac & param_invert' 1 ` & param_pow 3 'get_var intval1' & param_multiply 0.3 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
Why do I say "programming" from inside vdj is harder?
Well it comes down to the fact that to set an effect_string, you need to wrap the actual string in " " or ' ' , experienced scripters know how precious a set of " " or ' ' can be.
I've had to write all my examples to work for the effect_string methods, so I lost the use of a set of " " in writing the scripts. It just means I had to use more intermediate values
really in the weeds here but, two programmed buttons that look similar but give different results, here's the custom_button script to program them, we also set the level slider on deck to prove something
[still using boringFX]
first double click "clear" to blank the fx
custom button script
level 0.5 & effect_string boringFX 7 "param_smaller `level` 0.5 ? play_pause : nothing" & get_text "param_smaller `level` 0.5 ? play_pause : nothing" & param_cast text & effect_string boringFX 8
look at the effect_strings in the fx gui, button 1 is exactly what we typed, button 2 seems to have changed `level` into the value of level when the effect_string was wrote.
This is something to be aware of and in some cases it can be used as an advantage [pretty weird cases but still cases]
Really weird, can these effect_strings program other effect_strings ?
Yes they can, but we're reaching "script inception" here, [an effect_string programmed by an effect_string, programmed by a custom button script] weird cases but still cases.
I could go on and on with examples, I've used this for all kinds of stuff, like auto mic ducking, faster shader changing, sWingIt plugin was a virtualfx for about a year before I made it a full plugin
**** End of lecture ****
A special thanks to P.Roma for the mac port [port coming soon after NYE], and inspiring me to update this.
This might change things for you, it might not. This is the bare bones of a plugin, you add the meat.
It actually, in a way, reflects how c++ plugins work.
Read on and it'll start making sense.
free to use, but if this is something you'll use regularly, You could buy me a beer.
[beer makes stupid ideas stupid realities!]
Feel free to try before you consider donating.
***Edit there are 3 ways to "program" a virtualfx,
1 by writing to the .ini outside of vdj
2 by writing to the effect_strings inside vdj
3 asking me and I'll provide an .ini or help to make it on your own
***EDIT 2 new intro/guide
Virtualfx guide.
Most people won't use everything here, some people will find a lot of this obvious, I'm writing for everybody here.
What is virtualfx?
virtualfx is a plugin that on its own does nothing, it holds scripts and saves them for later use. You write the scripts and it performs the script, that could be anything - turn other fx on, move dials, perform beatjumps, call loops, tag database stuff. It can do any script.
Because it's a plugin you can just make and rename copies of the fx and have as many as you want all doing different kinds of script jobs, and the nice bit is - it is called just like any effect.
What it can't do: It just does script, it can't do anything else, it can't change the sound, but it can control other plugins that can change the sound.
Let's look at it from a fresh install, it does nothing until you "program" it
quick overview, 3 dials, 3 buttons, 1 more button named "clear" and 3 effect_strings that are called when an events happen, those events are onStart, onStop, buffer. We'll work thru all of this.
Clear
a double click of the clear button will erase all the scripts, that would take the virtualfx back to the default stated, there's no undo. You clicked it twice in 100ms, your fault.
The 3 effect_strings for events.
When I say effect_strings and you don't get what that means, it's just the space to hold a script. Like I said earlier, onStart, onStop, Buffer.
This is how real coded plugins work, they actually have these events.
onStart/onStop is what is done when the fx starts or stops.
Buffer, buffer is called when the fx is on and is called every time the plugin has to process a new chunk of sound, it seems to be called about every 10ms, when the plugin is off it's not called.
The 3 buttons, each of these 3 buttons has its own effect_string.
when you press a button there's 2 things that happen, first the button with change state - off to on, on to off. Second the script is called, the script knows nothing about the state of the button the only thing the script knows is the button was pressed.
The 3 dials, similar to buttons - each has it's own effect_string. Similar to buttons the script knows nothing about the dial state other than the dial was just touched.
To go with the 3 dials we have 3 labels [labels to show something under the dial like; 24% or some text] again these labels have their own effect string.
That's the introduction, there's 2 ways to "program" a virtualfx, there's writing the .ini file directly which is easiest, the other way you can use custom buttons inside vdj to "program" the virtualfx while vdj is running, this is a bit harder but it can do some interesting things.
let's look at a blank ini
[autoparams]
Slider DIAL A 0=4095
String DIAL A 1=
String LABEL A 2=
Slider DIAL B 3=4095
String DIAL B 4=
String LABEL B 5=
Slider DIAL C 6=4095
String DIAL C 8=
String LABEL C 7=
Switch BUTTON 1 9=0
String BUTTON 1 10=
Switch BUTTON 2 11=0
String BUTTON 2 12=
Switch BUTTON 3 13=0
String BUTTON 3 14=
String OnStart 16=
String OnStop 17=
String Buffer 18=
so I best tell you which "thing" is tied to which number
0 - you don't set that, it what the 1st dial was saved by vdj and it's what the dial will be set to next time you fresh use the fx
1 - this is the effect_string for the 1st dial
2 - this is the effect_string for the 1st dial label
3 - you don't set that, it what the 2nd dial was saved by vdj and it's what the dial will be set to next time you fresh use the fx
4 - this is the effect_string for the 2nd dial
5 - this is the effect_string for the 2nd dial label
6 - you don't set that, it what the 3rd dial was saved by vdj and it's what the dial will be set to next time you fresh use the fx
7 - this is the effect_string for the 3rd dial label
8 - this is the effect_string for the 3rd dial
9 - you don't set that, it what the 1st button was saved by vdj and it's what the button will be set to next time you fresh use the fx
10 - this is the effect string for the 1st button
11 - you don't set that, it what the 2nd button was saved by vdj and it's what the button will be set to next time you fresh use the fx
12 - this is the effect string for the 2nd button
13 - you don't set that, it what the 3rd button was saved by vdj and it's what the button will be set to next time you fresh use the fx
14 - this is the effect string for the 3rd button
16 - this is the effect_string called onStart
17 - this is the effect_string called onStop
18 - this is the effect_string called when the buffer wants to update
Why are we missing 15? That's the "clear" button, but unlike the other buttons which are latching switches, clear is a momentary button that has no savable state so isn't included in the .ini
the only detail about writing .ini files is keep each entry on one line, don't use "RETURN" key
Programming the virtualfx inside vdj, you send text to the effect_strings each one has a number and they're numbered like this
effect_string 1 - when dial 1 touched
effect_string 2 - dial 1 label
effect_string 3 - when dial 2 touched
effect_string 4 - dial 2 label
effect_string 5 - when dial 3 touched
effect_string 6 - dial 3 label
effect_string 7 - when button 1 touched
effect_string 8 - when button 2 touched
effect_string 9 - when button 3 touched
effect_string 10 - onstart
effect_string 11 - onstop
effect_string 12 - buffer
so example case, you made a copy of virtualfx and called it "basicThing" this is how you would "program" with a vdj skin custom_button the 1st fx button to work as play_pause
effect_string "basicThing" 7 "play_pause"
press that vdj skin button and our button is "programmed"
Thing of note I used " " around "basicThing", if your name does not contain spaces you do not need to wrap the fx name in " ", it is benificial to NEVER use spaces in names
Right we're getting to the juicy stuff now.
F.A.O theSoundInsurgent
I'll talk thru a real case that one person reading wants and give both a .ini example and how you would do it in vdj
Case: User wants the two dials on the cut effect swapped round
First make a copy of the .dll/.bundle and the .ini, we'll name these
virtualFXCut
we'll do the buttons first
our button 1 wants to control cut effect_button 1, string 7
effect_button cut 1
don't worry that they could be out of phase with each other now we'll fix that onstart
our button 2 wants to control cut effect_button 2, string 8
effect_button cut 2
next dials, remember how I said the script doesn't know anything about our dials other than it was touched recently, so our dial 1 we want to pass [cast] this value to cut dial 2, string 1
effect_slider virtualfxCut 1 & param_cast & effect_slider cut 2
same story with our dial 2 but controlling cut dial 1, string 3
effect_slider virtualfxCut 2 & param_cast & effect_slider cut 1
similar with our dial 3 controlling cut dial 3, string 5
effect_slider virtualfxCut 3 & param_cast & effect_slider cut 3
now the 3 labels, strings 2,4,& 6
get_effect_slider_text cut 2
get_effect_slider_text cut 1
get_effect_slider_text cut 3
onStart we want make sure the cut effect matches our virtual fx then turn the cut effect on
the dials are given an automatic poke as part of the c++ code so we don't worry about them but buttons need to be considered, string 10
( effect_button virtualfxCut 1 on ? effect_button cut 1 on : effect_button cut 1 off ) & ( effect_button virtualfxCut 2 on ? effect_button cut 2 on : effect_button cut 2 off ) & effect_active cut on
onStop we want to turn the cut effect_off, string 11
effect_active cut off
this is how the ini should look
[autoparams]
Slider DIAL A 0=465
String DIAL A 1=effect_slider virtualfxCut 1 & param_cast & effect_slider cut 2
String LABEL A 2=get_effect_slider_text cut 2
Slider DIAL B 3=4095
String DIAL B 4=effect_slider virtualfxCut 2 & param_cast & effect_slider cut 1
String LABEL B 5=get_effect_slider_text cut 1
Slider DIAL C 6=0
String DIAL C 8=effect_slider virtualfxCut 3 & param_cast & effect_slider cut 3
String LABEL C 7=get_effect_slider_text cut 3
Switch BUTTON 1 9=0
String BUTTON 1 10=effect_button cut 1
Switch BUTTON 2 11=0
String BUTTON 2 12=effect_button cut 2
Switch BUTTON 3 13=0
String BUTTON 3 14=
String OnStart 16=effect_active cut on & ( effect_button virtualfxCut 1 on ? effect_button cut 1 on : effect_button cut 1 off ) & ( effect_button virtualfxCut 2 on ? effect_button cut 2 on : effect_button cut 2 off )
String OnStop 17=effect_active cut off
String Buffer 18=
And if you wanted to "program" the fx from inside vdj with a custom_button the script to do this would look like below
effect_string virtualfxCut 1 "effect_slider virtualfxCut 1 & param_cast & effect_slider cut 2" & effect_string virtualfxCut 2 "get_effect_slider_text cut 2" & effect_string virtualfxCut 3 "effect_slider virtualfxCut 2 & param_cast & effect_slider cut 1" & effect_string virtualfxCut 4 "get_effect_slider_text cut 1" & effect_string virtualfxCut 5 "effect_slider virtualfxCut 3 & param_cast & effect_slider cut 3" & effect_string virtualfxCut 6 "get_effect_slider_text cut 3" & effect_string virtualfxCut 7 "effect_button cut 1" & effect_string virtualfxCut 8 "effect_button cut 2" & effect_string virtualfxCut 9 "" & effect_string virtualfxCut 10 "effect_active cut on & ( effect_button virtualfxCut 1 on ? effect_button cut 1 on : effect_button cut 1 off ) & ( effect_button virtualfxCut 2 on ? effect_button cut 2 on : effect_button cut 2 off )" & effect_string virtualfxCut 11 "effect_active cut off" & effect_string virtualfxCut 12 ""
So that's the first example done controlling another fx, now some stuff that you might find useful for your own creations
we'll name the dll/bundle & ini
boringFX
maybe you want a dial that picks 1,2,4,8,16,32,64 for beat lengths
String DIAL A 1=set boringFXLength `param_pow 'effect_slider boringFX 1 & param_multiply 6 & param_cast int_trunc' 2`
or if programming inside vdj with a custom_button
effect_string boringFX 1 "set boringFXLength `param_pow 'effect_slider boringFX 1 & param_multiply 6 & param_cast int_trunc' 2`"
what we're doing here is taking our dial value [which is 0.0 to 1.0] multiplying by 6, and then dropping the stuff after the decimal place, we're then doing 2 to the power of that value.
so we could have 2^0 =1 2^1=2... 2^6=64
and all that is part of how we make a variable called boringFXLength
ok we have that let's display it on the label but we'll also post fix it with ' bt'
String LABEL A 2=get_text "`get_var boringFXLength` bt"
or if programming inside vdj with a custom_button
effect_string boringFX 2 "get_text '`get_var boringFXLength` bt'"
give it a test
Lets do another dial but this one goes from 1/8th to 64, same idea but this time we multiply by 9, do the 2 to the power thing then divide the number by 8 [or *0.125]
String DIAL A 1=set boringFXLength `param_multiply 0.125 "param_pow 'effect_slider boringFX 1 & param_multiply 9 & param_cast int_trunc' 2"`
And the label, with a couple of checks if number is 0.125, actually show 1/8 bt
String LABEL A 2=var boringFXLength 0.125 ? get_text "1/8 bt" : boringFXLength 0.25 ? get_text "1/4 bt" : var boringFXLength 0.5 ? get_text "1/2 bt" : get_text "`get_var boringFXLength` bt"
lets do something with this boringFX, lets make it turn itself off after the number of beats you set
String OnStart 16=set boringFXstart `get_beatpos` & set boringFXend `get_var boringFXstart & param_add & get_var boringFXLength`
[inside vdj] effect_string boringfx 10 "set boringFXstart `get_beatpos` & set boringFXend `get_var boringFXstart & param_add & get_var boringFXLength`"
String Buffer 18=param_smaller `get_var boringFXend` `get_beatpos` ? : effect_active boringFX off
[inside vdj] effect_string boringfx 12 "`get_var boringFXend` `get_beatpos` ? : effect_active boringFX off"
we make a variable for the start point, we make another variable for our end by adding our dial variable to our start variable
then the buffer script ; if our current position is smaller than our end, do nothing, if not smaller turn our fx off
That's auto off, give it a try. Let's make it move the filter over the duration
String Buffer 18=set boringFXSweepCurrent `param_add 'get_var boringFXstart & param_multiply -1' 'get_beatpos'` & set boringFXSweepMultiplier `param_multiply 'get_var boringFXSweepCurrent' 'get_var boringFXLength & param_1_x'` & set boringFXSweepMultiplier `param_multiply 0.5 'get_var boringFXSweepMultiplier' & param_add 0.5` & get_var boringFXSweepMultiplier & param_cast & filter & param_bigger 1.0 'get_var boringFXSweepMultiplier' ? effect_active boringFX off
[inside vdj starts, I hope you're getting the difference between ini and in vdj by now] effect_string boringfx 12...
yeah, it gets involved, really all we're doing is converting our current position to a value between 0.0 and 1.0, in relation to our start and end points, we take that value and multiply by 0.5 and add 0.5, and pass the result to the filter, so our filter will move from 0.5 to 1.0 over our duration.
and because we don't want filter left on once our boringFX turns off
String OnStop 17=filter 0.5
[inside vdj is] effect_string boringfx 11...
I don't expect everybody to get all of this, just that it can be done, I'm around to answer questions
This is just an example, moving the slider in different directions, different scales, different curves, is just a matter of maths
The button scripts
like I said the script knows nothing about the state of the button, it just knows it was pressed
if you want different actions for button on against button off you need to program that
effect_string boringFX 7 "effect_button boringfx 1 on ? play : pause"
Using time;
Earlier examples I used position as the determining factor for auto off and to power the external slider movement.
Position might be what you want, even when in a loop (have the slider oscillate) , but it might not be. We can use beats worth of time instead.
We'll call this one
timeExample
make your copies, rename appropriately.
our dial 1 script, will do 1,2,4,8,16,32,64,96,128
take note how we got 96 & 128,
set teLength `param_pow 'effect_slider timeExample 1 & param_multiply 8 & param_cast int_trunc' 2` & var teLength 128 ? set teLength 96 : var telength 256 ? set teLength 128 :
for onStart, we're be using stopwatch [SW] for our timing, but different plugins you make might be using stopwatch at the same time so we just can't reset it.
But it's also useful if ours is the only one using stopwatch to reset it to zero on start.
The bit in ( ) deals with that, a common var for all plugins using SW, if this is the only one, great - reset SW, if something else is using SW save the value of SW now make it negative to subtract from further readings [named as teOffsetSW].
Next bit, work our our target SW time, how many ms/beat, how many beats.
Last bit just initialising some fx
effect string 11/onStart
( var $usingSW 0 ? & set $usingSW +1 & stopwatch_reset & set teOffsetSW 0 : set $usingSW +1 & set teOffsetSW `param_multiply stopwatch 1000 & param_cast int_trunc & param_invert` ) & set teTargetSW `get_bpm & param_1_x & param_multiply 60000 & param_multiply 'get_var teLength' & param_1_x` & effect_slider 'filter lp' 1 0.0 & effect_active 'filter lp' on & effect_slider distortion 2 0.0 & effect_active distortion on & effect_show_gui distortion on & effect_show_gui 'filter lp' on
onStop, we're just turning stuff off and subtracting 1 for our common SW variable to let it know we aren't using SW any more
effect sting 11 / OnStop
effect_slider 'filter lp' 1 0.0 & effect_active 'filter lp' off & effect_slider distortion 2 0.0 & effect_active distortion off & effect_show_gui distortion off & effect_show_gui 'filter lp' off & var $usingSW 0 ? : set $usingSW -1
Buffer, it gets mathy...
(current SW time - any offset ) * ( 1/ our target time )
that gives us some value between 0.0 and 1.0
param_pow is useful for different curve types, I'll show a pic in a minute
multiply by 0.8 as that's the value we want by the end of the fx
cast it to the filter lp dial
then we do a second dial, the same teSweep variable is still 0.0-1.0
a different param_pow value, a different multiplier, sent to distortion dial
last bit has our teSweep variable exceeded 1.0 ? yes, turn the fx off
effect sting 12 / Buffer
set teSweep `param_add 'stopwatch & param_multiply 1000 & param_cast int_trunc' 'get_var teOffsetSW' & param_multiply 'get_var teTargetSW'` & param_pow 0.333 'get_var teSweep' & param_multiply 0.8 & param_cast & effect_slider 'filter lp' 1 & param_pow 2 'get_var teSweep' & param_multiply 0.6 & param_cast & effect_slider distortion 2 & param_smaller 1 'get_var teSweep' ? : effect_active timeExample off
curiosities sake, param_pow 0.333 gives the blue curve, param_pow 2 gives the green curve.
More example sweeps
From 100% to 0% linearly
... & param_pow 1 'get_var teSweep' & param_multiply 1.0 & param_add 0.0 & param_invert & param_cast & effect_slider distortion 2 & ...
From 100% to 25% linearly
... & param_pow 1 'get_var teSweep' & param_multiply 0.75 & param_add 0.0 & param_invert & param_cast & effect_slider distortion 2 & ...
From 80% to 20% linearly
... & param_pow 1 'get_var teSweep' & param_multiply 0.6 & param_add 0.2 & param_invert & param_cast & effect_slider distortion 2 & ...
From 80% to 20% fast curve, run 4 times over teSweep
... & param_pow 0.333 'get_var teSweep & param_multiply 4 & param_cast frac' & param_multiply 0.6 & param_add 0.2 & param_invert & param_cast & effect_slider distortion 2 & ...
oscillations
the last curve example was a sawtooth like oscillation to get more sine like smooth up & down oscillations, it gets a bit more mathy.
As the curve functions get complex you have to use intermediate values
oscillate from 30% to 90% and back 4 times over the duration
... & set intVal0 `param_multiply 'get_var teSweep' 4` & set intVal1 `param_bigger 'get_var intVal0 & param_cast frac' 0.5 ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2 ` & param_pow 0.5 'get_var intval1' & param_multiply 0.6 & param_add 0.3 & param_cast & effect_slider distortion 2 & ...
oscillate from 25% to 75% and back over 4 beats
... & set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.25'` & set intVal1 `param_bigger 'get_var intVal0 & param_cast frac' 0.5 ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2 ` & param_pow 0.5 'get_var intval1' & param_multiply 0.5 & param_add 0.25 & param_cast & effect_slider distortion 2 & ...
This isn't easy, just know it's possible
A few more oscillations
linear up down
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.25'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & param_pow 1.0 'get_var intval1' & param_multiply 0.5 & param_add 0.3 & param_cast & effect_slider distortion 2 ) &...
◝ ◜ N-E, W-N [think north to east, dial does down slowly to start with]
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add 1 'get_var intVal1 & param_pow 2 & param_multiply -1'` & set intVal3 `param_pow 0.5 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
◜◝ W-N N-E
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add -1 'get_var intVal1' & param_pow 2 & param_multiply -1 & param_add 1` & set intVal3 `param_pow 0.5 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
◞ ◟ S-E W-S
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add 1 'get_var intVal1 & param_pow 2 & param_multiply -1' & param_pow 0.5 & param_multiply -1` & set intVal3 `param_add 1.0 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
◟◞ W-S S-E
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75'` & ( set intVal1 `param_smaller 0.5 'get_var intVal0 & param_cast frac' ? param_multiply 'get_var intVal0 & param_cast frac' 2 : param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2` & set intVal2 `param_add -1 'get_var intVal1' & param_pow 2 & param_multiply -1 & param_add 1 & param_pow 0.5 & param_multiply -1` & set intVal3 `param_add 1.0 'get_var intVal2'` & param_pow 1.0 'get_var intval3' & param_multiply 0.8 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
complicated curve, slow climb, fast climb, slow plateau , slow drop, fast drop slow drop
...& set intVal0 `param_multiply 'get_var teSweep' 'get_var teLength & param_multiply 0.75' & param_mod 3` & ( param_smaller 1 `get_var intVal0` ? param_pow 3 'get_var intval0' & param_multiply 0.3 & param_add 0.0 & param_cast & effect_slider distortion 2 : param_smaller 1.5 `get_var intVal0` ? set intVal1 `param_multiply 'get_var intVal0 & param_cast frac' 2` & param_pow 0.333 'get_var intval1' & param_multiply 0.5 & param_add 0.3 & param_cast & effect_slider distortion 2 : param_smaller 2.0 `get_var intVal0` ? set intVal1 `param_multiply 'get_var intVal0 & param_cast frac & param_invert' 2 ` & param_pow 0.333 'get_var intval1' & param_multiply 0.5 & param_add 0.3 & param_cast & effect_slider distortion 2 : set intVal1 `param_multiply 'get_var intVal0 & param_cast frac & param_invert' 1 ` & param_pow 3 'get_var intval1' & param_multiply 0.3 & param_add 0.0 & param_cast & effect_slider distortion 2 ) &...
Why do I say "programming" from inside vdj is harder?
Well it comes down to the fact that to set an effect_string, you need to wrap the actual string in " " or ' ' , experienced scripters know how precious a set of " " or ' ' can be.
I've had to write all my examples to work for the effect_string methods, so I lost the use of a set of " " in writing the scripts. It just means I had to use more intermediate values
really in the weeds here but, two programmed buttons that look similar but give different results, here's the custom_button script to program them, we also set the level slider on deck to prove something
[still using boringFX]
first double click "clear" to blank the fx
custom button script
level 0.5 & effect_string boringFX 7 "param_smaller `level` 0.5 ? play_pause : nothing" & get_text "param_smaller `level` 0.5 ? play_pause : nothing" & param_cast text & effect_string boringFX 8
look at the effect_strings in the fx gui, button 1 is exactly what we typed, button 2 seems to have changed `level` into the value of level when the effect_string was wrote.
This is something to be aware of and in some cases it can be used as an advantage [pretty weird cases but still cases]
Really weird, can these effect_strings program other effect_strings ?
Yes they can, but we're reaching "script inception" here, [an effect_string programmed by an effect_string, programmed by a custom button script] weird cases but still cases.
I could go on and on with examples, I've used this for all kinds of stuff, like auto mic ducking, faster shader changing, sWingIt plugin was a virtualfx for about a year before I made it a full plugin
**** End of lecture ****
geposted Tue 17 Mar 20 @ 11:45 am
So I was wanting to make a bandpass filter, but the maths for the c++ is pretty involved so I made this instead.
I called it "filterBP", it uses the lp & hp filters, I might add in a quick sweep for on and off but this is nice enough.
Dial 1 is sort of frequency, dial 2 is sort of Q value, and dial 3 is resonance. Interesting to play with dials 1 & 2 at the same time.
I called it "filterBP", it uses the lp & hp filters, I might add in a quick sweep for on and off but this is nice enough.
Dial 1 is sort of frequency, dial 2 is sort of Q value, and dial 3 is resonance. Interesting to play with dials 1 & 2 at the same time.
get_text "effect_slider 'filterBP' 1 & param_cast 'float' & set 'VALUE1' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply 0.5 & param_cast 'float' & set 'VALUE2' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply -0.5 & param_cast 'float' & set 'VALUE3' & param_add 'get_var VALUE1 & param_invert' 'get_var VALUE2' & param_cast 'float' & effect_slider 'filter lp' 1 & param_add 'get_var VALUE1' 'get_var VALUE3' & param_cast 'float' & effect_slider 'filter hp' 1" & param_cast 'text' & effect_string 'filterBP' 1 & get_text "effect_slider 'filterBP' 1 & param_cast 'float' & set 'VALUE1' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply 0.5 & param_cast 'float' & set 'VALUE2' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply -0.5 & param_cast 'float' & set 'VALUE3' & param_add 'get_var VALUE1 & param_invert' 'get_var VALUE2' & param_cast 'float' & effect_slider 'filter lp' 1 & param_add 'get_var VALUE1' 'get_var VALUE3' & param_cast 'float' & effect_slider 'filter hp' 1" & param_cast 'text' & effect_string 'filterBP' 3 & get_text "effect_slider 'filterBP' 3 & param_cast & effect_slider 'filter hp' 2 & param_multiply 0 & nothing & effect_slider 'filterBP' 3 & param_cast & effect_slider 'filter lp' 2" & param_cast 'text' & effect_string 'filterbp' 5 & get_text "effect_slider 'filterbp' 1 +0 & effect_active 'filter hp' on & effect_active 'filter lp' on" & param_cast 'text' & effect_string 'filterbp' 10 & & get_text "effect_active 'filter hp' off & effect_active 'filter lp' off" & param_cast 'text' & effect_string 'filterbp' 11
geposted Thu 19 Mar 20 @ 5:11 pm
This one is a little different, change the name of virtualfx.dll to VTT.dll, also change virtualfx.ini to VTT.ini
and this down here is the stuff you want to copy into the .ini file
the fx toggles the negative video fx on & off in a timed way, how long inbetween is decided by dial 1
1.5.1
and this down here is the stuff you want to copy into the .ini file
the fx toggles the negative video fx on & off in a timed way, how long inbetween is decided by dial 1
[autoparams]
Slider DIAL A 0=2513
String DIAL A 1=param_bigger 'effect_slider VTT 1' 0.16 ? set 'VTTvar1' 1 : param_bigger 'effect_slider VTT 1' 0.32 ? set 'VTTvar1' 2 : param_bigger 'effect_slider VTT 1' 0.48 ? set 'VTTvar1' 4 : param_bigger 'effect_slider VTT 1' 0.64 ? set 'VTTvar1' 8 : param_bigger 'effect_slider VTT 1' 0.80 ? set 'VTTvar1' 16 : set 'VTTvar1' 32
String LABEL A 2=param_multiply 'get_var VTTvar1' 0.125 & param_cast '0.000'
Slider DIAL B 3=2048
String DIAL B 4=
String LABEL B 5=
Slider DIAL C 6=2048
String DIAL C 8=
String LABEL C 7=
Switch BUTTON 1 9=1
String BUTTON 1 10=
Switch BUTTON 2 11=1
String BUTTON 2 12=set VTTvar3 `get_bpm & param_1_x & param_multiply 7500`
Switch BUTTON 3 13=0
String BUTTON 3 14=
String OnStart 16=effect_button 'VTT' 2 & effect_slider 'VTT' 1 +0.0 & get_text "repeat_start_instant 'VTTrsi' `get_var VTTvar3`ms -1 & var VTTvar2 0 ? set VTTvar2 +1 & effect_active negative on : cycle VTTvar2 256 & param_mod 'get_var VTTvar1' 'get_var VTTvar2' & param_cast & param_equal 0 ? effect_active negative toggle : nothing" & param_cast 'text' & effect_string 'VTT' 7 & effect_button 'VTT' 1 toggle & set VTTvar2 0
String OnStop 17=repeat_stop 'VTTrsi' & effect_active negative off
1.5.1
geposted Thu 23 Apr 20 @ 10:45 am
This one is to change AOV shaders at a different rate than the preset 32
dial 1 picks 1,2,4,8,16,32,64
grab a copy of virtualfx, rename the dll & ini to AOVss
fill the ini file with this code
1.5.1
dial 1 picks 1,2,4,8,16,32,64
grab a copy of virtualfx, rename the dll & ini to AOVss
fill the ini file with this code
[autoparams]
Slider DIAL A 0=0
String DIAL A 1=set 'AOVvar1' `effect_slider 'aovss' 1 & param_multiply 6 & param_cast 'int_trunc'1`
String LABEL A 2=param_pow 'get_var AOVvar1' 2
String OnStart 16= set 'AOVdoOnce' 0 & effect_slider 'AOVss' 1 +0.0 & repeat_start_instant 'AOVrsi' 25ms -1 & var 'AOVvar1' 0 ? deck master get_beat_bar 1 & param_smaller 0.125 ? var AOVdoOnce 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 : var 'AOVvar1' 1 ? deck master get_beat_bar 2 & param_smaller 0.125 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 : var 'AOVvar1' 2 ? deck master get_beat_bar 4 & param_smaller 0.5 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 : var 'AOVvar1' 3 ? deck master get_beat_bar 8 & param_smaller 0.5 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 : var 'AOVvar1' 4 ? deck master get_beat_bar 16 & param_smaller 0.5 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 : var 'AOVvar1' 5 ? deck master get_beat_bar 32 & param_smaller 0.5 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 : var 'AOVvar1' 6 ? deck master get_beat_bar 64 & param_smaller 0.5 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0 :
String OnStop 17=repeat_stop 'AOVrsi'
1.5.1
geposted Fri 24 Apr 20 @ 1:15 pm
bit of a rework for filterBP
name both the .dll & .ini to
filterBP
This has a 8 beat sweep when you switch the fx on
here's the code for the .ini
1.5.1
name both the .dll & .ini to
filterBP
This has a 8 beat sweep when you switch the fx on
here's the code for the .ini
[autoparams]
Slider DIAL A 0=1931
String DIAL A 1=effect_slider 'filterBP' 1 & param_cast 'float' & set 'VALUE1' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply 0.5 & param_cast 'float' & set 'VALUE2' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply -0.5 & param_cast 'float' & set 'VALUE3' & param_add 'get_var VALUE1 & param_invert' 'get_var VALUE2' & param_cast 'float' & effect_slider 'filter lp' 1 & param_add 'get_var VALUE1' 'get_var VALUE3' & param_cast 'float' & effect_slider 'filter hp' 1
String LABEL A 2=
Slider DIAL B 3=1536
String DIAL B 4=effect_slider 'filterBP' 1 & param_cast 'float' & set 'VALUE1' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply 0.5 & param_cast 'float' & set 'VALUE2' & param_multiply 0 & nothing & effect_slider 'filterBP' 2 & param_multiply -0.5 & param_cast 'float' & set 'VALUE3' & param_add 'get_var VALUE1 & param_invert' 'get_var VALUE2' & param_cast 'float' & effect_slider 'filter lp' 1 & param_add 'get_var VALUE1' 'get_var VALUE3' & param_cast 'float' & effect_slider 'filter hp' 1
String LABEL B 5=
Slider DIAL C 6=3118
String DIAL C 8=effect_slider 'filterBP' 3 & param_cast & effect_slider 'filter hp' 2 & param_multiply 0 & nothing & effect_slider 'filterBP' 3 & param_cast & effect_slider 'filter lp' 2
String LABEL C 7=
Switch BUTTON 1 9=1
String BUTTON 1 10=
Switch BUTTON 2 11=0
String BUTTON 2 12=
Switch BUTTON 3 13=0
String BUTTON 3 14=
String OnStart 16=effect_slider 'filterBP' 1 +0.0% & effect_slider 'filterBP' 2 +0.0% & set 'HPval' `effect_slider 'filter hp' 1` & set 'LPval' `effect_slider 'filter lp' 1` & effect_slider 'filter hp' 1 0 & effect_slider 'filter lp' 1 0 & effect_active 'filter hp' 1 & effect_active 'filter lp' 1 & get_text "repeat_start_instant 'rsiAutoSlide' 32ms -1 & effect_slider 'filter hp' 1 +`get_bpm & param_1_x & param_multiply 15000 & param_1_x & param_multiply 'get_var HPval' & param_cast '0.000000'` & effect_slider 'filter lp' 1 +`get_bpm & param_1_x & param_multiply 15000 & param_1_x & param_multiply 'get_var LPval' & param_cast '0.000000'` & nothing & effect_slider 'filter hp' 1 & param_cast & set HPliveVal & param_bigger 'get_var HPval' 'get_var HPliveVal' ? repeat_stop 'rsiAutoSlide'" & param_cast 'text' & effect_string 'filterBP' 7 & effect_button 'filterBP' 1 on
String OnStop 17=effect_active 'filter hp' off & effect_active 'filter lp' off
1.5.1
geposted Mon 27 Apr 20 @ 12:34 am
this one is a beat duration timed [dial1] fx on/fx off, gradual sweep of the noise fx from a dial position [dial2] to a dial position [dial3] while it's doing the slider thing you could be scratching or doing another fx
I call it sweepNoise, [so should you, if you want it to work]
here's the .ini to make it do stuff
1.5.1
I call it sweepNoise, [so should you, if you want it to work]
here's the .ini to make it do stuff
[autoparams]
Slider DIAL A 0=3600
String DIAL A 1=set 'SweepNoisevar1' `effect_slider 'sweepNoise' 1 & param_multiply 5 & param_cast 'int_trunc'` & set 'SweepNoisevar1' `param_pow 'get_var SweepNoisevar1' 2`
String LABEL A 2=get_var SweepNoisevar1
Slider DIAL B 3=200
String DIAL B 4=effect_slider 'sweepNoise' 2 & param_cast & effect_slider 'noise' 1 & set sweepNoiseStart `param_multiply 'effect_slider noise 1' -1`
String LABEL B 5=get effect_slider_text 'noise' 1
Slider DIAL C 6=2048
String DIAL C 8=effect_slider 'sweepNoise' 3 & param_cast & effect_slider 'noise' 1 & set sweepNoiseEnd `effect_slider noise 1`
String LABEL C 7=get effect_slider_text 'noise' 1
Switch BUTTON 1 9=1
String BUTTON 1 10=
Switch BUTTON 2 11=0
String BUTTON 2 12=
Switch BUTTON 3 13=0
String BUTTON 3 14=
String OnStart 16=effect_slider 'sweepNoise' 1 +0.0% & effect_slider 'sweepNoise' 3 +0.0% & effect_slider 'sweepNoise' 2 +0.0% & set sweepNoiseDiff `param_add 'get_var sweepNoiseEnd' 'get_var sweepNoiseStart'` & var_smaller sweepNoiseDiff 0 ? get_text "repeat_start_instant 'rsiSweepNoise' 32ms -1 & effect_slider 'noise' 1 `get_bpm & param_1_x & param_multiply 1875 & param_multiply 'get_var SweepNoisevar1' & param_1_x & param_multiply 'get_var sweepNoiseDiff' & param_cast '0.000000' & param_cast 'relative'` & nothing & effect_slider 'noise' 1 & param_cast & set NoiseliveVal & param_bigger 'get_var NoiseliveVal' 'get_var sweepNoiseEnd' ? effect_active 'sweepNoise' off & repeat_stop 'rsiSweepNoise' : var_equal 'NoiseliveVal' 'sweepNoiseEnd' ? effect_active 'sweepNoise' off & repeat_stop 'rsiSweepNoise'" & param_cast 'text' & effect_string 'sweepNoise' 7 & effect_button 'sweepNoise' 1 on & effect_active 'noise' on : get_text "repeat_start_instant 'rsiSweepNoise' 32ms -1 & effect_slider 'noise' 1 +`get_bpm & param_1_x & param_multiply 1875 & param_multiply 'get_var SweepNoisevar1' & param_1_x & param_multiply 'get_var sweepNoiseDiff' & param_cast '0.000000' & param_cast 'relative'` & nothing & effect_slider 'noise' 1 & param_cast & set NoiseliveVal & param_smaller 'get_var NoiseliveVal' 'get_var sweepNoiseEnd' ? effect_active 'sweepNoise' off & repeat_stop 'rsiSweepNoise' : var_equal 'NoiseliveVal' 'sweepNoiseEnd' ? effect_active 'sweepNoise' off & repeat_stop 'rsiSweepNoise'" & param_cast 'text' & effect_string 'sweepNoise' 7 & effect_button 'sweepNoise' 1 on & effect_active 'noise' on
String OnStop 17=effect_active 'noise' off
1.5.1
geposted Tue 28 Apr 20 @ 5:58 pm
VERY COOL! Nice work. I'm trying to play around but as I'm screwing with some the settings / dials I have a difficult time getting it back to your defaults w/o copying the params over again. I only have 2 dials on my skin and it's a bit over my head with the FX flyout panel. Is there a reset to get back to your default? Also what's going on with the flyout and all of the buttons. This effect seems to work on the track I'm fading INTO - what's your take? I'm just cracking the surface but love the idea of what the capabilities are!
geposted Thu 30 Apr 20 @ 9:25 pm
To clear all the effect_strings needs a very quick double tap on the clear button.
I kind of agree the single fx skin display could be better, but I try to make dial 3 something you might only adjust rarely.
The default settings are all dials at 12, but that's just virtualfx and not related to the "new.ini" variations, I suppose if you wanted to to could have a reset to default button on the fx, if you had a button spare.
Buttons on the fx gui for SweepNoise and some others are there to take advantage of the "get_text" action in vdj script,
anything script inside ` ` in a get_text action is converted to a number, so it means you can use variables in ways that normal scripting wouldn't allow.
But once you have built a script with get_text, you have to send that script somewhere to be called, [unfortunately there is no action like this that could call it, param_cast 'script_string'] so the string is built by the onStart and sent to a button, onStart also presses the button to call the script.
The whole thing is very open ended, so some uses I have don't use sliders or buttons at all, the fx just holds a script without using a custom button/pad/controller key. Others when called will unload themselves and call in other fx with certain presets in its place.
There's probably loads of uses I haven't even thought of yet
the one thing I'm going to update is slider update on load, just a little thing that annoys me.
thanks for the feedback.
I kind of agree the single fx skin display could be better, but I try to make dial 3 something you might only adjust rarely.
The default settings are all dials at 12, but that's just virtualfx and not related to the "new.ini" variations, I suppose if you wanted to to could have a reset to default button on the fx, if you had a button spare.
Buttons on the fx gui for SweepNoise and some others are there to take advantage of the "get_text" action in vdj script,
anything script inside ` ` in a get_text action is converted to a number, so it means you can use variables in ways that normal scripting wouldn't allow.
But once you have built a script with get_text, you have to send that script somewhere to be called, [unfortunately there is no action like this that could call it, param_cast 'script_string'] so the string is built by the onStart and sent to a button, onStart also presses the button to call the script.
The whole thing is very open ended, so some uses I have don't use sliders or buttons at all, the fx just holds a script without using a custom button/pad/controller key. Others when called will unload themselves and call in other fx with certain presets in its place.
There's probably loads of uses I haven't even thought of yet
the one thing I'm going to update is slider update on load, just a little thing that annoys me.
thanks for the feedback.
geposted Fri 01 May 20 @ 10:34 am
the initial efd.ini
1.5.1
[autoparams]
Slider DIAL A 0=0
String DIAL A 1=effect_slider 'efd' 1 & param_cast & effect_slider 'echo' 1
Slider DIAL B 3=2420
String LABEL A 2=get_effect_slider_text 'echo' 1
String DIAL B 4=effect_slider 'efd' 2 & param_cast & effect_slider 'flanger' 1
String LABEL B 5=get_effect_slider_text 'flanger' 1
String DIAL C 8=effect_slider 'efd' 3 & param_cast & effect_slider 'distortion' 2
String LABEL C 7=get_effect_slider_text 'distortion' 2
String BUTTON 1 9=effect_button 'efd' 1 off ? effect_active 'echo' off & effect_button 'efd' 1 off ? effect_button 'efd' 2 off ? effect_button 'efd' 3 off ? effect_active 'efd' off : : : : effect_active 'echo' on
String BUTTON 2 10=effect_button 'efd' 2 off ? effect_active 'flanger' off & effect_button 'efd' 1 off ? effect_button 'efd' 2 off ? effect_button 'efd' 3 off ? effect_active 'efd' off : : : : effect_active 'flanger' on
String BUTTON 3 11=effect_button 'efd' 3 off ? effect_active 'distortion' off & effect_button 'efd' 1 off ? effect_button 'efd' 2 off ? effect_button 'efd' 3 off ? effect_active 'efd' off : : : : effect_active 'distortion' on
String OnStart 16=effect_button 'efd' 1 1 & effect_button 'efd' 2 1 & effect_button 'efd' 3 1
String OnStop 17=effect_button 'efd' 1 0 & effect_button 'efd' 2 0 & effect_button 'efd' 3 0
1.5.1
geposted Fri 01 May 20 @ 2:50 pm
I've seen the request for echo manual backspin twice in the past week and it's something I worked out for a Greek fella about 4 months back. [actually enjoyed figuring this one out]
What it does is monitor the jog and when a manual backspin is detected it drops the gain a little, it also turns on the echo effect for 1 beat time duration, and then restores the gain.
Very Reggae & dancehall, but any set can get away with one backspin.
I call this one catchSpin, here's the .ini
1.5.1
What it does is monitor the jog and when a manual backspin is detected it drops the gain a little, it also turns on the echo effect for 1 beat time duration, and then restores the gain.
Very Reggae & dancehall, but any set can get away with one backspin.
I call this one catchSpin, here's the .ini
[autoparams]
String OnStart 16=set 'howMany' 0 & set 'trackT' `get_time 'elapsed' 44100` & repeat_start 'CatchSpin' 30ms & param_bigger "get_time 'elapsed' 44100" "get_var 'trackT'" ? set 'trackT' `get_time 'elapsed' 44100` & var 'howMany' 2 ? gain -22% & cycle 'howMany' 1000 & effect_button 'echo' 2 1 & effect_active "echo" & set 'beatvar' `get_bpm & param_1_x & param_multiply 60000 & get_var 'beatvar'` & param_cast "ms" & repeat_start 'rsiOnebeat' & effect_active 'echo' off & repeat_stop 'rsiOnebeat' : cycle 'howMany' 1000 : set 'trackT' `get_time 'elapsed' 44100` & var_smaller 'howMany' 3 ? set 'howMany' 0 : gain +22% & set 'howMany' 0
String OnStop 17=repeat_stop 'CatchSpin'
1.5.1
geposted Fri 15 May 20 @ 5:23 am