General

My first post-project.

Started by dj_eddie_gr on .

Sign in or create an account to join the conversation.

61 posts

Topic starter
Hi all. I'm from Greece. I've run into lemur about 2 weeks ago while I was looking something to help me get the most out of traktor. Since then I've downloaded the editor and inspired from Pjean and Traktor 26 template. I know nothing about scripts and programming generally ,but I can figure out some thing by myself. I began my personal project wich I'm gonna need some help to make it work. I don't even own an ipad yet (that's gonna change hopefully next week). I'll post my template for beta testing etc when I feel it's gonna be at least -part- working. So. for my questions now... :)
I want to map a button so when I press it, it would trigger the accelerometer and ,if I lean my iPad clockwise (holding it in horizontal mode) ,it would send CH13 CC5 and i lean it counterclockwise it would send CH13 CC6. I need this to map the iPad to pitch bend the deck like turning a wheel. I hope I make my self clear and you can understand me. Sorry for my bad English. Any help would be appreciated. :)
Thanx a lot my friend. Glad to have another Greek fellow here! Where do you live? I live in Nea Smyrni -Athens. Witch language does Lemur uses? I'd like to do some research and study a bit for more complex stuff to do with this controller ;).
Ok! There is a way to transform accelerometer data (-1 to 1) into a range of 0 to 1 which can then "drive" any object in Lemur (like a fader, knob, multislider, etc etc) but unfortunately I think what you are looking for would be to use the gyroscope - not the accelerometer.

In any case, if you add 3 monitors in a project and set each one to display the following values:
accelerometer[0]

accelerometer[1]

accelerometer[2]
and start tilting your device you can see that the readouts show change in values in ranges -1 to 1. In the Lemur manual these are described as the axises x,y,z (more info about the axises here). Keep in mind that when you leave the iPad on its back, flat and motionless z=-1 because the gravity force is calculated. In other words, z=0 only when iPad is falling (lol). In a way, the correct term for accelerometer would be "forcemeter" as it gauges the forces applied to it (even when its standing still) rather than its actual acceleration.

I tested a small template I made and I can pretty much get usable data by tilting the device but not by having it flat on its back and twisting it like you asked. In any case here it is, in case you want to experiment.

accelerometer-to-faders.jzml
Ok I think Im on to something here.....

First of all, as you will soon discover (Im afraid) its unwise to use such a "delecate" parameter as pitch bend to the accelerometer - the reasons being
1.not accurate control and
2.not physically possible to have your iPad absolutely aligned to 0

Further implications seem to suggest these features for such an implementation

a. a way to turn off accelerometer quickly and have access to the controlled Midi messages by touch
b. switching off the accelerometer should reset the Midi controls to zero
c. visual display of everything thats going on

So....here is...

my Accelerometer-to-Bipolar-Knob-Which-Outputs-two-different-Midi-messages (one for left tilt - knob twist, one for right) lol

accelerometer-to-bipolar.jzml

edit: just checked, it works as expected - hey Im impressed lol





The Midi messages are already set as per your initial question
Hi & thanx again :) I think ,the most suitable is 2 push buttons to be triggerd by the gyroscope. So when the sensor is possitive it triggers the pitch bend + button ,and when it is negative it should trigger the pitch bend - button.
Oh... I forgot to mention that my use will be with TRAKTOR DJ software where pitch bending is done by buttons ,NOT by wheel like an instrument...
Interesting, I'm trying to picture using this over nudge buttons or something. Problem is I just feel god awful awkward when ever trying to use the accelerometer, I was always awful at super monkey ball or any of those jet ski games where you actually have to move the device but maybe if the sensitivity was WAY down...
My thought was simple. Lean it forward or backward (depending if you wanna nudge + or -) and by pressing the button you trigger the nudge function. You keep holding the button until the two tracks are both on time. Then you just release the Button. I don't want the angle of my rotation ,to define the amount of nudje I'm doing. Just + or - using one button instead of 2. It is just for fun and it should need some practice ,cause we've all have been used in using 2 nudje buttons and/or Jog Wheel. Don't know if & how I'm gonna use it though. I should have my iPad by now to test some things but unfortunately something went wrong with the seller. I'll try to get it next week. Thanx for the feedback anyway :) .
I've realized that I forgot to set every command or led to Target & Object Target 0 !!! They are @ "none" both. Now that I'm trying to send some midi command after pairing deamon to IN/OUT MIDI 0 ,and can't get any of the commands mapped. Is there a way to select them all and apply Target & Object Target to 0 ,or I have to do it one by one???
Frankly Im still not sure how these two work....initially I thought setting up "Object target" would be sufficient as in "all object's variables default to this target" which is not the case because then you still need to set "target" to parent. In essense "Object target" is the "parent" for "target" while "Object Target" parents are the objects higher in the priority.

So, you dont have to set both - since all your targets are now "none" just set all "target" settings to desired target and skip the "Object target" settings.

For future designs, I think the best method is to set automap to "parent". This way all your project objects will "follow" the target specified in the object which is first in the hierarchy.