Home to Foleys Finest Audio

Idea for PGM editor - copy/paste metadata

Been having great fun with PGM. After spinning around in circles for a few days, I am not so worried about making it work better with Faust at the moment. There are some discrepancies in the ways which certain things are done so for the moment I am not doing those things. When the time comes that I can’t ignore it, I will deal with it. But I am also learning about 5 things at once and I have to slow down.

Anyway, I find that when I am doing editing in PGM, for example, I change certain aspects of a knob, then I want to propagate that change to all the other knobs in the design. Or a selectable subset of them.

I imagine a dialog that appears after you click the button. You select the object in the design which you want to use as the template. Then PGM finds all the other such objects (e.g. knobs) in the design and shows a table of them, at least with their captions so you can tell them apart. Then you mutli-select a group of them and proceed.

Next you are shown “some way” to choose which metadata to copy from the first device to the rest of them. Unfortunately that could/should go all the way to almost every possible thing, but mostly I was just adjusting background color.

I could see this being an enormous time saver. I was dealing with it by keeping the XML file open in a text editor and since the design isn’t that big, I could just copy the new tags around where they were needed.

Or maybe there’s an XML editor that would work well for this? No need to reinvent the wheel. But it’s a little cumbersome using a basic text editor.

Oh I have a surprise for you: CMD+C and CMD+V in the XML tree should already work. If it doesn’t there is something wrong with the keyboard focus, but it worked for me :slight_smile:

An edit multiple items is a little complicated, I don’t see how that could be done easily. But would be a great thing, I agree

Well I did a lot of copy/paste in the tree editor if that’s what you mean, but it’s 1 parameter at a time, unless I missed something. If I change 10 parameters (easily done) on one knob and I have 20 knobs (also easily done) then I’m going berzerk with copy and paste 200 times.

Something that just showed the structure of the XML file like a spreadsheet and let you copy/paste rows or sections of rows would be adequate. I don’t even care if it’s built-in. Visual Studio opens the XML and does syntax highlighting but does not display the structure.

It’s either a stupid idea, or a great idea, I can’t tell which. I looked at a number of online XML editors and none of them does this. I’d think you could just flatten the structure and give each unique key a column. This creates phantom entries for columns/keys where they don’t belong obviously so you’d still need to be careful. But then you could look at all “knobs” and see which one had all the extra metadata. Copy that and paste it to the (probably blank) areas of the target knobs. Then you’d need something to responsibly turn that back into XML.

Okay to give credit where it is due, you can e.g. copy and paste an existing knob and then hook it to a different signal and then delete the old slider. That is faster than copying metadata 1 by 1.

Let’s say I wish to impose the meta data (except for the Slider Parameter and Caption) from one knob to another. Just one at a time for now.

I can select an existing slider, CTRL-C, select a new location (slider) and press CTRL-V and the new slider is inserted next to the selected one. So there should be some sort of “Paste-Special” option that instead of inserting a copy of the copied component,

  • checks to see if it is the right component type (e.g. rotary slider) - skip if not
  • if it’s the right component type, add/update all metadata of the selected object except the Slider Parameter and Caption).

Where would I look in the code to add something like this?

What you do is:

Select New style class (CSS):

Give it a name and it will be selected to edit.
Now you set all the properties you want to share in that class and then click on the node that should use those settings:

When the property is looked up it looks first in the node itself, then the style classes and then from the parent. A node can reference multiple classes (separated with space), it’s processed in that order until a value is found.

That’s better than copying…

Hope that helps

Cool, I never would have figured it out. Thanks!

Copyright © 2020-2021 Foleys Finest Audio UG. All rights reserved.