MoI discussion forum
MoI discussion forum

Full Version: Parametric design in MoI?

Show messages:  1-9  …  570-589  590-609  610-629  630-649  650-669  670-689  690-709  …  910-912

From: Max Smirnov (SMIRNOV)
24 Sep 2017   [#630]
Well..
In fact I planned this feature for 1.xx versions, but two last evenings was enough to take mess with it.
Macro nodes! :)

Other changes:
Added dynamic mousewheel delta adjusting (Knob/Slider nodes)
Fixed Extract node bug
Fixed Polyline nodebug
Fixed Mouse scroll glitch
Changed Node info windows scroll method
Minor interface improvements

Attention!
I've made changes in getInputData function in core.js.
It's one of the most important and frequently used functions in nodeeditor.
Please test your node projects! Everything should work good.

http://moi.maxsm.net/nodeeditor
From: Frenchy Pilou (PILOU)
24 Sep 2017   [#631]
What a productivity!
From: James (JFH)
24 Sep 2017   [#632] In reply to [#630]
Bravo Max,

Thank you for Macro function. It'll greatly enhance legibility of node circuitry so as to not intimidate non-noders.

Will it be possible to marque a group of nodes and make them into a macro? Like so:



Also, will there be a way of loading multiple nod files into Nodeeditor so that macros may be shared between projects? (assuming that there is not to be a new file type for macros)

Thanks again for your inspiring work
James

Image Attachments:
MakeMacro.gif 


From: Max Smirnov (SMIRNOV)
25 Sep 2017   [#633] In reply to [#632]
Hi James

Yesterday I wrote Macro Export / Import tool. It can import nod files as macro. Wait for a next nodeeditor release.

>>Will it be possible to marque a group of nodes and make them into a macro
Yes, but not in the next release.
From: James (JFH)
25 Sep 2017   [#634] In reply to [#633]
Thanks Max,

>>Yesterday I wrote Macro Export / Import tool. It can import nod files as macro. Wait for a next nodeeditor release.<<

This will be brilliant! The ad hoc approach to node wiring can be anything but systematic, so to be able to encapsulate working chunks into macros and then reimport into a overall scheme will provide a much needed layer of structure; so kudos.

>>marque a group of nodes and make them into a macro
Yes, but not in the next release<<

I look forward to then!

I greatly appreciate all your hard work
James
From: speedy (AL2000)
25 Sep 2017   [#635]
Hi Max
Great excitement and gratitude for the
continuous improvements
Good job....
we look forward to the next .....
Thanks so much ,
have a nice day-
al
From: Karsten (KMRQUS)
25 Sep 2017   [#636] In reply to [#630]
Hello Max,

that's really great - thanks for that big improvement!

Karsten
From: Max Smirnov (SMIRNOV)
1 Oct 2017   [#637]
v.0.96

Added macros Import/Export tool
Fixed Basic/Output remove bug

I desided do not create special file format for macros. All macros will be saved as normal nod-file, and every nod-file you can import as a macro.
If you will try to open saved macro as top-level file all inputs/outputs nodes will be blocked.

Also you can create subdirectory nodeeditor/macros and put there your macros. They will be shown in Macros submenu.
Unfortunately, at the moment I can't scan subdirectories in nodeeditor/macros directory using MoI functions, so I can't create subfolders in macros submenu.

http://moi.maxsm.net/nodeeditor
From: mkdm
1 Oct 2017   [#638] In reply to [#637]
Hi Max.

Thank you very much for all your developing efforts!

With this new features for "Macro" you're doing a great job!!

I would like to find some extra spare time (..it's a hard challenge) to write some sort of "UI Control Panel" for NodeEditor,
with buttons/tabs/expandable sections, all dynamically created,
in order to give a different UI other than menu, that is very uncomfortable.

Do you think is it feasible ?

I stay tuned.

Ciao!
From: Karsten (KMRQUS)
1 Oct 2017   [#639] In reply to [#637]
Hello Max,
thank you very much - a first test shows that every thing works fine. Reusing the macros will give the productivity a boost.

So have a nice evening
Karsten
From: bemfarmer
1 Oct 2017   [#640]
My only experience with MACROS is in Microsoft Excel, where a series of key presses may be recorded, to reduced repetitive tasks.
"pressing the Macro key causes the sequence of key presses to be repeated."

My attempt of a definition of a MACRO in nodeEdit program:

NOTE: These statements are apparently FAULTY...

A MACRO is a group of nodes which have been pre-wired, or pre-assembled, to perform some function, or portion, of a full .nod program.
A MACRO is a building block. Several MACRO building blocks may be combined to make a .nod program. (?)

Rather that build a .nod file from scratch, by selecting individual nodes, and wiring them up, the .nod file may be built in smaller blocks. (?)
A library of pre-defined MACROS may be built up which accomplish common or typical portions of .nod files.
The programmer loads the appropriate MACROS from the MACRO subdirectory, loads any desired single nodes, (?)
and wires up appropriate connections between the MACROS and single nodes.(?)

Example of a super simple MACRO: A Frequency node wired to a Quartz node. One selection versus two selections and one wire and one label change.
I saved Frequency + Quartz as "Clock.nod" to the Macro directory. (Well, it should be exported...)


I guess a MACRO is saved by saving a .nod file to the Macro directory?
I have not managed to load more than one MACRO at a time.
There is a little box which says Macro, and another little box which says Clock...
Clicking on the Macro box loads Max's Macro.
Clicking on the Clock box loads Frequency+Quartz, but Max's Macro disappears...

- Brian
From: bemfarmer
1 Oct 2017   [#641] In reply to [#640]
So Max's CubePts is a macro container, which can be opened.

Double clicking on a macro container also opens it in a new window with a back button.

I cannot open more than one macro at a time...

- Brian
From: James (JFH)
2 Oct 2017   [#642] In reply to [#640]
Hi Brian,

>>I guess a MACRO is saved by saving a .nod file to the Macro directory?....There is a little box which says Macro.....<<

You need for example, to export the macro "cubePts.nod" out of Max's original "macro.nod" file, like so:


then it & others can be imported into a new project like so:


Hope this helps
James

Image Attachments:
macroExport.gif  macroImport.gif 


From: Frenchy Pilou (PILOU)
2 Oct 2017   [#643] In reply to [#642]
About this example CubePtrs.nod

It's only the node "CubePtrs" who is saved or the Node "CubePtrs" + Knob + Slider + OutPut who is saved as "Macro A" ?
From: James (JFH)
2 Oct 2017   [#644] In reply to [#643]
Hi Pilou,

>>It's only the node "CubePtrs" who is saved<<
Yes, the macro can be exported with any name, though it makes sense to give the .nod file the same name as the macro within.

.>>or the Node "CubePtrs" + Knob + Slider + OutPut who is saved as "Macro A" ?<<
No, I only included "MacroA" highlighted to illustrate that multiple macros may be imported into a project.
The Knob + Slider + OutPut will not be included in the export.

James
From: bemfarmer
2 Oct 2017   [#645] In reply to [#642]
Thank you James, that did help. You must have a Mac export window.

I was incorrectly thinking that detailed views of multiple Macros could be viewable in one window, at the same time.

An attempt to document the Macros feature:

NodeEditor MACROS

1. To create a new Macro container:
In a nodeeditor window, right click on the screen, and select Macro, then select Create.
This creates a small box labeled Macro,
which is the Macros/Container as per the i Node Info window on the right of the screen.
(In effect this small box is a condensed second screen, a "Back" screen.)

2. There are two ways to open the Macros container and see the "Back" screen:
a. Double click on the Macros container.
b. Right click on the Macros container and select Open.

In the info window, the name of the Macro container may be changed, for example to QuartzClock.

3. To build a Macro:
In the "Back" screen, build what amounts to a .nod program.
Right click on an open area, select Node, then select a particular node,
for example Node/Basic/Quartz, also select Node/Widgets/Slider and change its name to Frequency.
Color can also be changed.
Right click on an open area, and select Output. (Input can be selected if needed.)
Wire Frequency to Quartz, and Quartz to Output.
Select the Back button at the top of the screen.
This returns to the main node screen, and the Macro container now has an output dot.
Right click on the Macro container and Export it to the Macro subdirectory, with an appropriate name.
Note that the Macro container "Back" window may also have other Macros loaded and wired in as well,
but they will appear as condensed Macro containers (with sub Back windows).

Nested Macros containers:
Note that steps 1, 2, and 3 can be repeated in a second condensed Macros container opened in the "Back" window,
and have also have subordinate "Back" window(s), so as to make nested Macros.

In summary, the Macro appears as a "condensed" .nod file, until opened in a "Back window."
This can "unclutter" a complicated and large .nod program file.

I do not see any way to view the entire detail of some wired node ensemble of multiple nodes and macros, in one window.

Importing a previously saved Macro is straightforward, and not documented here.
Multiple saved Macros may be imported to the main nodeeditor screen, but appear in "condensed" form there, and may be wired together
along with regular nodes.

- Brian
From: Max Smirnov (SMIRNOV)
2 Oct 2017   [#646]
Hi Marco,

>>I would like to find some extra spare time (..it's a hard challenge) to write some sort of "UI Control Panel" for NodeEditor, with buttons/tabs/expandable sections, all dynamically created, in order to give a different UI other than menu, that is very uncomfortable.
Do you think is it feasible ?

Sure, the UI definetely needs redesigning. I'm not a designer, so I can't create good interface by myself. Maybe someone could make new interface for NE.

Brian,
thank you for documentation!
From: mkdm
2 Oct 2017   [#647] In reply to [#646]
Hi Max.

@You : "...Sure, the UI definetely needs redesigning. I'm not a designer, so I can't create good interface by myself. Maybe someone could make new interface for NE."

Well!

ASAP I hope to start writing a UI plugin with some nice look and above all with good UX, in order to speed up things in NE (or...PE...Project Elephant).

I also think that currently what we are really missing in NE is the support for keyboard shortcut,
but unfortunately I think that this can't be done, because I suppose that all keyboard events are captured and processed by Moi.

Anyway...let's change at least the UI!

I'll keep you up-to-date about this work.

Ciao!
From: Michael Gibson
2 Oct 2017   [#648] In reply to [#647]
Hi Marco, re: keyboard shortcuts in node editor - for v4 it will be possible to implement OnKeyDownEvent() and OnKeyUpEvent() script functions on a dialog and when the dialog has focus MoI will look for those and call them.

It's used also by the new shortcut key definition dialog "ShortcutKeyDialog.htm" and there are comments in that file about how it works.

- Michael
From: mkdm
2 Oct 2017   [#649] In reply to [#648]
Hi Michael.

@You : "...for v4 it will be possible...".

Perfect!! Thanks a lot.

"ShortcutKeyDialog.htm"....is in V4.....right ? I think so.

Show messages:  1-9  …  570-589  590-609  610-629  630-649  650-669  670-689  690-709  …  910-912