Etoys: Sound-kfr.27.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys: Sound-kfr.27.mcz

commits-2
Karl Ramberg uploaded a new version of Sound to project Etoys:
http://source.squeak.org/etoys/Sound-kfr.27.mcz

==================== Summary ====================

Name: Sound-kfr.27
Author: kfr
Time: 16 June 2013, 12:25:11 am
UUID: 66331c11-465d-1d42-b358-e7e5031f3436
Ancestors: Sound-kfr.26

Fix a age old bug in
PianoRollNoteMorph>>mouseMove:

Offset is now working

=============== Diff against Sound-kfr.26 ===============

Item was changed:
  ----- Method: AnonymousSoundMorph>>defaultColor (in category 'initialization') -----
  defaultColor
  "answer the default color/fill style for the receiver"
  ^ Color lightGreen!

Item was changed:
  ----- Method: AnonymousSoundMorph>>encounteredAtTime:inScorePlayer:atIndex:inEventTrack:secsPerTick: (in category 'piano roll') -----
  encounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick
 
  "hack... since we are called from within the SoundPlayer loop, the Semaphore will
  block attempts to play directly from here"
  WorldState addDeferredUIMessage: [sound play].!

Item was changed:
  ----- Method: AnonymousSoundMorph>>playSound (in category 'menu') -----
  playSound
  "Play the receiver's sound."
 
  sound play!

Item was changed:
  ----- Method: AnonymousSoundMorph>>putEventsOnto: (in category 'event roll') -----
  putEventsOnto: aStream
  "Write all of the events represented by the receiver in its current state onto the given stream."
 
  | aNewEvent |
  aNewEvent :=  MediaPlayEvent new.
  aNewEvent setType: #startSound argument: self sound hand: nil stamp: (self eventRoll timeStampForCurrentPositionOf: self).
  aStream nextPut: aNewEvent!

Item was changed:
  ----- Method: AnonymousSoundMorph>>sound (in category 'accessing') -----
  sound
  "Answer the sound."
 
  ^ sound!

Item was changed:
  ----- Method: AnonymousSoundMorph>>suitableForDroppingIntoEventRoll (in category 'event roll') -----
  suitableForDroppingIntoEventRoll
  "Answer whether the receiver is suitable for dropping into an Event Roll."
 
  ^ true!

Item was changed:
  ----- Method: PianoRollNoteMorph>>mouseMove: (in category 'event handling') -----
  mouseMove: evt
  | delta offsetEvt |
  editMode isNil
  ifTrue:
  ["First movement determines edit mode"
 
  ((delta := evt cursorPoint - hitLoc) dist: 0 @ 0) <= 2
  ifTrue: [^self "No significant movement yet."].
  delta x abs > delta y abs
  ifTrue:
  [delta x > 0
  ifTrue:
  ["Horizontal drag"
 
  editMode := #selectNotes]
  ifFalse:
  [self playSound: nil.
+ offsetEvt := evt copy translateBy: (20 @ 0).
- offsetEvt := evt copy setCursorPoint: evt cursorPoint + (20 @ 0).
  self invokeNoteMenu: offsetEvt]]
  ifFalse: [editMode := #editPitch "Vertical drag"]].
  editMode == #editPitch ifTrue: [self editPitch: evt].
  editMode == #selectNotes ifTrue: [self selectNotes: evt]!

Item was changed:
  ----- Method: RecordingControls class>>unload (in category 'class initialization') -----
  unload
  "Unload the receiver from global registries"
 
  self environment at: #Flaps ifPresent: [:cl |
  cl unregisterQuadsWithReceiver: self] !

Item was changed:
  ----- Method: RecordingControls>>buttonWithSelector: (in category 'private') -----
  buttonWithSelector: aSelector
  "Answer the button in my button pane that bears the given selector."
 
  ^ submorphs first submorphs detect:
  [:m | (m isKindOf: SimpleButtonMorph) and:
  [m actionSelector = aSelector]]!

Item was changed:
  ----- Method: RecordingControls>>playButtonHit (in category 'button commands') -----
  playButtonHit
  "The user hit the play button."
 
  recorder verifyExistenceOfRecordedSound ifFalse: [^ self].  "will have put up informer"
  (self buttonWithSelector: #stopButtonHit) setAppearanceForEnablement: true.
  (self buttonWithSelector: #playButtonHit) setAppearanceForEnablement: true.
  (self buttonWithSelector: #saveButtonHit) setAppearanceForEnablement: true.
 
  self playback!

Item was changed:
  ----- Method: RecordingControls>>playback (in category 'private') -----
  playback
  "The user hit the playback button"
 
  recorder verifyExistenceOfRecordedSound ifFalse: [^ self].
  recorder pause.
  recorder playback.
  !

Item was changed:
  ----- Method: RecordingControls>>recordButtonHit (in category 'button commands') -----
  recordButtonHit
  "The user hit the record button."
 
  (self buttonWithSelector: #stopButtonHit) setAppearanceForEnablement: true.
  self record.!

Item was changed:
  ----- Method: RecordingControls>>startStepping (in category 'stepping') -----
  startStepping
  "Make the level meter active when dropped into the world. Do nothing if already recording. Note that this will cause other recorders to stop recording..."
 
  super startStepping.
  recorder isPaused ifTrue: [
  SoundRecorder allSubInstancesDo: [:r | r stopRecording].  "stop all other sound recorders"
  recorder pause].  "meter is updated while paused"
  !

Item was changed:
  ----- Method: RecordingControls>>stopStepping (in category 'stepping') -----
  stopStepping
  "Turn off recording."
 
  super stopStepping.
  recorder stopRecording.
  !

Item was changed:
  ----- Method: RecordingControls>>updateReferencesUsing: (in category 'copying') -----
  updateReferencesUsing: aDictionary
  "Copy my recorder."
 
  super updateReferencesUsing: aDictionary.
  recorder _ SoundRecorder new.
  !

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev