My first post-project.

Discuss Lemur and share techniques.
Post Reply
dj_eddie_gr
Newbie
Posts: 32
Joined: 17 Feb 2013 19:23

My first post-project.

Post by dj_eddie_gr »

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. :)
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: My first post-project.

Post by Softcore »

Welcome aboard man! greek here too! il have a look tomorrow at what you are asking and get back at ya!!! ;)
dj_eddie_gr
Newbie
Posts: 32
Joined: 17 Feb 2013 19:23

Re: My first post-project.

Post by dj_eddie_gr »

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 ;).
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: My first post-project.

Post by Softcore »

Its own one - lol. The manual and the user library are the best teachers in learning the scripting. ;)

I 've looked into what you are after but I cant test it right now - I dont have the iPad with me. I'll be back this afternoon. ;)

Nea Smyrni eh? Cool! Im at Kamatero - near Petroypoli if you dont know where that is!
dj_eddie_gr
Newbie
Posts: 32
Joined: 17 Feb 2013 19:23

Re: My first post-project.

Post by dj_eddie_gr »

I know where it is.. :) Thanx for your feedback so far. I hope next week ,I'll get my own iPad and start testing my template.
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: My first post-project.

Post by Softcore »

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:

Code: Select all

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
(8.36 KiB) Downloaded 89 times
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: My first post-project.

Post by Softcore »

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
(7.22 KiB) Downloaded 93 times
edit: just checked, it works as expected - hey Im impressed lol





The Midi messages are already set as per your initial question
dj_eddie_gr
Newbie
Posts: 32
Joined: 17 Feb 2013 19:23

Re: My first post-project.

Post by dj_eddie_gr »

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...
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: My first post-project.

Post by Softcore »

Thats way easier...I also included "sensitivity settings"...You define at what degrees of tilt exactly the Bend buttons will be activated! ;)
accelerometer-to-pads.jzml
(17.71 KiB) Downloaded 114 times
dj_eddie_gr
Newbie
Posts: 32
Joined: 17 Feb 2013 19:23

Re: My first post-project.

Post by dj_eddie_gr »

You're the man !! :)
Post Reply