Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

trigger events from a knob

For general discussion related FlowStone

trigger events from a knob

Postby gvalletto » Wed Mar 08, 2017 2:42 pm

Hi all,
When I want to know how many trigger events a knob generates, I only connect a trigger counter to the float output of the knob. Obviously, the number of counts depends on how fast (or slow) I move the knob.
Now I want to know if the number of trigger events would be the same on different computers when they come from similar events.
How that trigger events are generated in cases like this, that is, from a continue variable like a float knob output?
Depend them on the sampling rate or something else?

Thanks in advance,
Gustavo
User avatar
gvalletto
 
Posts: 115
Joined: Fri Jul 09, 2010 10:15 pm
Location: Argentina

Re: trigger events from a knob

Postby Nubeat7 » Wed Mar 08, 2017 5:00 pm

afaik it depends on the mouse update rate..??

so it will not be the same on every computer, anyways you should use a trigger limiter, then it should be about the same on different machines..
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: trigger events from a knob

Postby Wassaka » Wed Mar 08, 2017 9:10 pm

I think the number of triggers per second varies depending on the CPU state in your plugin. For example, if you have occupied 1% of the CPU in the plugin, obviously the tickrate will be higher than if you have the CPU occupied by 50% ... Anyway the information limit per second of a float is 100 Ticks.
As well said Nubeat7, put a trigger limiter to make sure that all computers will have at least that tickrate, eg: 20 ticks.
Hope it Helps!!
Wassaka
 
Posts: 85
Joined: Wed Dec 30, 2015 3:41 am

Re: trigger events from a knob

Postby martinvicanek » Wed Mar 08, 2017 9:30 pm

Hm, I think if you don't move fast you get a trigger each time you advance by a pixel. For fast movement there may be some computer dependent limitation as stated above.
User avatar
martinvicanek
 
Posts: 1315
Joined: Sat Jun 22, 2013 8:28 pm

Re: trigger events from a knob

Postby nix » Wed Mar 08, 2017 11:14 pm

I think it could be jigged to produce pretty consistent(at least) triggers if you need it.
Ruby would help.
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: trigger events from a knob

Postby tulamide » Thu Mar 09, 2017 5:29 am

Martin pretty much nails it. There's a low end of 1 trigger per pixel movement of the mouse, but there's no fixed maximum. It depends on so many factors, like mouse tracking speed, system mouse event speed, or if you currently execute a mouse event in which case you lose the newly incoming one, etc.

Never depend on a certain amount of triggers.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: trigger events from a knob

Postby Spogg » Thu Mar 09, 2017 10:04 am

I've also noticed that the mouse response can be different in the exported VST to the FS edit environment. So I would always test in an export (Green stuff generally seems faster in a VST than in the editor).

Cheers

Spogg
User avatar
Spogg
 
Posts: 3318
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: trigger events from a knob

Postby nix » Thu Mar 09, 2017 10:47 am

Sure, it doesn't necessarily depend on the mouse's speed.
What about turning a timer on on on mouse down, and turning it off on mouse up,
plus mouse up trigger to set final position, with the trigger blocked from the mouse position?
Does that make sense?
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: trigger events from a knob

Postby tulamide » Thu Mar 09, 2017 11:49 am

nix wrote:Sure, it doesn't necessarily depend on the mouse's speed.
What about turning a timer on on on mouse down, and turning it off on mouse up,
plus mouse up trigger to set final position, with the trigger blocked from the mouse position?
Does that make sense?


That's again trying to be dependend on triggers.
tulamide wrote:Never depend on a certain amount of triggers.


Consistency in computing is reached only with interpolation. In case of green/Ruby that means using deltatime. dt is the time passed between the next-to-last and last trigger and used to get a constant over time action.

x * dt means "x times per second", when dt is recalculated on every new trigger. Say you want to move a slider smoothly by 100 pixels over a period of 1 second. You don't know how many triggers will occur, and you don't need to. With dt it will be 100 pixels per second, no matter the amount of triggers.

Say, triggers come in at 0.05, 0.1, 0.25, 0.3, 0.5, 0.55, 0.6, 0.65, 0.7, 0.85, 0.95, 1 (display in seconds)

Your calculation (see above) would be 100 * dt as the portion of movement for a trigger. You just need dt.

trigger 1
dt = 0.05 - 0.0 = 0.05; 100 * 0.05 = 5 pixel translation at this trigger

trigger 2
dt = 0.1 - 0.05 = 0.05; 100 * 0.05 = 5 pixel translation at this trigger

trigger 3
dt = 0.25 - 0.1 = 0.15; 100 * 0.15 = 15 pixel translation at this trigger

trigger 4
dt = 0.3 - 0.0 = 0.25; 100 * 0.05 = 5 pixel translation at this trigger

trigger 5
dt = 0.5 - 0.3 = 0.2; 100 * 0.2 = 20 pixel translation at this trigger

trigger 6 to 9
100 * 0.05 = 5 pixel translation at each trigger

trigger 10
dt = 0.85 - 0.7 = 0.15; 100 * 0.15 = 15 pixel translation at this trigger

trigger 11
dt = 0.95 - 0.85 = 0.1; 100 * 0.1 = 10 pixel translation at this trigger

trigger 12
dt = 1.0 - 0.95 = 0.05; 100 * 0.05 = 5 pixel translation at this trigger

This covers one second. Let's add the translations:
5 + 5 + 15 + 5 + 20 + 5 + 5 + 5 + 5 + 15 + 10 + 5 = 100 pixel total

This works wherever you need a stable progress over time.

You don't need it in blue or white, since there everything is already based on a stable progress - the samplerate.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: trigger events from a knob

Postby nix » Thu Mar 09, 2017 12:53 pm

Interesting about the delta time theory.
How is that implemented?

All the same , Ruby time is pretty good,
more than the quasi-random output of the mouse movements.
This would provide a degree of similarity across different user's systems-
if that's needed
I think it's a hold that would be triggered?
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Next

Return to General

Who is online

Users browsing this forum: No registered users and 27 guests