Kyma Forum
  Kyma Support
  Create Class from Example problem

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Create Class from Example problem
Bill Meadows
Member
posted 15 December 2000 18:33         Edit/Delete Message   Reply w/Quote
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
posted 16 December 2000 12:01         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Bill Meadows:
I created a new delay with filter, but implemented the feedback path with a MemoryWriter and an Oscillator.
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."

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.
To create several of the delays, each having an independent delay line, I suggest using a Script to set each of the delay lines to a different name. Or, if you don't have very many different delay lines, you can give each one a different name more easily by hand.


IP: Logged

Bill Meadows
Member
posted 21 December 2000 17:50         Edit/Delete Message   Reply w/Quote
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,
I also have to go back and replace each instatiation.

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
posted 22 December 2000 11:28         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Bill Meadows:

So if I decide to change the underlying class,
I also have to go back and replace each instatiation. Not to mention having to repeat all of the steps in the "create class from example" action - copy and paste all the descriptions, etc.

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

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c