Is there a way to lock and constrain objects?

Home Forums Scripts Is there a way to lock and constrain objects?

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

    Hello,
    I scripted a very simple linear envelope sequencer to drive a Max/MSP patch and would like to be able to lock some parts so I’m not able to change them while editing, I would also like to be able to constrain a curve in a predefined rectangle… Is there a way to do that?
    All the best,
    Matthieu

    here’s my current code :


    function onConfigure() {
    title("TEST1");
    ask("Enveloppes", "Nombre", "qEnv", 6);
    ask("Enveloppes", "Durée (s)", "dur", 60);
    ask("Nom du Groupe", "nom", "grpName", "Seq-1");
    }

    function onCreate() {
    for(var index = 0 ; index < qEnv ; index++){
    addPlayer(index, dur, grpName);
    addEnvCurve(index, dur, grpName);
    }
    }


    function addPlayer(index, dur, grpName) {
    var startyTop = index*5 + 2;
    var endyBottom = index*5 - 2;

    run("add curve auto");
    run("setPointAt current 0 0 " + index*5 + " 0");
    run("setPointAt current 1 " + dur + " " + index*5 + " 0");
    run("setPointAt current 2 " + dur + " " + startyTop + " 0");
    run("setPointAt current 3 " + dur + " " + endyBottom + " 0");
    run("setGroup current "+ grpName);

    run("add cursor auto")
    run("setWidth current 4");
    run("setCurve current lastCurve");
    run("setSpeed current 1");
    run("setPattern current 0 0 1 0");
    run("setMessage current 20, osc://ip_out:57120/cursor collision_curve_label collision_value_y");
    run("setGroup current "+ grpName);
    }

    function addEnvCurve(index, dur, grpName) {
    var endyBottom = index*5 - 2;
    var label = index+1;

    run("add curve auto");
    run("setPointAt current 0 0 " + endyBottom + " 0");
    run("setPointAt current 1 " + dur + " " + endyBottom + " 0");
    run("setColor current 85 255 127 255");
    run("setLabel current Env"+ label);
    run("setGroup current "+ grpName);
    }
    #2844 Reply
    Anonymous
    Inactive

    Not yet possible, but good idea for future versions!

    #2845 Reply
    Anonymous
    Inactive

    Ok, nice! Thanks for your quick reply, I’ll stay tuned.
    By the way, I discover IanniX since this morning, really a cool piece of software, congratulations!
    Bonne journée,
    Matthieu

    #2846 Reply
    Anonymous
    Inactive

    Merci !

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Is there a way to lock and constrain objects?
Your information:





© IanniX Association

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