Page 1 of 1

Using accelerometer to control a fader...

Posted: 05 Sep 2016 13:06
by davidestevens
This is probably pretty simple, but I'm new to this aspect of Lemur, and after spending most of the morning trying to figure this out, it's time to ask for some help.

I need to make a simple 8 pad patch for iPhone, where there is some control over the velocity sent when I play a pad. As far as I can see, the only way to do this is to assign a fader to the velocity value of the pads (that bit's working) and then control the fader value with the accelerometer (that's where I'm stuck). (I want to use the accelerometer so that I have both hands free for the pads)

I've tried attaching a script to the fader, declaring a variable e.g. decl LR = accelerometer[0];
then setattribute(Fader,x,LR);
and a few other things too, but I think I'm missing something basic here in how this works. I'm also unclear on how, even if I get the accelerometer value that I'm after, I then apply it to the fader.
I've tried going through the manual, but it's not helping, so...
help!

thanks

David

Re: Using accelerometer to control a fader...

Posted: 25 Sep 2016 16:43
by Softcore
First of all, x is an "expression" not an attribute...so you should really use

Code: Select all

setexpression(Fader,'x',LR);
or simply

Code: Select all

Fader.x = LR;
Here are some working ideas that you can copy stuff from
https://forum.liine.net/viewtopic.php?f ... 13&p=10788