Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hygienic layer duplication #171

Closed
bgribble opened this issue Jul 9, 2014 · 8 comments
Closed

Hygienic layer duplication #171

bgribble opened this issue Jul 9, 2014 · 8 comments
Labels
Milestone

Comments

@bgribble
Copy link
Owner

bgribble commented Jul 9, 2014

This is required for patches with parameterized input and output lists. A message to "self" should cause a layer to be copied into a new scope.

Items in the copied layer which are to be handled specially:

  • inlets and outlets. Auto numbering should proceed left to right, top to bottom, front to back.
  • items with displays in the interface. The first layer will be the one configured by the user, others will be stacked left to right or top to bottom as set by a parameter to the message
@bgribble
Copy link
Owner Author

Needed to implement this without completing #170: a method to change the scope of a single object in the UI. This will only be used in the Interface layer, to set the scope of widget(s) associated with a cloneable scope.

@bgribble
Copy link
Owner Author

Demo patch: a [mixer] object with an arbitrary number of tracks passed in as an initarg, and each channel having a number of aux sends configured by another initarg. So [mixer 8,3] should open up a largeish UI with 8 sets of gain and pan controls, each one having 3 smallish aux send dials next to. The object should have 8 inlets and 2 + 3 = 5 signal outlets.

The aux send knobs are set up to stack vertically, the channels to stack horizontally.

@bgribble
Copy link
Owner Author

Implementation of #175 makes the patch mechanics necessary to do this a bit simpler. Now it's basically:

[loadbang]
| 
[trigger 2]
|        | 
|        [,("aux_001", self.init_arg(0))]
|        |
[apply "copy_scope"]
|
o self

@bgribble
Copy link
Owner Author

Actually, after some bug fixes and rethinking it's easier:

[loadbang]
|
[@clonescope("aux_001", self.args(0))(
|
o self 

@bgribble
Copy link
Owner Author

Above commit gets a big chunk of clonescope working. No UI stuff yet.

bgribble added a commit that referenced this issue Jul 30, 2014
@bgribble
Copy link
Owner Author

Current state: there are still some bugs with cloned scopes, but a basic demo patch works.

  • Quitting after cloning causes a DSP segfault.
  • Template expansion in text objects is a total kludge. This needs to be rethought.

bgribble added a commit that referenced this issue Aug 4, 2014
Actually, this is a pretty wide-ranging commit.

 * Add --verbose-remote option to log RPC remote console output
 * Update logging code to always use console to send log messages
 * Clean up deletion code and export GUI
 * Address a delete/free anti-pattern that was causing stuff that boiled
   down to this:

    for epos, elt in enumerate(mylist):
        mylist[epos:epos+1] = []

   that don't work in case you were wondering
@bgribble
Copy link
Owner Author

bgribble commented Aug 4, 2014

The above commit addresses the DSP crashes, but see #179 for further work on this topic.

Template expansion I'm still thinking about. The current hack, which lives in Patch.clonescope, just does a Python format expansion on any TextElement that is in the exported UI. The format is passed a dict containing just "num", "row", and "col" values.

If there are no copies made, this needs to still be kludgified to show "0" as the num, so you can make an object with no specified number of copies and get something that still works

@bgribble
Copy link
Owner Author

bgribble commented Aug 8, 2014

Ok, #180 (I think) has a pretty clean solution for the template expansion: don't do anything about it explicitly, but add some support allowing it to be done in the patch. That's good enough for me to close this ticket, since the basic functionality is working.

@bgribble bgribble closed this as completed Aug 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant