'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #388] on 11 February 2005 at 12:04:13 pm'! "Change Set: MultiMediaTranslations Date: 11 February 2005 Author: Yoshiki Ohshima Some more translations for MultiMedia tools."! !EventRecorderMorph methodsFor: 'commands' stamp: 'yo 2/11/2005 09:59'! button "Make a simple button interface for replay only" | butnCaption erm | butnCaption _ FillInTheBlank request: 'Caption for this butn?' translated initialAnswer: 'play' translated. butnCaption isEmpty ifTrue: [^ self]. erm _ (EventRecorderMorph basicNew caption: butnCaption voiceRecorder: voiceRecorder copy tape: tape) initialize. self world primaryHand attachMorph: erm! ! !EventRecorderMorph methodsFor: 'initialization' stamp: 'yo 2/11/2005 09:56'! buttonFor: data | b | b _ SimpleButtonMorph new target: self; label: data first asString translated; actionSelector: data first. data second ifNotNil: [b width < data second ifTrue: [b width: data second]]. data third ifNotNil: [b setBalloonText: data third translated]. ^b! ! !JoystickMorph methodsFor: 'menu' stamp: 'yo 2/11/2005 09:16'! chooseJoystickNumber "Allow the user to select a joystick number" | result aNumber str | str := self lastRealJoystickIndex asString. result := FillInTheBlank request: ('Joystick device number (currently {1})' translated format: {str}) initialAnswer: str. [aNumber := result asNumber] on: Error do: [:err | ^self beep]. (aNumber > 0 and: [aNumber <= 32]) ifFalse: ["???" ^Beeper beep]. realJoystickIndex := aNumber. self setProperty: #lastRealJoystickIndex toValue: aNumber. self startStepping! ! !JoystickMorph methodsFor: 'menu' stamp: 'yo 2/11/2005 09:19'! joystickNumberString "Answer a string characterizing the joystick number" ^ 'set real joystick number (now {1})' translated format: {self lastRealJoystickIndex asString}. ! ! !KeyboardMorphForInput methodsFor: 'initialization' stamp: 'yo 2/11/2005 10:39'! addRecordingControls | button switch playRow durRow articRow modRow | "Add chord, rest and delete buttons" playRow _ AlignmentMorph newRow. playRow color: color; borderWidth: 0; layoutInset: 0. playRow hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5. switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. playRow addMorphBack: (switch label: 'chord' translated; actionSelector: #buildChord:). button _ SimpleButtonMorph new target: self; borderColor: #raised; borderWidth: 2; color: color. playRow addMorphBack: (button label: ' rest ' translated; actionSelector: #emitRest). button _ SimpleButtonMorph new target: self; borderColor: #raised; borderWidth: 2; color: color. playRow addMorphBack: (button label: 'del' translated; actionSelector: #deleteNotes). self addMorph: playRow. playRow align: playRow fullBounds topCenter with: self fullBounds bottomCenter. "Add note duration buttons" durRow _ AlignmentMorph newRow. durRow color: color; borderWidth: 0; layoutInset: 0. durRow hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5. switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. durRow addMorphBack: (switch label: 'whole' translated; actionSelector: #duration:onOff:; arguments: #(1)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. durRow addMorphBack: (switch label: 'half' translated; actionSelector: #duration:onOff:; arguments: #(2)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. durRow addMorphBack: (switch label: 'quarter' translated; actionSelector: #duration:onOff:; arguments: #(4)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. durRow addMorphBack: (switch label: 'eighth' translated; actionSelector: #duration:onOff:; arguments: #(8)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. durRow addMorphBack: (switch label: 'sixteenth' translated; actionSelector: #duration:onOff:; arguments: #(16)). self addMorph: durRow. durRow align: durRow fullBounds topCenter with: playRow fullBounds bottomCenter. "Add note duration modifier buttons" modRow _ AlignmentMorph newRow. modRow color: color; borderWidth: 0; layoutInset: 0. modRow hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5. switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. modRow addMorphBack: (switch label: 'dotted' translated; actionSelector: #durMod:onOff:; arguments: #(dotted)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. modRow addMorphBack: (switch label: 'normal' translated; actionSelector: #durMod:onOff:; arguments: #(normal)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. modRow addMorphBack: (switch label: 'triplets' translated; actionSelector: #durMod:onOff:; arguments: #(triplets)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. modRow addMorphBack: (switch label: 'quints' translated; actionSelector: #durMod:onOff:; arguments: #(quints)). self addMorph: modRow. modRow align: modRow fullBounds topCenter with: durRow fullBounds bottomCenter. "Add articulation buttons" articRow _ AlignmentMorph newRow. articRow color: color; borderWidth: 0; layoutInset: 0. articRow hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5. switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. articRow addMorphBack: (switch label: 'legato' translated; actionSelector: #articulation:onOff:; arguments: #(legato)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. articRow addMorphBack: (switch label: 'normal' translated; actionSelector: #articulation:onOff:; arguments: #(normal)). switch _ SimpleSwitchMorph new target: self; borderWidth: 2; offColor: color; onColor: (Color r: 1.0 g: 0.6 b: 0.6); setSwitchState: false. articRow addMorphBack: (switch label: 'staccato' translated; actionSelector: #articulation:onOff:; arguments: #(staccato)). self addMorph: articRow. articRow align: articRow fullBounds topCenter with: modRow fullBounds bottomCenter. self bounds: (self fullBounds expandBy: (0@0 extent: 0@borderWidth)) ! ! !PianoRollScoreMorph methodsFor: 'menu' stamp: 'yo 2/11/2005 10:19'! invokeScoreMenu: evt "Invoke the score's edit menu." | menu subMenu | menu _ MenuMorph new defaultTarget: self. menu addList: {{'cut' translated. #cutSelection}. {'copy' translated. #copySelection}. {'paste' translated. #insertSelection}. {'paste...' translated. #insertTransposed}}. menu addLine. menu addList: {{'legato' translated. #selectionBeLegato}. {'staccato' translated. #selectionBeStaccato}. {'normal' translated. #selectionBeNormal}}. menu addLine. menu addList: {{'expand time' translated. #expandTime}. {'contract time' translated. #contractTime}}. menu addLine. subMenu _ MenuMorph new defaultTarget: self. (2 to: 12) do: [:i | subMenu add: i printString selector: #beatsPerMeasure: argument: i]. menu add: 'time ' translated, beatsPerMeasure printString subMenu: subMenu. subMenu _ MenuMorph new defaultTarget: self. #(2 4 8) do: [:i | subMenu add: i printString selector: #notePerBeat: argument: i]. menu add: 'sig ' translated, notePerBeat printString subMenu: subMenu. menu addLine. showMeasureLines ifTrue: [menu add: 'hide measure lines' translated action: #measureLinesOnOff] ifFalse: [menu add: 'show measure lines' translated action: #measureLinesOnOff]. showBeatLines ifTrue: [menu add: 'hide beat lines' translated action: #beatLinesOnOff] ifFalse: [menu add: 'show beat lines' translated action: #beatLinesOnOff]. menu addLine. menu add: 'add keyboard' translated action: #addKeyboard. menu popUpEvent: evt in: self world. ! !