Creating your own single prototype from a more complex structure defining which controls are implemented is an immensely satisfying process.
Analogous to a 'Macro' in 'Reaktor' or (correct me if I am wrong - been a few years) a 'sub patcher' in Max~MSP.
You can add your creations in new and amusingly titled categories on the Prototypes P 302.
Whilst actually being Step 8 in 'The twelve steps to Kyma Mastery' p 22, I found this process very helpful and an invaluable tool which will ultimately speed up your workflow. (no pain, no gain)
Obviously this is from the forum and is Pete's rather marvellous condensed explanation on how to navigate what is actually a huge and powerful topic.
Epic thanks go to Pete for helping us Noobs out.
Question From Charlie
'I am reading the section in Kyma-X-revealed on encapsulation. If I understand this concept, then we can take a sound with say three modules to it (like the bit-crusher) and condense this down to one icon and only the controls we specify. I can then drag this single icon crusher from my prototypes and it only takes up one position on my sound signal flow!
Correct?!? mmm sounds and classes.... and green messages! (Charlie has a confused expression on his face)'
Answer From Pete
Make your sound with a bunch of Icons like the bit crusher and make all the parameters you want, using !xxxxx to try it out. The names you choose here will be the names of the fields in the finished encapsulated module.
Then change all the !xxxx in all the icons into ?xxxx. This will turn them into green variables. If you leave any !xxxx parameters in it, you will get an error when you try to encapsulate later.
At this stage I normally make a copy of the sound and put ???? on the end of it's name, to tell me it's not a playable sound but just a preparation for encapsulating.
Now when you play the sound you will be asked to give fixed values for the green variable. Type in a value and hit the value button for each name. Think of these values as the default staring point. Then when you play the sound it will have lost all it's live controllability, but don't worry as this is in preparation for encapsulation. Also any sound inputs that you want in the final sound (like replaceable inputs), you must replace in your current sound with the module called VARIABLE, which has the Icon of a giant question mark. You must name each variable module with the name you want the field to be called in the final encapsulated module. When you next start up your sound it will ask for a value for these these names, but just click on the SOUND button without typing any thing in.
Now close down the sound (saving the differences) so that it is sitting in the sound file window (not the sound editor). Click on it once so that it is hi-lighted, and then go the the action menu and choose 'New class from example".
Now the tricky bit.
If asked, give values to all the names remembering to press sound for the names of the input modules (as you did before) and after you've done that you will the see the class editor. This is where you make the look of your new single sound Icon. You must go through each of your names one at a time (found in the Parameter field) and say what Type they are. For you first experiment you should choose, "Hot value" as type for all your parameters and "sound" as type for the input sounds. Here you can draw a pretty picture for your new icon and in the top left name box, type the name of your new sound over writing the words "newClassFromExample". NO SPACES ALLOWED IN ANY OF THE NAMES.
You can also choose where each field will appear and it's shape and size by selecting the name in the parameters and editing the text in the "Field Rectangle" but this can get a bit hairy to start with so I would just leave it as it is for now.
Then close down the window and it will ask you if you want to save, so answer yes. Then look around the sound file window and you will find you newly made single sound.
Now you can try it out and put !xxxx in the hot fields to make them hot again (just like any other sound in kyma). If you need to change things you can close it down and Hi-light it in the sound file window and choose edit class under the action menu.
Pete
-- CharlieNorton - 19 May 2010