Is there a way to lock and constrain objects?

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

  • Ce sujet contient 3 réponses, 2 participants et a été mis à jour pour la dernière fois par Anonyme, le il y a 12 années.
4 sujets de 1 à 4 (sur un total de 4)
  • Auteur
    Messages
  • #2286 Répondre
    Anonyme
    Inactif

    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 Répondre
    Anonyme
    Inactif

    Not yet possible, but good idea for future versions!

    #2845 Répondre
    Anonyme
    Inactif

    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 Répondre
    Anonyme
    Inactif

    Merci !

4 sujets de 1 à 4 (sur un total de 4)
Répondre à : Is there a way to lock and constrain objects?
Vos informations :





© IanniX Association

Qu'est-ce que IanniX ? | Téléchargement | Showcase | Forum | Recherche | À propos