[Etoys] Sound tool refactoring and enhancement
Karl Ramberg
karlramberg at gmail.com
Sat May 10 04:28:55 EDT 2008
polishookm wrote:
> Karl, Thanks for attaching the changeset with the StarMorph tile
> additions. I'm more than a little amazed. As best as I can tell from
> code, defining and adding new tiles is as simple as
>
> 1. Add an 'additionsToViewerCategories' as needed
> 2. Add a method or methods to Player to account for whatever is in the
> 'additionsToViewerCategories' method.
>
> To test, I added 2 more tiles to the changeset:
>
> " 1 "
> (command openTranscript 'Show a transcript?')
> " 2 "
> (slot starRatioReloaded 'How long vertices are within me' Number
> readWrite Player setStarRatio: Player getStarRatio)
>
> .... The 2nd tile, obviously, is almost identical to one of the tiles
> you've already defined ...
>
> .... So 'command' refers to a message that will be sent to Player -
> which means Player has to know how to respond to that message (in this
> case, Player requires an 'openTranscript' method).
>
And Player usually passes the message on to the player costume, so you
have to know the internals of the costume to know what messages it have
implemented. Costume is most usually a subclass of morph.
Sound is unusual as it does not have a morphic costume and the only
visual representation is tiles.
> 'slot' defines an instance variable. In this case, 'Number readWrite'
> means the inst var will be a number with get/set access which, in turn,
> means corresponding get/set methods in Player (as per your changeset)
> have to exist.
>
> My questions are:
>
> (1) am I stating this all correctly?
> (2) is 'additionToViewerCategory' used anywhere in the system?
>
> * * * * * * *
> " From Morph additionsToViewerCategories "
> Subclasses that have additions can either:
> - override this method, or
> - (preferably) define one or more additionToViewerCategory* methods.
> * * * * * * *
>
> Anything else you might add in the way of advice?
>
I recommend playing around and testing stuff. Ask questions here and if
you could document stuff you learn it would be great :-)
> Thanks in advance for all further information and thanks one more time
> for demonstrating how easily tiles can be added.
>
Its easy to add the scripts for most stuff. I spend most of the time
understanding the internals of the morph I want to script, like finding
the access point and what kind of data types are sent.
Karl
> Ab,
>
> Mark
>
>
>
>
>
> karl wrote:
>
>> polishookm wrote:
>>
>>> Bert, the etoy you attached to your previous mail is fabulous; as
>>> best as I can tell, it demonstrates what Karl has been suggesting in
>>> his mails. From my point of view, it would be nice if
>>>
>>> 1. more tile scripting options existed for sounds (simple
>>> transformations that could be applied ....)
>>> 2. something such as a sound holder or some other collection
>>> mechanism existed (maybe it already does?)
>>>
>>> As best as I can tell, sound can (obviously) be scripted in response
>>> to morphic events.
>>>
>>> I'm still wondering if morph events can be scripted in response to
>>> conditions that exist in a sound? For example, is a sound file ended,
>>> can a player then change its costume?
>>>
>>> Is there any documentation on the web or elsewhere about extending
>>> the tile system? Or (my guess) is documentation mostly the class
>>> comments, etc. in Etoys?
>>>
>>>
>> I don't know of any documentation but take a look at the attached
>> change set that adds tile scripting to StarMorphs.
>> Feel free to ask questions if you have any.
>>
>> Karl
>>
>>
>>> Bert Freudenberg wrote:
>>>
>>>
>>>> On 07.05.2008, at 09:38, karl wrote:
>>>>
>>>>
>>>>
>>>>> K. K. Subramaniam wrote:
>>>>>
>>>>>
>>>>>> On Tuesday 06 May 2008 11:49:02 pm you wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> There are lots of possible pathways here to make nicer sound / music
>>>>>>> environment but it needs to be thought through and carefully
>>>>>>> designed.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> An interesting application of sound tiles for learning is seen in
>>>>>>
>>>>>> http://www.ccd.rpi.edu/Eglash/csdt/latino/rhythm/rhy_intr.htm
>>>>>>
>>>>>> It illustrates how units of sounds can be combined using simple
>>>>>> algebras to
>>>>>> produce rhythms. In the process, children get to learn about
>>>>>> similarity,
>>>>>> repetitions, multiples and so on.
>>>>>>
>>>>>> Regards .. Subbu
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> Thats really cool. You can kind of do the same with the Sound
>>>>> SequencerMorph, in a linear fashion. And the UI should be cleaned up a
>>>>> little.
>>>>>
>>>>>
>>>> I made an Etoy a while ago, see attachment. Drag the yellow "notes"
>>>> off the circle, and resize them to change pitch. Now, what would be
>>>> really cool if we could make this use an instrument instead of the
>>>> simple sine wave ...
>>>>
>>>> The same thing should be doable with percussions, just drop some
>>>> sampled sounds into the world.
>>>>
>>>> On the XO it would be great to use TamTam instruments. We have OSC
>>>> for Squeak ...
>>>>
>>>> - Bert -
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>> Etoys mailing list
>>>> Etoys at lists.laptop.org
>>>> http://lists.laptop.org/listinfo/etoys
>>>>
>>>>
>>>
>>>
>
>
More information about the Etoys
mailing list