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

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

measuring speed of a fader?

For general discussion related FlowStone

measuring speed of a fader?

Postby mccy » Wed Oct 28, 2015 9:52 am

Measuring the speed of a fader, how would you do that?
I'd like to have an output in numbers how fast I move a Fader for scratching, so sometimes it goes up and down very fast. I would need an algorithm which measures how much 'way' the fader goes, how fast it moves...

Any Ideas?

Martin
mccy
 
Posts: 69
Joined: Sun Feb 27, 2011 3:20 pm

Re: measuring speed of a fader?

Postby KG_is_back » Wed Oct 28, 2015 11:50 am

Following ruby code should do it:

Code: Select all
def event(i,v,t)
if @pt #pt = previous time
dt=t-@pt #change in time
else
dt=1000.0 #if previous time doesn't exist make dt big
end
@pi=t
if @pv
output 0, (v-@pv)/dt #if previous value exists output speed = dv/dt
@pv=v
else
@pv=v
output 0,0.0 #if previous value doesn't exist, output zero.
end
end
Last edited by KG_is_back on Wed Oct 28, 2015 3:07 pm, edited 2 times in total.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: measuring speed of a fader?

Postby adamszabo » Wed Oct 28, 2015 2:20 pm

I wanted to try it but I get a syntax error saying unexpected $end or something
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: measuring speed of a fader?

Postby KG_is_back » Wed Oct 28, 2015 3:08 pm

oops sorry... bad copy-paste... there should be one more "end" in the end. Fixed in the original post.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: measuring speed of a fader?

Postby mccy » Wed Oct 28, 2015 11:29 pm

Wow, thank you!!! I will try it in the next days & show you the result. I want to control a filter cutoff with it to avoid artefacts when moving the fader slowly.
mccy
 
Posts: 69
Joined: Sun Feb 27, 2011 3:20 pm

Re: measuring speed of a fader?

Postby mccy » Sun Nov 01, 2015 7:34 pm

mccy
 
Posts: 69
Joined: Sun Feb 27, 2011 3:20 pm

Re: measuring speed of a fader?

Postby adamszabo » Sun Nov 01, 2015 8:16 pm

mccy wrote:I want to control a filter cutoff with it to avoid artefacts when moving the fader slowly.


Thats exactly what I was planning to do as well! Would you mind posting a project with that part?
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: measuring speed of a fader?

Postby mccy » Mon Nov 02, 2015 8:46 am

Had strange problems, when using midi or automation. Dropped the ruby thing.
All you need is a delay, substraction and some envelope following. It's so easy and I needed hours to get it:

- Calculate Signalchanges so that your values are 0-1 (ActualFaderposition) / (MaxFader-MinFader)
- use a sample delay with something above 100 samples (cant look right now)
- substract delayed signal from signal in time
- use some smoothing like envelope follower
=> you have the speed of the fader (between 0 &1)
- nothing simpler, to modulate a Filter with it!

Now it works with midi & automation & I love it!
mccy
 
Posts: 69
Joined: Sun Feb 27, 2011 3:20 pm


Return to General

Who is online

Users browsing this forum: No registered users and 48 guests