First time here? Check out the FAQ!

If I'm encapsulating a Sound with a ?GeneratedEvent, what parameter type would that be?

0 votes
If I'm making an encapsulated Sound that generates an EventValue, like the GeneratedEvent of a SoundToGlobalController, what Parameter Type would that be in my encapsulation?
asked Mar 26 in Capytalk & Smalltalk by alan-jackson (Virtuoso) (13,660 points)

1 Answer

0 votes
The parameter type is hotValue, but we do not recommend encapsulating Sounds that generate EventValues (we cannot guarantee that all uses of these encapsulated Sounds will work now or will continue to work in the future).
answered Mar 26 by ssc (Savant) (110,320 points)
Perhaps I should clarify, when I said I'm generating EventValues all I meant was that my encapsulated Sound contains a SoundToGlobalController and I have a parameter on my Sound that sets the GeneratedEvent.

Is that what you're saying might not work in the future?
Thanks, what you describe will indeed work. (What is not guaranteed to work is when the names of the generated events are computed internally)
In other Sounds I've made I have generated multiple STGCs from a single "root" name.

For instance in a script I would have:

(1 to: 8) do: [:i
        start: 0
        generatedEvent: (?rootEvent eventValue suffix: i)

Where ?rootEvent is a parameter on my encapsulated Sound that is set to an EventValue, stgc is a SoundToGlobalController in the Inputs of my script and generatedEvent is a ParameterVariable in the STGCs GeneratedEvent parameter.

Will this not work in the future?
Right, we cannot guarantee that this would work in all circumstances, for example, in the Timeline. That's why we recommend against generating the names of EventValues within an encapsulated Sound. It's fine to do it in an unencapsulated Sound though!
Oh ok, thanks for the clarification.

Sorry I have to ask, I'm intrigued now. What is it about encapsulation that's different from an un-encapsulated Sound that makes its generated EventValue not work in a TimeLIne?