Connexion rapide:  

Forum: Old versions

Sujet Scripting a effect LFO

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

locoDogPRO InfinityModeratorMember since 2013
I had an idea that first I thought would need to be a plugin but now I think it could be done with a skin modification and a script, but I don't really understand the blink function.

To start with you have a slider that goes from 0 - 4096 (arbitrary number) then you have a button that 'while_pressed' takes the value of the slider and blinks another effect (lets say the effect in the default slot) on and off at the rate set by the slider (in ms)

This is the general idea, it will take more refinement to get behave as intended (i.e. the effect is off when the button is unpressed) and it will take much more work to get it to sync to 64ths/beats.

Is this logically sound or am I overestimating what blink can do?

*edit I've just found that blink won't interact with effects on a keyboard press script, but what if I have a skin element so that it blinks constantly at the given rate and and then the button press (to put the LFO into effect) queries the state of said element while pressed?

* Further edit I've had a partial success with querying the play buttons blink state, pressing and holding the keyboard button, when the blink is off nothing happens but when it is on, it flickers (like holding any keyboard button)
 

Posté Mon 19 May 14 @ 9:09 am
It sounds out of the scope of using VDJscript as you would need to use math algorithm's to produce a sine wave for an LFO to follow. your best bet would be to use one of the existing plugins or a vst, or create a c++ plugin as you will have all the power of your computer behind you that you can use in VDJ.

If you want a triangle wave you could maybe try using a couple of variables, but it would only be triangle and probably won't work anyway

1 | var 'init' ? 
2 | --->var 'up' ?
3 | --->--->volume +1% &
4 | --->--->volume 100% ?
5 | --->--->--->set 'up' false :
6 | --->--->set 'up' true :
7 | --->volume -1% &
8 | --->volume 0% ?
9 | --->--->set 'up' true :
10| --->set 'up' false :
11| set 'init' true &
12| set 'up' true

use this in your mapping
[size=11]var 'init' ? var 'up' ? volume +1% & volume 100% ? set 'up' false : set 'up' true : volume -1% & volume 0% ? set 'up' true : set 'up' false : set 'init' true & set 'up' true
created by synthet1c
[/size]
 

Posté Tue 20 May 14 @ 12:56 am
locoDogPRO InfinityModeratorMember since 2013
Maybe I used the wrong term, Low frequency pulse would be a more accurate description (effect on : effect off), It's one of those things that is easy to build and program into my controller (1 dial + a scrap of code) This may just be a promising looking dead end software side, if vdj script had a 'delay' command or if variables could be could be commands, that would call on themselves, things would be different.

Although within the skin there are items that persistent scripts like the cue button... *goes wandering down the rabbit hole, gets caught in a bear trap.
 

Posté Tue 20 May 14 @ 6:07 am
[size=14]1 | repeat 100ms & effect 'effectName' active

but you wouldn't use that with a keyboard, only a midi button
 

Posté Tue 20 May 14 @ 6:54 am
locoDogPRO InfinityModeratorMember since 2013
midi/hid only because a keyboard (for want of a better word) stutters?

*Wanders off, comes back triumphant!,
Not so true windows 7 has filter keys so it completely ignores the key repeat,

I had an effect pulsing on and off twice a second, 'repeat 250ms' right then I'm off to work and shall mess with this later, but I'm really starting to think I can have this working with the skin and a single click/single button press,

How would I get a variable time from a slider's position, and then how do I write that into the repeat script you've written?
 

Posté Tue 20 May 14 @ 9:23 am
you can't do it. logically you would use the following to make a slider time convert to one second and store it in a variable
[size=14]param_cast 'float' & param_multiply 100 & param_cast 'integer' & set 'myVar' value.

Then use that variable on your button..
[size=14]repeat ([color=#ea009c]var 'myVar' . 'ms')[/color] & etc...

But you cant do things like that in vdjScript
 

Posté Tue 20 May 14 @ 11:15 am


(Les anciens sujets et forums sont automatiquement fermés)