Performance: simple control of a circular curve

Home Forums Scripts Performance: simple control of a circular curve

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2268 Reply
    Anonymous
    Inactive

    Hi there!

    Just getting started in this wonderful software. I got a problem, and i can’t seem to find the solution in the existing performance script example (a-z)2

    What i want to do is simple. Control the size of a circular curve with a korg nano control fader. I got the following script running, which seems logical to me, but it doesn’t work. Hope someone sees a solution!


    //Script "New Script"
    //Insert requests for global variables:
    function onConfigure() {
    //title("enter title here");
    //ask("prompt", "groupName", "variableName", defaultValue);
    }

    //Insert code to create score:
    function onCreate() {
    run (" add curve 1 ")
    run (" setpos current 0 0 0 ")
    run (" setpointsellipse current 1 1 ")
    run (" add cursor 2 ")
    run (" setcurve current lastCurve ")
    }

    //If a message is received
    function onMessage(protocol, host, port, destination, values) {
    if((protocol == "midi") && (destination == "cc") && (values.length > 2)) {
    var channel = parseInt(values[0]);
    var cc = parseInt(values[1]);
    var val = parseInt(values[2]);
    var sizer = val;
    run (" setpointsellipse" + "1" + sizer + sizer);
    }
    }
    #2816 Reply
    Anonymous
    Inactive

    Hi !

    The mistake is here :

    run ("setpointsellipse" + "1" + sizer + sizer); 

    should be

    run ("setpointsellipse " + " 1 " + sizer + " " + sizer); 

    (be careful with spaces!)

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Performance: simple control of a circular curve
Your information:





© IanniX Association

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