![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Create Class from Example problem |
Bill Meadows Member |
![]() ![]() ![]() I created a simple delay with an LPF in the feedback path. I used the FeedbackIn and FeedbackOut objects to implement the feedback path. I then used "create class from example" so that I could use several of these in one sound. I discovered that the "connection" name in the feedback objects is global, thus all of the delays got co-mingled (inter-connected through the use of the common connection). "O.K." I thought, I'll change the name to a variable by putting "?" in front of it (in both feedback objects). However, I was not prompted to supply a default value when I started "create class from example". The new class does work however, just like the original one, with all instatiations sharing the same connection path. Next I borrowed from some really old examples of feedback that SSC provided a couple of years ago. I created a new delay with filter, but implemented the feedback path with a MemoryWriter and an Oscillator. Again, this worked fine by itself (it was more DSP efficient, too!). I changed the wavetable name to a "?"-variable in both the MemoryWriter and the Oscillator. I envoked "create class from example", and this time I was prompted to supply a value for the variable. When I did, I was informed that it was an "undeclared variable." How can I do what I want to do? I have asked this before, but... Why must encapsulation be so difficult in Kyma? The "create class from example" interface is antiquated and arcane. I really wish it could work like MAX where all you have to do is select some objects, copy/paste them to a new window and add I/O ports. Proper code encapsulation is the hallmark of clear, self-documenting software. Neat, hierarchical programs are easy to read and understand. (Most of my MAX programs) Giant, rambling structures with no hierarchy are difficult to follow and debug. (Most of my Kyma programs) IP: Logged |
SSC Administrator |
![]() ![]() ![]() quote: Filenames are strings, so when you are prompted to supply a value for the variable, put it in single quotes. Then you can proceed with creating the class. IP: Logged |
Bill Meadows Member |
![]() ![]() ![]() Putting the name in single quotes worked. Thanks. I am still frustrated by the lack of effective encapsulation. I am not up on the terminology of object-oriented programming, but in old-fashioned terms, there seems to be no way to implement a subroutine call within Kyma. I can "create class from example", but each instantiation of that class COPIES the underlying code, it does not reference it. So if I decide to change the underlying class, What a pain! Not to mention having to repeat all of the steps in the "create class from example" action - copy and paste all the descriptions, etc. Isn't there a more elegant way to do this? IP: Logged |
SSC Administrator |
![]() ![]() ![]() quote: User-created classes within the same Sound file do reference the same class definition. In other words, if you create a class, make multiple instantiations of it, and then edit the class of one of the instance, all instances will reflect the changes to the class. (Changes to the icon will not be noticeable until you copy-paste the instantiation or re-open the Sound file after saving it on disk). To save time when copying parameter definitions and icon drawing, you can drag an instance of an old class into the icon and/or parameter definition area of the Class Editor, and it will automatically copy all parameter definitions and the icon for you. IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.