Variables for current rotation/zoom?

Home Forums Scripts Variables for current rotation/zoom?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2269 Reply
    IanniX
    Keymaster

    Could anyone tell me what the variables are for the current rotation? I read the manual and saw how to set it to a specific number, but I’d like to make a script that rotates it an addition 15 degrees each time it receives a message or something.

    #2817 Reply
    IanniX
    Keymaster

    After looking at the sticky and understanding it a bit more clearly, I was able to solve my own question by creating a global variable.

    var rotation = 0;

    //If a message is received
    function onMessage(protocol, host, port, destination, values) {
    //Message reception

    if((protocol == 'midi') && (values[1] == 56)) { //rotates right
    rotation += 15;
    run('rotate 0 0 ' + rotation);

    }
    if((protocol == 'midi') && (values[1] == 57)) { //rotates left
    rotation += 15;
    run('rotate 0 0 ' + rotation);

    }
    }
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Variables for current rotation/zoom?
Your information:





© IanniX Association

What is IanniX? | Download | Showcase | Forums | Research | About