[L2Ork-dev] Description of intelligent patching

Ivica Ico Bukvic ico at vt.edu
Mon Nov 7 09:03:28 UTC 2016


You're right, Albert. The documentation for this is thin. IIRC when I 
committed it to the git, I think I added the explanation. Below are 
extracted comments from the g_editor.c:

         /* FIRST OPTION: if two objects are selected and the one that is
            originating is one of the selected objects try multi-connecting
            all outlets into all inlets starting with the user-made one as
            an offset */

         /* SECOND OPTION: if two or more objects are selected and the one
            that is originating is not one of the selected, connect 
originating
            to all selected objects' the outlets specified by the first
            connection */

         /* THIRD OPTION: if two or more objects are selected and the one
            that is receiving connection is one of the selected, and the
            target object is selected, connect nth outlet (as specified by
            the first connection) from all selected objects into the inlet
            of the unselected one */

         /* FOURTH OPTION: if more than two objects are selected and both y1
            and y2 are selected connect each originating object's outlet to
            each of the outgoing objects' inlets until you run out of 
objects
            or outlets. This one is tricky as there is no guarrantee that
            objects will be selected in proper visual order, so we order the
            selection from left to right and top to bottom to ensure proper
            visual pairing. This option has two variants, A and B.
            OPTION A VS B: we either connect outgoing to each of other 
objects
            (A) or incoming to all other objects (B). We determine which 
one of
            the two options is selected based on which condition will 
yield more
            successful connections. */

As for the paste script into canvas, you should be able to copy PD patch 
text (from the .pd file), focus onto a newly opened canvas you wish to 
patch into, and paste and doing so should automagically paste things 
into that patch and update canvas properties accordingly, including its 
size and position. I think there is a variant of that where if you paste 
into the existing canvas that has been already edited in which case 
canvas properties like size and location are ignored while there rest is 
pasted accordingly on top of the edited stuff. Pasting malformed text, 
however, can result in a crashtastic paste for which pd-l2ork will 
inform you in the console before crashing. Unfortunately, I haven't 
figured out yet an easy way how to salvage it at that point. HTH

Best,

Ico

On 11/6/2016 6:45 PM, Albert Graef wrote:
> Ico, is there an explanation anywhere about how pd-l2ork's different 
> intelligent patching modes work? A quick search in the help browser 
> didn't turn up anything.
>
> Also, in the PdCon paper you mentioned something about "pasting script 
> code snippets directly onto the canvas". Could you please elaborate a 
> bit on that a bit as well? Sounds like this might be useful for Faust 
> and Pure externals.
>
> TIA,
> Albert
>
> -- 
> Dr. Albert Gr"af
> Computer Music Research Group, JGU Mainz, Germany
> Email: aggraef at gmail.com <mailto:aggraef at gmail.com>
> WWW: https://plus.google.com/+AlbertGraef
>
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> http://disis.music.vt.edu/listinfo/l2ork-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20161107/6fed1216/attachment-0001.html>


More information about the L2Ork-dev mailing list