'From Squeakland.396-Nihongo7.29 of 18 March 2005 [latest update: #98] on 28 May 2005 at 11:48:28 pm'! "Change Set: Ws20050528 Date: 28 May 2005 Author: Kazuhiro Abe and Tetsuya Hayashi (Load ja_Ws20050528.translation before this file). * World-Stethoscope software module See http://swikis.ddo.jp/WorldStethoscope/. This change set is depend on Squeak Nihong7 update #98. - arranged by Takashi Yamamiya "! ClockMorph subclass: #WsClockMorph instanceVariableNames: 'nowTime' classVariableNames: '' poolDictionaries: '' category: 'WS-Gadgets'! AlignmentMorph subclass: #WsPhonePadMorph instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'WS-Sound-Interface'! PianoKeyboardMorph subclass: #WsPianoKeyboardMorph instanceVariableNames: 'frequency sticky soundPlayingList' classVariableNames: '' poolDictionaries: '' category: 'WS-Sound-Interface'! Object subclass: #WsSound instanceVariableNames: 'frequency level' classVariableNames: '' poolDictionaries: '' category: 'WS-Sound-Primitives'! Object subclass: #WsWorldStethoscope instanceVariableNames: 'soundInput fft sounds offset cutOffLevel sortType listening' classVariableNames: '' poolDictionaries: '' category: 'WS-Sound-Interface'! WsWorldStethoscope class instanceVariableNames: 'default'! AlignmentMorph subclass: #WsWorldStethoscopeMorph instanceVariableNames: 'soundInput statusLight fft sounds offset cutOffLevel sortType' classVariableNames: '' poolDictionaries: '' category: 'WS-Sound-Interface'! !EToyVocabulary methodsFor: '*Ws-Sound-Override' stamp: 'tak 5/28/2005 23:23'! masterOrderingOfPhraseSymbols "Answer a dictatorially-imposed presentation list of phrase-symbols. This governs the order in which suitable phrases are presented in etoy viewers using the etoy vocabulary. For any given category, the default implementation is that any items that are in this list will occur first, in the order specified here; after that, all other items will come, in alphabetic order by formal selector." ^ #(beep: forward: turn: getX getY getLocationRounded getHeading getScaleFactor getLeft getRight getTop getBottom getLength getWidth getTheta getDistance getHeadingTheta getUnitVector startScript: pauseScript: stopScript: startAll: pauseAll: stopAll: tellAllSiblings: doScript: getColor getUseGradientFill getSecondColor getRadialGradientFill getBorderWidth getBorderColor getBorderStyle getRoundedCorners getDropShadow getShadowColor getVolume play playUntilPosition: stop rewind getIsRunning getRepeat getPosition getTotalFrames getTotalSeconds getFrameGraphic getVideoFileName getSubtitlesFileName getGraphic getBaseGraphic #getAutoExpansion #getAutoLineLayout #getBatchPenTrails #getFenceEnabled #getIndicateCursor #getIsOpenForDragNDrop #getIsPartsBin #getMouseOverHalos #getOriginAtCenter #getShowThumbnail #getRed #getGreen #getBlue #getAlpha #getHue #getBrightness #getSaturation )! ! !FloatArray methodsFor: '*WS-Sound-Primitives' stamp: 'ka 11/10/2003 22:11'! bytesPerElement "Number of bytes in each item. This multiplied by (self size)*8 gives the number of bits stored." ^ 4! ! !Morph class methodsFor: '*WS-Sound-Interface' stamp: 'tak 12/8/2004 22:14'! additionsToViewerCategoryColor "Answer viewer additions for the 'sound' category" ^#( color ( (slot red 'Red value of my color from 0 to 1.0 as float' Number readWrite Player getRed Player setRed:) (slot green 'Green value of my color from 0 to 1.0 as float' Number readWrite Player getGreen Player setGreen:) (slot blue 'Blue value of my color from 0 to 1.0 as float' Number readWrite Player getBlue Player setBlue:) (slot alpha 'Alpha value of my color from 0 to 1.0 as float' Number readWrite Player getAlpha Player setAlpha:) (slot hue 'hue value of my color from -180 to 180 as float' Number readWrite Player getHue Player setHue:) (slot saturation 'Saturation value of my color from 0 to 100 as float' Number readWrite Player getSaturation Player setSaturation:) (slot brightness 'Brightness value of my color from 0 to 100 as float' Number readWrite Player getBrightness Player setBrightness:) ) ) ! ! !Morph class methodsFor: '*WS-Sound-Interface' stamp: 'ka 9/11/2003 15:56'! additionsToViewerCategorySound "Answer viewer additions for the 'sound' category" ^#( sound ( (command playSound: 'play sound' Number) (command stopSound 'stop sound') ) ) ! ! !PasteUpMorph methodsFor: '*WS-Sound-Interface' stamp: 'tetha 1/12/2004 23:33'! dialNumber | stethoscope | stethoscope _ WsWorldStethoscope default. ^ stethoscope dialNumber! ! !PasteUpMorph methodsFor: '*WS-Sound-Interface' stamp: 'tetha 1/12/2004 23:34'! frequency | stethoscope | stethoscope _ WsWorldStethoscope default. ^ stethoscope frequency! ! !PasteUpMorph methodsFor: '*WS-Sound-Interface' stamp: 'tetha 1/12/2004 23:33'! level | stethoscope | stethoscope _ WsWorldStethoscope default. ^ stethoscope level! ! !PasteUpMorph methodsFor: '*WS-Sound-Override' stamp: 'tetha 1/13/2004 00:17'! step WsWorldStethoscope default processBuffer. (self isWorldMorph and: [owner notNil]) ifTrue: [^ self runLocalStepMethods]. super step! ! !PasteUpMorph methodsFor: '*WS-Sound-Override' stamp: 'tak 12/10/2004 21:11'! stopRunningAll "Reset all ticking scripts to be paused. Triggered by user hitting STOP button" SoundPlayer shutDown. self presenter allExtantPlayers do: [:aPlayer | aPlayer stopRunning]. self allScriptors do: [:aScript | aScript pauseIfTicking]. self world updateStatusForAllScriptEditors! ! !PasteUpMorph class methodsFor: '*WS-Sound-Override' stamp: 'tak 5/28/2005 19:59'! additionsToViewerCategories "Answer a list of ( ) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." ^ # ( (playfield ( (command initiatePainting 'Initiate painting of a new object in the standard playfield.') (slot mouseX 'The x coordinate of the mouse pointer' Number readWrite Player getMouseX unused unused) (slot mouseY 'The y coordinate of the mouse pointer' Number readWrite Player getMouseY unused unused) (command roundUpStrays 'Bring all out-of-container subparts back into view.') (slot graphic 'The graphic shown in the background of this object' Graphic readWrite Player getGraphic Player setGraphic:) (command unhideHiddenObjects 'Unhide all hidden objects.'))) (scripting ( (command tellAllContents: 'Send a message to all the objects inside the playfield' ScriptName))) (collections ( (slot cursor 'The index of the chosen element' Number readWrite Player getCursor Player setCursorWrapped:) (slot count 'How many elements are within me' Number readOnly Player getCount unused unused) (slot stringContents 'The characters of the objects inside me, laid end to end' String readOnly Player getStringContents unused unused) (slot playerAtCursor 'the object currently at the cursor' Player readWrite Player getValueAtCursor unused unused) (slot firstElement 'The first object in my contents' Player readWrite Player getFirstElement Player setFirstElement:) (slot numberAtCursor 'the number at the cursor' Number readWrite Player getNumberAtCursor Player setNumberAtCursor: ) (slot graphicAtCursor 'the graphic worn by the object at the cursor' Graphic readOnly Player getGraphicAtCursor unused unused) (command tellAllContents: 'Send a message to all the objects inside the playfield' ScriptName) (command removeAll 'Remove all elements from the playfield') (command shuffleContents 'Shuffle the contents of the playfield') (command append: 'Add the object to the end of my contents list.' Player) (command prepend: 'Add the object at the beginning of my contents list.' Player) (command includeAtCursor: 'Add the object to my contents at my current cursor position' Player) (command include: 'Add the object to my contents' Player) )) (#'stack navigation' ( (command goToNextCardInStack 'Go to the next card') (command goToPreviousCardInStack 'Go to the previous card') (command goToFirstCardInBackground 'Go to the first card of the current background') (command goToFirstCardOfStack 'Go to the first card of the entire stack') (command goToLastCardInBackground 'Go to the last card of the current background') (command goToLastCardOfStack 'Go to the last card of the entire stack') (command deleteCard 'Delete the current card') (command insertCard 'Create a new card'))) "(viewing ( (slot viewingNormally 'whether contents are viewed normally' Boolean readWrite Player getViewingByIcon Player setViewingByIcon: )))" (#'pen trails' ( (command liftAllPens 'Lift the pens on all the objects in my interior.') (command lowerAllPens 'Lower the pens on all the objects in my interior.') (command trailStyleForAllPens: 'Set the trail style for pens of all objects within' TrailStyle) (command clearTurtleTrails 'Clear all the pen trails in the interior.'))) (#sound ( (slot soundPitch 'pitch of sound' Number readOnly Player getPitch unused unused) (slot soundLevel 'level of sound' Number readOnly Player getLevel unused unused) (slot dialNumber 'dial number of sound' String readOnly Player getDialNumber unused unused) (slot soundListening 'whether the stethoscope is listening' Boolean readWrite Player getListening Player setListening:))) ) ! ! !Player methodsFor: '*WS-Gadgets' stamp: 'chronograph 9/16/2003 12:11'! getHours ^ self getValueFromCostume: #hours! ! !Player methodsFor: '*WS-Gadgets' stamp: 'chronograph 9/16/2003 12:11'! getMinutes ^ self getValueFromCostume: #minutes! ! !Player methodsFor: '*WS-Gadgets' stamp: 'chronograph 9/16/2003 12:11'! getSeconds ^ self getValueFromCostume: #seconds! ! !Player methodsFor: '*WS-Sound-Override' stamp: 'tak 5/28/2005 20:02'! categoriesForWorld "Answer the list of categories given that the receiver is the Player representing a World" | aList | aList _ #(#'color & border' #'pen trails' playfield collections #'stack navigation' #'sound') asOrderedCollection. aList addFirst: ScriptingSystem nameForScriptsCategory. aList addFirst: ScriptingSystem nameForInstanceVariablesCategory. aList add: #input. ^ aList! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 2/18/2005 14:22'! getAlpha ^ self costume renderedMorph color alpha * 100! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:17'! getBlue ^ self costume renderedMorph color blue * 100! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 12/8/2004 22:48'! getBrightness ^ self costume renderedMorph color brightness * 100! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:18'! getGreen ^ self costume renderedMorph color green * 100! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 12/8/2004 22:47'! getHue | hue | hue _ self costume renderedMorph color hue. ^ hue > 180 ifTrue: [-360 + hue] ifFalse: [hue]! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:18'! getRed ^ self costume renderedMorph color red * 100! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 12/8/2004 22:48'! getSaturation ^ self costume renderedMorph color saturation * 100! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 2/18/2005 14:22'! setAlpha: aFloat | value color | value := (aFloat / 100 max: 0) min: 1. color := self costume renderedMorph color. self costume renderedMorph color: (Color r: color red g: color green b: color blue alpha: value)! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:14'! setBlue: aFloat | value color | value := (aFloat / 100 max: 0) min: 1. color := self costume renderedMorph color. self costume renderedMorph color: (Color r: color red g: color green b: value alpha: color alpha)! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:18'! setBrightness: aFloat | brightness color | brightness _ ((aFloat / 100 max: 0) min: 1). color _ self costume renderedMorph color. self costume renderedMorph color: (Color h: color hue s: color saturation v: brightness)! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:15'! setGreen: aFloat | value color | value := (aFloat / 100 max: 0) min: 1. color := self costume renderedMorph color. self costume renderedMorph color: (Color r: color red g: value b: color blue alpha: color alpha)! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 12/8/2004 22:52'! setHue: aFloat | hue color | hue _ aFloat \\ 360. color _ self costume renderedMorph color. self costume renderedMorph color: (Color h: hue s: color saturation v: color brightness)! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:15'! setRed: aFloat | value color | value := (aFloat / 100 max: 0) min: 1. color := self costume renderedMorph color. self costume renderedMorph color: (Color r: value g: color green b: color blue alpha: color alpha)! ! !Player methodsFor: '*WS-Sound-Slots' stamp: 'tak 1/5/2005 20:19'! setSaturation: aFloat | saturation color | saturation _ ((aFloat / 100 max: 0) min: 1). color _ self costume renderedMorph color. self costume renderedMorph color: (Color h: color hue s: saturation v: color brightness)! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'ka 7/31/2003 21:06'! dial: dialNumberString self costume dial: dialNumberString! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'ka 7/31/2003 23:40'! getDialNumber ^ self getValueFromCostume: #dialNumber! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'ka 8/12/2003 17:41'! getFrequency ^ self getValueFromCostume: #frequency! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 7/29/2003 12:30'! getFrequency1 ^ self getValueFromCostume: #frequency1! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 7/29/2003 12:30'! getFrequency2 ^ self getValueFromCostume: #frequency2! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 7/29/2003 12:30'! getFrequency3 ^ self getValueFromCostume: #frequency3! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 1/7/2004 18:15'! getLevel ^ self getValueFromCostume: #level! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 7/29/2003 12:30'! getLevel1 ^ self getValueFromCostume: #level1! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 7/29/2003 12:30'! getLevel2 ^ self getValueFromCostume: #level2! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 7/29/2003 12:30'! getLevel3 ^ self getValueFromCostume: #level3! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 1/12/2004 23:31'! getListening | stethoscope | stethoscope _ WsWorldStethoscope default. ^ stethoscope isListening! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'ka 1/19/2004 23:48'! getPitch ^ self getFrequency! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'ka 9/11/2003 15:53'! playSound: frequency | newSound | self stopSound. newSound _ FMSound new soundForPitch: frequency dur: 100.0 loudness: 0.3. self costume setProperty: #playingSound toValue: newSound. SoundPlayer resumePlaying: newSound quickStart: true! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'tetha 1/12/2004 23:32'! setListening: aBoolean | stethoscope | stethoscope _ WsWorldStethoscope default. aBoolean ifTrue: [stethoscope start] ifFalse: [stethoscope stop]! ! !Player methodsFor: '*WS-Sound-Interface' stamp: 'ka 9/11/2003 15:58'! stopSound | playingSound | playingSound _ self costume valueOfProperty: #playingSound ifAbsent: []. playingSound ifNotNil: [playingSound stopGracefully. self costume removeProperty: #playingSound]! ! !Project methodsFor: '*WS-Sound-Override' stamp: 'tak 5/28/2005 20:07'! enter: returningFlag revert: revertFlag saveForRevert: saveForRevert "Install my ChangeSet, Transcript, and scheduled views as current globals. If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case. If saveForRevert is true, save the ImageSegment of the project being left. If revertFlag is true, make stubs for the world of the project being left. If revertWithoutAsking is true in the project being left, then always revert." | showZoom recorderOrNil old forceRevert response seg newProcess | SoundPlayer shutDown. (world isKindOf: StringMorph) ifTrue: [ self inform: 'This project is not all here. I will try to load a complete version.' translated. ^self loadFromServer: true "try to get a fresh copy" ]. self isCurrentProject ifTrue: [^ self]. "Check the guards" guards ifNotNil: [guards _ guards reject: [:obj | obj isNil]. guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]]. CurrentProject world triggerEvent: #aboutToLeaveWorld. forceRevert _ false. CurrentProject rawParameters ifNil: [revertFlag ifTrue: [^ self inform: 'nothing to revert to' translated]] ifNotNil: [saveForRevert ifFalse: [ forceRevert _ CurrentProject projectParameters at: #revertWithoutAsking ifAbsent: [false]]]. forceRevert not & revertFlag ifTrue: [ response _ SelectionMenu confirm: 'Are you sure you want to destroy this Project\ and revert to an older version?\\(From the parent project, click on this project''s thumbnail.)' translated withCRs trueChoice: 'Revert to saved version' translated falseChoice: 'Cancel' translated. response ifFalse: [^ self]]. revertFlag | forceRevert ifTrue: [seg _ CurrentProject projectParameters at: #revertToMe ifAbsent: [ ^ self inform: 'nothing to revert to' translated]] ifFalse: [ CurrentProject finalExitActions. CurrentProject makeThumbnail. returningFlag == #specialReturn ifTrue: [ProjectHistory forget: CurrentProject. "this guy is irrelevant" Project forget: CurrentProject] ifFalse: [ProjectHistory remember: CurrentProject]]. (revertFlag | saveForRevert | forceRevert) ifFalse: [(Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [self storeToMakeRoom]]. CurrentProject abortResourceLoading. Smalltalk isMorphic ifTrue: [CurrentProject world triggerClosingScripts]. CurrentProject saveProjectPreferences. "Update the display depth and make a thumbnail of the current project" CurrentProject displayDepth: Display depth. old _ CurrentProject. "for later" "Show the project transition. Note: The project zoom is run in the context of the old project, so that eventual errors can be handled accordingly" displayDepth == nil ifTrue: [displayDepth _ Display depth]. self installNewDisplay: Display extent depth: displayDepth. (showZoom _ self showZoom) ifTrue: [ self displayZoom: CurrentProject parent ~~ self]. (world isMorph and: [world hasProperty: #letTheMusicPlay]) ifTrue: [world removeProperty: #letTheMusicPlay] ifFalse: [Smalltalk at: #ScorePlayer ifPresentAndInMemory: [:playerClass | playerClass allSubInstancesDo: [:player | player pause]]]. returningFlag == #specialReturn ifTrue: [ old removeChangeSetIfPossible. "keep this stuff from accumulating" nextProject _ nil ] ifFalse: [ returningFlag ifTrue: [nextProject _ CurrentProject] ifFalse: [previousProject _ CurrentProject]. ]. CurrentProject saveState. CurrentProject isolationHead == self isolationHead ifFalse: [self invokeFrom: CurrentProject]. CurrentProject _ self. self installProjectPreferences. ChangeSet newChanges: changeSet. TranscriptStream newTranscript: transcript. Sensor flushKeyboard. Smalltalk isMorphic ifTrue: [recorderOrNil _ World pauseEventRecorder]. ProjectHistory remember: CurrentProject. world isMorph ifTrue: [World _ world. "Signifies Morphic" world install. world transferRemoteServerFrom: old world. "(revertFlag | saveForRevert | forceRevert) ifFalse: [ (Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [ self storeSomeSegment]]." recorderOrNil ifNotNil: [recorderOrNil resumeIn: world]. world triggerOpeningScripts] ifFalse: [World _ nil. "Signifies MVC" Smalltalk at: #ScheduledControllers put: world]. saveForRevert ifTrue: [ Smalltalk garbageCollect. "let go of pointers" old storeSegment. "result _" old world isInMemory ifTrue: ['Can''t seem to write the project.'] ifFalse: [old projectParameters at: #revertToMe put: old world xxxSegment clone]. 'Project written.']. "original is for coming back in and continuing." revertFlag | forceRevert ifTrue: [ seg clone revert]. "non-cloned one is for reverting again later" self removeParameter: #exportState. "Complete the enter: by launching a new process" world isMorph ifTrue: [ self finalEnterActions. world repairEmbeddedWorlds. world triggerEvent: #aboutToEnterWorld. Project spawnNewProcessAndTerminateOld: true ] ifFalse: [ SystemWindow clearTopWindow. "break external ref to this project" newProcess _ [ ScheduledControllers resetActiveController. "in case of walkback in #restore" showZoom ifFalse: [ScheduledControllers restore]. ScheduledControllers searchForActiveController ] fixTemps newProcess priority: Processor userSchedulingPriority. newProcess resume. "lose the current process and its referenced morphs" Processor terminateActive. ]! ! !StandardScriptingSystem methodsFor: '*WS-Sound-Override' stamp: 'tak 5/28/2005 20:09'! wordingForOperator: aString "Answer the wording to be seen by the user for the given operator symbol/string" | toTest | toTest _ aString asString. #( (append: 'include at end') (arrowheadsOnAllPens 'arrowheads on all pens') (beep: 'make sound') (bounce: 'bounce') (clearTurtleTrails 'clear pen trails') (clearOwnersPenTrails 'clear all pen trails') (colorSees 'color sees') (color:sees: 'color sees') (doMenuItem: 'do menu item') (doScript: 'do') (forward: 'forward by') (goToRightOf: 'align after') (includeAtCursor: 'include at cursor') (isDivisibleBy: 'is divisible by') (liftAllPens 'lift all pens') (lowerAllPens 'lower all pens') (makeNewDrawingIn: 'start painting in') (max: 'max') (min: 'min') (moveToward: 'move toward') (noArrowheadsOnAllPens 'no arrowheads on pens') (overlapsAny 'overlaps any') (pauseAll: 'pause all') (pauseScript: 'pause script') (prepend: 'include at beginning') (seesColor: 'is over color') (startAll: 'start all') (startScript: 'start script') (stopProgramatically 'stop') (stopAll: 'stop all') (stopScript: 'stop script') (tellAllSiblings: 'tell all siblings') (tellSelfAndAllSiblings: 'send to all') (turn: 'turn by') (turnToward: 'turn toward') (wearCostumeOf: 'look like') (dial: 'dial to') (dialNumber 'dial number') (playSound: 'play sound of') (stopSound 'stop sound') (soundPitch 'sound pitch') (soundLevel 'sound level') (soundListening 'sound listening') ) do: [:pair | toTest = pair first ifTrue: [^ pair second]]. ^ toTest "StandardScriptingSystem initialize" ! ! !WsClockMorph methodsFor: 'accessing' stamp: 'chronograph 9/16/2003 12:05'! hours ^ nowTime hours! ! !WsClockMorph methodsFor: 'accessing' stamp: 'chronograph 9/16/2003 12:06'! minutes ^ nowTime minutes! ! !WsClockMorph methodsFor: 'accessing' stamp: 'chronograph 9/16/2003 12:12'! seconds ^ nowTime seconds! ! !WsClockMorph methodsFor: 'stepping and presenter' stamp: 'chronograph 9/16/2003 12:05'! step | time | super step. nowTime _ Time now. time _ String streamContents: [:aStrm | nowTime print24: false showSeconds: (showSeconds == true) on: aStrm]. self contents: time ! ! !WsClockMorph class methodsFor: 'scripting' stamp: 'chronograph 9/16/2003 12:09'! additionsToViewerCategories ^ # ((time ( (slot hours 'hours' Number readOnly player getHours unused unused) (slot minutes 'minutes' Number readOnly player getMinutes unused unused) (slot seconds 'seconds' Number readOnly player getSeconds unused unused) ))) ! ! !WsClockMorph class methodsFor: 'scripting' stamp: 'chronograph 9/16/2003 12:15'! defaultNameStemForInstances ^ 'WsClock' translated! ! !WsClockMorph class methodsFor: 'parts bin' stamp: 'chronograph 9/16/2003 12:35'! descriptionForPartsBin ^ self partName: 'WsClock' categories: #('Useful' ) documentation: 'A digital clock with tile slots' ! ! !WsClockMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:34'! initialize self registerInFlapsRegistry! ! !WsClockMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:36'! registerInFlapsRegistry "Register the receiver in the system's flaps registry" self environment at: #Flaps ifPresent: [:cl | cl registerQuad: #(WsClockMorph authoringPrototype 'WsClockMorph' 'A digital clock with tile slots') forFlapNamed: 'Widgets'. cl registerQuad: #(WsClockMorph authoringPrototype 'WsClockMorph' 'A digital clock with tile slots') forFlapNamed: 'PlugIn Supplies'.]! ! !WsClockMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:34'! unload "Unload the receiver from global registries" self environment at: #Flaps ifPresent: [:cl | cl unregisterQuadsWithReceiver: self]! ! !WsPhonePadMorph methodsFor: 'initialization' stamp: 'ka 7/31/2003 23:47'! addButtonRows | row | row _ AlignmentMorph newRow vResizing: #shrinkWrap. row addMorphBack: (self buttonName: '1'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '2'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '3'). self addMorphBack: row. row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: 'A'). self addMorphBack: row. row _ AlignmentMorph newRow vResizing: #shrinkWrap. row addMorphBack: (self buttonName: '4'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '5'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '6'). self addMorphBack: row. row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: 'B'). self addMorphBack: row. row _ AlignmentMorph newRow vResizing: #shrinkWrap. row addMorphBack: (self buttonName: '7'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '8'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '9'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). self addMorphBack: row. row addMorphBack: (self buttonName: 'C'). self addMorphBack: row. row _ AlignmentMorph newRow vResizing: #shrinkWrap. row addMorphBack: (self buttonName: '*'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '0'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '#'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: 'D'). self addMorphBack: row. self addMorphBack: row! ! !WsPhonePadMorph methodsFor: 'initialization' stamp: 'ka 7/9/2003 17:28'! initialize super initialize. self hResizing: #shrinkWrap; vResizing: #shrinkWrap. borderWidth _ 2. self listDirection: #topToBottom. self addButtonRows. self extent: 10 @ 10! ! !WsPhonePadMorph methodsFor: 'button commands' stamp: 'ka 7/31/2003 21:05'! dial: dialNumberString AbstractSound dial: dialNumberString. "(Delay forSeconds: 0.2 * dialNumberString size) wait"! ! !WsPhonePadMorph methodsFor: 'menu commands' stamp: 'ka 3/25/2005 21:15'! addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'dial to...' translated action: #dialTo. ! ! !WsPhonePadMorph methodsFor: 'menu commands' stamp: 'ka 7/31/2003 21:06'! dialTo | dialNumberString | dialNumberString _ FillInTheBlank request: 'Phone number?'. dialNumberString isEmpty ifTrue: [^ self]. self dial: dialNumberString! ! !WsPhonePadMorph methodsFor: 'others' stamp: 'ka 7/31/2003 21:05'! buttonName: aString ^ SimpleButtonMorph new target: self; label: aString; actionSelector: #dial:; arguments: (Array with: aString)! ! !WsPhonePadMorph class methodsFor: 'parts bin' stamp: 'ka 7/9/2003 17:51'! descriptionForPartsBin ^ self partName: 'PhonePad' categories: #('Useful' ) documentation: 'A device for dialing by tone.'! ! !WsPhonePadMorph class methodsFor: 'scripting' stamp: 'ka 7/31/2003 21:06'! additionsToViewerCategories ^ #(#(#phonepad #(#(#command #dial: 'Dial a telephone number' #String))) )! ! !WsPhonePadMorph class methodsFor: 'scripting' stamp: 'ka 7/9/2003 18:58'! defaultNameStemForInstances ^ 'PhonePad' translated! ! !WsPhonePadMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:43'! initialize self registerInFlapsRegistry! ! !WsPhonePadMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:41'! registerInFlapsRegistry "Register the receiver in the system's flaps registry" self environment at: #Flaps ifPresent: [:cl | cl registerQuad: #(WsPhonePadMorph authoringPrototype 'PhonePad' 'A device for dialing by tone.') forFlapNamed: 'Widgets'. cl registerQuad: #(WsPhonePadMorph authoringPrototype 'PhonePad' 'A device for dialing by tone.') forFlapNamed: 'PlugIn Supplies'.]! ! !WsPhonePadMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:42'! unload "Unload the receiver from global registries" self environment at: #Flaps ifPresent: [:cl | cl unregisterQuadsWithReceiver: self]! ! !WsPianoKeyboardMorph methodsFor: 'simple keyboard' stamp: 'ka 8/19/2003 03:43'! initialize super initialize. frequency _ 0. soundPrototype _ FMSound new. sticky _ true. soundPlayingList _ Array new: self submorphs size! ! !WsPianoKeyboardMorph methodsFor: 'simple keyboard' stamp: 'tetha 8/18/2003 16:32'! mouseDownPitch: midiKey event: event noteMorph: noteMorph | pitch oldSound newSound | event hand hasSubmorphs ifTrue: [^ self]. event hand mouseFocus ifNil: ["If dragged into me, then establish focus so I'll see moves" event hand newMouseFocus: noteMorph event: event]. noteMorph color: playingKeyColor. "Transcript show: 'key -> ' , midiKey printString , ' f -> ' , frequency printString; cr." oldSound _ self soundPlayingListAt: midiKey. oldSound notNil ifTrue: [self stopSoundPitch: midiKey event: event noteMorph: noteMorph. self isSticky ifTrue: [^ self]]. pitch _ AbstractSound pitchForMIDIKey: midiKey + 23. pitch _ pitch * 4. frequency _ pitch truncated. newSound _ soundPrototype soundForPitch: pitch dur: 100.0 loudness: 0.3. self soundPlayingListAt: midiKey put: newSound. SoundPlayer resumePlaying: newSound quickStart: true! ! !WsPianoKeyboardMorph methodsFor: 'simple keyboard' stamp: 'tetha 8/18/2003 16:23'! mouseUpPitch: midiKey event: event noteMorph: noteMorph self isSticky ifFalse: [self stopSoundPitch: midiKey event: event noteMorph: noteMorph]! ! !WsPianoKeyboardMorph methodsFor: 'accessing' stamp: 'ka 7/18/2003 15:25'! frequency ^ frequency! ! !WsPianoKeyboardMorph methodsFor: 'accessing' stamp: 'tetha 8/18/2003 14:36'! soundPlayingListAt: anInteger ^soundPlayingList at: anInteger! ! !WsPianoKeyboardMorph methodsFor: 'accessing' stamp: 'tetha 8/18/2003 14:36'! soundPlayingListAt: anInteger put: aSound soundPlayingList at: anInteger put: aSound! ! !WsPianoKeyboardMorph methodsFor: 'testing' stamp: 'tetha 8/12/2003 22:33'! isSticky ^ sticky == true! ! !WsPianoKeyboardMorph methodsFor: 'menus' stamp: 'tetha 8/12/2003 22:43'! addCustomMenuItems: aMenu hand: aHandMorph "Add morph-specific items to the given menu which was invoked by the given hand." super addCustomMenuItems: aMenu hand: aHandMorph. aMenu addLine. aMenu addUpdating: #stickyString action: #toggleSticky.! ! !WsPianoKeyboardMorph methodsFor: 'menus' stamp: 'ka 3/25/2005 21:17'! stickyString ^ self isSticky ifTrue: ['', 'sticky off' translated] ifFalse: ['', 'sticky on' translated]! ! !WsPianoKeyboardMorph methodsFor: 'menus' stamp: 'tetha 8/12/2003 22:35'! toggleSticky sticky _ sticky not! ! !WsPianoKeyboardMorph methodsFor: 'private' stamp: 'tetha 8/18/2003 16:24'! stopSoundPitch: midiKey event: event noteMorph: noteMorph | sound | frequency _ 0. noteMorph color: ((#(0 1 3 5 6 8 10 ) includes: midiKey \\ 12) ifTrue: [whiteKeyColor] ifFalse: [blackKeyColor]). sound _ self soundPlayingListAt: midiKey. sound notNil ifTrue: [sound stopGracefully. self soundPlayingListAt: midiKey put: nil]! ! !WsPianoKeyboardMorph class methodsFor: 'scripting' stamp: 'ka 7/18/2003 15:25'! additionsToViewerCategories ^ # ((sound ( (slot frequency 'my frequency' Number readOnly player getFrequency unused unused) ))) ! ! !WsPianoKeyboardMorph class methodsFor: 'scripting' stamp: 'ka 7/18/2003 15:23'! defaultNameStemForInstances ^ 'WsPianoKeyboard' translated! ! !WsPianoKeyboardMorph class methodsFor: 'parts bin' stamp: 'ka 7/18/2003 15:24'! descriptionForPartsBin ^ self partName: 'WsPianoKeyboard' categories: #('Multimedia') documentation: 'A piano keyboard with scripting support'! ! !WsPianoKeyboardMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:43'! initialize self registerInFlapsRegistry! ! !WsPianoKeyboardMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:43'! registerInFlapsRegistry "Register the receiver in the system's flaps registry" self environment at: #Flaps ifPresent: [:cl | cl registerQuad: #(WsPianoKeyboardMorph authoringPrototype 'WsPianoKeyboard' 'A piano keyboard with scripting support') forFlapNamed: 'Widgets'. cl registerQuad: #(WsPianoKeyboardMorph authoringPrototype 'WsPianoKeyboard' 'A piano keyboard with scripting support') forFlapNamed: 'PlugIn Supplies'.]! ! !WsPianoKeyboardMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:42'! unload "Unload the receiver from global registries" self environment at: #Flaps ifPresent: [:cl | cl unregisterQuadsWithReceiver: self]! ! !WsSound methodsFor: 'initialize-release' stamp: 'ka 7/29/2003 22:19'! initialize frequency _ level _ 0! ! !WsSound methodsFor: 'accessing' stamp: 'ka 7/29/2003 22:14'! frequency ^ frequency! ! !WsSound methodsFor: 'accessing' stamp: 'ka 7/29/2003 22:14'! frequency: aNumber frequency _ aNumber! ! !WsSound methodsFor: 'accessing' stamp: 'ka 7/30/2003 00:33'! frequency: frequencyNumber level: levelNumber self frequency: frequencyNumber. self level: levelNumber! ! !WsSound methodsFor: 'accessing' stamp: 'ka 7/29/2003 22:14'! level ^ level! ! !WsSound methodsFor: 'accessing' stamp: 'ka 7/29/2003 22:15'! level: aNumber level _ aNumber! ! !WsSound methodsFor: 'printing' stamp: 'ka 7/29/2003 22:25'! printOn: aStream super printOn: aStream. aStream nextPut: $(. self frequency printOn: aStream. aStream nextPut: Character space. self level printOn: aStream. aStream nextPut: $)! ! !WsSound methodsFor: 'musical scaling' stamp: 'tetha 9/25/2003 17:45'! musicalScaleName ^self class musicalScaleNameOf: self frequency! ! !WsSound class methodsFor: 'instance creation' stamp: 'ka 7/30/2003 00:34'! frequency: frequency level: level "WsSound frequency: 1000 level: 10" ^ self new frequency: frequency level: level! ! !WsSound class methodsFor: 'instance creation' stamp: 'ka 7/29/2003 22:20'! new ^ super new initialize! ! !WsSound class methodsFor: 'examples' stamp: 'ka 7/29/2003 22:27'! example1 "WsSound example1" ^ self frequency: 1000 level: 10! ! !WsSound class methodsFor: 'examples' stamp: 'tetha 9/25/2003 17:52'! example2 "WsSound example2" | frequencies | frequencies _ #(261.6 293.6 329.6 349.2 392 440 493.8 523.3 ). ^ frequencies collect: [:f | WsSound musicalScaleNameOf: f]! ! !WsSound class methodsFor: 'examples' stamp: 'tetha 9/25/2003 17:53'! example3 "WsSound example3" | frequencies | frequencies _ #(454 94324 898423 333 432 8586 1 2). ^ frequencies collect: [:f | WsSound musicalScaleNameOf: f]! ! !WsSound class methodsFor: 'musical scaling' stamp: 'tetha 9/25/2003 18:47'! musicalScaleC0Frequency ^ 16.351 ! ! !WsSound class methodsFor: 'musical scaling' stamp: 'tetha 9/25/2003 18:55'! musicalScaleNameOf: aNumber | index | aNumber < self musicalScaleC0Frequency ifTrue: [^'unknown']. index _ (((aNumber / self musicalScaleC0Frequency) log:2) * 12) rounded \\ 12. ^self musicalScaleNames at: index + 1! ! !WsSound class methodsFor: 'musical scaling' stamp: 'tetha 9/25/2003 18:51'! musicalScaleNames ^ #('C' 'C#' 'D' 'D#' 'E' 'F' 'F#' 'G' 'G#' 'A' 'A#' 'B' )! ! !WsWorldStethoscope methodsFor: 'initialization' stamp: 'tetha 1/12/2004 21:02'! initialize fft _ FFT new: 512. self cutOffLevel: self defaultCutOffLevel. self offset: self defaultOffset. sounds _ Array with: WsSound new with: WsSound new with: WsSound new. soundInput _ SoundInputStream new samplingRate: 22050. sortType _ self class sortByLevelType! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:56'! cutOffLevel ^ cutOffLevel! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:57'! cutOffLevel: number cutOffLevel _ number! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/12/2004 23:36'! frequency ^ self frequency1! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:57'! frequency1 ^ sounds first frequency max: 0! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:57'! frequency2 ^ sounds second frequency max: 0! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:57'! frequency3 ^ sounds third frequency max: 0! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/12/2004 23:37'! level ^ self level1! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:57'! level1 ^ sounds first level! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:58'! level2 ^ sounds second level! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:58'! level3 ^ sounds third level! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:58'! offset ^ offset! ! !WsWorldStethoscope methodsFor: 'accessing' stamp: 'tetha 1/11/2004 21:58'! offset: number offset _ number! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/11/2004 23:03'! cutOffLevelDecrease | newValue | newValue _ self cutOffLevel - 1000. self cutOffLevel: newValue.! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/11/2004 23:03'! cutOffLevelIncrease | newValue | newValue _ self cutOffLevel + 1000. self cutOffLevel: newValue.! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/11/2004 23:04'! offsetDecrease | newValue | newValue _ self offset - 1. self offset: newValue.! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/11/2004 23:04'! offsetIncrease | newValue | newValue _ self offset + 1. self offset: newValue.! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/11/2004 23:04'! setFFTSize | menu fftSize on | menu _ CustomMenu new title: 'FFT size (currently ' translated, fft n printString , ')'. ((7 to: 10) collect: [:n | 2 raisedTo: n]) do: [:r | menu add: r printString action: r]. fftSize _ menu startUp. fftSize ifNil: [^ self]. on _ soundInput isRecording. self stop. fft _ FFT new: fftSize. on ifTrue: [self start]! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/11/2004 23:05'! setSamplingRate | menu rate on | menu _ CustomMenu new title: 'Sampling rate (currently ' translated, soundInput samplingRate printString, ')'. #(11025 22050 44100) do:[:r | menu add: r printString action: r]. rate _ menu startUp. rate ifNil: [^ self]. on _ soundInput isRecording. self stop. soundInput samplingRate: rate. on ifTrue: [self start]. ! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/12/2004 23:29'! start soundInput bufferSize: fft n. soundInput startRecording. listening _ true! ! !WsWorldStethoscope methodsFor: 'control' stamp: 'tetha 1/12/2004 23:29'! stop soundInput stopRecording. listening _ false! ! !WsWorldStethoscope methodsFor: 'constants' stamp: 'tetha 1/11/2004 22:09'! cutOffLevelMaxValue ^ 100000! ! !WsWorldStethoscope methodsFor: 'constants' stamp: 'tetha 1/11/2004 22:09'! cutOffLevelMinValue ^ 0! ! !WsWorldStethoscope methodsFor: 'constants' stamp: 'tetha 1/11/2004 22:09'! defaultCutOffLevel ^ 10000! ! !WsWorldStethoscope methodsFor: 'constants' stamp: 'tetha 1/11/2004 22:09'! defaultOffset ^ -30! ! !WsWorldStethoscope methodsFor: 'constants' stamp: 'tetha 1/11/2004 22:09'! offsetMaxValue ^ 200! ! !WsWorldStethoscope methodsFor: 'constants' stamp: 'tetha 1/11/2004 22:09'! offsetMinValue ^ -200! ! !WsWorldStethoscope methodsFor: 'phone utilities' stamp: 'tetha 1/11/2004 22:54'! dialNumber | permissibleRange lows highs lowFrequency highFrequency numbers index | permissibleRange _ self permissibleRange. lows _ self lowFrequencies. highs _ self highFrequencies. numbers _ self dialNumbers. lowFrequency _ nil. highFrequency _ nil. sounds do: [:each | | frequency | frequency _ each frequency rounded. lowFrequency isNil ifTrue: [lows detect: [:low | lowFrequency _ low. (low - permissibleRange to: low + permissibleRange) includes: frequency] ifNone: [lowFrequency _ nil]]. highFrequency isNil ifTrue: [highs detect: [:high | highFrequency _ high. (high - permissibleRange to: high + permissibleRange) includes: frequency] ifNone: [highFrequency _ nil]]]. lowFrequency isNil ifTrue: [^ '']. highFrequency isNil ifTrue: [^ '']. index _ (lows indexOf: lowFrequency) - 1 * 4 + (highs indexOf: highFrequency). ^ (numbers at: index) asString! ! !WsWorldStethoscope methodsFor: 'phone utilities' stamp: 'tetha 1/11/2004 22:54'! dialNumbers ^ '123A456B789C*0#D' copy! ! !WsWorldStethoscope methodsFor: 'phone utilities' stamp: 'tetha 1/11/2004 22:54'! highFrequencies ^ #(1209 1336 1477 1633 ) copy! ! !WsWorldStethoscope methodsFor: 'phone utilities' stamp: 'tetha 1/11/2004 22:55'! lowFrequencies ^ #(697 770 852 941 ) copy! ! !WsWorldStethoscope methodsFor: 'phone utilities' stamp: 'tetha 1/11/2004 22:55'! permissibleRange ^ 30! ! !WsWorldStethoscope methodsFor: 'processing' stamp: 'tetha 1/11/2004 22:55'! processBuffer | buffer | soundInput bufferCount = 0 ifTrue: [^ self]. [soundInput bufferCount > 0] whileTrue: [buffer _ soundInput nextBufferOrNil]. self updateSounds: (fft transformDataFrom: buffer startingAt: 1)! ! !WsWorldStethoscope methodsFor: 'processing' stamp: 'tetha 1/11/2004 22:55'! updateSounds: analizedData | deltas factor | deltas _ Array new: analizedData size - 1. 1 to: deltas size do: [:index | | delta | delta _ (analizedData at: index + 1) - (analizedData at: index). deltas at: index put: index -> delta]. deltas _ deltas asSortedCollection: [:a :b | a value < b value]. factor _ soundInput samplingRate / fft n. 1 to: 3 do: [:index | | n level frequency | n _ (deltas at: index) key - 1 max: 1. level _ analizedData at: n. frequency _ level < self cutOffLevel ifTrue: [frequency _ 0. level _ 0] ifFalse: [frequency _ (n * factor) truncated]. (sounds at: index) frequency: frequency + self offset level: level]. sounds _ self isSortByLevel ifTrue: [(sounds asSortedCollection: [:a :b | a level > b level]) asArray] ifFalse: [(sounds asSortedCollection: [:a :b | a frequency > b frequency]) asArray]. "level _ analizedData max. (sounds at: 3) frequency: ((analizedData indexOf: level) * factor) truncated level: level"! ! !WsWorldStethoscope methodsFor: 'sort setting' stamp: 'tetha 1/11/2004 22:56'! sortByFrequency sortType _ self class sortByFrequencyType! ! !WsWorldStethoscope methodsFor: 'sort setting' stamp: 'tetha 1/11/2004 22:56'! sortByLevel sortType _ self class sortByLevelType! ! !WsWorldStethoscope methodsFor: 'testing' stamp: 'tetha 1/12/2004 23:30'! isListening ^ listening == true! ! !WsWorldStethoscope methodsFor: 'testing' stamp: 'tetha 1/11/2004 22:59'! isSortByFrequency ^ sortType == self class sortByFrequencyType! ! !WsWorldStethoscope methodsFor: 'testing' stamp: 'tetha 1/11/2004 22:59'! isSortByLevel ^ sortType == self class sortByLevelType! ! !WsWorldStethoscope methodsFor: 'fileIn/out' stamp: 'tetha 1/13/2004 00:21'! storeDataOn: aDataStream | savedState | savedState _ self isListening. "soundInput stopRecording." self stop. [super storeDataOn: aDataStream] ensure: [savedState ifTrue: [self start]]! ! !WsWorldStethoscope class methodsFor: 'constants' stamp: 'tetha 1/11/2004 23:15'! sortByFrequencyType ^ #sortByFrequencyType! ! !WsWorldStethoscope class methodsFor: 'constants' stamp: 'tetha 1/11/2004 23:15'! sortByLevelType ^ #sortByLevelType! ! !WsWorldStethoscope class methodsFor: 'instance creation' stamp: 'tetha 1/12/2004 20:36'! default default isNil ifTrue: [default _ self basicNew initialize]. ^ default! ! !WsWorldStethoscope class methodsFor: 'instance creation' stamp: 'tetha 1/12/2004 20:36'! new ^ self default! ! !WsWorldStethoscopeMorph methodsFor: 'initialization' stamp: 'ka 8/14/2003 01:50'! addButtonRow | row | row _ AlignmentMorph newRow vResizing: #shrinkWrap. row addMorphBack: (self buttonName: 'Menu' action: #invokeMenu). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: 'Start' action: #start). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: 'Stop' action: #stop). row addMorphBack: (Morph new extent: 12 @ 1; color: Color transparent). row addMorphBack: self makeStatusLight. self addMorphBack: row! ! !WsWorldStethoscopeMorph methodsFor: 'initialization' stamp: 'tetha 10/23/2003 16:57'! addSliders | row | row _ AlignmentMorph newRow color: color; layoutInset: 0; "wrapCentering: #center;" listDirection: #topToBottom; hResizing: #shrinkWrap; vResizing: #shrinkWrap; height: 24. row name: #adjustments. row addMorphBack: (self buildSliderFor: #cutOffLevel min: self cutOffLevelMinValue max: self cutOffLevelMaxValue label: 'cut off level'). row addMorphBack: (self buildSliderFor: #offset min: self offsetMinValue max: self offsetMaxValue label: 'calibration '). self addMorphBack: row. row hide. ! ! !WsWorldStethoscopeMorph methodsFor: 'initialization' stamp: 'tetha 9/9/2003 11:28'! initialize super initialize. soundInput _ SoundInputStream new samplingRate: 22050. fft _ FFT new: 512. self cutOffLevel: self defaultCutOffLevel. self offset: self defaultOffset. sounds _ Array with: WsSound new with: WsSound new with: WsSound new. self hResizing: #shrinkWrap; vResizing: #shrinkWrap. borderWidth _ 2. self listDirection: #topToBottom. self addButtonRow. self addSliders. soundInput _ SoundInputStream new samplingRate: 22050. sortType _ self class sortByLevelType! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 8/19/2003 03:03'! cutOffLevel ^ cutOffLevel! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 8/19/2003 03:08'! cutOffLevel: number cutOffLevel _ number! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 9/10/2003 15:45'! frequency1 ^ sounds first frequency max: 0! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 9/10/2003 15:45'! frequency2 ^ sounds second frequency max: 0! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 9/10/2003 15:45'! frequency3 ^ sounds third frequency max: 0! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 7/30/2003 00:09'! level1 ^ sounds first level! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 7/30/2003 00:09'! level2 ^ sounds second level! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 7/30/2003 00:09'! level3 ^ sounds third level! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 8/19/2003 03:04'! offset ^ offset! ! !WsWorldStethoscopeMorph methodsFor: 'accessing' stamp: 'ka 8/19/2003 03:04'! offset: number offset _ number! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 9/10/2003 18:12'! cutOffLevelMaxValue ^ 100000! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 9/10/2003 18:12'! cutOffLevelMinValue ^ 0! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 8/19/2003 03:05'! defaultCutOffLevel ^ 10000! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 8/19/2003 03:40'! defaultOffset ^ -30! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 9/25/2003 18:10'! defaultStatusLightColorAtRunning ^ Color yellow! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 9/10/2003 18:13'! offsetMaxValue ^ 200! ! !WsWorldStethoscopeMorph methodsFor: 'constants' stamp: 'ka 9/10/2003 18:13'! offsetMinValue ^ -200! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/10/2003 18:15'! cutOffLevelDecrease | newValue slider | newValue _ self cutOffLevel - 1000. self cutOffLevel: newValue. slider _ self submorphNamed: #cutOffLevel. slider value: newValue / self cutOffLevelMaxValue! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/10/2003 18:16'! cutOffLevelIncrease | newValue slider | newValue _ self cutOffLevel + 1000. self cutOffLevel: newValue. slider _ self submorphNamed: #cutOffLevel. slider value: newValue / self cutOffLevelMaxValue! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 3/25/2005 21:13'! invokeMenu | aMenu | aMenu _ CustomMenu new. aMenu addList: { {'set sampling rate' translated. #setSamplingRate}. {'set FFT size' translated. #setFFTSize}}. aMenu add: (self adjustmentsString translated) action: #toggleAdjustments. aMenu invokeOn: self defaultSelection: nil. ! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/10/2003 18:33'! offsetDecrease | newValue slider | newValue _ self offset - 1. self offset: newValue. slider _ self submorphNamed: #offset. slider value: newValue + self offsetMinValue negated / (self offsetMaxValue - self offsetMinValue)! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/10/2003 18:32'! offsetIncrease | newValue slider | newValue _ self offset + 1. self offset: newValue. slider _ self submorphNamed: #offset. slider value: newValue + self offsetMinValue negated / (self offsetMaxValue - self offsetMinValue)! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/19/2003 13:27'! setFFTSize | menu fftSize on | menu _ CustomMenu new title: 'FFT size (currently ' translated, fft n printString , ')'. ((7 to: 10) collect: [:n | 2 raisedTo: n]) do: [:r | menu add: r printString action: r]. fftSize _ menu startUp. fftSize ifNil: [^ self]. on _ soundInput isRecording. self stop. fft _ FFT new: fftSize. on ifTrue: [self start]! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/19/2003 13:27'! setSamplingRate | menu rate on | menu _ CustomMenu new title: 'Sampling rate (currently ' translated, soundInput samplingRate printString, ')'. #(11025 22050 44100) do:[:r | menu add: r printString action: r]. rate _ menu startUp. rate ifNil: [^ self]. on _ soundInput isRecording. self stop. soundInput samplingRate: rate. on ifTrue: [self start]. ! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 9/25/2003 18:10'! start soundInput bufferSize: fft n. soundInput startRecording. statusLight color: self defaultStatusLightColorAtRunning! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'ka 8/19/2003 03:51'! stop soundInput stopRecording. statusLight color: Color gray! ! !WsWorldStethoscopeMorph methodsFor: 'menu and buttons' stamp: 'tetha 10/23/2003 17:01'! toggleAdjustments | adjustments | adjustments _ self submorphNamed: #adjustments. adjustments visible ifTrue: [adjustments hide] ifFalse: [adjustments show]. self layoutChanged! ! !WsWorldStethoscopeMorph methodsFor: 'phone utilities' stamp: 'ka 9/25/2003 17:25'! dialNumber | permissibleRange lows highs lowFrequency highFrequency numbers index | permissibleRange _ self permissibleRange. lows _ self lowFrequencies. highs _ self highFrequencies. numbers _ self dialNumbers. lowFrequency _ nil. highFrequency _ nil. sounds do: [:each | | frequency | frequency _ each frequency rounded. lowFrequency isNil ifTrue: [lows detect: [:low | lowFrequency _ low. (low - permissibleRange to: low + permissibleRange) includes: frequency] ifNone: [lowFrequency _ nil]]. highFrequency isNil ifTrue: [highs detect: [:high | highFrequency _ high. (high - permissibleRange to: high + permissibleRange) includes: frequency] ifNone: [highFrequency _ nil]]]. lowFrequency isNil ifTrue: [^ '']. highFrequency isNil ifTrue: [^ '']. index _ (lows indexOf: lowFrequency) - 1 * 4 + (highs indexOf: highFrequency). ^ (numbers at: index) asString! ! !WsWorldStethoscopeMorph methodsFor: 'phone utilities' stamp: 'ka 7/31/2003 23:20'! dialNumbers ^ '123A456B789C*0#D' copy! ! !WsWorldStethoscopeMorph methodsFor: 'phone utilities' stamp: 'ka 8/19/2003 03:45'! highFrequencies ^ #(1209 1336 1477 1633 ) copy! ! !WsWorldStethoscopeMorph methodsFor: 'phone utilities' stamp: 'ka 8/19/2003 03:45'! lowFrequencies ^ #(697 770 852 941 ) copy! ! !WsWorldStethoscopeMorph methodsFor: 'phone utilities' stamp: 'ka 7/31/2003 23:21'! permissibleRange ^ 30! ! !WsWorldStethoscopeMorph methodsFor: 'stepping' stamp: 'ka 8/19/2003 03:51'! step self processBuffer! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'ka 9/19/2003 12:35'! addSliderFor: aspectSymbol min: minNumber max: maxNumber label: labelString | slider row | slider _ SimpleSliderMorph new color: Color gray; extent: 100 @ 2; target: self; actionSelector: aspectSymbol , ':'; minVal: minNumber; maxVal: maxNumber; adjustToValue: (self perform: aspectSymbol); name: aspectSymbol. row _ AlignmentMorph newRow color: color; layoutInset: 0; wrapCentering: #center; hResizing: #spaceFill; vResizing: #rigid; height: 24. row addMorphBack: (StringMorph contents: labelString translated). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '-' action: aspectSymbol , 'Decrease'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: slider. row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '+' action: aspectSymbol , 'Increase'). self addMorphBack: row! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'tetha 10/23/2003 17:05'! adjustmentsString | morph | morph _ self submorphNamed: #adjustments. ^ morph isNil ifTrue: [false] ifFalse: [morph visible ifTrue: ['hide adjustments'] ifFalse: ['show adjustments']]! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'tak 1/5/2005 16:53'! buildSliderFor: aspectSymbol min: minNumber max: maxNumber label: labelString | slider row | slider _ SimpleSliderMorph new color: Color gray; extent: 100 @ 2; target: self; actionSelector: aspectSymbol , ':'; minVal: minNumber; maxVal: maxNumber; adjustToValue: (self perform: aspectSymbol); name: aspectSymbol. row _ AlignmentMorph newRow color: color; layoutInset: 0; wrapCentering: #center; hResizing: #spaceFill; vResizing: #rigid; height: 24. row addMorphBack: (StringMorph contents: labelString translated). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '-' action: aspectSymbol , 'Decrease'). row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: slider. row addMorphBack: (Morph new extent: 4 @ 1; color: Color transparent). row addMorphBack: (self buttonName: '+' action: aspectSymbol , 'Increase'). ^row! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'tak 1/5/2005 16:53'! buttonName: aString action: aSymbol ^ SimpleButtonMorph new target: self; label: aString translated; actionSelector: aSymbol! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'tak 1/5/2005 16:53'! makeStatusLight | label | statusLight _ RectangleMorph new extent: 48 @ 19. statusLight color: Color gray. label _ StringMorph contents: 'On' translated. label position: statusLight center - (label extent // 2). statusLight addMorph: label. ^ statusLight! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'ka 8/14/2003 01:33'! processBuffer | buffer | soundInput bufferCount = 0 ifTrue: [^ self]. [soundInput bufferCount > 0] whileTrue: [buffer _ soundInput nextBufferOrNil]. self updateSounds: (fft transformDataFrom: buffer startingAt: 1)! ! !WsWorldStethoscopeMorph methodsFor: 'private' stamp: 'tetha 9/9/2003 11:52'! updateSounds: analizedData | deltas factor | deltas _ Array new: analizedData size - 1. 1 to: deltas size do: [:index | | delta | delta _ (analizedData at: index + 1) - (analizedData at: index). deltas at: index put: index -> delta]. deltas _ deltas asSortedCollection: [:a :b | a value < b value]. factor _ soundInput samplingRate / fft n. 1 to: 3 do: [:index | | n level frequency | n _ (deltas at: index) key - 1 max: 1. level _ analizedData at: n. frequency _ level < self cutOffLevel ifTrue: [frequency _ 0. level _ 0] ifFalse: [frequency _ (n * factor) truncated]. (sounds at: index) frequency: frequency + self offset level: level]. sounds _ self isSortByLevel ifTrue: [(sounds asSortedCollection: [:a :b | a level > b level]) asArray] ifFalse: [(sounds asSortedCollection: [:a :b | a frequency > b frequency]) asArray]. "level _ analizedData max. (sounds at: 3) frequency: ((analizedData indexOf: level) * factor) truncated level: level"! ! !WsWorldStethoscopeMorph methodsFor: 'menus' stamp: 'tetha 9/9/2003 11:40'! addCustomMenuItems: aMenu hand: aHandMorph "Add morph-specific items to the given menu which was invoked by the given hand." super addCustomMenuItems: aMenu hand: aHandMorph. aMenu addLine. aMenu addUpdating: #sortByLevelString action: #sortByLevel. aMenu addUpdating: #sortByFrequencyString action: #sortByFrequency.! ! !WsWorldStethoscopeMorph methodsFor: 'menus' stamp: 'tetha 9/9/2003 11:44'! sortByFrequency sortType _ self class sortByFrequencyType! ! !WsWorldStethoscopeMorph methodsFor: 'menus' stamp: 'ka 3/25/2005 21:14'! sortByFrequencyString | label | label _ 'sort by frequency' translated. ^ self isSortByFrequency ifTrue: ['' , label] ifFalse: ['' , label]! ! !WsWorldStethoscopeMorph methodsFor: 'menus' stamp: 'tetha 9/9/2003 11:44'! sortByLevel sortType _ self class sortByLevelType! ! !WsWorldStethoscopeMorph methodsFor: 'menus' stamp: 'ka 3/25/2005 21:01'! sortByLevelString | label | label _ 'sort by level' translated. ^ self isSortByLevel ifTrue: ['' , label] ifFalse: ['' , label]! ! !WsWorldStethoscopeMorph methodsFor: 'testing' stamp: 'ka 9/25/2003 18:10'! isRunning ^ statusLight color = self defaultStatusLightColorAtRunning! ! !WsWorldStethoscopeMorph methodsFor: 'testing' stamp: 'tetha 9/9/2003 11:28'! isSortByFrequency ^ sortType == self class sortByFrequencyType! ! !WsWorldStethoscopeMorph methodsFor: 'testing' stamp: 'tetha 9/9/2003 11:43'! isSortByLevel ^ sortType == self class sortByLevelType! ! !WsWorldStethoscopeMorph methodsFor: 'fileIn/out' stamp: 'ka 9/25/2003 18:59'! storeDataOn: aDataStream | savedState | savedState _ self isRunning. "soundInput stopRecording." self stop. [super storeDataOn: aDataStream] ensure: [savedState ifTrue: [self start]]! ! !WsWorldStethoscopeMorph class methodsFor: 'parts bin' stamp: 'ka 9/19/2003 12:23'! descriptionForPartsBin ^ self partName: 'WorldStethoscope' categories: #('Useful' ) documentation: 'A device for analyzing phenomena as sounds' ! ! !WsWorldStethoscopeMorph class methodsFor: 'scripting' stamp: 'ka 1/20/2004 01:53'! additionsToViewerCategories ^ # ((sound ( (slot frequency1 'frequency-1 of sound' Number readOnly player getFrequency1 unused unused) (slot level1 'level-1 of sound' Number readOnly player getLevel1 unused unused) (slot frequency2 'frequency-2 of sound' Number readOnly player getFrequency2 unused unused) (slot level2 'level-2 of sound' Number readOnly player getLevel2 unused unused) (slot frequency3 'frequency-3 of sound' Number readOnly player getFrequency3 unused unused) (slot level3 'level-3 of sound' Number readOnly player getLevel3 unused unused) (slot dialNumber 'dial number of sound' String readOnly player getDialNumber unused unused) ))) ! ! !WsWorldStethoscopeMorph class methodsFor: 'scripting' stamp: 'tak 5/28/2005 19:12'! defaultNameStemForInstances ^ 'WorldStethoscope' translated ! ! !WsWorldStethoscopeMorph class methodsFor: 'examples' stamp: 'ka 7/30/2003 01:46'! example1 "WsWorldStethoscopeMorph example1" self new openInHand! ! !WsWorldStethoscopeMorph class methodsFor: 'examples' stamp: 'ka 7/30/2003 01:46'! example2 "WsWorldStethoscopeMorph example2" | duration mixedSound | duration _ 10. mixedSound _ MixedSound new. mixedSound add: (FMSound new setPitch: 440 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 880 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 1760 dur: duration loudness: 0.5). mixedSound play. ^ mixedSound! ! !WsWorldStethoscopeMorph class methodsFor: 'examples' stamp: 'ka 7/31/2003 23:41'! example3 "WsWorldStethoscopeMorph example3" | duration mixedSound | duration _ 10. mixedSound _ MixedSound new. mixedSound add: (FMSound new setPitch: 697 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 1209 dur: duration loudness: 0.5). mixedSound play. ^ mixedSound! ! !WsWorldStethoscopeMorph class methodsFor: 'examples' stamp: 'ka 7/31/2003 23:01'! example4 "WsWorldStethoscopeMorph example4" | duration mixedSound | duration _ 10. mixedSound _ MixedSound new. mixedSound add: (FMSound new setPitch: 941 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 1633 dur: duration loudness: 0.5). mixedSound play. ^ mixedSound! ! !WsWorldStethoscopeMorph class methodsFor: 'examples' stamp: 'tetha 8/12/2003 19:34'! example5 "WsWorldStethoscopeMorph example5" | duration mixedSound | duration _ 10. mixedSound _ MixedSound new. mixedSound add: (FMSound new setPitch: 524 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 588 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 660 dur: duration loudness: 0.5). mixedSound play. ^ mixedSound! ! !WsWorldStethoscopeMorph class methodsFor: 'examples' stamp: 'tetha 8/12/2003 22:20'! example6 "WsWorldStethoscopeMorph example6" | duration mixedSound | duration _ 10. mixedSound _ MixedSound new. mixedSound add: (FMSound new setPitch: 524 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 660 dur: duration loudness: 0.5). mixedSound add: (FMSound new setPitch: 784 dur: duration loudness: 0.5). mixedSound play. ^ mixedSound ! ! !WsWorldStethoscopeMorph class methodsFor: 'constants' stamp: 'tetha 9/9/2003 11:27'! sortByFrequencyType ^ #sortByFrequencyType! ! !WsWorldStethoscopeMorph class methodsFor: 'constants' stamp: 'tetha 9/9/2003 11:27'! sortByLevelType ^ #sortByLevelType! ! !WsWorldStethoscopeMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:27'! initialize self registerInFlapsRegistry! ! !WsWorldStethoscopeMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:32'! registerInFlapsRegistry "Register the receiver in the system's flaps registry" self environment at: #Flaps ifPresent: [:cl | cl registerQuad: #(WsWorldStethoscopeMorph authoringPrototype 'WorldStethoscope' 'A device for analyzing phenomena as sounds') forFlapNamed: 'Widgets'. cl registerQuad: #(WsWorldStethoscopeMorph authoringPrototype 'WorldStethoscope' 'A device for analyzing phenomena as sounds') forFlapNamed: 'PlugIn Supplies'.]! ! !WsWorldStethoscopeMorph class methodsFor: 'class initialization' stamp: 'ka 3/25/2005 21:28'! unload "Unload the receiver from global registries" self environment at: #Flaps ifPresent: [:cl | cl unregisterQuadsWithReceiver: self]! ! WsWorldStethoscopeMorph initialize! WsPianoKeyboardMorph initialize! WsPhonePadMorph initialize! WsClockMorph initialize! !StandardScriptingSystem reorganize! ('font & color choices' colorBehindTiles fontForNameEditingInScriptor fontForTiles smallBoldFont statusColorSymbolFor: uniformTileInteriorColor) ('form dictionary' deletePrivateGraphics deletePrivateGraphics:afterStoringToFileNamed: formAtKey: formAtKey:extent:depth: formDictionary inspectFormDictionary installSolidMenuForm mergeGraphicsFrom: patchInNewStandardPlayerForm privateGraphics readFormsFromFileNamed: readFormsFromFileNamed:andStoreIntoGlobal: restorePrivateGraphics saveForm:atKey: saveFormsToFileNamed: squeakyMouseForm standardForms) ('help dictionary' helpStringOrNilFor: initializeHelpStrings) ('parts bin' anyButtonPressedTiles noButtonPressedTiles prototypicalHolder resetStandardPartsBin tilesForQuery:label:) ('script-control' goButton goUp:with: scriptControlButtons stepButton stepDown:with: stepStillDown:with: stepUp:with: stopButton stopUp:with:) ('tile colors' colorForType: colorFudge standardTileBorderColor) ('universal slots & scripts' acceptableSlotNameFrom:forSlotCurrentlyNamed:asSlotNameIn:world: doesOperatorWantArrows: systemSlotNamesOfType:) ('utilities' allClassVarNamesInSystem allKnownClassVariableNames arithmeticalOperatorsAndHelpStrings buttonDownTile buttonUpTile cleanupsForRelease customizeForEToyUsers: helpStringForOperator: helpStringOrNilForOperator: holderWithAlphabet informScriptingUser: nameForInstanceVariablesCategory nameForScriptsCategory newScriptingSpace newScriptingSpace2 numericComparitorsAndHelpStrings prepareForExternalReleaseNamed: reclaimSpace referenceAt: referenceAt:put: reinvigorateThumbnailsInViewerFlapTabs reportToUser: resetAllScriptingReferences resetStaleScriptingReferences restoreClassicEToyLook setterSelectorForGetter: soundNamesToSuppress spaceReclaimed stripGraphicsForExternalRelease tileForArgType: tryButtonFor:) ('viewer' uniqueNameForReference) ('*customevents-custom events' addCustomEventFor:named:help:targetMorphClass: addUserCustomEventNamed:help: customEventNamesAndHelpStringsFor: customEventStati customEventsRegistry globalCustomEventNames globalCustomEventNamesFor: removeCustomEventNamed:for: removeUserCustomEventNamed: standardEventStati userCustomEventNames) ('*customevents-help dictionary' statusHelpStringFor:) ('*WS-Sound-Override' wordingForOperator:) ! !Project reorganize! ('initialization' backgroundColorForMorphicProject backgroundColorForMvcProject defaultBackgroundColor initMorphic initialExtent initialProject initialize installNewDisplay:depth: installPasteUpAsWorld: setChangeSet: setProjectHolder: setServer windowActiveOnFirstClick windowReqNewLabel:) ('accessing' addGuard: addSubProjectNamesTo:indentation: changeSet children currentStack: displayDepth: environment findProjectView: forgetExistingURL isCurrentProject isMorphic isTopProject labelString lastDirectory: lastSavedAtSeconds name nameAdjustedForDepth nextProject parent previousProject projectChangeSet renameTo: setParent: setThumbnail: setViewSize: storeNewPrimaryURL: thumbnail urlList viewSize withChildrenDo: world) ('menu messages' assureNavigatorPresenceMatchesPreference displayFontProgress doWeWantToRename enter enter: enterAsActiveSubprojectWithin: enterForEmergencyRecovery exit fileOut finalEnterActions finalExitActions installProjectPreferences makeThumbnail navigatorFlapVisible saveProjectPreferences saveState validateProjectNameIfOK: viewLocFor:) ('release' addDependent: canDiscardEdits deletingProject: okToChange release removeChangeSetIfPossible subProjects) ('printing' printOn:) ('file in/out' armsLengthCommand:withDescription: assureIntegerVersion bumpVersion: compressFilesIn:to:in:resources: couldBeSwappedOut currentVersionNumber decideAboutCreatingBlank: doArmsLengthCommand: downloadUrl ensureChangeSetNameUnique exportSegmentFileName:directory: exportSegmentWithChangeSet:fileName:directory: findAFolderToLoadProjectFrom findAFolderToStoreProjectIn fromMyServerLoad: hasBadNameForStoring htmlPagePrototype loadFromServer loadFromServer: objectForDataStream: primaryServer primaryServerIfNil: projectExtension restoreReferences revert saveAs saveForRevert serverList squeakletDirectory storeDataOn: storeHtmlPageIn: storeOnServer storeOnServerAssumingNameValid storeOnServerInnards storeOnServerShowProgressOn:forgetURL: storeOnServerWithProgressInfo storeOnServerWithProgressInfoOn: storeSegment storeSegmentNoFile storeSomeSegment storeToMakeRoom tryToFindAServerWithMe url urlForLoading versionForFileName versionFrom: versionedFileName writeFileNamed:fromDirectory:toServer: writeStackText:in:registerIn:) ('object fileIn' convertToCurrentVersion:refStream:) ('project parameters' currentStack initializeProjectParameters initializeProjectPreferences noteThatParameter:justChangedTo: parameterAt: parameterAt:ifAbsent: projectParameterAt: projectParameterAt:ifAbsent: projectParameterAt:ifAbsentPut: projectParameterAt:put: projectParameters projectPreferenceAt: projectPreferenceAt:ifAbsent: projectPreferenceFlagDictionary rawParameters removeParameter:) ('flaps support' assureFlapIntegrity cleanseDisabledGlobalFlapIDsList enableDisableGlobalFlap: flapsSuppressed flapsSuppressed: globalFlapEnabledString: globalFlapWithIDEnabledString: isFlapEnabled: isFlapIDEnabled: showSharedFlaps) ('language' chooseNaturalLanguage localeChanged localeID naturalLanguage setFlaps setPaletteFor: updateLocaleDependents) ('displaying' createViewIfAppropriate displayZoom: imageForm imageFormOfSize:depth: showZoom) ('isolation layers' beIsolated compileAll:from: compileAllIsolated:from: invoke invokeFrom: isIsolated isolationHead isolationSet layersToTop propagateChanges revoke) ('OBSOLETE' obsolete) ('SuperSwiki' tellAFriend tellAFriend:) ('resources' abortResourceLoading resourceDirectoryName resourceManager resourceManager: resourceUrl startResourceLoading storeResourceList:in:) ('active process' depth) ('*sound' beep) ('*connectors-projects' worldMorphClass) ('*WS-Sound-Override' enter:revert:saveForRevert:) ! !Player reorganize! ('accessing' presenter) ('card/stack commands' deleteCard firstPage getRoundedCorners goToCard: goToFirstCardInBackground goToFirstCardOfStack goToLastCardInBackground goToLastCardOfStack goToNextCardInStack goToPreviousCardInStack goto: insertCard lastPage nextPage previousPage setRoundedCorners:) ('copying' copyUniClassWith: initializeCostumesFrom: veryDeepFixupWith: veryDeepInner:) ('costume' availableCostumeNames availableCostumesForArrows ceaseHavingAParameterFor: changeParameterTypeFor: clearOwnersPenTrails clearPenTrails costume costumeRespondingTo: costumesDo: flipHorizontal flipVertical forgetOtherCostumes getValueFromCostume: hasCostumeThatIsAWorld hasOnlySketchCostumes knownSketchCostumeWithSameFormAs: newCostume rawCostume: recaptureUniqueCostumes rememberCostume: renderedCostume: renderedCostume:remember: resetCostumeList restoreBaseGraphic sendMessageToCostume: sendMessageToCostume:with: setCostumeSlot:toValue: setParameterFor:toType: stamp stampAndErase startHavingParameterFor: tearOffButtonToFireScriptForSelector: typeforParameterFor: wearCostumeOf: wearCostumeOfClass: wearCostumeOfName:) ('error handling' doesNotUnderstand:) ('fileIn/Out' releaseCachedState) ('heading' headDown headLeft headRight headUp) ('macpal' isUniversalTiles slotInfo) ('menus' step) ('misc' adoptScriptsFrom allOpenViewers allOpenViewersOnReceiverAndSiblings arrowDeltaFor: beNotZero: beRevealedInActiveWorld beep: browseEToyVocabulary browsePlayerClass color color:sees: decimalPlacesForGetter: defaultFloatPrecisionFor: dummy entryForPlayersTool: erase getIsOverColor: grabPlayerIn: grabPlayerInActiveWorld grabScriptorForSelector:in: impartSketchScripts indicateLocationOnScreen makeBounceSound: noteDecimalPlaces:forGetter: offerAlternateViewerMenuFor:event: offerViewerMenuFor:event: openSearchingVocabularyBrowser openUnderlyingScriptorFor: ordinalNumber overlaps: revealPlayerIn: revertToUnscriptedPlayerIfAppropriate roundUpStrays seesColor: stack tearOffTileForSelf thumbnailMenuEvt:forMorph: tileReferringToSelf touchesA: unhideHiddenObjects uninstallFrom: unusedScriptName updateAllViewers updateAllViewersAndForceToShow: viewerFlapTab width) ('name' tryToRenameTo:) ('objects from disk' storeDataOn:) ('pen' addPlayerMenuItemsTo:hand: arrowheadsOnAllPens choosePenColor: choosePenSize clearTurtleTrails colorUnder defaultPenColor defaultPenSize getDotSize getPenArrowheads getPenColor getPenDown getPenSize getTrailStyle liftAllPens liftPen lowerAllPens lowerPen noArrowheadsOnAllPens penColor: setDotSize: setPenArrowheads: setPenColor: setPenDown: setPenSize: setTrailStyle: trailStyleForAllPens:) ('printing' printOn: stringForReadout) ('scripting' methodInterfacesForScriptsCategoryIn:) ('scripts-execution' assureEventHandlerRepresentsStatus assureNoScriptOtherThan:hasStatus: fireOnce prepareToBeRunning runAllClosingScripts runAllOpeningScripts runAllTickingScripts: scriptingError: startRunning startRunningScripts stepAt: stopProgramatically stopRunning) ('scripts-kernel' acceptScript:for: acceptableScriptNameFrom:forScriptCurrentlyNamed: addIdiosyncraticMenuItemsTo:forSlotSymol: allScriptEditors editDescriptionForSelector: emptyScript expungeEmptyScripts expungeEmptyUnRenamedScripts hasScriptInvoking:ofPlayer: hasScriptReferencing:ofPlayer: isEmptyTileScript: isExpendableScript: makeIsolatedCodePaneForSelector: methodInterfaceForEmptyScript newTextualScriptorFor: noteRenameOf:to:inPlayer: okayToDestroyScriptNamed: okayToRemoveSlotNamed: removeScript:fromWorld: removeScriptWithSelector: removeScriptWithoutUpdatingViewers: removeScriptWithoutUpdatingViewers:fromWorld: renameScript: scriptEditorFor: scriptInstantiationForSelector: scriptorsForSelector:inWorld: slotInfoButtonHitFor:inViewer: sourceCodeFor: tilesToCall: universalTilesForInterface:) ('scripts-standard' append: assignStatus:toAllFor: bounce: changeScript:toStatus: clear contents contents: doButtonAction doMenuItem: doScript: fire followPath forward: getBackgroundColor getObtrudes goToRightOf: hide include: includeAtCursor: initiatePainting insertCharacters: insertContentsOf: loadSineWave loadSound: makeNewDrawingIn: menuItemAfter: menuItemBefore: moveToward: overlapsAny: pauseAll: pauseScript: performScriptIfCan: prepend: removeAll reverse setBackgroundColor: show shuffleContents startAll: startScript: stopAll: stopScript: tellAllContents: tellAllSiblings: tellSelfAndAllSiblings: turn: turnToward: wrap) ('scripts-vector' * + - / asPoint decr: dividedBy: incr: multBy:) ('slot getters/setters' bookEmbodied cameraPoint cameraPoint: getActWhen getAllButFirstCharacter getAmount getAngle getBaseGraphic getBorderColor getBorderStyle getBorderWidth getBottom getBrightnessUnder getCameraPoint getCardNumber getCellInset getCharacterAtCursor getCharacters getClipSubmorphs getColor getColorUnder getCostume getCostumeAtCursor getCount getCursor getCursorWrapped getDescending getDistance getDragEnabled getDropEnabled getDropShadow getFirstCharacter getFirstElement getGetListSelector getGraphic getGraphicAtCursor getHResizing getHeading getHeadingTheta getHeadingUnrounded getHeight getHolder getIndexInOwner getIsLocked getIsUnderMouse getKnobColor getLabel getLastCharacter getLastKeystroke getLastValue getLayoutInset getLeft getLeftRight getLength getListCentering getListDirection getLuminanceUnder getMaxVal getMinVal getMouseX getMouseY getName getNewClone getNumberAtCursor getNumericValue getOffsetX getOffsetY getPageNumber getPlayerAtCursor getPosition getRadialGradientFill getResistsRemoval getRight getRotationStyle getSampleAtCursor getSaturationUnder getScale getScaleFactor getSecondColor getShadowColor getSpeed getSticky getStringContents getSubtitlesFileName getTheta getTop getTruncate getUpDown getUseGradientFill getVResizing getValueAtCursor getVideoFileName getViewingByIcon getVolume getWidth getWrapDirection getX getY handTheUserACopy setActWhen: setAllButFirstCharacter: setBaseGraphic: setBorderColor: setBorderStyle: setBorderWidth: setBottom: setCameraPoint: setCardNumber: setCellInset: setCharacterAtCursor: setCharacters: setClipSubmorphs: setColor: setColorUnder: setCostume: setCursor: setCursorWrapped: setDescending: setDistance: setDragEnabled: setDropEnabled: setDropShadow: setFirstCharacter: setFirstElement: setGetListSelector: setGraphic: setHResizing: setHeading: setHeadingTheta: setHeight: setIndexInOwner: setIsLocked: setKnobColor: setLabel: setLastCharacter: setLastKeystroke: setLastValue: setLayoutInset: setLeft: setLength: setListCentering: setListDirection: setMaxVal: setMinVal: setName: setNumberAtCursor: setNumericValue: setOffsetX: setOffsetY: setPageNumber: setPosition: setRadialGradientFill: setResistsRemoval: setRight: setRotationStyle: setSampleAtCursor: setScale: setScaleFactor: setSecondColor: setShadowColor: setSticky: setSubtitlesFileName: setTheta: setTop: setTruncate: setUseGradientFill: setVResizing: setValueAtCursor: setVideoFileName: setViewingByIcon: setVolume: setWidth: setWrapDirection: setX: setY: stackEmbodied) ('slots-assignment' assignDecrGetter:setter:amt: assignGetter:setter:amt: assignIncrGetter:setter:amt: assignMultGetter:setter:amt:) ('slots-kernel' absorbBackgroundDataFrom:forInstanceVariables: categories categoriesForVocabulary: methodInterfacesForInstanceVariablesCategoryIn: slotNames typeForSlot: typeForSlot:vocabulary: typeForSlotWithGetter:) ('slots-user' addInstanceVariable addInstanceVariableNamed:type:value: addSpecialSetter: allPossibleWatchersFromWorld chooseSlotTypeFor: chooseUserSlot compileInstVarAccessorsFor: defaultValueOfType: hasUserDefinedScripts initialValueForSlotOfType: offerGetterTiles: removeSlotNamed: renameSlot: renameSlot:newSlotName: setFloatPrecisionFor: setPrecisionFor: slotInfoAt: slotInfoAt:ifAbsent: slotInfoForGetter: slotNamesOfType: tearOffFancyWatcherFor: tearOffUnlabeledWatcherFor: tearOffWatcherFor: valueOfType:from:) ('slots-wonderland' getFogColor getFogDensity getFogRangeEnd getFogRangeStart getFogType setFogColor: setFogDensity: setFogRangeEnd: setFogRangeStart: setFogType:) ('testing' basicType costumes knownName nameForViewer renameTo: wantsSteps) ('user interface' defaultLabelForInspector) ('viewer' assureUniClass belongsToUniClass elementTypeFor:vocabulary: externalName graphicForViewerTab hasUserDefinedSlots infoFor:inViewer: initialTypeForSlotNamed: isPlayerLike newScriptorAround: tileToRefer uniqueNameForReference usableMethodInterfacesIn:) ('*sound' getConePosition setConePosition:) ('playing commands' getCurrentFrameForm getFrameGraphic getIsRunning getRepeat getTotalFrames getTotalSeconds play playUntilPosition: rewind setRepeat: stop totalFrames totalSeconds) ('translation' labelFromWatcher: renameSlotInWatchersOld:new:) ('*customevents-custom events' getTriggeringObject triggerCustomEvent: triggerScript:) ('*customevents-scripts-kernel' existingScriptInstantiationForSelector: instantiatedUserScriptsDo: pacifyScript: renameScript:newSelector: runScript:) ('*customevents-misc' actorState) ('*customevents-costume' costume:) ('*connectors-slot getters/setters' getAllowsConnectionToEmbeddedPins getDestinationArrowName getDestinationPlayer getDestinationX getDestinationY getHasPins getIncomingConnectionCount getLineWidth getMidpointX getMidpointY getOrthogonal getOutgoingConnectionCount getPinCount getRootOwner getSmoothCurve getSourceArrowName getSourcePlayer getSourceX getSourceY getTotalLength getWantsConnectionWhenEmbedded setAllowsConnectionToEmbeddedPins: setDestinationArrowName: setDestinationPlayer: setLineWidth: setOrthogonal: setSmoothCurve: setSourceArrowName: setSourcePlayer: setWantsConnectionWhenEmbedded:) ('*connectors-commands' addLabel: removeLabels straighten tellAllIncomingConnections: tellAllOutgoingConnections: tellAllPins: tellAllPredecessors: tellAllSuccessors:) ('*connectors-embeddings' createSlotFor: noteDeletionOfSubmorph:fromCostume: tellAllEmbeddedObjects:) ('*connectorstext-slot getters/setters' getTextFocus setTextFocus:) ('*flexibleVocabularies-costume' hasAnyBorderedCostumes) ('*connectors-notification-override' noteDeletionOf:fromWorld:) ('*WS-Gadgets' getHours getMinutes getSeconds) ('*WS-Sound-Override' categoriesForWorld) ('*WS-Sound-Slots' getAlpha getBlue getBrightness getGreen getHue getRed getSaturation setAlpha: setBlue: setBrightness: setGreen: setHue: setRed: setSaturation:) ('*WS-Sound-Interface' dial: getDialNumber getFrequency getFrequency1 getFrequency2 getFrequency3 getLevel getLevel1 getLevel2 getLevel3 getListening getPitch playSound: setListening: stopSound) ! !PasteUpMorph class reorganize! ('class initialization' initialize registerInFlapsRegistry unload) ('parts bin' descriptionForPartsBin supplementaryPartsDescriptions) ('printing' defaultNameStemForInstances) ('project' MinCycleLapse: disableDeferredUpdates disableDeferredUpdates: newWorldForProject: newWorldTesting) ('scripting' additionsToViewerCategoryInput authoringPrototype) ('system startup' shutDown startUp) ('*WS-Sound-Override' additionsToViewerCategories) ! !PasteUpMorph reorganize! ('Nebraska' addRemoteClient: convertRemoteClientToBuffered: hasRemoteServer releaseRemoteServer remoteServer remoteServer: removeRemoteClient: transferRemoteServerFrom:) ('WiW support' addMorphInLayer: morphicLayerNumber restartWorldCycleWithEvent: shouldGetStepsFrom: validateMouseEvent:) ('accessing' assureFlapWidth: flapTab modalWindow: modelOrNil presenter removeModalWindow useRoundedCorners) ('alarms-scheduler' addAlarm:withArguments:for:at: removeAlarm:for:) ('caching' releaseCachedState) ('change reporting' invalidRect:from:) ('classification' isPlayfieldLike isWorldMorph) ('copying' veryDeepCopyWith:) ('cursor' cursorWrapped: numberAtCursor rectifyCursor selectedRect valueAtCursor valueAtCursor:) ('debug and other' addViewingItemsTo:) ('display' gradientFillColor: setGradientColor:) ('drawing' drawOn:) ('dropping/grabbing' acceptDroppingMorph:event: automaticPhraseExpansion dropEnabled justDroppedInto:event: morphToDropFrom: originAtCenter positionNear:forExtent:adjustmentSuggestion: repelsMorph:event: wantsDroppedMorph:event:) ('e-toy support' automaticViewing cursor cursor: fenceEnabled isCandidateForAutomaticViewing lastKeystroke lastKeystroke: referencePlayfield) ('event handling' dropFiles: handlesKeyboard: handlesMouseDown: keyStroke: morphToGrab: mouseDown: mouseUp: wantsDropFiles: wantsKeyboardFocusFor:) ('events-processing' processEvent:using:) ('fileIn/out') ('flaps' accommodateFlap: addGlobalFlaps assureFlapTabsFitOnScreen bringFlapTabsToFront correspondingFlapTab deleteAllFlapArtifacts deleteGlobalFlapArtifacts enableGlobalFlaps flapTabs localFlapTabs offsetForAccommodating:onEdge: paintingFlapTab releaseViewers removeAccommodationForFlap:) ('geometry' extent: gridPoint: position:) ('geometry testing' fullContainsPoint:) ('gridding' gridModulus gridModulus: gridOrigin gridOrigin: gridSpec gridSpecPut: gridVisible gridVisibleOnOff gridVisibleString griddingOn griddingOnOff griddingString setGridSpec) ('halos and balloon help' defersHaloOnClickTo: wantsDirectionHandles wantsHaloFor: wantsHaloFromClick) ('initialization' becomeActiveDuring: defaultBorderColor defaultBorderWidth defaultColor initialize newResourceLoaded) ('interaction loop' doOneCycleNow) ('layout' addCenteredAtBottom:offset: convertAlignment laySubpartsOutInOneRow layoutChanged) ('macpal' currentVocabulary) ('menu & halo' addCustomMenuItems:hand: addPenMenuItems:hand: addPenTrailsMenuItemsTo: addPlayfieldMenuItems:hand: addScalingMenuItems:hand: addStackMenuItems:hand: addWorldHaloMenuItemsTo:hand: addWorldToggleItemsToHaloMenu: autoExpansionString autoLineLayoutString autoViewingString batchPenTrailsString buildDebugMenu: defineApplicationView defineFactoryView deleteBalloonTarget: fenceEnabledString indicateCursorString isOpenForDragNDropString isPartsBinString mouseOverHalosString originAtCenterString playfieldOptionsMenu presentCardAndStackMenu presentPlayfieldMenu presentViewMenu putUpPenTrailsSubmenu reformulateUpdatingMenus sendTextContentsBackToDonor showApplicationView showExpandedView showFactoryView showFullView showReducedView showThumbnailString transformToShow:) ('misc' abandonCostumeHistory allScriptEditors allScriptors alwaysShowThumbnail cachedOrNewThumbnailFrom: cartesianOrigin closedViewerFlapTabs heightForThumbnails hideFlapsOtherThan:ifClingingTo: hideViewerFlaps hideViewerFlapsOtherThanFor: impartPrivatePresenter innocuousName makeDetachable maxHeightToAvoidThumbnailing maximumThumbnailWidth mouseX mouseY nameForCopyIfAlreadyNamed: padding: prepareToBeSaved roundUpStrays smallThumbnailForPageSorter startRunningAll stepAll thumbnailForPageSorter unhideHiddenObjects updateStatusForAllScriptEditors viewerFlapTabFor:) ('model' createCustomModel model setModel:) ('objects from disk' convertToCurrentVersion:refStream: fixUponLoad:seg: saveOnFile) ('options' autoLineLayout autoLineLayout: automaticViewing: batchPenTrails batchPenTrails: becomeLikeAHolder behaveLikeAHolderString behaveLikeHolder behaveLikeHolder: behavingLikeAHolder fenceEnabled: indicateCursor indicateCursor: isPartsBin: replaceTallSubmorphsByThumbnails resizeToFit resizeToFitString setPartsBinStatusTo: setThumbnailHeight toggleAlwaysShowThumbnail toggleAutoLineLayout toggleAutomaticPhraseExpansion toggleAutomaticViewing toggleBatchPenTrails toggleBehaveLikeAHolder toggleFenceEnabled toggleIndicateCursor toggleIsPartsBin toggleMouseOverHalos toggleOriginAtCenter toggleResizeToFit updateSubmorphThumbnails wantsMouseOverHalos wantsMouseOverHalos:) ('painting' backgroundForm backgroundForm: backgroundSketch backgroundSketch: deleteBackgroundPainting drawSubmorphsOn: makeNewDrawingWithin paintBackground paintingBoundsAround: prepareToPaint prepareToPaint: reasonablePaintingExtent) ('parts bin' initializeToStandAlone isPartsBin residesInPartsBin) ('pen' addImageToPenTrails: addImageToPenTrailsFor: arrowheadsOnAllPens arrowsForAllPens clearTurtleTrails createOrResizeTrailsForm dotsForAllPens drawPenTrailFor:from:to: liftAllPens linesAndArrowsForAllPens linesForAllPens lowerAllPens noArrowheadsOnAllPens noteNewLocation:forPlayer: notePenDown:forPlayer:at: trailMorph trailStyleForAllPens: updateTrailsForm) ('printing' printOn:) ('project' project releaseSqueakPages storeProjectsAsSegments) ('project state' canvas firstHand hands handsDo: handsReverseDo: isStepping: isStepping:selector: listOfSteppingMorphs stepListSize stepListSummary steppingMorphsNotInWorld viewBox viewBox:) ('scripting' abandonOldReferenceScheme adaptedToWorld: allTileScriptingElements currentVocabularyFor: elementCount getCharacters hideAllPlayers modernizeBJProject recreateScripts relaunchAllViewers scriptorForTextualScript:ofPlayer: showAllPlayers) ('stepping' cleanseStepList runLocalStepMethods runStepMethods startStepping: startStepping:at:selector:arguments:stepTime: stopStepping: stopStepping:selector:) ('stepping and presenter') ('structure' activeHand world) ('submorphs-accessing' allMorphsDo: morphsInFrontOf:overlapping:do:) ('submorphs-add/remove' addAllMorphs: addMorphFront:) ('testing' stepTime) ('undo' clearCommandHistory commandHistory) ('update cycle' startBackgroundProcess) ('user interface' modelWakeUp) ('viewer' defaultNameStemForInstances) ('viewing' imposeListViewSortingBy:retrieving: restoreBoundsOfSubmorphs saveBoundsOfSubmorphs scriptSelectorToTriggerFor: showingListView sortSubmorphsBy: viewByIcon viewByName viewBySize viewNonOverlapping viewingByIconString viewingByNameString viewingBySizeString viewingNonOverlappingString viewingNormally) ('visual properties' canHaveFillStyles) ('world menu' activateObjectsTool addUndoItemsTo: attemptCleanup attemptCleanupReporting: bringWindowsFullOnscreen browseAllScriptsTextually buildWorldMenu: closeUnchangedWindows collapseAll collapseNonWindows commandKeySelectors connectRemoteUser connectRemoteUserWithName:picture:andIPAddress: defaultDesktopCommandKeyTriplets deleteNonWindows detachableScriptingSpace disconnectAllRemoteUsers disconnectRemoteUser dispatchCommandKeyInWorld:event: drawingClass expandAll extractScreenRegion:andPutSketchInHand: findAChangeSorter: findAFileList: findAMessageNamesWindow: findAPreferencesPanel: findATranscript: findAWindowSatisfying:orMakeOneUsing: findDirtyBrowsers: findDirtyWindows: findWindow: galleryOfPlayers getWorldMenu: grabDrawingFromScreen: grabFloodFromScreen: grabLassoFromScreen: grabRubberBandFromScreen: initializeDesktopCommandKeySelectors invokeWorldMenu: keyboardNavigationHandler keyboardNavigationHandler: keystrokeInWorld: makeAllScriptEditorsReferToMasters makeNewDrawing: makeNewDrawing:at: newDrawingFromMenu: openRecentSubmissionsBrowser: openScrapsBook: printScriptSummary putUpDesktopMenu: putUpNewMorphMenu putUpWorldMenu: putUpWorldMenuFromEscapeKey removeAllViewers reportLocalAddress respondToCommand:bySending:to: showStatusOfAllScripts toggleClassicNavigatorIfAppropriate undoOrRedoCommand) ('world state' abandonAllHalos abandonVocabularyPreference activeHand: addHand: addMorph:centeredNear: addMorphsAndModel: allNonFlapRelatedSubmorphs assureNotPaintingElse: assureNotPaintingEvent: assuredCanvas beWorldForProject: checkCurrentHandForObjectToPaste checkCurrentHandForObjectToPaste2 chooseClickTarget colorAt:belowMorph: deEmphasizeViewMVC: displayWorld displayWorldAsTwoTone displayWorldNonIncrementally displayWorldSafely doOneCycle doOneCycleInBackground doOneSubCycle dragThroughOnDesktop: embeddedProjectDisplayMode endDrawing: exit flashRects:color: fullRepaintNeeded goBack haloMorphOrNil haloMorphs handleFatalDrawingError: initForProject: install installAsActiveSubprojectIn:at:titled: installAsActiveSubprojectIn:titled: installFlaps installVectorVocabulary jumpToProject nextPage open openWithTitle:cautionOnClose: optimumExtentFromAuthor paintArea paintAreaFor: paintBox paintBoxOrNil patchAt:without:andNothingAbove: pauseEventRecorder previousPage privateOuterDisplayWorld removeHand: repairEmbeddedWorlds repositionFlapsAfterScreenSizeChange restoreDisplay restoreFlapsDisplay restoreMorphicDisplay saveAsWorld sketchEditorOrNil sleep someHalo specialNameInModelFor: standardPlayerHit standardSystemController startSteppingSubmorphsOf: triggerClosingScripts triggerOpeningScripts) ('private' privateFullMoveBy: privateMoveBy: privateRemoveMorph:) ('name' unusedMorphNameLike:) ('*cgprereqs-structure' graphContext) ('*flexiblevocabularies-scripting' printVocabularySummary) ('*customevents-scripting' addUserCustomEventNamed:help: removeUserCustomEventNamed: userCustomEventNames userCustomEventsRegistry) ('*standardyellowbuttonmenus-event handling' hasYellowButtonMenu) ('*standardyellowbuttonmenus-misc' addMyYellowButtonMenuItemsToSubmorphMenus) ('*connectors-misc' defaultConnectorClass isConnectable) ('*connectors-embeddings' allowsConnectionToSubmorph: allowsConnectionToSubmorphs) ('*connectors-world menu' grabNCDrawingFromScreen:) ('*connectors-connections' allConnectedMorphs allConnections) ('*connectors-commands' tellAllContents:) ('*connectors-world menu-override' yellowButtonClickOnDesktopWithEvent:) ('*connectors' newMorphMenu) ('*connectors-world state' deleteAllHalos) ('worldstethoscope-accessing') ('worldstethoscope-phone utilities') ('*WS-Sound-Interface' dialNumber frequency level) ('*WS-Sound-Override' step stopRunningAll) ! !Morph class reorganize! ('*connectors-scripting' additionsToViewerCategoryConnection additionsToViewerCategoryEmbeddings) ('*customevents-user events' additionsToViewerCategoryUserEvents) ('*flexiblevocabularies-scripting' additionToViewerCategorySelectors additionsToViewerCategory: allAdditionsToViewerCategories hasAdditionsToViewerCategories noteCompilationOf:meta: unfilteredCategoriesForViewer) ('arrow head size' defaultArrowheadSize obtainArrowheadFor:defaultValue:) ('class initialization' initialize) ('fileIn/Out' fileReaderServicesForFile:suffix: fromFileName: serviceLoadMorphFromFile services) ('initialize-release' unload) ('instance creation' initializedInstance newBounds: newBounds:color: newSticky) ('misc' morphsUnknownToTheirOwners) ('new-morph participation' addPartsDescriptorQuadsTo:if: includeInNewMorphMenu newStandAlone partName:categories:documentation: partName:categories:documentation:sampleImageForm:) ('parts bin' supplementaryPartsDescriptions) ('scripting' additionsToViewerCategories additionsToViewerCategoryBasic additionsToViewerCategoryColorAndBorder additionsToViewerCategoryDragAndDrop additionsToViewerCategoryGeometry additionsToViewerCategoryLayout additionsToViewerCategoryMiscellaneous additionsToViewerCategoryMotion additionsToViewerCategoryObservation additionsToViewerCategoryPenUse additionsToViewerCategoryScripting additionsToViewerCategoryScripts additionsToViewerCategoryTests authoringPrototype helpContributions vectorAdditions) ('testing' allSketchMorphClasses allSketchMorphForms isSketchMorphClass) ('*ode-base-morph') ('*WS-Sound-Interface' additionsToViewerCategoryColor additionsToViewerCategorySound) ! !FloatArray reorganize! ('accessing' at: at:put: defaultElement length squaredLength) ('arithmetic' * *= + += - -= / /= adaptToNumber:andSend: dot: negated) ('comparing' = hash) ('primitives-plugin' primAddArray: primAddScalar: primDivArray: primDivScalar: primMulArray: primMulScalar: primSubArray: primSubScalar: sum) ('converting' asFloatArray) ('private' replaceFrom:to:with:startingAt:) ('user interface' inspect inspectWithLabel:) ('') ('*WS-Sound-Primitives' bytesPerElement) ! !EToyVocabulary reorganize! ('initialization' addCustomCategoriesTo: encompassesAPriori: includesSelector:forInstance:ofClass:limitClass: methodInterfaceFrom: objectForDataStream: setCategoryDocumentationStrings) ('category list' categoryListForInstance:ofClass:limitClass:) ('*Ws-Sound-Override' masterOrderingOfPhraseSymbols) ('method list' allMethodsInCategory:forInstance:ofClass: phraseSymbolsToSuppress) ('*flexiblevocabularies-initialization' initialize) ('*flexibleVocabularies-testing' isEToyVocabulary) ('*flexiblevocabularies-method list') ! "Postscript: Leave the line above, and replace the rest of this comment by a useful one. Executable statements should follow this comment, and should be separated by periods, with no exclamation points (!!). Be sure to put any further comments in double-quotes, like this one." PartsBin initialize. Preferences enable: #canRecordWhilePlaying. Flaps disableGlobalFlaps: false. Flaps addAndEnableEToyFlaps. ActiveWorld addGlobalFlaps. Flaps sharedFlapsAlongBottom. !