Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Module Name

For general discussion related FlowStone

Module Name

Postby deraudrl » Wed Jan 22, 2020 9:05 pm

Is there any way for a module to access its own name or (probably more useful) the name of its parent module?
I keep a pair of oven mitts next to my computer so I don't get a concussion from slapping my forehead while I'm reading the responses to my questions.
deraudrl
 
Posts: 239
Joined: Thu Nov 28, 2019 9:12 pm
Location: SoCal

Re: Module Name

Postby Spogg » Thu Jan 23, 2020 9:57 am

I don’t believe there’s any official way to do it.
I think it would involve a software hack of considerable proportions, if it were possible at all.

Just out of interest…why?

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Module Name

Postby chackl » Thu Jan 23, 2020 2:41 pm

Hi!

There is something (I hope i got you correct)
It is a quite old post so i needed some time to find it:
viewtopic.php?f=3&t=602

Ruby Code:
Code: Select all
self.parent.caption


Example attached in this post.
But: I found no way to get the parent's parent module name so that you could make a module to get the including module name...

Maybe there is a solution?...

Regards!
Attachments
Modul Name.fsm
(405 Bytes) Downloaded 752 times
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
User avatar
chackl
 
Posts: 233
Joined: Tue Aug 17, 2010 8:46 pm
Location: Austria / Salzburg

Re: Module Name

Postby trogluddite » Thu Jan 23, 2020 3:15 pm

The Ruby that chackl mentioned is as much access to the schematic "tree" that we have, unfortunately, besides the "root node" of the schematic (it's file/folder location); and it is strictly Ruby-only. The 'parent' method has always struck me as odd; it does rather look as if access to the whole tree might have been intended at one time, but it goes back no further than the module directly enclosing the calling RubyEdit.

Aside from that, the only other 'reflection' that I've discovered is:
- If a RubyEdit is within a toolbox module (the thumbnails are all "live" mini-schematics), the 'time' method returns nil.
- For a quick way to check whether a RubyEdit is in an export or the FlowStone application, you can use "defined?(CodeRay)" (CodeRay is a Ruby module which handles the code syntax-colouring, so isn't needed in exports).
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Module Name

Postby deraudrl » Thu Jan 23, 2020 5:31 pm

As Hetty would say, "Bugger."

I kind of hoped there was something in Ruby that could walk back up the line, and that might be useful for what I have in mind. (Haven't thought the whole thing through yet, just checking feasibility.)

Of course, best case would be full access to the underlying FS object model, similar to the way VBA/JS/whatever has access to the entire document tree in COM-enabled apps like Excel or CorelDraw. In those apps, user-written macros can walk the entire document hierarchy, manipulating individual components. Hey, I can dream, right? :D
I keep a pair of oven mitts next to my computer so I don't get a concussion from slapping my forehead while I'm reading the responses to my questions.
deraudrl
 
Posts: 239
Joined: Thu Nov 28, 2019 9:12 pm
Location: SoCal

Re: Module Name

Postby trogluddite » Thu Jan 23, 2020 6:20 pm

deraudrl wrote:Hey, I can dream, right?

Oh, yes - you're not the only one who dreams about such things. My first taste of Ruby was writing plugins for the SketchUp 3D-modeller back when it was still a Google thing, where besides every last node of the models, you could modify and add your own menus, toolbars, file export formatters, etc. to the application itself. And as I found just recently, having just acquired a new PC, I can barely use Notepad++ any more without installing a folder full of dozens of scripts and macro/menu/key-binding definitions; I forget which stuff came built in and which I've bolted on over the years!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Module Name

Postby deraudrl » Thu Jan 23, 2020 6:43 pm

trogluddite wrote:My first taste of Ruby was writing plugins for the SketchUp 3D-modeller...
I knew I'd encountered Ruby before, just couldn't remember where.

I built a CNC router back in 2012...looked at SketchUp briefly and bounced hard off it. The Vectric apps I ended up using had Lua as their macro language, and I think I've had Ruby and Lua confused ever since.
I keep a pair of oven mitts next to my computer so I don't get a concussion from slapping my forehead while I'm reading the responses to my questions.
deraudrl
 
Posts: 239
Joined: Thu Nov 28, 2019 9:12 pm
Location: SoCal

Re: Module Name

Postby RJHollins » Thu Jan 23, 2020 7:20 pm

ahh ... SketchUp.

Got my introduction when beginning the design/layout phase for my Mastering Control Room.

To this day, I still play around with some Architectural designs/ideas every so often. One of the latest was for
a proposed outdoor deck that helped visualize the project. Probably to be built early this Spring 8-)

Also have the VRAY renderer :mrgreen:

My younger brother is a Contractor, and a few times He's asked for a visualization for a Client. Kinda fun doing these
things ... a nice little diversion from my Audio work.
8-)
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Module Name

Postby deraudrl » Thu Jan 23, 2020 8:44 pm

Spogg wrote:Just out of interest…why?
Side effect of my previous query about separating GUI and processing, which got some added incentive from BobF's thread about GUI's. Mostly I was looking for a cleaner way to handle the baroque intertwining of the stock control widgets, presets, and MIDI CC, which gives me a headache whenever I drill down into what looks to be a simple knob or slider.

A related question involves exactly what things propagate when one of a set of synced modules gets modified: does the syncing only reflect the components/connections or does it include names/properties/values etc? E.g. if I rename or change the value of a string primitive inside one of a set of synced modules, does it change in all of them? The manual, as is its wont, is ambiguous in this area.

(I suppose I could just embrace the suck and stop looking under the hood of things that are known to work properly, but my mind doesn't work that way.)
I keep a pair of oven mitts next to my computer so I don't get a concussion from slapping my forehead while I'm reading the responses to my questions.
deraudrl
 
Posts: 239
Joined: Thu Nov 28, 2019 9:12 pm
Location: SoCal

Re: Module Name

Postby Spogg » Fri Jan 24, 2020 9:42 am

I don’t have the definitive answer but I do know that anything tagged as a Property (for viewing in the P view) will NOT be synchronised. Also the parent view size for any synced module won’t copy to the others. The synced modules name can also be changed for each module. So you could have Osc 1, Osc 2 etc but all still synced.

I think pretty much everything else will be synced, based on my experience.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Next

Return to General

Who is online

Users browsing this forum: No registered users and 81 guests