The Trunk: Morphic-kfr.1418.mcz

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

The Trunk: Morphic-kfr.1418.mcz

commits-2
Karl Ramberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kfr.1418.mcz

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

Name: Morphic-kfr.1418
Author: kfr
Time: 22 April 2018, 11:30:41.518937 am
UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
Ancestors: Morphic-kfr.1416, Morphic-cmm.1417

Some maintenance to ScorePlayerMorph.
Fixing some layout issues.
Add menu options to make a new score and add tracks to the score.

=============== Diff against Morphic-kfr.1416 ===============

Item was changed:
  ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category 'layout') -----
  balanceOffsets
+ (self valueOfProperty: #fullDelta) ifNil: [self setProperty: #fullDelta toValue: (0@0)] .
 
  self layoutFrame hasFixedHeight ifTrue: [
  | otop obot ctop cbot topf |
 
  otop := (owner submorphs detect: [:m |
  m layoutFrame topFraction isZero] ifNone: [^ self]) in: [:tm |
  tm top - (tm layoutFrame topOffset ifNil: [0])].
 
  obot := (owner submorphs detect: [:m |
  m layoutFrame bottomFraction = 1] ifNone: [^ self]) in: [:tm |
  tm bottom - (tm layoutFrame bottomOffset ifNil: [0])].
 
  ctop := (self layoutFrame topFraction * (obot - otop)) rounded
  + otop + (self layoutFrame topOffset ifNil: [0]).
  cbot := (self layoutFrame bottomFraction * (obot - otop)) rounded
  + otop + (self layoutFrame bottomOffset ifNil: [0]).
 
  topf := self layoutFrame topFraction.
  self layoutFrame topFraction:  ((ctop + cbot) * 0.5 - otop) / (obot - otop) asFloat.
  self layoutFrame bottomFraction: self layoutFrame topFraction.
  self layoutFrame topOffset: ctop -
  (self layoutFrame topFraction * (obot - otop) + otop) rounded.
  self layoutFrame bottomOffset: cbot -
  (self layoutFrame bottomFraction * (obot - otop) + otop) rounded..
 
  (leftOrTop copy union: rightOrBottom) do: [:m |
  (m layoutFrame topFraction closeTo: topf) ifTrue: [
  m layoutFrame topFraction: self layoutFrame topFraction.
  m layoutFrame topOffset:
  m layoutFrame topOffset - (self valueOfProperty: #fullDelta) y].
  (m layoutFrame bottomFraction closeTo: topf) ifTrue: [
  m layoutFrame bottomFraction: self layoutFrame topFraction.
  m layoutFrame bottomOffset:
  m layoutFrame bottomOffset - (self valueOfProperty: #fullDelta) y.]]] .
 
  self layoutFrame hasFixedWidth ifTrue: [
  | oleft oright cleft cright leftf |
 
  oleft := (owner submorphs detect: [:m |
  m layoutFrame leftFraction isZero] ifNone: [^ self]) in: [:tm |
  tm left - (tm layoutFrame leftOffset ifNil: [0])].
 
  oright := (owner submorphs detect: [:m |
  m layoutFrame rightFraction = 1] ifNone: [^ self]) in: [:tm |
  tm right - (tm layoutFrame rightOffset ifNil: [0])].
 
  cleft := (self layoutFrame leftFraction * (oright - oleft)) rounded
  + oleft + (self layoutFrame leftOffset ifNil: [0]).
  cright := (self layoutFrame rightFraction * (oright - oleft)) rounded
  + oleft + (self layoutFrame rightOffset ifNil: [0]).
 
  leftf := self layoutFrame leftFraction.
  self layoutFrame leftFraction: ((cleft + cright) * 0.5 - oleft) / (oright - oleft) asFloat.
  self layoutFrame rightFraction: self layoutFrame leftFraction.
 
  self layoutFrame leftOffset: cleft -
  (self layoutFrame leftFraction * (oright - oleft) + oleft) rounded.
  self layoutFrame rightOffset: cright -
  (self layoutFrame rightFraction * (oright - oleft) + oleft) rounded.
 
  (leftOrTop copy union: rightOrBottom) do: [:m |
  (m layoutFrame leftFraction closeTo: leftf) ifTrue: [
  m layoutFrame leftFraction: self layoutFrame leftFraction.
  m layoutFrame leftOffset:
  m layoutFrame leftOffset - (self valueOfProperty: #fullDelta) x].
  (m layoutFrame rightFraction closeTo: leftf) ifTrue: [
  m layoutFrame rightFraction: self layoutFrame leftFraction.
  m layoutFrame rightOffset:
  m layoutFrame rightOffset - (self valueOfProperty: #fullDelta) x.]]] .
 
  self removeProperty: #fullDelta.
  owner layoutChanged
  !

Item was changed:
  ----- Method: ProportionalSplitterMorph>>step (in category 'events') -----
  step
  splitsTopAndBottom
  ifTrue: [ self reduceTopBottomImbalance ]
  ifFalse:
  [ self reduceLeftRightImbalance abs > 1 ifTrue:
  [ self splittersLeftDo:
  [ : splitter | splitter reduceLeftRightImbalance ].
  self splittersRightDo:
+ [ : splitter | splitter reduceLeftRightImbalance ] ] ].
+ self balanceOffsets!
- [ : splitter | splitter reduceLeftRightImbalance ] ] ]!

Item was added:
+ ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu') -----
+ addNewScore
+ "Open a MIDI score and re-init controls..."
+ | score player |
+
+ score := MIDIScore new.
+ score tracks: (Array with: Array new).
+ score trackInfo: #('Instrument').
+ player := ScorePlayer onScore: score.
+ ^self onScorePlayer: player title: 'new'!

Item was added:
+ ----- Method: ScorePlayerMorph>>addTrackToScore (in category 'menu') -----
+ addTrackToScore
+ "add a instrument track to the current score"
+ | score tracks trackInfo player |
+ score := scorePlayer score.
+       tracks := score tracks copyWith:#().
+ score tracks: tracks.
+       trackInfo := score trackInfo copyWith: 'Instrument'.
+ score trackInfo: trackInfo.
+ player := ScorePlayer onScore: score.
+ ^self onScorePlayer: player title: 'new'!

Item was changed:
  ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu') -----
  invokeMenu
  "Invoke a menu of additonal functions for this ScorePlayer."
-
  | aMenu |
  aMenu := MenuMorph new defaultTarget: self.
+ aMenu add: 'add a new score' translated action: #addNewScore.
+ aMenu add: 'add a new track to score' translated action: #addTrackToScore.
  aMenu add: 'open a MIDI file' translated action: #openMIDIFile.
+ aMenu addList: {#-. {'save as AIFF file' translated. #saveAsAIFF}. {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file' translated. #saveAsSunAudio}. #-}.
+ aMenu
+ add: 'reload instruments' translated
+ target: AbstractSound
+ selector: #updateScorePlayers.
- aMenu addList: {
- #-.
- {'save as AIFF file' translated. #saveAsAIFF}.
- {'save as WAV file' translated. #saveAsWAV}.
- {'save as Sun AU file' translated. #saveAsSunAudio}.
- #-}.
- aMenu add: 'reload instruments' translated target: AbstractSound selector: #updateScorePlayers.
  aMenu addLine.
  scorePlayer midiPort
+ ifNil: [aMenu add: 'play via MIDI' translated action: #openMIDIPort]
+ ifNotNil: [aMenu add: 'play via built in synth' translated action: #closeMIDIPort.
- ifNil: [
- aMenu add: 'play via MIDI' translated action: #openMIDIPort]
- ifNotNil: [
- aMenu add: 'play via built in synth' translated action: #closeMIDIPort.
  aMenu add: 'new MIDI controller' translated action: #makeMIDIController:].
  aMenu addLine.
  aMenu add: 'make a pause marker' translated action: #makeAPauseEvent:.
+ aMenu popUpInWorld: self world!
-
- aMenu popUpInWorld: self world.
- !

Item was changed:
  ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category 'initialization') -----
  onScorePlayer: aScorePlayer title: scoreName
  | divider col r |
  scorePlayer := aScorePlayer.
  scorePlayer ifNotNil:
  [scorePlayer  reset.
  instrumentSelector := Array new: scorePlayer score tracks size].
 
  self removeAllMorphs.
  self addMorphBack: self makeControls.
  scorePlayer ifNil: [^ self].
 
  r := self makeRow
+ hResizing: #spaceFill;
- hResizing: #shrinkWrap;
  vResizing: #shrinkWrap.
  r addMorphBack: self rateControl;
  addMorphBack: (Morph newBounds: (0@0 extent: 20@0) color: Color transparent);
  addMorphBack: self volumeControl.
  self addMorphBack: r.
  self addMorphBack: self scrollControl.
 
  col := AlignmentMorph newColumn color: color; layoutInset: 0.
  self addMorphBack: col.
  1 to: scorePlayer trackCount do: [:trackIndex |
  divider := AlignmentMorph new
  extent: 10@1;
  borderWidth: 1;
  layoutInset: 0;
  borderColor: #raised;
  color: color;
  hResizing: #spaceFill;
  vResizing: #rigid.
  col addMorphBack: divider.
  col addMorphBack: (self trackControlsFor: trackIndex)].
 
  LastMIDIPort ifNotNil: [
  "use the most recently set MIDI port"
  scorePlayer openMIDIPort: LastMIDIPort].
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>rateControl (in category 'layout') -----
  rateControl
 
  | rateSlider middleLine r |
  rateSlider := SimpleSliderMorph new
  color: color;
  sliderColor: Color gray;
+ extent: 180@12;
- extent: 180@6;
  target: self;
  actionSelector: #setLogRate:;
  minVal: -1.0;
  maxVal: 1.0;
  adjustToValue: 0.0.
  middleLine := Morph new  "center indicator for pan slider"
  color: (Color r: 0.4 g: 0.4 b: 0.4);
  extent: 1@(rateSlider height - 4);
  position: rateSlider center x@(rateSlider top + 2).
  rateSlider addMorphBack: middleLine.
  r := self makeRow
+ hResizing: #spaceFill;
- hResizing: #shrinkWrap;
  vResizing: #rigid;
  height: 24.
  r addMorphBack: (StringMorph contents: 'slow ' translated).
  r addMorphBack: rateSlider.
  r addMorphBack: (StringMorph contents: ' fast' translated).
  ^ r
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>scrollControl (in category 'layout') -----
  scrollControl
 
  | r |
  scrollSlider := SimpleSliderMorph new
  color: color;
  sliderColor: Color gray;
+ extent: 360@12;
- extent: 360@6;
  target: scorePlayer;
  actionSelector: #positionInScore:;
  adjustToValue: scorePlayer positionInScore.
  r := self makeRow
+ hResizing: #spaceFill;
- hResizing: #shrinkWrap;
  vResizing: #rigid;
  height: 24.
  r addMorphBack: (StringMorph contents: 'start ' translated).
  r addMorphBack: scrollSlider.
  r addMorphBack: (StringMorph contents: ' end' translated).
  ^ r
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category 'layout') -----
  trackNumAndMuteButtonFor: trackIndex
 
  | muteButton instSelector pianoRollColor r |
  muteButton := SimpleSwitchMorph new
  onColor: (Color r: 1.0 g: 0.6 b: 0.6);
  offColor: color;
  color: color;
  label: 'Mute' translated;
  target: scorePlayer;
  actionSelector: #mutedForTrack:put:;
  arguments: (Array with: trackIndex).
  instSelector := PopUpChoiceMorph new
  extent: 95@14;
  contentsClipped: 'oboe1';
  target: self;
  actionSelector: #atTrack:from:selectInstrument:;
  getItemsSelector: #instrumentChoicesForTrack:;
  getItemsArgs: (Array with: trackIndex).
  instSelector arguments:
  (Array with: trackIndex with: instSelector).
  instrumentSelector at: trackIndex put: instSelector.
 
  "select track color using same color list as PianoRollScoreMorph"
  pianoRollColor := (Color wheel: scorePlayer score tracks size) at: trackIndex.
 
  r := self makeRow
  hResizing: #spaceFill;
  vResizing: #spaceFill;
  extent: 70@10.
  r addMorphBack:
  ((StringMorph
  contents: trackIndex printString
  font: (TextStyle default fontOfSize: 24)) color: pianoRollColor).
  trackIndex < 10
  ifTrue: [r addMorphBack: (Morph new color: color; extent: 19@8)]  "spacer"
  ifFalse: [r addMorphBack: (Morph new color: color; extent: 8@8)].  "spacer"
  r addMorphBack:
  (StringMorph new
+ extent: 80@14;
- extent: 140@14;
  contentsClipped: (scorePlayer infoForTrack: trackIndex)).
  r addMorphBack: (Morph new color: color; extent: 8@8).  "spacer"
  r addMorphBack: instSelector.
  r addMorphBack: (AlignmentMorph newRow color: color).  "spacer"
  r addMorphBack: muteButton.
  ^ r
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>volumeControl (in category 'layout') -----
  volumeControl
 
  | volumeSlider r |
  volumeSlider := SimpleSliderMorph new
  color: color;
  sliderColor: Color gray;
+ extent: 80@12;
- extent: 80@6;
  target: scorePlayer;
  actionSelector: #overallVolume:;
  adjustToValue: scorePlayer overallVolume.
  r := self makeRow
+ hResizing: #spaceFill;
- hResizing: #shrinkWrap;
  vResizing: #rigid;
  height: 24.
  r addMorphBack: (StringMorph contents: 'soft  ' translated).
  r addMorphBack: volumeSlider.
  r addMorphBack: (StringMorph contents: ' loud' translated).
  ^ r
  !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

Karl Ramberg
Hm,
Bogus ancestry for this commit :-(
Can it be deleted ?

Best,
Karl

On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]> wrote:
Karl Ramberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kfr.1418.mcz

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

Name: Morphic-kfr.1418
Author: kfr
Time: 22 April 2018, 11:30:41.518937 am
UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
Ancestors: Morphic-kfr.1416, Morphic-cmm.1417

Some maintenance to ScorePlayerMorph.
Fixing some layout issues.
Add menu options to make a new score and add tracks to the score.

=============== Diff against Morphic-kfr.1416 ===============

Item was changed:
  ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category 'layout') -----
  balanceOffsets
+       (self valueOfProperty: #fullDelta) ifNil: [self setProperty: #fullDelta toValue: (0@0)] .

        self layoutFrame hasFixedHeight ifTrue: [
                | otop obot ctop cbot topf |

                otop := (owner submorphs detect: [:m |
                                        m layoutFrame topFraction isZero] ifNone: [^ self]) in: [:tm |
                                                tm top - (tm layoutFrame topOffset ifNil: [0])].

                obot := (owner submorphs detect: [:m |
                                        m layoutFrame bottomFraction = 1] ifNone: [^ self]) in: [:tm |
                                                tm bottom - (tm layoutFrame bottomOffset ifNil: [0])].

                ctop := (self layoutFrame topFraction * (obot - otop)) rounded
                                        + otop + (self layoutFrame topOffset ifNil: [0]).
                cbot := (self layoutFrame bottomFraction * (obot - otop)) rounded
                                        + otop + (self layoutFrame bottomOffset ifNil: [0]).

                topf := self layoutFrame topFraction.
                self layoutFrame topFraction:  ((ctop + cbot) * 0.5 - otop) / (obot - otop) asFloat.
                self layoutFrame bottomFraction: self layoutFrame topFraction.
                self layoutFrame topOffset: ctop -
                        (self layoutFrame topFraction * (obot - otop) + otop) rounded.
                self layoutFrame bottomOffset: cbot -
                        (self layoutFrame bottomFraction * (obot - otop) + otop) rounded..

                (leftOrTop copy union: rightOrBottom) do: [:m |
                        (m layoutFrame topFraction closeTo: topf) ifTrue: [
                                m layoutFrame topFraction: self layoutFrame topFraction.
                                m layoutFrame topOffset:
                                        m layoutFrame topOffset - (self valueOfProperty: #fullDelta) y].
                        (m layoutFrame bottomFraction closeTo: topf) ifTrue: [
                                m layoutFrame bottomFraction: self layoutFrame topFraction.
                                m layoutFrame bottomOffset:
                                        m layoutFrame bottomOffset - (self valueOfProperty: #fullDelta) y.]]] .

        self layoutFrame hasFixedWidth ifTrue: [
                | oleft oright cleft cright leftf |

                oleft := (owner submorphs detect: [:m |
                        m layoutFrame leftFraction isZero] ifNone: [^ self]) in: [:tm |
                                tm left - (tm layoutFrame leftOffset ifNil: [0])].

                oright := (owner submorphs detect: [:m |
                        m layoutFrame rightFraction = 1] ifNone: [^ self]) in: [:tm |
                                tm right - (tm layoutFrame rightOffset ifNil: [0])].

                cleft := (self layoutFrame leftFraction * (oright - oleft)) rounded
                                        + oleft + (self layoutFrame leftOffset ifNil: [0]).
                cright := (self layoutFrame rightFraction * (oright - oleft)) rounded
                                        + oleft + (self layoutFrame rightOffset ifNil: [0]).

                leftf := self layoutFrame leftFraction.
                self layoutFrame leftFraction: ((cleft + cright) * 0.5 - oleft) / (oright - oleft) asFloat.
                self layoutFrame rightFraction: self layoutFrame leftFraction.

                self layoutFrame leftOffset: cleft -
                        (self layoutFrame leftFraction * (oright - oleft) + oleft) rounded.
                self layoutFrame rightOffset: cright -
                        (self layoutFrame rightFraction * (oright - oleft) + oleft) rounded.

                (leftOrTop copy union: rightOrBottom) do: [:m |
                        (m layoutFrame leftFraction closeTo: leftf) ifTrue: [
                                m layoutFrame leftFraction: self layoutFrame leftFraction.
                                m layoutFrame leftOffset:
                                        m layoutFrame leftOffset - (self valueOfProperty: #fullDelta) x].
                        (m layoutFrame rightFraction closeTo: leftf) ifTrue: [
                                m layoutFrame rightFraction: self layoutFrame leftFraction.
                                m layoutFrame rightOffset:
                                        m layoutFrame rightOffset - (self valueOfProperty: #fullDelta) x.]]] .

        self removeProperty: #fullDelta.
        owner layoutChanged
  !

Item was changed:
  ----- Method: ProportionalSplitterMorph>>step (in category 'events') -----
  step
        splitsTopAndBottom
                ifTrue: [ self reduceTopBottomImbalance ]
                ifFalse:
                        [ self reduceLeftRightImbalance abs > 1 ifTrue:
                                [ self splittersLeftDo:
                                        [ : splitter | splitter reduceLeftRightImbalance ].
                                self splittersRightDo:
+                                       [ : splitter | splitter reduceLeftRightImbalance ] ] ].
+       self balanceOffsets!
-                                       [ : splitter | splitter reduceLeftRightImbalance ] ] ]!

Item was added:
+ ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu') -----
+ addNewScore
+       "Open a MIDI score and re-init controls..."
+       | score player |
+
+       score := MIDIScore new.
+       score tracks: (Array with: Array new).
+       score trackInfo: #('Instrument').
+       player := ScorePlayer onScore: score.
+       ^self onScorePlayer: player title: 'new'!

Item was added:
+ ----- Method: ScorePlayerMorph>>addTrackToScore (in category 'menu') -----
+ addTrackToScore
+       "add a instrument track to the current score"
+       | score tracks trackInfo player |
+       score := scorePlayer score.
+       tracks := score tracks copyWith:#().
+       score tracks: tracks.
+       trackInfo := score trackInfo copyWith: 'Instrument'.
+       score trackInfo: trackInfo.
+       player := ScorePlayer onScore: score.
+       ^self onScorePlayer: player title: 'new'!

Item was changed:
  ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu') -----
  invokeMenu
        "Invoke a menu of additonal functions for this ScorePlayer."
-
        | aMenu |
        aMenu := MenuMorph new defaultTarget: self.
+       aMenu add: 'add a new score' translated action: #addNewScore.
+       aMenu add: 'add a new track to score' translated action: #addTrackToScore.
        aMenu add: 'open a MIDI file' translated action: #openMIDIFile.
+       aMenu addList: {#-. {'save as AIFF file' translated. #saveAsAIFF}. {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file' translated. #saveAsSunAudio}. #-}.
+       aMenu
+               add: 'reload instruments' translated
+               target: AbstractSound
+               selector: #updateScorePlayers.
-       aMenu addList: {
-               #-.
-               {'save as AIFF file' translated.        #saveAsAIFF}.
-               {'save as WAV file' translated.         #saveAsWAV}.
-               {'save as Sun AU file' translated.      #saveAsSunAudio}.
-               #-}.
-       aMenu add: 'reload instruments' translated target: AbstractSound selector: #updateScorePlayers.
        aMenu addLine.
        scorePlayer midiPort
+               ifNil: [aMenu add: 'play via MIDI' translated action: #openMIDIPort]
+               ifNotNil: [aMenu add: 'play via built in synth' translated action: #closeMIDIPort.
-               ifNil: [
-                       aMenu add: 'play via MIDI' translated action: #openMIDIPort]
-               ifNotNil: [
-                       aMenu add: 'play via built in synth' translated action: #closeMIDIPort.
                        aMenu add: 'new MIDI controller' translated action: #makeMIDIController:].
        aMenu addLine.
        aMenu add: 'make a pause marker' translated action: #makeAPauseEvent:.
+       aMenu popUpInWorld: self world!
-
-       aMenu popUpInWorld: self world.
- !

Item was changed:
  ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category 'initialization') -----
  onScorePlayer: aScorePlayer title: scoreName
        | divider col r |
        scorePlayer := aScorePlayer.
        scorePlayer ifNotNil:
                [scorePlayer  reset.
                instrumentSelector := Array new: scorePlayer score tracks size].

        self removeAllMorphs.
        self addMorphBack: self makeControls.
        scorePlayer ifNil: [^ self].

        r := self makeRow
+               hResizing: #spaceFill;
-               hResizing: #shrinkWrap;
                vResizing: #shrinkWrap.
        r addMorphBack: self rateControl;
                addMorphBack: (Morph newBounds: (0@0 extent: 20@0) color: Color transparent);
                addMorphBack: self volumeControl.
        self addMorphBack: r.
        self addMorphBack: self scrollControl.

        col := AlignmentMorph newColumn color: color; layoutInset: 0.
        self addMorphBack: col.
        1 to: scorePlayer trackCount do: [:trackIndex |
                divider := AlignmentMorph new
                        extent: 10@1;
                        borderWidth: 1;
                        layoutInset: 0;
                        borderColor: #raised;
                        color: color;
                        hResizing: #spaceFill;
                        vResizing: #rigid.
                col addMorphBack: divider.
                col addMorphBack: (self trackControlsFor: trackIndex)].

        LastMIDIPort ifNotNil: [
                "use the most recently set MIDI port"
                scorePlayer openMIDIPort: LastMIDIPort].
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>rateControl (in category 'layout') -----
  rateControl

        | rateSlider middleLine r |
        rateSlider := SimpleSliderMorph new
                color: color;
                sliderColor: Color gray;
+               extent: 180@12;
-               extent: 180@6;
                target: self;
                actionSelector: #setLogRate:;
                minVal: -1.0;
                maxVal: 1.0;
                adjustToValue: 0.0.
        middleLine := Morph new  "center indicator for pan slider"
                color: (Color r: 0.4 g: 0.4 b: 0.4);
                extent: 1@(rateSlider height - 4);
                position: rateSlider center x@(rateSlider top + 2).
        rateSlider addMorphBack: middleLine.
        r := self makeRow
+               hResizing: #spaceFill;
-               hResizing: #shrinkWrap;
                vResizing: #rigid;
                height: 24.
        r addMorphBack: (StringMorph contents: 'slow ' translated).
        r addMorphBack: rateSlider.
        r addMorphBack: (StringMorph contents: ' fast' translated).
        ^ r
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>scrollControl (in category 'layout') -----
  scrollControl

        | r |
        scrollSlider := SimpleSliderMorph new
                color: color;
                sliderColor: Color gray;
+               extent: 360@12;
-               extent: 360@6;
                target: scorePlayer;
                actionSelector: #positionInScore:;
                adjustToValue: scorePlayer positionInScore.
        r := self makeRow
+               hResizing: #spaceFill;
-               hResizing: #shrinkWrap;
                vResizing: #rigid;
                height: 24.
        r addMorphBack: (StringMorph contents: 'start ' translated).
        r addMorphBack: scrollSlider.
        r addMorphBack: (StringMorph contents: ' end' translated).
        ^ r
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category 'layout') -----
  trackNumAndMuteButtonFor: trackIndex

        | muteButton instSelector pianoRollColor r |
        muteButton := SimpleSwitchMorph new
                onColor: (Color r: 1.0 g: 0.6 b: 0.6);
                offColor: color;
                color: color;
                label: 'Mute' translated;
                target: scorePlayer;
                actionSelector: #mutedForTrack:put:;
                arguments: (Array with: trackIndex).
        instSelector := PopUpChoiceMorph new
                extent: 95@14;
                contentsClipped: 'oboe1';
                target: self;
                actionSelector: #atTrack:from:selectInstrument:;
                getItemsSelector: #instrumentChoicesForTrack:;
                getItemsArgs: (Array with: trackIndex).
        instSelector arguments:
                (Array with: trackIndex with: instSelector).
        instrumentSelector at: trackIndex put: instSelector.

        "select track color using same color list as PianoRollScoreMorph"
        pianoRollColor := (Color wheel: scorePlayer score tracks size) at: trackIndex.

        r := self makeRow
                hResizing: #spaceFill;
                vResizing: #spaceFill;
                extent: 70@10.
        r addMorphBack:
                ((StringMorph
                        contents: trackIndex printString
                        font: (TextStyle default fontOfSize: 24)) color: pianoRollColor).
        trackIndex < 10
                ifTrue: [r addMorphBack: (Morph new color: color; extent: 19@8)]  "spacer"
                ifFalse: [r addMorphBack: (Morph new color: color; extent: 8@8)].  "spacer"
        r addMorphBack:
                (StringMorph new
+                       extent: 80@14;
-                       extent: 140@14;
                        contentsClipped: (scorePlayer infoForTrack: trackIndex)).
        r addMorphBack: (Morph new color: color; extent: 8@8).  "spacer"
        r addMorphBack: instSelector.
        r addMorphBack: (AlignmentMorph newRow color: color).  "spacer"
        r addMorphBack: muteButton.
        ^ r
  !

Item was changed:
  ----- Method: ScorePlayerMorph>>volumeControl (in category 'layout') -----
  volumeControl

        | volumeSlider r |
        volumeSlider := SimpleSliderMorph new
                color: color;
                sliderColor: Color gray;
+               extent: 80@12;
-               extent: 80@6;
                target: scorePlayer;
                actionSelector: #overallVolume:;
                adjustToValue: scorePlayer overallVolume.
        r := self makeRow
+               hResizing: #spaceFill;
-               hResizing: #shrinkWrap;
                vResizing: #rigid;
                height: 24.
        r addMorphBack: (StringMorph contents: 'soft  ' translated).
        r addMorphBack: volumeSlider.
        r addMorphBack: (StringMorph contents: ' loud' translated).
        ^ r
  !





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

David T. Lewis
Hi Karl,

I used the web interface to delete version Morphic-kfr.1418.

You will need to do "MCFileBasedRepository flushAllCaches" in your image,
and probably delete the file in your package-cache directory also.

Usually it is best not to delete versions the way I just did, but in this
case the version history seemed to be causing problems, so I deleted it.

If anyone has problems with a recently updated image, please revert back
to Morphic-cmm.1417 and do a flushAllCaches.

Dave


On Sun, Apr 22, 2018 at 11:50:59AM +0200, karl ramberg wrote:

> Hm,
> Bogus ancestry for this commit :-(
> Can it be deleted ?
>
> Best,
> Karl
>
> On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]> wrote:
>
> > Karl Ramberg uploaded a new version of Morphic to project The Trunk:
> > http://source.squeak.org/trunk/Morphic-kfr.1418.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Morphic-kfr.1418
> > Author: kfr
> > Time: 22 April 2018, 11:30:41.518937 am
> > UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
> > Ancestors: Morphic-kfr.1416, Morphic-cmm.1417
> >
> > Some maintenance to ScorePlayerMorph.
> > Fixing some layout issues.
> > Add menu options to make a new score and add tracks to the score.
> >
> > =============== Diff against Morphic-kfr.1416 ===============
> >
> > Item was changed:
> >   ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category
> > 'layout') -----
> >   balanceOffsets
> > +       (self valueOfProperty: #fullDelta) ifNil: [self setProperty:
> > #fullDelta toValue: (0@0)] .
> >
> >         self layoutFrame hasFixedHeight ifTrue: [
> >                 | otop obot ctop cbot topf |
> >
> >                 otop := (owner submorphs detect: [:m |
> >                                         m layoutFrame topFraction isZero]
> > ifNone: [^ self]) in: [:tm |
> >                                                 tm top - (tm layoutFrame
> > topOffset ifNil: [0])].
> >
> >                 obot := (owner submorphs detect: [:m |
> >                                         m layoutFrame bottomFraction = 1]
> > ifNone: [^ self]) in: [:tm |
> >                                                 tm bottom - (tm
> > layoutFrame bottomOffset ifNil: [0])].
> >
> >                 ctop := (self layoutFrame topFraction * (obot - otop))
> > rounded
> >                                         + otop + (self layoutFrame
> > topOffset ifNil: [0]).
> >                 cbot := (self layoutFrame bottomFraction * (obot - otop))
> > rounded
> >                                         + otop + (self layoutFrame
> > bottomOffset ifNil: [0]).
> >
> >                 topf := self layoutFrame topFraction.
> >                 self layoutFrame topFraction:  ((ctop + cbot) * 0.5 -
> > otop) / (obot - otop) asFloat.
> >                 self layoutFrame bottomFraction: self layoutFrame
> > topFraction.
> >                 self layoutFrame topOffset: ctop -
> >                         (self layoutFrame topFraction * (obot - otop) +
> > otop) rounded.
> >                 self layoutFrame bottomOffset: cbot -
> >                         (self layoutFrame bottomFraction * (obot - otop) +
> > otop) rounded..
> >
> >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> >                         (m layoutFrame topFraction closeTo: topf) ifTrue: [
> >                                 m layoutFrame topFraction: self
> > layoutFrame topFraction.
> >                                 m layoutFrame topOffset:
> >                                         m layoutFrame topOffset - (self
> > valueOfProperty: #fullDelta) y].
> >                         (m layoutFrame bottomFraction closeTo: topf)
> > ifTrue: [
> >                                 m layoutFrame bottomFraction: self
> > layoutFrame topFraction.
> >                                 m layoutFrame bottomOffset:
> >                                         m layoutFrame bottomOffset - (self
> > valueOfProperty: #fullDelta) y.]]] .
> >
> >         self layoutFrame hasFixedWidth ifTrue: [
> >                 | oleft oright cleft cright leftf |
> >
> >                 oleft := (owner submorphs detect: [:m |
> >                         m layoutFrame leftFraction isZero] ifNone: [^
> > self]) in: [:tm |
> >                                 tm left - (tm layoutFrame leftOffset
> > ifNil: [0])].
> >
> >                 oright := (owner submorphs detect: [:m |
> >                         m layoutFrame rightFraction = 1] ifNone: [^ self])
> > in: [:tm |
> >                                 tm right - (tm layoutFrame rightOffset
> > ifNil: [0])].
> >
> >                 cleft := (self layoutFrame leftFraction * (oright -
> > oleft)) rounded
> >                                         + oleft + (self layoutFrame
> > leftOffset ifNil: [0]).
> >                 cright := (self layoutFrame rightFraction * (oright -
> > oleft)) rounded
> >                                         + oleft + (self layoutFrame
> > rightOffset ifNil: [0]).
> >
> >                 leftf := self layoutFrame leftFraction.
> >                 self layoutFrame leftFraction: ((cleft + cright) * 0.5 -
> > oleft) / (oright - oleft) asFloat.
> >                 self layoutFrame rightFraction: self layoutFrame
> > leftFraction.
> >
> >                 self layoutFrame leftOffset: cleft -
> >                         (self layoutFrame leftFraction * (oright - oleft)
> > + oleft) rounded.
> >                 self layoutFrame rightOffset: cright -
> >                         (self layoutFrame rightFraction * (oright - oleft)
> > + oleft) rounded.
> >
> >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> >                         (m layoutFrame leftFraction closeTo: leftf)
> > ifTrue: [
> >                                 m layoutFrame leftFraction: self
> > layoutFrame leftFraction.
> >                                 m layoutFrame leftOffset:
> >                                         m layoutFrame leftOffset - (self
> > valueOfProperty: #fullDelta) x].
> >                         (m layoutFrame rightFraction closeTo: leftf)
> > ifTrue: [
> >                                 m layoutFrame rightFraction: self
> > layoutFrame leftFraction.
> >                                 m layoutFrame rightOffset:
> >                                         m layoutFrame rightOffset - (self
> > valueOfProperty: #fullDelta) x.]]] .
> >
> >         self removeProperty: #fullDelta.
> >         owner layoutChanged
> >   !
> >
> > Item was changed:
> >   ----- Method: ProportionalSplitterMorph>>step (in category 'events')
> > -----
> >   step
> >         splitsTopAndBottom
> >                 ifTrue: [ self reduceTopBottomImbalance ]
> >                 ifFalse:
> >                         [ self reduceLeftRightImbalance abs > 1 ifTrue:
> >                                 [ self splittersLeftDo:
> >                                         [ : splitter | splitter
> > reduceLeftRightImbalance ].
> >                                 self splittersRightDo:
> > +                                       [ : splitter | splitter
> > reduceLeftRightImbalance ] ] ].
> > +       self balanceOffsets!
> > -                                       [ : splitter | splitter
> > reduceLeftRightImbalance ] ] ]!
> >
> > Item was added:
> > + ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu') -----
> > + addNewScore
> > +       "Open a MIDI score and re-init controls..."
> > +       | score player |
> > +
> > +       score := MIDIScore new.
> > +       score tracks: (Array with: Array new).
> > +       score trackInfo: #('Instrument').
> > +       player := ScorePlayer onScore: score.
> > +       ^self onScorePlayer: player title: 'new'!
> >
> > Item was added:
> > + ----- Method: ScorePlayerMorph>>addTrackToScore (in category 'menu')
> > -----
> > + addTrackToScore
> > +       "add a instrument track to the current score"
> > +       | score tracks trackInfo player |
> > +       score := scorePlayer score.
> > +       tracks := score tracks copyWith:#().
> > +       score tracks: tracks.
> > +       trackInfo := score trackInfo copyWith: 'Instrument'.
> > +       score trackInfo: trackInfo.
> > +       player := ScorePlayer onScore: score.
> > +       ^self onScorePlayer: player title: 'new'!
> >
> > Item was changed:
> >   ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu') -----
> >   invokeMenu
> >         "Invoke a menu of additonal functions for this ScorePlayer."
> > -
> >         | aMenu |
> >         aMenu := MenuMorph new defaultTarget: self.
> > +       aMenu add: 'add a new score' translated action: #addNewScore.
> > +       aMenu add: 'add a new track to score' translated action:
> > #addTrackToScore.
> >         aMenu add: 'open a MIDI file' translated action: #openMIDIFile.
> > +       aMenu addList: {#-. {'save as AIFF file' translated. #saveAsAIFF}.
> > {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file'
> > translated. #saveAsSunAudio}. #-}.
> > +       aMenu
> > +               add: 'reload instruments' translated
> > +               target: AbstractSound
> > +               selector: #updateScorePlayers.
> > -       aMenu addList: {
> > -               #-.
> > -               {'save as AIFF file' translated.        #saveAsAIFF}.
> > -               {'save as WAV file' translated.         #saveAsWAV}.
> > -               {'save as Sun AU file' translated.      #saveAsSunAudio}.
> > -               #-}.
> > -       aMenu add: 'reload instruments' translated target: AbstractSound
> > selector: #updateScorePlayers.
> >         aMenu addLine.
> >         scorePlayer midiPort
> > +               ifNil: [aMenu add: 'play via MIDI' translated action:
> > #openMIDIPort]
> > +               ifNotNil: [aMenu add: 'play via built in synth' translated
> > action: #closeMIDIPort.
> > -               ifNil: [
> > -                       aMenu add: 'play via MIDI' translated action:
> > #openMIDIPort]
> > -               ifNotNil: [
> > -                       aMenu add: 'play via built in synth' translated
> > action: #closeMIDIPort.
> >                         aMenu add: 'new MIDI controller' translated
> > action: #makeMIDIController:].
> >         aMenu addLine.
> >         aMenu add: 'make a pause marker' translated action:
> > #makeAPauseEvent:.
> > +       aMenu popUpInWorld: self world!
> > -
> > -       aMenu popUpInWorld: self world.
> > - !
> >
> > Item was changed:
> >   ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category
> > 'initialization') -----
> >   onScorePlayer: aScorePlayer title: scoreName
> >         | divider col r |
> >         scorePlayer := aScorePlayer.
> >         scorePlayer ifNotNil:
> >                 [scorePlayer  reset.
> >                 instrumentSelector := Array new: scorePlayer score tracks
> > size].
> >
> >         self removeAllMorphs.
> >         self addMorphBack: self makeControls.
> >         scorePlayer ifNil: [^ self].
> >
> >         r := self makeRow
> > +               hResizing: #spaceFill;
> > -               hResizing: #shrinkWrap;
> >                 vResizing: #shrinkWrap.
> >         r addMorphBack: self rateControl;
> >                 addMorphBack: (Morph newBounds: (0@0 extent: 20@0) color:
> > Color transparent);
> >                 addMorphBack: self volumeControl.
> >         self addMorphBack: r.
> >         self addMorphBack: self scrollControl.
> >
> >         col := AlignmentMorph newColumn color: color; layoutInset: 0.
> >         self addMorphBack: col.
> >         1 to: scorePlayer trackCount do: [:trackIndex |
> >                 divider := AlignmentMorph new
> >                         extent: 10@1;
> >                         borderWidth: 1;
> >                         layoutInset: 0;
> >                         borderColor: #raised;
> >                         color: color;
> >                         hResizing: #spaceFill;
> >                         vResizing: #rigid.
> >                 col addMorphBack: divider.
> >                 col addMorphBack: (self trackControlsFor: trackIndex)].
> >
> >         LastMIDIPort ifNotNil: [
> >                 "use the most recently set MIDI port"
> >                 scorePlayer openMIDIPort: LastMIDIPort].
> >   !
> >
> > Item was changed:
> >   ----- Method: ScorePlayerMorph>>rateControl (in category 'layout') -----
> >   rateControl
> >
> >         | rateSlider middleLine r |
> >         rateSlider := SimpleSliderMorph new
> >                 color: color;
> >                 sliderColor: Color gray;
> > +               extent: 180@12;
> > -               extent: 180@6;
> >                 target: self;
> >                 actionSelector: #setLogRate:;
> >                 minVal: -1.0;
> >                 maxVal: 1.0;
> >                 adjustToValue: 0.0.
> >         middleLine := Morph new  "center indicator for pan slider"
> >                 color: (Color r: 0.4 g: 0.4 b: 0.4);
> >                 extent: 1@(rateSlider height - 4);
> >                 position: rateSlider center x@(rateSlider top + 2).
> >         rateSlider addMorphBack: middleLine.
> >         r := self makeRow
> > +               hResizing: #spaceFill;
> > -               hResizing: #shrinkWrap;
> >                 vResizing: #rigid;
> >                 height: 24.
> >         r addMorphBack: (StringMorph contents: 'slow ' translated).
> >         r addMorphBack: rateSlider.
> >         r addMorphBack: (StringMorph contents: ' fast' translated).
> >         ^ r
> >   !
> >
> > Item was changed:
> >   ----- Method: ScorePlayerMorph>>scrollControl (in category 'layout')
> > -----
> >   scrollControl
> >
> >         | r |
> >         scrollSlider := SimpleSliderMorph new
> >                 color: color;
> >                 sliderColor: Color gray;
> > +               extent: 360@12;
> > -               extent: 360@6;
> >                 target: scorePlayer;
> >                 actionSelector: #positionInScore:;
> >                 adjustToValue: scorePlayer positionInScore.
> >         r := self makeRow
> > +               hResizing: #spaceFill;
> > -               hResizing: #shrinkWrap;
> >                 vResizing: #rigid;
> >                 height: 24.
> >         r addMorphBack: (StringMorph contents: 'start ' translated).
> >         r addMorphBack: scrollSlider.
> >         r addMorphBack: (StringMorph contents: ' end' translated).
> >         ^ r
> >   !
> >
> > Item was changed:
> >   ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category
> > 'layout') -----
> >   trackNumAndMuteButtonFor: trackIndex
> >
> >         | muteButton instSelector pianoRollColor r |
> >         muteButton := SimpleSwitchMorph new
> >                 onColor: (Color r: 1.0 g: 0.6 b: 0.6);
> >                 offColor: color;
> >                 color: color;
> >                 label: 'Mute' translated;
> >                 target: scorePlayer;
> >                 actionSelector: #mutedForTrack:put:;
> >                 arguments: (Array with: trackIndex).
> >         instSelector := PopUpChoiceMorph new
> >                 extent: 95@14;
> >                 contentsClipped: 'oboe1';
> >                 target: self;
> >                 actionSelector: #atTrack:from:selectInstrument:;
> >                 getItemsSelector: #instrumentChoicesForTrack:;
> >                 getItemsArgs: (Array with: trackIndex).
> >         instSelector arguments:
> >                 (Array with: trackIndex with: instSelector).
> >         instrumentSelector at: trackIndex put: instSelector.
> >
> >         "select track color using same color list as PianoRollScoreMorph"
> >         pianoRollColor := (Color wheel: scorePlayer score tracks size) at:
> > trackIndex.
> >
> >         r := self makeRow
> >                 hResizing: #spaceFill;
> >                 vResizing: #spaceFill;
> >                 extent: 70@10.
> >         r addMorphBack:
> >                 ((StringMorph
> >                         contents: trackIndex printString
> >                         font: (TextStyle default fontOfSize: 24)) color:
> > pianoRollColor).
> >         trackIndex < 10
> >                 ifTrue: [r addMorphBack: (Morph new color: color; extent:
> > 19@8)]  "spacer"
> >                 ifFalse: [r addMorphBack: (Morph new color: color; extent:
> > 8@8)].  "spacer"
> >         r addMorphBack:
> >                 (StringMorph new
> > +                       extent: 80@14;
> > -                       extent: 140@14;
> >                         contentsClipped: (scorePlayer infoForTrack:
> > trackIndex)).
> >         r addMorphBack: (Morph new color: color; extent: 8@8).  "spacer"
> >         r addMorphBack: instSelector.
> >         r addMorphBack: (AlignmentMorph newRow color: color).  "spacer"
> >         r addMorphBack: muteButton.
> >         ^ r
> >   !
> >
> > Item was changed:
> >   ----- Method: ScorePlayerMorph>>volumeControl (in category 'layout')
> > -----
> >   volumeControl
> >
> >         | volumeSlider r |
> >         volumeSlider := SimpleSliderMorph new
> >                 color: color;
> >                 sliderColor: Color gray;
> > +               extent: 80@12;
> > -               extent: 80@6;
> >                 target: scorePlayer;
> >                 actionSelector: #overallVolume:;
> >                 adjustToValue: scorePlayer overallVolume.
> >         r := self makeRow
> > +               hResizing: #spaceFill;
> > -               hResizing: #shrinkWrap;
> >                 vResizing: #rigid;
> >                 height: 24.
> >         r addMorphBack: (StringMorph contents: 'soft  ' translated).
> >         r addMorphBack: volumeSlider.
> >         r addMorphBack: (StringMorph contents: ' loud' translated).
> >         ^ r
> >   !
> >
> >
> >

>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

David T. Lewis
I re-saved Karl's update in Morphic-dtl.1418, which is the same as Morphic-kfr.1418
except for the fixed ancestry. I kept a copy of Karl's original MCZ file in case
of any problems.

Dave

On Sun, Apr 22, 2018 at 10:10:04AM -0400, David T. Lewis wrote:

> Hi Karl,
>
> I used the web interface to delete version Morphic-kfr.1418.
>
> You will need to do "MCFileBasedRepository flushAllCaches" in your image,
> and probably delete the file in your package-cache directory also.
>
> Usually it is best not to delete versions the way I just did, but in this
> case the version history seemed to be causing problems, so I deleted it.
>
> If anyone has problems with a recently updated image, please revert back
> to Morphic-cmm.1417 and do a flushAllCaches.
>
> Dave
>
>
> On Sun, Apr 22, 2018 at 11:50:59AM +0200, karl ramberg wrote:
> > Hm,
> > Bogus ancestry for this commit :-(
> > Can it be deleted ?
> >
> > Best,
> > Karl
> >
> > On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]> wrote:
> >
> > > Karl Ramberg uploaded a new version of Morphic to project The Trunk:
> > > http://source.squeak.org/trunk/Morphic-kfr.1418.mcz
> > >
> > > ==================== Summary ====================
> > >
> > > Name: Morphic-kfr.1418
> > > Author: kfr
> > > Time: 22 April 2018, 11:30:41.518937 am
> > > UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
> > > Ancestors: Morphic-kfr.1416, Morphic-cmm.1417
> > >
> > > Some maintenance to ScorePlayerMorph.
> > > Fixing some layout issues.
> > > Add menu options to make a new score and add tracks to the score.
> > >
> > > =============== Diff against Morphic-kfr.1416 ===============
> > >
> > > Item was changed:
> > >   ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category
> > > 'layout') -----
> > >   balanceOffsets
> > > +       (self valueOfProperty: #fullDelta) ifNil: [self setProperty:
> > > #fullDelta toValue: (0@0)] .
> > >
> > >         self layoutFrame hasFixedHeight ifTrue: [
> > >                 | otop obot ctop cbot topf |
> > >
> > >                 otop := (owner submorphs detect: [:m |
> > >                                         m layoutFrame topFraction isZero]
> > > ifNone: [^ self]) in: [:tm |
> > >                                                 tm top - (tm layoutFrame
> > > topOffset ifNil: [0])].
> > >
> > >                 obot := (owner submorphs detect: [:m |
> > >                                         m layoutFrame bottomFraction = 1]
> > > ifNone: [^ self]) in: [:tm |
> > >                                                 tm bottom - (tm
> > > layoutFrame bottomOffset ifNil: [0])].
> > >
> > >                 ctop := (self layoutFrame topFraction * (obot - otop))
> > > rounded
> > >                                         + otop + (self layoutFrame
> > > topOffset ifNil: [0]).
> > >                 cbot := (self layoutFrame bottomFraction * (obot - otop))
> > > rounded
> > >                                         + otop + (self layoutFrame
> > > bottomOffset ifNil: [0]).
> > >
> > >                 topf := self layoutFrame topFraction.
> > >                 self layoutFrame topFraction:  ((ctop + cbot) * 0.5 -
> > > otop) / (obot - otop) asFloat.
> > >                 self layoutFrame bottomFraction: self layoutFrame
> > > topFraction.
> > >                 self layoutFrame topOffset: ctop -
> > >                         (self layoutFrame topFraction * (obot - otop) +
> > > otop) rounded.
> > >                 self layoutFrame bottomOffset: cbot -
> > >                         (self layoutFrame bottomFraction * (obot - otop) +
> > > otop) rounded..
> > >
> > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > >                         (m layoutFrame topFraction closeTo: topf) ifTrue: [
> > >                                 m layoutFrame topFraction: self
> > > layoutFrame topFraction.
> > >                                 m layoutFrame topOffset:
> > >                                         m layoutFrame topOffset - (self
> > > valueOfProperty: #fullDelta) y].
> > >                         (m layoutFrame bottomFraction closeTo: topf)
> > > ifTrue: [
> > >                                 m layoutFrame bottomFraction: self
> > > layoutFrame topFraction.
> > >                                 m layoutFrame bottomOffset:
> > >                                         m layoutFrame bottomOffset - (self
> > > valueOfProperty: #fullDelta) y.]]] .
> > >
> > >         self layoutFrame hasFixedWidth ifTrue: [
> > >                 | oleft oright cleft cright leftf |
> > >
> > >                 oleft := (owner submorphs detect: [:m |
> > >                         m layoutFrame leftFraction isZero] ifNone: [^
> > > self]) in: [:tm |
> > >                                 tm left - (tm layoutFrame leftOffset
> > > ifNil: [0])].
> > >
> > >                 oright := (owner submorphs detect: [:m |
> > >                         m layoutFrame rightFraction = 1] ifNone: [^ self])
> > > in: [:tm |
> > >                                 tm right - (tm layoutFrame rightOffset
> > > ifNil: [0])].
> > >
> > >                 cleft := (self layoutFrame leftFraction * (oright -
> > > oleft)) rounded
> > >                                         + oleft + (self layoutFrame
> > > leftOffset ifNil: [0]).
> > >                 cright := (self layoutFrame rightFraction * (oright -
> > > oleft)) rounded
> > >                                         + oleft + (self layoutFrame
> > > rightOffset ifNil: [0]).
> > >
> > >                 leftf := self layoutFrame leftFraction.
> > >                 self layoutFrame leftFraction: ((cleft + cright) * 0.5 -
> > > oleft) / (oright - oleft) asFloat.
> > >                 self layoutFrame rightFraction: self layoutFrame
> > > leftFraction.
> > >
> > >                 self layoutFrame leftOffset: cleft -
> > >                         (self layoutFrame leftFraction * (oright - oleft)
> > > + oleft) rounded.
> > >                 self layoutFrame rightOffset: cright -
> > >                         (self layoutFrame rightFraction * (oright - oleft)
> > > + oleft) rounded.
> > >
> > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > >                         (m layoutFrame leftFraction closeTo: leftf)
> > > ifTrue: [
> > >                                 m layoutFrame leftFraction: self
> > > layoutFrame leftFraction.
> > >                                 m layoutFrame leftOffset:
> > >                                         m layoutFrame leftOffset - (self
> > > valueOfProperty: #fullDelta) x].
> > >                         (m layoutFrame rightFraction closeTo: leftf)
> > > ifTrue: [
> > >                                 m layoutFrame rightFraction: self
> > > layoutFrame leftFraction.
> > >                                 m layoutFrame rightOffset:
> > >                                         m layoutFrame rightOffset - (self
> > > valueOfProperty: #fullDelta) x.]]] .
> > >
> > >         self removeProperty: #fullDelta.
> > >         owner layoutChanged
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ProportionalSplitterMorph>>step (in category 'events')
> > > -----
> > >   step
> > >         splitsTopAndBottom
> > >                 ifTrue: [ self reduceTopBottomImbalance ]
> > >                 ifFalse:
> > >                         [ self reduceLeftRightImbalance abs > 1 ifTrue:
> > >                                 [ self splittersLeftDo:
> > >                                         [ : splitter | splitter
> > > reduceLeftRightImbalance ].
> > >                                 self splittersRightDo:
> > > +                                       [ : splitter | splitter
> > > reduceLeftRightImbalance ] ] ].
> > > +       self balanceOffsets!
> > > -                                       [ : splitter | splitter
> > > reduceLeftRightImbalance ] ] ]!
> > >
> > > Item was added:
> > > + ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu') -----
> > > + addNewScore
> > > +       "Open a MIDI score and re-init controls..."
> > > +       | score player |
> > > +
> > > +       score := MIDIScore new.
> > > +       score tracks: (Array with: Array new).
> > > +       score trackInfo: #('Instrument').
> > > +       player := ScorePlayer onScore: score.
> > > +       ^self onScorePlayer: player title: 'new'!
> > >
> > > Item was added:
> > > + ----- Method: ScorePlayerMorph>>addTrackToScore (in category 'menu')
> > > -----
> > > + addTrackToScore
> > > +       "add a instrument track to the current score"
> > > +       | score tracks trackInfo player |
> > > +       score := scorePlayer score.
> > > +       tracks := score tracks copyWith:#().
> > > +       score tracks: tracks.
> > > +       trackInfo := score trackInfo copyWith: 'Instrument'.
> > > +       score trackInfo: trackInfo.
> > > +       player := ScorePlayer onScore: score.
> > > +       ^self onScorePlayer: player title: 'new'!
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu') -----
> > >   invokeMenu
> > >         "Invoke a menu of additonal functions for this ScorePlayer."
> > > -
> > >         | aMenu |
> > >         aMenu := MenuMorph new defaultTarget: self.
> > > +       aMenu add: 'add a new score' translated action: #addNewScore.
> > > +       aMenu add: 'add a new track to score' translated action:
> > > #addTrackToScore.
> > >         aMenu add: 'open a MIDI file' translated action: #openMIDIFile.
> > > +       aMenu addList: {#-. {'save as AIFF file' translated. #saveAsAIFF}.
> > > {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file'
> > > translated. #saveAsSunAudio}. #-}.
> > > +       aMenu
> > > +               add: 'reload instruments' translated
> > > +               target: AbstractSound
> > > +               selector: #updateScorePlayers.
> > > -       aMenu addList: {
> > > -               #-.
> > > -               {'save as AIFF file' translated.        #saveAsAIFF}.
> > > -               {'save as WAV file' translated.         #saveAsWAV}.
> > > -               {'save as Sun AU file' translated.      #saveAsSunAudio}.
> > > -               #-}.
> > > -       aMenu add: 'reload instruments' translated target: AbstractSound
> > > selector: #updateScorePlayers.
> > >         aMenu addLine.
> > >         scorePlayer midiPort
> > > +               ifNil: [aMenu add: 'play via MIDI' translated action:
> > > #openMIDIPort]
> > > +               ifNotNil: [aMenu add: 'play via built in synth' translated
> > > action: #closeMIDIPort.
> > > -               ifNil: [
> > > -                       aMenu add: 'play via MIDI' translated action:
> > > #openMIDIPort]
> > > -               ifNotNil: [
> > > -                       aMenu add: 'play via built in synth' translated
> > > action: #closeMIDIPort.
> > >                         aMenu add: 'new MIDI controller' translated
> > > action: #makeMIDIController:].
> > >         aMenu addLine.
> > >         aMenu add: 'make a pause marker' translated action:
> > > #makeAPauseEvent:.
> > > +       aMenu popUpInWorld: self world!
> > > -
> > > -       aMenu popUpInWorld: self world.
> > > - !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category
> > > 'initialization') -----
> > >   onScorePlayer: aScorePlayer title: scoreName
> > >         | divider col r |
> > >         scorePlayer := aScorePlayer.
> > >         scorePlayer ifNotNil:
> > >                 [scorePlayer  reset.
> > >                 instrumentSelector := Array new: scorePlayer score tracks
> > > size].
> > >
> > >         self removeAllMorphs.
> > >         self addMorphBack: self makeControls.
> > >         scorePlayer ifNil: [^ self].
> > >
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #shrinkWrap.
> > >         r addMorphBack: self rateControl;
> > >                 addMorphBack: (Morph newBounds: (0@0 extent: 20@0) color:
> > > Color transparent);
> > >                 addMorphBack: self volumeControl.
> > >         self addMorphBack: r.
> > >         self addMorphBack: self scrollControl.
> > >
> > >         col := AlignmentMorph newColumn color: color; layoutInset: 0.
> > >         self addMorphBack: col.
> > >         1 to: scorePlayer trackCount do: [:trackIndex |
> > >                 divider := AlignmentMorph new
> > >                         extent: 10@1;
> > >                         borderWidth: 1;
> > >                         layoutInset: 0;
> > >                         borderColor: #raised;
> > >                         color: color;
> > >                         hResizing: #spaceFill;
> > >                         vResizing: #rigid.
> > >                 col addMorphBack: divider.
> > >                 col addMorphBack: (self trackControlsFor: trackIndex)].
> > >
> > >         LastMIDIPort ifNotNil: [
> > >                 "use the most recently set MIDI port"
> > >                 scorePlayer openMIDIPort: LastMIDIPort].
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>rateControl (in category 'layout') -----
> > >   rateControl
> > >
> > >         | rateSlider middleLine r |
> > >         rateSlider := SimpleSliderMorph new
> > >                 color: color;
> > >                 sliderColor: Color gray;
> > > +               extent: 180@12;
> > > -               extent: 180@6;
> > >                 target: self;
> > >                 actionSelector: #setLogRate:;
> > >                 minVal: -1.0;
> > >                 maxVal: 1.0;
> > >                 adjustToValue: 0.0.
> > >         middleLine := Morph new  "center indicator for pan slider"
> > >                 color: (Color r: 0.4 g: 0.4 b: 0.4);
> > >                 extent: 1@(rateSlider height - 4);
> > >                 position: rateSlider center x@(rateSlider top + 2).
> > >         rateSlider addMorphBack: middleLine.
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #rigid;
> > >                 height: 24.
> > >         r addMorphBack: (StringMorph contents: 'slow ' translated).
> > >         r addMorphBack: rateSlider.
> > >         r addMorphBack: (StringMorph contents: ' fast' translated).
> > >         ^ r
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>scrollControl (in category 'layout')
> > > -----
> > >   scrollControl
> > >
> > >         | r |
> > >         scrollSlider := SimpleSliderMorph new
> > >                 color: color;
> > >                 sliderColor: Color gray;
> > > +               extent: 360@12;
> > > -               extent: 360@6;
> > >                 target: scorePlayer;
> > >                 actionSelector: #positionInScore:;
> > >                 adjustToValue: scorePlayer positionInScore.
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #rigid;
> > >                 height: 24.
> > >         r addMorphBack: (StringMorph contents: 'start ' translated).
> > >         r addMorphBack: scrollSlider.
> > >         r addMorphBack: (StringMorph contents: ' end' translated).
> > >         ^ r
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category
> > > 'layout') -----
> > >   trackNumAndMuteButtonFor: trackIndex
> > >
> > >         | muteButton instSelector pianoRollColor r |
> > >         muteButton := SimpleSwitchMorph new
> > >                 onColor: (Color r: 1.0 g: 0.6 b: 0.6);
> > >                 offColor: color;
> > >                 color: color;
> > >                 label: 'Mute' translated;
> > >                 target: scorePlayer;
> > >                 actionSelector: #mutedForTrack:put:;
> > >                 arguments: (Array with: trackIndex).
> > >         instSelector := PopUpChoiceMorph new
> > >                 extent: 95@14;
> > >                 contentsClipped: 'oboe1';
> > >                 target: self;
> > >                 actionSelector: #atTrack:from:selectInstrument:;
> > >                 getItemsSelector: #instrumentChoicesForTrack:;
> > >                 getItemsArgs: (Array with: trackIndex).
> > >         instSelector arguments:
> > >                 (Array with: trackIndex with: instSelector).
> > >         instrumentSelector at: trackIndex put: instSelector.
> > >
> > >         "select track color using same color list as PianoRollScoreMorph"
> > >         pianoRollColor := (Color wheel: scorePlayer score tracks size) at:
> > > trackIndex.
> > >
> > >         r := self makeRow
> > >                 hResizing: #spaceFill;
> > >                 vResizing: #spaceFill;
> > >                 extent: 70@10.
> > >         r addMorphBack:
> > >                 ((StringMorph
> > >                         contents: trackIndex printString
> > >                         font: (TextStyle default fontOfSize: 24)) color:
> > > pianoRollColor).
> > >         trackIndex < 10
> > >                 ifTrue: [r addMorphBack: (Morph new color: color; extent:
> > > 19@8)]  "spacer"
> > >                 ifFalse: [r addMorphBack: (Morph new color: color; extent:
> > > 8@8)].  "spacer"
> > >         r addMorphBack:
> > >                 (StringMorph new
> > > +                       extent: 80@14;
> > > -                       extent: 140@14;
> > >                         contentsClipped: (scorePlayer infoForTrack:
> > > trackIndex)).
> > >         r addMorphBack: (Morph new color: color; extent: 8@8).  "spacer"
> > >         r addMorphBack: instSelector.
> > >         r addMorphBack: (AlignmentMorph newRow color: color).  "spacer"
> > >         r addMorphBack: muteButton.
> > >         ^ r
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>volumeControl (in category 'layout')
> > > -----
> > >   volumeControl
> > >
> > >         | volumeSlider r |
> > >         volumeSlider := SimpleSliderMorph new
> > >                 color: color;
> > >                 sliderColor: Color gray;
> > > +               extent: 80@12;
> > > -               extent: 80@6;
> > >                 target: scorePlayer;
> > >                 actionSelector: #overallVolume:;
> > >                 adjustToValue: scorePlayer overallVolume.
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #rigid;
> > >                 height: 24.
> > >         r addMorphBack: (StringMorph contents: 'soft  ' translated).
> > >         r addMorphBack: volumeSlider.
> > >         r addMorphBack: (StringMorph contents: ' loud' translated).
> > >         ^ r
> > >   !
> > >
> > >
> > >
>
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

Karl Ramberg
Thanks, David.
I'm not sure how the image got in a bad state :-(
I'll start over with a new one.

Cheers,
Karl


On Sun, Apr 22, 2018 at 6:41 PM, David T. Lewis <[hidden email]> wrote:
I re-saved Karl's update in Morphic-dtl.1418, which is the same as Morphic-kfr.1418
except for the fixed ancestry. I kept a copy of Karl's original MCZ file in case
of any problems.

Dave

On Sun, Apr 22, 2018 at 10:10:04AM -0400, David T. Lewis wrote:
> Hi Karl,
>
> I used the web interface to delete version Morphic-kfr.1418.
>
> You will need to do "MCFileBasedRepository flushAllCaches" in your image,
> and probably delete the file in your package-cache directory also.
>
> Usually it is best not to delete versions the way I just did, but in this
> case the version history seemed to be causing problems, so I deleted it.
>
> If anyone has problems with a recently updated image, please revert back
> to Morphic-cmm.1417 and do a flushAllCaches.
>
> Dave
>
>
> On Sun, Apr 22, 2018 at 11:50:59AM +0200, karl ramberg wrote:
> > Hm,
> > Bogus ancestry for this commit :-(
> > Can it be deleted ?
> >
> > Best,
> > Karl
> >
> > On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]> wrote:
> >
> > > Karl Ramberg uploaded a new version of Morphic to project The Trunk:
> > > http://source.squeak.org/trunk/Morphic-kfr.1418.mcz
> > >
> > > ==================== Summary ====================
> > >
> > > Name: Morphic-kfr.1418
> > > Author: kfr
> > > Time: 22 April 2018, 11:30:41.518937 am
> > > UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
> > > Ancestors: Morphic-kfr.1416, Morphic-cmm.1417
> > >
> > > Some maintenance to ScorePlayerMorph.
> > > Fixing some layout issues.
> > > Add menu options to make a new score and add tracks to the score.
> > >
> > > =============== Diff against Morphic-kfr.1416 ===============
> > >
> > > Item was changed:
> > >   ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category
> > > 'layout') -----
> > >   balanceOffsets
> > > +       (self valueOfProperty: #fullDelta) ifNil: [self setProperty:
> > > #fullDelta toValue: (0@0)] .
> > >
> > >         self layoutFrame hasFixedHeight ifTrue: [
> > >                 | otop obot ctop cbot topf |
> > >
> > >                 otop := (owner submorphs detect: [:m |
> > >                                         m layoutFrame topFraction isZero]
> > > ifNone: [^ self]) in: [:tm |
> > >                                                 tm top - (tm layoutFrame
> > > topOffset ifNil: [0])].
> > >
> > >                 obot := (owner submorphs detect: [:m |
> > >                                         m layoutFrame bottomFraction = 1]
> > > ifNone: [^ self]) in: [:tm |
> > >                                                 tm bottom - (tm
> > > layoutFrame bottomOffset ifNil: [0])].
> > >
> > >                 ctop := (self layoutFrame topFraction * (obot - otop))
> > > rounded
> > >                                         + otop + (self layoutFrame
> > > topOffset ifNil: [0]).
> > >                 cbot := (self layoutFrame bottomFraction * (obot - otop))
> > > rounded
> > >                                         + otop + (self layoutFrame
> > > bottomOffset ifNil: [0]).
> > >
> > >                 topf := self layoutFrame topFraction.
> > >                 self layoutFrame topFraction:  ((ctop + cbot) * 0.5 -
> > > otop) / (obot - otop) asFloat.
> > >                 self layoutFrame bottomFraction: self layoutFrame
> > > topFraction.
> > >                 self layoutFrame topOffset: ctop -
> > >                         (self layoutFrame topFraction * (obot - otop) +
> > > otop) rounded.
> > >                 self layoutFrame bottomOffset: cbot -
> > >                         (self layoutFrame bottomFraction * (obot - otop) +
> > > otop) rounded..
> > >
> > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > >                         (m layoutFrame topFraction closeTo: topf) ifTrue: [
> > >                                 m layoutFrame topFraction: self
> > > layoutFrame topFraction.
> > >                                 m layoutFrame topOffset:
> > >                                         m layoutFrame topOffset - (self
> > > valueOfProperty: #fullDelta) y].
> > >                         (m layoutFrame bottomFraction closeTo: topf)
> > > ifTrue: [
> > >                                 m layoutFrame bottomFraction: self
> > > layoutFrame topFraction.
> > >                                 m layoutFrame bottomOffset:
> > >                                         m layoutFrame bottomOffset - (self
> > > valueOfProperty: #fullDelta) y.]]] .
> > >
> > >         self layoutFrame hasFixedWidth ifTrue: [
> > >                 | oleft oright cleft cright leftf |
> > >
> > >                 oleft := (owner submorphs detect: [:m |
> > >                         m layoutFrame leftFraction isZero] ifNone: [^
> > > self]) in: [:tm |
> > >                                 tm left - (tm layoutFrame leftOffset
> > > ifNil: [0])].
> > >
> > >                 oright := (owner submorphs detect: [:m |
> > >                         m layoutFrame rightFraction = 1] ifNone: [^ self])
> > > in: [:tm |
> > >                                 tm right - (tm layoutFrame rightOffset
> > > ifNil: [0])].
> > >
> > >                 cleft := (self layoutFrame leftFraction * (oright -
> > > oleft)) rounded
> > >                                         + oleft + (self layoutFrame
> > > leftOffset ifNil: [0]).
> > >                 cright := (self layoutFrame rightFraction * (oright -
> > > oleft)) rounded
> > >                                         + oleft + (self layoutFrame
> > > rightOffset ifNil: [0]).
> > >
> > >                 leftf := self layoutFrame leftFraction.
> > >                 self layoutFrame leftFraction: ((cleft + cright) * 0.5 -
> > > oleft) / (oright - oleft) asFloat.
> > >                 self layoutFrame rightFraction: self layoutFrame
> > > leftFraction.
> > >
> > >                 self layoutFrame leftOffset: cleft -
> > >                         (self layoutFrame leftFraction * (oright - oleft)
> > > + oleft) rounded.
> > >                 self layoutFrame rightOffset: cright -
> > >                         (self layoutFrame rightFraction * (oright - oleft)
> > > + oleft) rounded.
> > >
> > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > >                         (m layoutFrame leftFraction closeTo: leftf)
> > > ifTrue: [
> > >                                 m layoutFrame leftFraction: self
> > > layoutFrame leftFraction.
> > >                                 m layoutFrame leftOffset:
> > >                                         m layoutFrame leftOffset - (self
> > > valueOfProperty: #fullDelta) x].
> > >                         (m layoutFrame rightFraction closeTo: leftf)
> > > ifTrue: [
> > >                                 m layoutFrame rightFraction: self
> > > layoutFrame leftFraction.
> > >                                 m layoutFrame rightOffset:
> > >                                         m layoutFrame rightOffset - (self
> > > valueOfProperty: #fullDelta) x.]]] .
> > >
> > >         self removeProperty: #fullDelta.
> > >         owner layoutChanged
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ProportionalSplitterMorph>>step (in category 'events')
> > > -----
> > >   step
> > >         splitsTopAndBottom
> > >                 ifTrue: [ self reduceTopBottomImbalance ]
> > >                 ifFalse:
> > >                         [ self reduceLeftRightImbalance abs > 1 ifTrue:
> > >                                 [ self splittersLeftDo:
> > >                                         [ : splitter | splitter
> > > reduceLeftRightImbalance ].
> > >                                 self splittersRightDo:
> > > +                                       [ : splitter | splitter
> > > reduceLeftRightImbalance ] ] ].
> > > +       self balanceOffsets!
> > > -                                       [ : splitter | splitter
> > > reduceLeftRightImbalance ] ] ]!
> > >
> > > Item was added:
> > > + ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu') -----
> > > + addNewScore
> > > +       "Open a MIDI score and re-init controls..."
> > > +       | score player |
> > > +
> > > +       score := MIDIScore new.
> > > +       score tracks: (Array with: Array new).
> > > +       score trackInfo: #('Instrument').
> > > +       player := ScorePlayer onScore: score.
> > > +       ^self onScorePlayer: player title: 'new'!
> > >
> > > Item was added:
> > > + ----- Method: ScorePlayerMorph>>addTrackToScore (in category 'menu')
> > > -----
> > > + addTrackToScore
> > > +       "add a instrument track to the current score"
> > > +       | score tracks trackInfo player |
> > > +       score := scorePlayer score.
> > > +       tracks := score tracks copyWith:#().
> > > +       score tracks: tracks.
> > > +       trackInfo := score trackInfo copyWith: 'Instrument'.
> > > +       score trackInfo: trackInfo.
> > > +       player := ScorePlayer onScore: score.
> > > +       ^self onScorePlayer: player title: 'new'!
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu') -----
> > >   invokeMenu
> > >         "Invoke a menu of additonal functions for this ScorePlayer."
> > > -
> > >         | aMenu |
> > >         aMenu := MenuMorph new defaultTarget: self.
> > > +       aMenu add: 'add a new score' translated action: #addNewScore.
> > > +       aMenu add: 'add a new track to score' translated action:
> > > #addTrackToScore.
> > >         aMenu add: 'open a MIDI file' translated action: #openMIDIFile.
> > > +       aMenu addList: {#-. {'save as AIFF file' translated. #saveAsAIFF}.
> > > {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file'
> > > translated. #saveAsSunAudio}. #-}.
> > > +       aMenu
> > > +               add: 'reload instruments' translated
> > > +               target: AbstractSound
> > > +               selector: #updateScorePlayers.
> > > -       aMenu addList: {
> > > -               #-.
> > > -               {'save as AIFF file' translated.        #saveAsAIFF}.
> > > -               {'save as WAV file' translated.         #saveAsWAV}.
> > > -               {'save as Sun AU file' translated.      #saveAsSunAudio}.
> > > -               #-}.
> > > -       aMenu add: 'reload instruments' translated target: AbstractSound
> > > selector: #updateScorePlayers.
> > >         aMenu addLine.
> > >         scorePlayer midiPort
> > > +               ifNil: [aMenu add: 'play via MIDI' translated action:
> > > #openMIDIPort]
> > > +               ifNotNil: [aMenu add: 'play via built in synth' translated
> > > action: #closeMIDIPort.
> > > -               ifNil: [
> > > -                       aMenu add: 'play via MIDI' translated action:
> > > #openMIDIPort]
> > > -               ifNotNil: [
> > > -                       aMenu add: 'play via built in synth' translated
> > > action: #closeMIDIPort.
> > >                         aMenu add: 'new MIDI controller' translated
> > > action: #makeMIDIController:].
> > >         aMenu addLine.
> > >         aMenu add: 'make a pause marker' translated action:
> > > #makeAPauseEvent:.
> > > +       aMenu popUpInWorld: self world!
> > > -
> > > -       aMenu popUpInWorld: self world.
> > > - !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category
> > > 'initialization') -----
> > >   onScorePlayer: aScorePlayer title: scoreName
> > >         | divider col r |
> > >         scorePlayer := aScorePlayer.
> > >         scorePlayer ifNotNil:
> > >                 [scorePlayer  reset.
> > >                 instrumentSelector := Array new: scorePlayer score tracks
> > > size].
> > >
> > >         self removeAllMorphs.
> > >         self addMorphBack: self makeControls.
> > >         scorePlayer ifNil: [^ self].
> > >
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #shrinkWrap.
> > >         r addMorphBack: self rateControl;
> > >                 addMorphBack: (Morph newBounds: (0@0 extent: 20@0) color:
> > > Color transparent);
> > >                 addMorphBack: self volumeControl.
> > >         self addMorphBack: r.
> > >         self addMorphBack: self scrollControl.
> > >
> > >         col := AlignmentMorph newColumn color: color; layoutInset: 0.
> > >         self addMorphBack: col.
> > >         1 to: scorePlayer trackCount do: [:trackIndex |
> > >                 divider := AlignmentMorph new
> > >                         extent: 10@1;
> > >                         borderWidth: 1;
> > >                         layoutInset: 0;
> > >                         borderColor: #raised;
> > >                         color: color;
> > >                         hResizing: #spaceFill;
> > >                         vResizing: #rigid.
> > >                 col addMorphBack: divider.
> > >                 col addMorphBack: (self trackControlsFor: trackIndex)].
> > >
> > >         LastMIDIPort ifNotNil: [
> > >                 "use the most recently set MIDI port"
> > >                 scorePlayer openMIDIPort: LastMIDIPort].
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>rateControl (in category 'layout') -----
> > >   rateControl
> > >
> > >         | rateSlider middleLine r |
> > >         rateSlider := SimpleSliderMorph new
> > >                 color: color;
> > >                 sliderColor: Color gray;
> > > +               extent: 180@12;
> > > -               extent: 180@6;
> > >                 target: self;
> > >                 actionSelector: #setLogRate:;
> > >                 minVal: -1.0;
> > >                 maxVal: 1.0;
> > >                 adjustToValue: 0.0.
> > >         middleLine := Morph new  "center indicator for pan slider"
> > >                 color: (Color r: 0.4 g: 0.4 b: 0.4);
> > >                 extent: 1@(rateSlider height - 4);
> > >                 position: rateSlider center x@(rateSlider top + 2).
> > >         rateSlider addMorphBack: middleLine.
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #rigid;
> > >                 height: 24.
> > >         r addMorphBack: (StringMorph contents: 'slow ' translated).
> > >         r addMorphBack: rateSlider.
> > >         r addMorphBack: (StringMorph contents: ' fast' translated).
> > >         ^ r
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>scrollControl (in category 'layout')
> > > -----
> > >   scrollControl
> > >
> > >         | r |
> > >         scrollSlider := SimpleSliderMorph new
> > >                 color: color;
> > >                 sliderColor: Color gray;
> > > +               extent: 360@12;
> > > -               extent: 360@6;
> > >                 target: scorePlayer;
> > >                 actionSelector: #positionInScore:;
> > >                 adjustToValue: scorePlayer positionInScore.
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #rigid;
> > >                 height: 24.
> > >         r addMorphBack: (StringMorph contents: 'start ' translated).
> > >         r addMorphBack: scrollSlider.
> > >         r addMorphBack: (StringMorph contents: ' end' translated).
> > >         ^ r
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category
> > > 'layout') -----
> > >   trackNumAndMuteButtonFor: trackIndex
> > >
> > >         | muteButton instSelector pianoRollColor r |
> > >         muteButton := SimpleSwitchMorph new
> > >                 onColor: (Color r: 1.0 g: 0.6 b: 0.6);
> > >                 offColor: color;
> > >                 color: color;
> > >                 label: 'Mute' translated;
> > >                 target: scorePlayer;
> > >                 actionSelector: #mutedForTrack:put:;
> > >                 arguments: (Array with: trackIndex).
> > >         instSelector := PopUpChoiceMorph new
> > >                 extent: 95@14;
> > >                 contentsClipped: 'oboe1';
> > >                 target: self;
> > >                 actionSelector: #atTrack:from:selectInstrument:;
> > >                 getItemsSelector: #instrumentChoicesForTrack:;
> > >                 getItemsArgs: (Array with: trackIndex).
> > >         instSelector arguments:
> > >                 (Array with: trackIndex with: instSelector).
> > >         instrumentSelector at: trackIndex put: instSelector.
> > >
> > >         "select track color using same color list as PianoRollScoreMorph"
> > >         pianoRollColor := (Color wheel: scorePlayer score tracks size) at:
> > > trackIndex.
> > >
> > >         r := self makeRow
> > >                 hResizing: #spaceFill;
> > >                 vResizing: #spaceFill;
> > >                 extent: 70@10.
> > >         r addMorphBack:
> > >                 ((StringMorph
> > >                         contents: trackIndex printString
> > >                         font: (TextStyle default fontOfSize: 24)) color:
> > > pianoRollColor).
> > >         trackIndex < 10
> > >                 ifTrue: [r addMorphBack: (Morph new color: color; extent:
> > > 19@8)]  "spacer"
> > >                 ifFalse: [r addMorphBack: (Morph new color: color; extent:
> > > 8@8)].  "spacer"
> > >         r addMorphBack:
> > >                 (StringMorph new
> > > +                       extent: 80@14;
> > > -                       extent: 140@14;
> > >                         contentsClipped: (scorePlayer infoForTrack:
> > > trackIndex)).
> > >         r addMorphBack: (Morph new color: color; extent: 8@8).  "spacer"
> > >         r addMorphBack: instSelector.
> > >         r addMorphBack: (AlignmentMorph newRow color: color).  "spacer"
> > >         r addMorphBack: muteButton.
> > >         ^ r
> > >   !
> > >
> > > Item was changed:
> > >   ----- Method: ScorePlayerMorph>>volumeControl (in category 'layout')
> > > -----
> > >   volumeControl
> > >
> > >         | volumeSlider r |
> > >         volumeSlider := SimpleSliderMorph new
> > >                 color: color;
> > >                 sliderColor: Color gray;
> > > +               extent: 80@12;
> > > -               extent: 80@6;
> > >                 target: scorePlayer;
> > >                 actionSelector: #overallVolume:;
> > >                 adjustToValue: scorePlayer overallVolume.
> > >         r := self makeRow
> > > +               hResizing: #spaceFill;
> > > -               hResizing: #shrinkWrap;
> > >                 vResizing: #rigid;
> > >                 height: 24.
> > >         r addMorphBack: (StringMorph contents: 'soft  ' translated).
> > >         r addMorphBack: volumeSlider.
> > >         r addMorphBack: (StringMorph contents: ' loud' translated).
> > >         ^ r
> > >   !
> > >
> > >
> > >
>
> >
>
>




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

David T. Lewis
It's easy to get the Monticello browsers confused. If you directly load the
re-saved package (Morphic-dtl.1418) back into your old image, it will probably
be fine again :-)

Dave

On Sun, Apr 22, 2018 at 06:58:29PM +0200, karl ramberg wrote:

> Thanks, David.
> I'm not sure how the image got in a bad state :-(
> I'll start over with a new one.
>
> Cheers,
> Karl
>
>
> On Sun, Apr 22, 2018 at 6:41 PM, David T. Lewis <[hidden email]> wrote:
>
> > I re-saved Karl's update in Morphic-dtl.1418, which is the same as
> > Morphic-kfr.1418
> > except for the fixed ancestry. I kept a copy of Karl's original MCZ file
> > in case
> > of any problems.
> >
> > Dave
> >
> > On Sun, Apr 22, 2018 at 10:10:04AM -0400, David T. Lewis wrote:
> > > Hi Karl,
> > >
> > > I used the web interface to delete version Morphic-kfr.1418.
> > >
> > > You will need to do "MCFileBasedRepository flushAllCaches" in your image,
> > > and probably delete the file in your package-cache directory also.
> > >
> > > Usually it is best not to delete versions the way I just did, but in this
> > > case the version history seemed to be causing problems, so I deleted it.
> > >
> > > If anyone has problems with a recently updated image, please revert back
> > > to Morphic-cmm.1417 and do a flushAllCaches.
> > >
> > > Dave
> > >
> > >
> > > On Sun, Apr 22, 2018 at 11:50:59AM +0200, karl ramberg wrote:
> > > > Hm,
> > > > Bogus ancestry for this commit :-(
> > > > Can it be deleted ?
> > > >
> > > > Best,
> > > > Karl
> > > >
> > > > On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]> wrote:
> > > >
> > > > > Karl Ramberg uploaded a new version of Morphic to project The Trunk:
> > > > > http://source.squeak.org/trunk/Morphic-kfr.1418.mcz
> > > > >
> > > > > ==================== Summary ====================
> > > > >
> > > > > Name: Morphic-kfr.1418
> > > > > Author: kfr
> > > > > Time: 22 April 2018, 11:30:41.518937 am
> > > > > UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
> > > > > Ancestors: Morphic-kfr.1416, Morphic-cmm.1417
> > > > >
> > > > > Some maintenance to ScorePlayerMorph.
> > > > > Fixing some layout issues.
> > > > > Add menu options to make a new score and add tracks to the score.
> > > > >
> > > > > =============== Diff against Morphic-kfr.1416 ===============
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ProportionalSplitterMorph>>balanceOffsets (in
> > category
> > > > > 'layout') -----
> > > > >   balanceOffsets
> > > > > +       (self valueOfProperty: #fullDelta) ifNil: [self setProperty:
> > > > > #fullDelta toValue: (0@0)] .
> > > > >
> > > > >         self layoutFrame hasFixedHeight ifTrue: [
> > > > >                 | otop obot ctop cbot topf |
> > > > >
> > > > >                 otop := (owner submorphs detect: [:m |
> > > > >                                         m layoutFrame topFraction
> > isZero]
> > > > > ifNone: [^ self]) in: [:tm |
> > > > >                                                 tm top - (tm
> > layoutFrame
> > > > > topOffset ifNil: [0])].
> > > > >
> > > > >                 obot := (owner submorphs detect: [:m |
> > > > >                                         m layoutFrame bottomFraction
> > = 1]
> > > > > ifNone: [^ self]) in: [:tm |
> > > > >                                                 tm bottom - (tm
> > > > > layoutFrame bottomOffset ifNil: [0])].
> > > > >
> > > > >                 ctop := (self layoutFrame topFraction * (obot -
> > otop))
> > > > > rounded
> > > > >                                         + otop + (self layoutFrame
> > > > > topOffset ifNil: [0]).
> > > > >                 cbot := (self layoutFrame bottomFraction * (obot -
> > otop))
> > > > > rounded
> > > > >                                         + otop + (self layoutFrame
> > > > > bottomOffset ifNil: [0]).
> > > > >
> > > > >                 topf := self layoutFrame topFraction.
> > > > >                 self layoutFrame topFraction:  ((ctop + cbot) * 0.5 -
> > > > > otop) / (obot - otop) asFloat.
> > > > >                 self layoutFrame bottomFraction: self layoutFrame
> > > > > topFraction.
> > > > >                 self layoutFrame topOffset: ctop -
> > > > >                         (self layoutFrame topFraction * (obot -
> > otop) +
> > > > > otop) rounded.
> > > > >                 self layoutFrame bottomOffset: cbot -
> > > > >                         (self layoutFrame bottomFraction * (obot -
> > otop) +
> > > > > otop) rounded..
> > > > >
> > > > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > > > >                         (m layoutFrame topFraction closeTo: topf)
> > ifTrue: [
> > > > >                                 m layoutFrame topFraction: self
> > > > > layoutFrame topFraction.
> > > > >                                 m layoutFrame topOffset:
> > > > >                                         m layoutFrame topOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) y].
> > > > >                         (m layoutFrame bottomFraction closeTo: topf)
> > > > > ifTrue: [
> > > > >                                 m layoutFrame bottomFraction: self
> > > > > layoutFrame topFraction.
> > > > >                                 m layoutFrame bottomOffset:
> > > > >                                         m layoutFrame bottomOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) y.]]] .
> > > > >
> > > > >         self layoutFrame hasFixedWidth ifTrue: [
> > > > >                 | oleft oright cleft cright leftf |
> > > > >
> > > > >                 oleft := (owner submorphs detect: [:m |
> > > > >                         m layoutFrame leftFraction isZero] ifNone: [^
> > > > > self]) in: [:tm |
> > > > >                                 tm left - (tm layoutFrame leftOffset
> > > > > ifNil: [0])].
> > > > >
> > > > >                 oright := (owner submorphs detect: [:m |
> > > > >                         m layoutFrame rightFraction = 1] ifNone: [^
> > self])
> > > > > in: [:tm |
> > > > >                                 tm right - (tm layoutFrame
> > rightOffset
> > > > > ifNil: [0])].
> > > > >
> > > > >                 cleft := (self layoutFrame leftFraction * (oright -
> > > > > oleft)) rounded
> > > > >                                         + oleft + (self layoutFrame
> > > > > leftOffset ifNil: [0]).
> > > > >                 cright := (self layoutFrame rightFraction * (oright -
> > > > > oleft)) rounded
> > > > >                                         + oleft + (self layoutFrame
> > > > > rightOffset ifNil: [0]).
> > > > >
> > > > >                 leftf := self layoutFrame leftFraction.
> > > > >                 self layoutFrame leftFraction: ((cleft + cright) *
> > 0.5 -
> > > > > oleft) / (oright - oleft) asFloat.
> > > > >                 self layoutFrame rightFraction: self layoutFrame
> > > > > leftFraction.
> > > > >
> > > > >                 self layoutFrame leftOffset: cleft -
> > > > >                         (self layoutFrame leftFraction * (oright -
> > oleft)
> > > > > + oleft) rounded.
> > > > >                 self layoutFrame rightOffset: cright -
> > > > >                         (self layoutFrame rightFraction * (oright -
> > oleft)
> > > > > + oleft) rounded.
> > > > >
> > > > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > > > >                         (m layoutFrame leftFraction closeTo: leftf)
> > > > > ifTrue: [
> > > > >                                 m layoutFrame leftFraction: self
> > > > > layoutFrame leftFraction.
> > > > >                                 m layoutFrame leftOffset:
> > > > >                                         m layoutFrame leftOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) x].
> > > > >                         (m layoutFrame rightFraction closeTo: leftf)
> > > > > ifTrue: [
> > > > >                                 m layoutFrame rightFraction: self
> > > > > layoutFrame leftFraction.
> > > > >                                 m layoutFrame rightOffset:
> > > > >                                         m layoutFrame rightOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) x.]]] .
> > > > >
> > > > >         self removeProperty: #fullDelta.
> > > > >         owner layoutChanged
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ProportionalSplitterMorph>>step (in category
> > 'events')
> > > > > -----
> > > > >   step
> > > > >         splitsTopAndBottom
> > > > >                 ifTrue: [ self reduceTopBottomImbalance ]
> > > > >                 ifFalse:
> > > > >                         [ self reduceLeftRightImbalance abs > 1
> > ifTrue:
> > > > >                                 [ self splittersLeftDo:
> > > > >                                         [ : splitter | splitter
> > > > > reduceLeftRightImbalance ].
> > > > >                                 self splittersRightDo:
> > > > > +                                       [ : splitter | splitter
> > > > > reduceLeftRightImbalance ] ] ].
> > > > > +       self balanceOffsets!
> > > > > -                                       [ : splitter | splitter
> > > > > reduceLeftRightImbalance ] ] ]!
> > > > >
> > > > > Item was added:
> > > > > + ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu')
> > -----
> > > > > + addNewScore
> > > > > +       "Open a MIDI score and re-init controls..."
> > > > > +       | score player |
> > > > > +
> > > > > +       score := MIDIScore new.
> > > > > +       score tracks: (Array with: Array new).
> > > > > +       score trackInfo: #('Instrument').
> > > > > +       player := ScorePlayer onScore: score.
> > > > > +       ^self onScorePlayer: player title: 'new'!
> > > > >
> > > > > Item was added:
> > > > > + ----- Method: ScorePlayerMorph>>addTrackToScore (in category
> > 'menu')
> > > > > -----
> > > > > + addTrackToScore
> > > > > +       "add a instrument track to the current score"
> > > > > +       | score tracks trackInfo player |
> > > > > +       score := scorePlayer score.
> > > > > +       tracks := score tracks copyWith:#().
> > > > > +       score tracks: tracks.
> > > > > +       trackInfo := score trackInfo copyWith: 'Instrument'.
> > > > > +       score trackInfo: trackInfo.
> > > > > +       player := ScorePlayer onScore: score.
> > > > > +       ^self onScorePlayer: player title: 'new'!
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu')
> > -----
> > > > >   invokeMenu
> > > > >         "Invoke a menu of additonal functions for this ScorePlayer."
> > > > > -
> > > > >         | aMenu |
> > > > >         aMenu := MenuMorph new defaultTarget: self.
> > > > > +       aMenu add: 'add a new score' translated action: #addNewScore.
> > > > > +       aMenu add: 'add a new track to score' translated action:
> > > > > #addTrackToScore.
> > > > >         aMenu add: 'open a MIDI file' translated action:
> > #openMIDIFile.
> > > > > +       aMenu addList: {#-. {'save as AIFF file' translated.
> > #saveAsAIFF}.
> > > > > {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file'
> > > > > translated. #saveAsSunAudio}. #-}.
> > > > > +       aMenu
> > > > > +               add: 'reload instruments' translated
> > > > > +               target: AbstractSound
> > > > > +               selector: #updateScorePlayers.
> > > > > -       aMenu addList: {
> > > > > -               #-.
> > > > > -               {'save as AIFF file' translated.        #saveAsAIFF}.
> > > > > -               {'save as WAV file' translated.         #saveAsWAV}.
> > > > > -               {'save as Sun AU file' translated.
> > #saveAsSunAudio}.
> > > > > -               #-}.
> > > > > -       aMenu add: 'reload instruments' translated target:
> > AbstractSound
> > > > > selector: #updateScorePlayers.
> > > > >         aMenu addLine.
> > > > >         scorePlayer midiPort
> > > > > +               ifNil: [aMenu add: 'play via MIDI' translated action:
> > > > > #openMIDIPort]
> > > > > +               ifNotNil: [aMenu add: 'play via built in synth'
> > translated
> > > > > action: #closeMIDIPort.
> > > > > -               ifNil: [
> > > > > -                       aMenu add: 'play via MIDI' translated action:
> > > > > #openMIDIPort]
> > > > > -               ifNotNil: [
> > > > > -                       aMenu add: 'play via built in synth'
> > translated
> > > > > action: #closeMIDIPort.
> > > > >                         aMenu add: 'new MIDI controller' translated
> > > > > action: #makeMIDIController:].
> > > > >         aMenu addLine.
> > > > >         aMenu add: 'make a pause marker' translated action:
> > > > > #makeAPauseEvent:.
> > > > > +       aMenu popUpInWorld: self world!
> > > > > -
> > > > > -       aMenu popUpInWorld: self world.
> > > > > - !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category
> > > > > 'initialization') -----
> > > > >   onScorePlayer: aScorePlayer title: scoreName
> > > > >         | divider col r |
> > > > >         scorePlayer := aScorePlayer.
> > > > >         scorePlayer ifNotNil:
> > > > >                 [scorePlayer  reset.
> > > > >                 instrumentSelector := Array new: scorePlayer score
> > tracks
> > > > > size].
> > > > >
> > > > >         self removeAllMorphs.
> > > > >         self addMorphBack: self makeControls.
> > > > >         scorePlayer ifNil: [^ self].
> > > > >
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #shrinkWrap.
> > > > >         r addMorphBack: self rateControl;
> > > > >                 addMorphBack: (Morph newBounds: (0@0 extent: 20@0)
> > color:
> > > > > Color transparent);
> > > > >                 addMorphBack: self volumeControl.
> > > > >         self addMorphBack: r.
> > > > >         self addMorphBack: self scrollControl.
> > > > >
> > > > >         col := AlignmentMorph newColumn color: color; layoutInset: 0.
> > > > >         self addMorphBack: col.
> > > > >         1 to: scorePlayer trackCount do: [:trackIndex |
> > > > >                 divider := AlignmentMorph new
> > > > >                         extent: 10@1;
> > > > >                         borderWidth: 1;
> > > > >                         layoutInset: 0;
> > > > >                         borderColor: #raised;
> > > > >                         color: color;
> > > > >                         hResizing: #spaceFill;
> > > > >                         vResizing: #rigid.
> > > > >                 col addMorphBack: divider.
> > > > >                 col addMorphBack: (self trackControlsFor:
> > trackIndex)].
> > > > >
> > > > >         LastMIDIPort ifNotNil: [
> > > > >                 "use the most recently set MIDI port"
> > > > >                 scorePlayer openMIDIPort: LastMIDIPort].
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>rateControl (in category 'layout')
> > -----
> > > > >   rateControl
> > > > >
> > > > >         | rateSlider middleLine r |
> > > > >         rateSlider := SimpleSliderMorph new
> > > > >                 color: color;
> > > > >                 sliderColor: Color gray;
> > > > > +               extent: 180@12;
> > > > > -               extent: 180@6;
> > > > >                 target: self;
> > > > >                 actionSelector: #setLogRate:;
> > > > >                 minVal: -1.0;
> > > > >                 maxVal: 1.0;
> > > > >                 adjustToValue: 0.0.
> > > > >         middleLine := Morph new  "center indicator for pan slider"
> > > > >                 color: (Color r: 0.4 g: 0.4 b: 0.4);
> > > > >                 extent: 1@(rateSlider height - 4);
> > > > >                 position: rateSlider center x@(rateSlider top + 2).
> > > > >         rateSlider addMorphBack: middleLine.
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #rigid;
> > > > >                 height: 24.
> > > > >         r addMorphBack: (StringMorph contents: 'slow ' translated).
> > > > >         r addMorphBack: rateSlider.
> > > > >         r addMorphBack: (StringMorph contents: ' fast' translated).
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>scrollControl (in category
> > 'layout')
> > > > > -----
> > > > >   scrollControl
> > > > >
> > > > >         | r |
> > > > >         scrollSlider := SimpleSliderMorph new
> > > > >                 color: color;
> > > > >                 sliderColor: Color gray;
> > > > > +               extent: 360@12;
> > > > > -               extent: 360@6;
> > > > >                 target: scorePlayer;
> > > > >                 actionSelector: #positionInScore:;
> > > > >                 adjustToValue: scorePlayer positionInScore.
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #rigid;
> > > > >                 height: 24.
> > > > >         r addMorphBack: (StringMorph contents: 'start ' translated).
> > > > >         r addMorphBack: scrollSlider.
> > > > >         r addMorphBack: (StringMorph contents: ' end' translated).
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in
> > category
> > > > > 'layout') -----
> > > > >   trackNumAndMuteButtonFor: trackIndex
> > > > >
> > > > >         | muteButton instSelector pianoRollColor r |
> > > > >         muteButton := SimpleSwitchMorph new
> > > > >                 onColor: (Color r: 1.0 g: 0.6 b: 0.6);
> > > > >                 offColor: color;
> > > > >                 color: color;
> > > > >                 label: 'Mute' translated;
> > > > >                 target: scorePlayer;
> > > > >                 actionSelector: #mutedForTrack:put:;
> > > > >                 arguments: (Array with: trackIndex).
> > > > >         instSelector := PopUpChoiceMorph new
> > > > >                 extent: 95@14;
> > > > >                 contentsClipped: 'oboe1';
> > > > >                 target: self;
> > > > >                 actionSelector: #atTrack:from:selectInstrument:;
> > > > >                 getItemsSelector: #instrumentChoicesForTrack:;
> > > > >                 getItemsArgs: (Array with: trackIndex).
> > > > >         instSelector arguments:
> > > > >                 (Array with: trackIndex with: instSelector).
> > > > >         instrumentSelector at: trackIndex put: instSelector.
> > > > >
> > > > >         "select track color using same color list as
> > PianoRollScoreMorph"
> > > > >         pianoRollColor := (Color wheel: scorePlayer score tracks
> > size) at:
> > > > > trackIndex.
> > > > >
> > > > >         r := self makeRow
> > > > >                 hResizing: #spaceFill;
> > > > >                 vResizing: #spaceFill;
> > > > >                 extent: 70@10.
> > > > >         r addMorphBack:
> > > > >                 ((StringMorph
> > > > >                         contents: trackIndex printString
> > > > >                         font: (TextStyle default fontOfSize: 24))
> > color:
> > > > > pianoRollColor).
> > > > >         trackIndex < 10
> > > > >                 ifTrue: [r addMorphBack: (Morph new color: color;
> > extent:
> > > > > 19@8)]  "spacer"
> > > > >                 ifFalse: [r addMorphBack: (Morph new color: color;
> > extent:
> > > > > 8@8)].  "spacer"
> > > > >         r addMorphBack:
> > > > >                 (StringMorph new
> > > > > +                       extent: 80@14;
> > > > > -                       extent: 140@14;
> > > > >                         contentsClipped: (scorePlayer infoForTrack:
> > > > > trackIndex)).
> > > > >         r addMorphBack: (Morph new color: color; extent: 8@8).
> > "spacer"
> > > > >         r addMorphBack: instSelector.
> > > > >         r addMorphBack: (AlignmentMorph newRow color: color).
> > "spacer"
> > > > >         r addMorphBack: muteButton.
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>volumeControl (in category
> > 'layout')
> > > > > -----
> > > > >   volumeControl
> > > > >
> > > > >         | volumeSlider r |
> > > > >         volumeSlider := SimpleSliderMorph new
> > > > >                 color: color;
> > > > >                 sliderColor: Color gray;
> > > > > +               extent: 80@12;
> > > > > -               extent: 80@6;
> > > > >                 target: scorePlayer;
> > > > >                 actionSelector: #overallVolume:;
> > > > >                 adjustToValue: scorePlayer overallVolume.
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #rigid;
> > > > >                 height: 24.
> > > > >         r addMorphBack: (StringMorph contents: 'soft  ' translated).
> > > > >         r addMorphBack: volumeSlider.
> > > > >         r addMorphBack: (StringMorph contents: ' loud' translated).
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > >
> > > > >
> > >
> > > >
> > >
> > >
> >
> >

>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

Karl Ramberg
I did what you suggeted with  MCFileBasedRepository flushAllCache and delete the files.
I seems to have fixed the issue.
Thanks

Best,
Karl


On Sun, Apr 22, 2018 at 7:31 PM, David T. Lewis <[hidden email]> wrote:
It's easy to get the Monticello browsers confused. If you directly load the
re-saved package (Morphic-dtl.1418) back into your old image, it will probably
be fine again :-)

Dave

On Sun, Apr 22, 2018 at 06:58:29PM +0200, karl ramberg wrote:
> Thanks, David.
> I'm not sure how the image got in a bad state :-(
> I'll start over with a new one.
>
> Cheers,
> Karl
>
>
> On Sun, Apr 22, 2018 at 6:41 PM, David T. Lewis <[hidden email]> wrote:
>
> > I re-saved Karl's update in Morphic-dtl.1418, which is the same as
> > Morphic-kfr.1418
> > except for the fixed ancestry. I kept a copy of Karl's original MCZ file
> > in case
> > of any problems.
> >
> > Dave
> >
> > On Sun, Apr 22, 2018 at 10:10:04AM -0400, David T. Lewis wrote:
> > > Hi Karl,
> > >
> > > I used the web interface to delete version Morphic-kfr.1418.
> > >
> > > You will need to do "MCFileBasedRepository flushAllCaches" in your image,
> > > and probably delete the file in your package-cache directory also.
> > >
> > > Usually it is best not to delete versions the way I just did, but in this
> > > case the version history seemed to be causing problems, so I deleted it.
> > >
> > > If anyone has problems with a recently updated image, please revert back
> > > to Morphic-cmm.1417 and do a flushAllCaches.
> > >
> > > Dave
> > >
> > >
> > > On Sun, Apr 22, 2018 at 11:50:59AM +0200, karl ramberg wrote:
> > > > Hm,
> > > > Bogus ancestry for this commit :-(
> > > > Can it be deleted ?
> > > >
> > > > Best,
> > > > Karl
> > > >
> > > > On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]> wrote:
> > > >
> > > > > Karl Ramberg uploaded a new version of Morphic to project The Trunk:
> > > > > http://source.squeak.org/trunk/Morphic-kfr.1418.mcz
> > > > >
> > > > > ==================== Summary ====================
> > > > >
> > > > > Name: Morphic-kfr.1418
> > > > > Author: kfr
> > > > > Time: 22 April 2018, 11:30:41.518937 am
> > > > > UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
> > > > > Ancestors: Morphic-kfr.1416, Morphic-cmm.1417
> > > > >
> > > > > Some maintenance to ScorePlayerMorph.
> > > > > Fixing some layout issues.
> > > > > Add menu options to make a new score and add tracks to the score.
> > > > >
> > > > > =============== Diff against Morphic-kfr.1416 ===============
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ProportionalSplitterMorph>>balanceOffsets (in
> > category
> > > > > 'layout') -----
> > > > >   balanceOffsets
> > > > > +       (self valueOfProperty: #fullDelta) ifNil: [self setProperty:
> > > > > #fullDelta toValue: (0@0)] .
> > > > >
> > > > >         self layoutFrame hasFixedHeight ifTrue: [
> > > > >                 | otop obot ctop cbot topf |
> > > > >
> > > > >                 otop := (owner submorphs detect: [:m |
> > > > >                                         m layoutFrame topFraction
> > isZero]
> > > > > ifNone: [^ self]) in: [:tm |
> > > > >                                                 tm top - (tm
> > layoutFrame
> > > > > topOffset ifNil: [0])].
> > > > >
> > > > >                 obot := (owner submorphs detect: [:m |
> > > > >                                         m layoutFrame bottomFraction
> > = 1]
> > > > > ifNone: [^ self]) in: [:tm |
> > > > >                                                 tm bottom - (tm
> > > > > layoutFrame bottomOffset ifNil: [0])].
> > > > >
> > > > >                 ctop := (self layoutFrame topFraction * (obot -
> > otop))
> > > > > rounded
> > > > >                                         + otop + (self layoutFrame
> > > > > topOffset ifNil: [0]).
> > > > >                 cbot := (self layoutFrame bottomFraction * (obot -
> > otop))
> > > > > rounded
> > > > >                                         + otop + (self layoutFrame
> > > > > bottomOffset ifNil: [0]).
> > > > >
> > > > >                 topf := self layoutFrame topFraction.
> > > > >                 self layoutFrame topFraction:  ((ctop + cbot) * 0.5 -
> > > > > otop) / (obot - otop) asFloat.
> > > > >                 self layoutFrame bottomFraction: self layoutFrame
> > > > > topFraction.
> > > > >                 self layoutFrame topOffset: ctop -
> > > > >                         (self layoutFrame topFraction * (obot -
> > otop) +
> > > > > otop) rounded.
> > > > >                 self layoutFrame bottomOffset: cbot -
> > > > >                         (self layoutFrame bottomFraction * (obot -
> > otop) +
> > > > > otop) rounded..
> > > > >
> > > > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > > > >                         (m layoutFrame topFraction closeTo: topf)
> > ifTrue: [
> > > > >                                 m layoutFrame topFraction: self
> > > > > layoutFrame topFraction.
> > > > >                                 m layoutFrame topOffset:
> > > > >                                         m layoutFrame topOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) y].
> > > > >                         (m layoutFrame bottomFraction closeTo: topf)
> > > > > ifTrue: [
> > > > >                                 m layoutFrame bottomFraction: self
> > > > > layoutFrame topFraction.
> > > > >                                 m layoutFrame bottomOffset:
> > > > >                                         m layoutFrame bottomOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) y.]]] .
> > > > >
> > > > >         self layoutFrame hasFixedWidth ifTrue: [
> > > > >                 | oleft oright cleft cright leftf |
> > > > >
> > > > >                 oleft := (owner submorphs detect: [:m |
> > > > >                         m layoutFrame leftFraction isZero] ifNone: [^
> > > > > self]) in: [:tm |
> > > > >                                 tm left - (tm layoutFrame leftOffset
> > > > > ifNil: [0])].
> > > > >
> > > > >                 oright := (owner submorphs detect: [:m |
> > > > >                         m layoutFrame rightFraction = 1] ifNone: [^
> > self])
> > > > > in: [:tm |
> > > > >                                 tm right - (tm layoutFrame
> > rightOffset
> > > > > ifNil: [0])].
> > > > >
> > > > >                 cleft := (self layoutFrame leftFraction * (oright -
> > > > > oleft)) rounded
> > > > >                                         + oleft + (self layoutFrame
> > > > > leftOffset ifNil: [0]).
> > > > >                 cright := (self layoutFrame rightFraction * (oright -
> > > > > oleft)) rounded
> > > > >                                         + oleft + (self layoutFrame
> > > > > rightOffset ifNil: [0]).
> > > > >
> > > > >                 leftf := self layoutFrame leftFraction.
> > > > >                 self layoutFrame leftFraction: ((cleft + cright) *
> > 0.5 -
> > > > > oleft) / (oright - oleft) asFloat.
> > > > >                 self layoutFrame rightFraction: self layoutFrame
> > > > > leftFraction.
> > > > >
> > > > >                 self layoutFrame leftOffset: cleft -
> > > > >                         (self layoutFrame leftFraction * (oright -
> > oleft)
> > > > > + oleft) rounded.
> > > > >                 self layoutFrame rightOffset: cright -
> > > > >                         (self layoutFrame rightFraction * (oright -
> > oleft)
> > > > > + oleft) rounded.
> > > > >
> > > > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > > > >                         (m layoutFrame leftFraction closeTo: leftf)
> > > > > ifTrue: [
> > > > >                                 m layoutFrame leftFraction: self
> > > > > layoutFrame leftFraction.
> > > > >                                 m layoutFrame leftOffset:
> > > > >                                         m layoutFrame leftOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) x].
> > > > >                         (m layoutFrame rightFraction closeTo: leftf)
> > > > > ifTrue: [
> > > > >                                 m layoutFrame rightFraction: self
> > > > > layoutFrame leftFraction.
> > > > >                                 m layoutFrame rightOffset:
> > > > >                                         m layoutFrame rightOffset -
> > (self
> > > > > valueOfProperty: #fullDelta) x.]]] .
> > > > >
> > > > >         self removeProperty: #fullDelta.
> > > > >         owner layoutChanged
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ProportionalSplitterMorph>>step (in category
> > 'events')
> > > > > -----
> > > > >   step
> > > > >         splitsTopAndBottom
> > > > >                 ifTrue: [ self reduceTopBottomImbalance ]
> > > > >                 ifFalse:
> > > > >                         [ self reduceLeftRightImbalance abs > 1
> > ifTrue:
> > > > >                                 [ self splittersLeftDo:
> > > > >                                         [ : splitter | splitter
> > > > > reduceLeftRightImbalance ].
> > > > >                                 self splittersRightDo:
> > > > > +                                       [ : splitter | splitter
> > > > > reduceLeftRightImbalance ] ] ].
> > > > > +       self balanceOffsets!
> > > > > -                                       [ : splitter | splitter
> > > > > reduceLeftRightImbalance ] ] ]!
> > > > >
> > > > > Item was added:
> > > > > + ----- Method: ScorePlayerMorph>>addNewScore (in category 'menu')
> > -----
> > > > > + addNewScore
> > > > > +       "Open a MIDI score and re-init controls..."
> > > > > +       | score player |
> > > > > +
> > > > > +       score := MIDIScore new.
> > > > > +       score tracks: (Array with: Array new).
> > > > > +       score trackInfo: #('Instrument').
> > > > > +       player := ScorePlayer onScore: score.
> > > > > +       ^self onScorePlayer: player title: 'new'!
> > > > >
> > > > > Item was added:
> > > > > + ----- Method: ScorePlayerMorph>>addTrackToScore (in category
> > 'menu')
> > > > > -----
> > > > > + addTrackToScore
> > > > > +       "add a instrument track to the current score"
> > > > > +       | score tracks trackInfo player |
> > > > > +       score := scorePlayer score.
> > > > > +       tracks := score tracks copyWith:#().
> > > > > +       score tracks: tracks.
> > > > > +       trackInfo := score trackInfo copyWith: 'Instrument'.
> > > > > +       score trackInfo: trackInfo.
> > > > > +       player := ScorePlayer onScore: score.
> > > > > +       ^self onScorePlayer: player title: 'new'!
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu')
> > -----
> > > > >   invokeMenu
> > > > >         "Invoke a menu of additonal functions for this ScorePlayer."
> > > > > -
> > > > >         | aMenu |
> > > > >         aMenu := MenuMorph new defaultTarget: self.
> > > > > +       aMenu add: 'add a new score' translated action: #addNewScore.
> > > > > +       aMenu add: 'add a new track to score' translated action:
> > > > > #addTrackToScore.
> > > > >         aMenu add: 'open a MIDI file' translated action:
> > #openMIDIFile.
> > > > > +       aMenu addList: {#-. {'save as AIFF file' translated.
> > #saveAsAIFF}.
> > > > > {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU file'
> > > > > translated. #saveAsSunAudio}. #-}.
> > > > > +       aMenu
> > > > > +               add: 'reload instruments' translated
> > > > > +               target: AbstractSound
> > > > > +               selector: #updateScorePlayers.
> > > > > -       aMenu addList: {
> > > > > -               #-.
> > > > > -               {'save as AIFF file' translated.        #saveAsAIFF}.
> > > > > -               {'save as WAV file' translated.         #saveAsWAV}.
> > > > > -               {'save as Sun AU file' translated.
> > #saveAsSunAudio}.
> > > > > -               #-}.
> > > > > -       aMenu add: 'reload instruments' translated target:
> > AbstractSound
> > > > > selector: #updateScorePlayers.
> > > > >         aMenu addLine.
> > > > >         scorePlayer midiPort
> > > > > +               ifNil: [aMenu add: 'play via MIDI' translated action:
> > > > > #openMIDIPort]
> > > > > +               ifNotNil: [aMenu add: 'play via built in synth'
> > translated
> > > > > action: #closeMIDIPort.
> > > > > -               ifNil: [
> > > > > -                       aMenu add: 'play via MIDI' translated action:
> > > > > #openMIDIPort]
> > > > > -               ifNotNil: [
> > > > > -                       aMenu add: 'play via built in synth'
> > translated
> > > > > action: #closeMIDIPort.
> > > > >                         aMenu add: 'new MIDI controller' translated
> > > > > action: #makeMIDIController:].
> > > > >         aMenu addLine.
> > > > >         aMenu add: 'make a pause marker' translated action:
> > > > > #makeAPauseEvent:.
> > > > > +       aMenu popUpInWorld: self world!
> > > > > -
> > > > > -       aMenu popUpInWorld: self world.
> > > > > - !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in category
> > > > > 'initialization') -----
> > > > >   onScorePlayer: aScorePlayer title: scoreName
> > > > >         | divider col r |
> > > > >         scorePlayer := aScorePlayer.
> > > > >         scorePlayer ifNotNil:
> > > > >                 [scorePlayer  reset.
> > > > >                 instrumentSelector := Array new: scorePlayer score
> > tracks
> > > > > size].
> > > > >
> > > > >         self removeAllMorphs.
> > > > >         self addMorphBack: self makeControls.
> > > > >         scorePlayer ifNil: [^ self].
> > > > >
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #shrinkWrap.
> > > > >         r addMorphBack: self rateControl;
> > > > >                 addMorphBack: (Morph newBounds: (0@0 extent: 20@0)
> > color:
> > > > > Color transparent);
> > > > >                 addMorphBack: self volumeControl.
> > > > >         self addMorphBack: r.
> > > > >         self addMorphBack: self scrollControl.
> > > > >
> > > > >         col := AlignmentMorph newColumn color: color; layoutInset: 0.
> > > > >         self addMorphBack: col.
> > > > >         1 to: scorePlayer trackCount do: [:trackIndex |
> > > > >                 divider := AlignmentMorph new
> > > > >                         extent: 10@1;
> > > > >                         borderWidth: 1;
> > > > >                         layoutInset: 0;
> > > > >                         borderColor: #raised;
> > > > >                         color: color;
> > > > >                         hResizing: #spaceFill;
> > > > >                         vResizing: #rigid.
> > > > >                 col addMorphBack: divider.
> > > > >                 col addMorphBack: (self trackControlsFor:
> > trackIndex)].
> > > > >
> > > > >         LastMIDIPort ifNotNil: [
> > > > >                 "use the most recently set MIDI port"
> > > > >                 scorePlayer openMIDIPort: LastMIDIPort].
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>rateControl (in category 'layout')
> > -----
> > > > >   rateControl
> > > > >
> > > > >         | rateSlider middleLine r |
> > > > >         rateSlider := SimpleSliderMorph new
> > > > >                 color: color;
> > > > >                 sliderColor: Color gray;
> > > > > +               extent: 180@12;
> > > > > -               extent: 180@6;
> > > > >                 target: self;
> > > > >                 actionSelector: #setLogRate:;
> > > > >                 minVal: -1.0;
> > > > >                 maxVal: 1.0;
> > > > >                 adjustToValue: 0.0.
> > > > >         middleLine := Morph new  "center indicator for pan slider"
> > > > >                 color: (Color r: 0.4 g: 0.4 b: 0.4);
> > > > >                 extent: 1@(rateSlider height - 4);
> > > > >                 position: rateSlider center x@(rateSlider top + 2).
> > > > >         rateSlider addMorphBack: middleLine.
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #rigid;
> > > > >                 height: 24.
> > > > >         r addMorphBack: (StringMorph contents: 'slow ' translated).
> > > > >         r addMorphBack: rateSlider.
> > > > >         r addMorphBack: (StringMorph contents: ' fast' translated).
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>scrollControl (in category
> > 'layout')
> > > > > -----
> > > > >   scrollControl
> > > > >
> > > > >         | r |
> > > > >         scrollSlider := SimpleSliderMorph new
> > > > >                 color: color;
> > > > >                 sliderColor: Color gray;
> > > > > +               extent: 360@12;
> > > > > -               extent: 360@6;
> > > > >                 target: scorePlayer;
> > > > >                 actionSelector: #positionInScore:;
> > > > >                 adjustToValue: scorePlayer positionInScore.
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #rigid;
> > > > >                 height: 24.
> > > > >         r addMorphBack: (StringMorph contents: 'start ' translated).
> > > > >         r addMorphBack: scrollSlider.
> > > > >         r addMorphBack: (StringMorph contents: ' end' translated).
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in
> > category
> > > > > 'layout') -----
> > > > >   trackNumAndMuteButtonFor: trackIndex
> > > > >
> > > > >         | muteButton instSelector pianoRollColor r |
> > > > >         muteButton := SimpleSwitchMorph new
> > > > >                 onColor: (Color r: 1.0 g: 0.6 b: 0.6);
> > > > >                 offColor: color;
> > > > >                 color: color;
> > > > >                 label: 'Mute' translated;
> > > > >                 target: scorePlayer;
> > > > >                 actionSelector: #mutedForTrack:put:;
> > > > >                 arguments: (Array with: trackIndex).
> > > > >         instSelector := PopUpChoiceMorph new
> > > > >                 extent: 95@14;
> > > > >                 contentsClipped: 'oboe1';
> > > > >                 target: self;
> > > > >                 actionSelector: #atTrack:from:selectInstrument:;
> > > > >                 getItemsSelector: #instrumentChoicesForTrack:;
> > > > >                 getItemsArgs: (Array with: trackIndex).
> > > > >         instSelector arguments:
> > > > >                 (Array with: trackIndex with: instSelector).
> > > > >         instrumentSelector at: trackIndex put: instSelector.
> > > > >
> > > > >         "select track color using same color list as
> > PianoRollScoreMorph"
> > > > >         pianoRollColor := (Color wheel: scorePlayer score tracks
> > size) at:
> > > > > trackIndex.
> > > > >
> > > > >         r := self makeRow
> > > > >                 hResizing: #spaceFill;
> > > > >                 vResizing: #spaceFill;
> > > > >                 extent: 70@10.
> > > > >         r addMorphBack:
> > > > >                 ((StringMorph
> > > > >                         contents: trackIndex printString
> > > > >                         font: (TextStyle default fontOfSize: 24))
> > color:
> > > > > pianoRollColor).
> > > > >         trackIndex < 10
> > > > >                 ifTrue: [r addMorphBack: (Morph new color: color;
> > extent:
> > > > > 19@8)]  "spacer"
> > > > >                 ifFalse: [r addMorphBack: (Morph new color: color;
> > extent:
> > > > > 8@8)].  "spacer"
> > > > >         r addMorphBack:
> > > > >                 (StringMorph new
> > > > > +                       extent: 80@14;
> > > > > -                       extent: 140@14;
> > > > >                         contentsClipped: (scorePlayer infoForTrack:
> > > > > trackIndex)).
> > > > >         r addMorphBack: (Morph new color: color; extent: 8@8).
> > "spacer"
> > > > >         r addMorphBack: instSelector.
> > > > >         r addMorphBack: (AlignmentMorph newRow color: color).
> > "spacer"
> > > > >         r addMorphBack: muteButton.
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > > Item was changed:
> > > > >   ----- Method: ScorePlayerMorph>>volumeControl (in category
> > 'layout')
> > > > > -----
> > > > >   volumeControl
> > > > >
> > > > >         | volumeSlider r |
> > > > >         volumeSlider := SimpleSliderMorph new
> > > > >                 color: color;
> > > > >                 sliderColor: Color gray;
> > > > > +               extent: 80@12;
> > > > > -               extent: 80@6;
> > > > >                 target: scorePlayer;
> > > > >                 actionSelector: #overallVolume:;
> > > > >                 adjustToValue: scorePlayer overallVolume.
> > > > >         r := self makeRow
> > > > > +               hResizing: #spaceFill;
> > > > > -               hResizing: #shrinkWrap;
> > > > >                 vResizing: #rigid;
> > > > >                 height: 24.
> > > > >         r addMorphBack: (StringMorph contents: 'soft  ' translated).
> > > > >         r addMorphBack: volumeSlider.
> > > > >         r addMorphBack: (StringMorph contents: ' loud' translated).
> > > > >         ^ r
> > > > >   !
> > > > >
> > > > >
> > > > >
> > >
> > > >
> > >
> > >
> >
> >

>





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1418.mcz

David T. Lewis
And thanks for the ScorePlayereMorph updates!

Dave

On Sun, Apr 22, 2018 at 07:45:20PM +0200, karl ramberg wrote:

> I did what you suggeted with  MCFileBasedRepository flushAllCache and
> delete the files.
> I seems to have fixed the issue.
> Thanks
>
> Best,
> Karl
>
>
> On Sun, Apr 22, 2018 at 7:31 PM, David T. Lewis <[hidden email]> wrote:
>
> > It's easy to get the Monticello browsers confused. If you directly load the
> > re-saved package (Morphic-dtl.1418) back into your old image, it will
> > probably
> > be fine again :-)
> >
> > Dave
> >
> > On Sun, Apr 22, 2018 at 06:58:29PM +0200, karl ramberg wrote:
> > > Thanks, David.
> > > I'm not sure how the image got in a bad state :-(
> > > I'll start over with a new one.
> > >
> > > Cheers,
> > > Karl
> > >
> > >
> > > On Sun, Apr 22, 2018 at 6:41 PM, David T. Lewis <[hidden email]>
> > wrote:
> > >
> > > > I re-saved Karl's update in Morphic-dtl.1418, which is the same as
> > > > Morphic-kfr.1418
> > > > except for the fixed ancestry. I kept a copy of Karl's original MCZ
> > file
> > > > in case
> > > > of any problems.
> > > >
> > > > Dave
> > > >
> > > > On Sun, Apr 22, 2018 at 10:10:04AM -0400, David T. Lewis wrote:
> > > > > Hi Karl,
> > > > >
> > > > > I used the web interface to delete version Morphic-kfr.1418.
> > > > >
> > > > > You will need to do "MCFileBasedRepository flushAllCaches" in your
> > image,
> > > > > and probably delete the file in your package-cache directory also.
> > > > >
> > > > > Usually it is best not to delete versions the way I just did, but in
> > this
> > > > > case the version history seemed to be causing problems, so I deleted
> > it.
> > > > >
> > > > > If anyone has problems with a recently updated image, please revert
> > back
> > > > > to Morphic-cmm.1417 and do a flushAllCaches.
> > > > >
> > > > > Dave
> > > > >
> > > > >
> > > > > On Sun, Apr 22, 2018 at 11:50:59AM +0200, karl ramberg wrote:
> > > > > > Hm,
> > > > > > Bogus ancestry for this commit :-(
> > > > > > Can it be deleted ?
> > > > > >
> > > > > > Best,
> > > > > > Karl
> > > > > >
> > > > > > On Sun, Apr 22, 2018 at 11:31 AM, <[hidden email]>
> > wrote:
> > > > > >
> > > > > > > Karl Ramberg uploaded a new version of Morphic to project The
> > Trunk:
> > > > > > > http://source.squeak.org/trunk/Morphic-kfr.1418.mcz
> > > > > > >
> > > > > > > ==================== Summary ====================
> > > > > > >
> > > > > > > Name: Morphic-kfr.1418
> > > > > > > Author: kfr
> > > > > > > Time: 22 April 2018, 11:30:41.518937 am
> > > > > > > UUID: d6dd46c1-fa46-5043-bf0d-8b4542cf733d
> > > > > > > Ancestors: Morphic-kfr.1416, Morphic-cmm.1417
> > > > > > >
> > > > > > > Some maintenance to ScorePlayerMorph.
> > > > > > > Fixing some layout issues.
> > > > > > > Add menu options to make a new score and add tracks to the score.
> > > > > > >
> > > > > > > =============== Diff against Morphic-kfr.1416 ===============
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ProportionalSplitterMorph>>balanceOffsets (in
> > > > category
> > > > > > > 'layout') -----
> > > > > > >   balanceOffsets
> > > > > > > +       (self valueOfProperty: #fullDelta) ifNil: [self
> > setProperty:
> > > > > > > #fullDelta toValue: (0@0)] .
> > > > > > >
> > > > > > >         self layoutFrame hasFixedHeight ifTrue: [
> > > > > > >                 | otop obot ctop cbot topf |
> > > > > > >
> > > > > > >                 otop := (owner submorphs detect: [:m |
> > > > > > >                                         m layoutFrame topFraction
> > > > isZero]
> > > > > > > ifNone: [^ self]) in: [:tm |
> > > > > > >                                                 tm top - (tm
> > > > layoutFrame
> > > > > > > topOffset ifNil: [0])].
> > > > > > >
> > > > > > >                 obot := (owner submorphs detect: [:m |
> > > > > > >                                         m layoutFrame
> > bottomFraction
> > > > = 1]
> > > > > > > ifNone: [^ self]) in: [:tm |
> > > > > > >                                                 tm bottom - (tm
> > > > > > > layoutFrame bottomOffset ifNil: [0])].
> > > > > > >
> > > > > > >                 ctop := (self layoutFrame topFraction * (obot -
> > > > otop))
> > > > > > > rounded
> > > > > > >                                         + otop + (self
> > layoutFrame
> > > > > > > topOffset ifNil: [0]).
> > > > > > >                 cbot := (self layoutFrame bottomFraction * (obot
> > -
> > > > otop))
> > > > > > > rounded
> > > > > > >                                         + otop + (self
> > layoutFrame
> > > > > > > bottomOffset ifNil: [0]).
> > > > > > >
> > > > > > >                 topf := self layoutFrame topFraction.
> > > > > > >                 self layoutFrame topFraction:  ((ctop + cbot) *
> > 0.5 -
> > > > > > > otop) / (obot - otop) asFloat.
> > > > > > >                 self layoutFrame bottomFraction: self layoutFrame
> > > > > > > topFraction.
> > > > > > >                 self layoutFrame topOffset: ctop -
> > > > > > >                         (self layoutFrame topFraction * (obot -
> > > > otop) +
> > > > > > > otop) rounded.
> > > > > > >                 self layoutFrame bottomOffset: cbot -
> > > > > > >                         (self layoutFrame bottomFraction * (obot
> > -
> > > > otop) +
> > > > > > > otop) rounded..
> > > > > > >
> > > > > > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > > > > > >                         (m layoutFrame topFraction closeTo: topf)
> > > > ifTrue: [
> > > > > > >                                 m layoutFrame topFraction: self
> > > > > > > layoutFrame topFraction.
> > > > > > >                                 m layoutFrame topOffset:
> > > > > > >                                         m layoutFrame topOffset -
> > > > (self
> > > > > > > valueOfProperty: #fullDelta) y].
> > > > > > >                         (m layoutFrame bottomFraction closeTo:
> > topf)
> > > > > > > ifTrue: [
> > > > > > >                                 m layoutFrame bottomFraction:
> > self
> > > > > > > layoutFrame topFraction.
> > > > > > >                                 m layoutFrame bottomOffset:
> > > > > > >                                         m layoutFrame
> > bottomOffset -
> > > > (self
> > > > > > > valueOfProperty: #fullDelta) y.]]] .
> > > > > > >
> > > > > > >         self layoutFrame hasFixedWidth ifTrue: [
> > > > > > >                 | oleft oright cleft cright leftf |
> > > > > > >
> > > > > > >                 oleft := (owner submorphs detect: [:m |
> > > > > > >                         m layoutFrame leftFraction isZero]
> > ifNone: [^
> > > > > > > self]) in: [:tm |
> > > > > > >                                 tm left - (tm layoutFrame
> > leftOffset
> > > > > > > ifNil: [0])].
> > > > > > >
> > > > > > >                 oright := (owner submorphs detect: [:m |
> > > > > > >                         m layoutFrame rightFraction = 1] ifNone:
> > [^
> > > > self])
> > > > > > > in: [:tm |
> > > > > > >                                 tm right - (tm layoutFrame
> > > > rightOffset
> > > > > > > ifNil: [0])].
> > > > > > >
> > > > > > >                 cleft := (self layoutFrame leftFraction *
> > (oright -
> > > > > > > oleft)) rounded
> > > > > > >                                         + oleft + (self
> > layoutFrame
> > > > > > > leftOffset ifNil: [0]).
> > > > > > >                 cright := (self layoutFrame rightFraction *
> > (oright -
> > > > > > > oleft)) rounded
> > > > > > >                                         + oleft + (self
> > layoutFrame
> > > > > > > rightOffset ifNil: [0]).
> > > > > > >
> > > > > > >                 leftf := self layoutFrame leftFraction.
> > > > > > >                 self layoutFrame leftFraction: ((cleft + cright)
> > *
> > > > 0.5 -
> > > > > > > oleft) / (oright - oleft) asFloat.
> > > > > > >                 self layoutFrame rightFraction: self layoutFrame
> > > > > > > leftFraction.
> > > > > > >
> > > > > > >                 self layoutFrame leftOffset: cleft -
> > > > > > >                         (self layoutFrame leftFraction * (oright
> > -
> > > > oleft)
> > > > > > > + oleft) rounded.
> > > > > > >                 self layoutFrame rightOffset: cright -
> > > > > > >                         (self layoutFrame rightFraction *
> > (oright -
> > > > oleft)
> > > > > > > + oleft) rounded.
> > > > > > >
> > > > > > >                 (leftOrTop copy union: rightOrBottom) do: [:m |
> > > > > > >                         (m layoutFrame leftFraction closeTo:
> > leftf)
> > > > > > > ifTrue: [
> > > > > > >                                 m layoutFrame leftFraction: self
> > > > > > > layoutFrame leftFraction.
> > > > > > >                                 m layoutFrame leftOffset:
> > > > > > >                                         m layoutFrame leftOffset
> > -
> > > > (self
> > > > > > > valueOfProperty: #fullDelta) x].
> > > > > > >                         (m layoutFrame rightFraction closeTo:
> > leftf)
> > > > > > > ifTrue: [
> > > > > > >                                 m layoutFrame rightFraction: self
> > > > > > > layoutFrame leftFraction.
> > > > > > >                                 m layoutFrame rightOffset:
> > > > > > >                                         m layoutFrame
> > rightOffset -
> > > > (self
> > > > > > > valueOfProperty: #fullDelta) x.]]] .
> > > > > > >
> > > > > > >         self removeProperty: #fullDelta.
> > > > > > >         owner layoutChanged
> > > > > > >   !
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ProportionalSplitterMorph>>step (in category
> > > > 'events')
> > > > > > > -----
> > > > > > >   step
> > > > > > >         splitsTopAndBottom
> > > > > > >                 ifTrue: [ self reduceTopBottomImbalance ]
> > > > > > >                 ifFalse:
> > > > > > >                         [ self reduceLeftRightImbalance abs > 1
> > > > ifTrue:
> > > > > > >                                 [ self splittersLeftDo:
> > > > > > >                                         [ : splitter | splitter
> > > > > > > reduceLeftRightImbalance ].
> > > > > > >                                 self splittersRightDo:
> > > > > > > +                                       [ : splitter | splitter
> > > > > > > reduceLeftRightImbalance ] ] ].
> > > > > > > +       self balanceOffsets!
> > > > > > > -                                       [ : splitter | splitter
> > > > > > > reduceLeftRightImbalance ] ] ]!
> > > > > > >
> > > > > > > Item was added:
> > > > > > > + ----- Method: ScorePlayerMorph>>addNewScore (in category
> > 'menu')
> > > > -----
> > > > > > > + addNewScore
> > > > > > > +       "Open a MIDI score and re-init controls..."
> > > > > > > +       | score player |
> > > > > > > +
> > > > > > > +       score := MIDIScore new.
> > > > > > > +       score tracks: (Array with: Array new).
> > > > > > > +       score trackInfo: #('Instrument').
> > > > > > > +       player := ScorePlayer onScore: score.
> > > > > > > +       ^self onScorePlayer: player title: 'new'!
> > > > > > >
> > > > > > > Item was added:
> > > > > > > + ----- Method: ScorePlayerMorph>>addTrackToScore (in category
> > > > 'menu')
> > > > > > > -----
> > > > > > > + addTrackToScore
> > > > > > > +       "add a instrument track to the current score"
> > > > > > > +       | score tracks trackInfo player |
> > > > > > > +       score := scorePlayer score.
> > > > > > > +       tracks := score tracks copyWith:#().
> > > > > > > +       score tracks: tracks.
> > > > > > > +       trackInfo := score trackInfo copyWith: 'Instrument'.
> > > > > > > +       score trackInfo: trackInfo.
> > > > > > > +       player := ScorePlayer onScore: score.
> > > > > > > +       ^self onScorePlayer: player title: 'new'!
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ScorePlayerMorph>>invokeMenu (in category 'menu')
> > > > -----
> > > > > > >   invokeMenu
> > > > > > >         "Invoke a menu of additonal functions for this
> > ScorePlayer."
> > > > > > > -
> > > > > > >         | aMenu |
> > > > > > >         aMenu := MenuMorph new defaultTarget: self.
> > > > > > > +       aMenu add: 'add a new score' translated action:
> > #addNewScore.
> > > > > > > +       aMenu add: 'add a new track to score' translated action:
> > > > > > > #addTrackToScore.
> > > > > > >         aMenu add: 'open a MIDI file' translated action:
> > > > #openMIDIFile.
> > > > > > > +       aMenu addList: {#-. {'save as AIFF file' translated.
> > > > #saveAsAIFF}.
> > > > > > > {'save as WAV file' translated. #saveAsWAV}. {'save as Sun AU
> > file'
> > > > > > > translated. #saveAsSunAudio}. #-}.
> > > > > > > +       aMenu
> > > > > > > +               add: 'reload instruments' translated
> > > > > > > +               target: AbstractSound
> > > > > > > +               selector: #updateScorePlayers.
> > > > > > > -       aMenu addList: {
> > > > > > > -               #-.
> > > > > > > -               {'save as AIFF file' translated.
> > #saveAsAIFF}.
> > > > > > > -               {'save as WAV file' translated.
> >  #saveAsWAV}.
> > > > > > > -               {'save as Sun AU file' translated.
> > > > #saveAsSunAudio}.
> > > > > > > -               #-}.
> > > > > > > -       aMenu add: 'reload instruments' translated target:
> > > > AbstractSound
> > > > > > > selector: #updateScorePlayers.
> > > > > > >         aMenu addLine.
> > > > > > >         scorePlayer midiPort
> > > > > > > +               ifNil: [aMenu add: 'play via MIDI' translated
> > action:
> > > > > > > #openMIDIPort]
> > > > > > > +               ifNotNil: [aMenu add: 'play via built in synth'
> > > > translated
> > > > > > > action: #closeMIDIPort.
> > > > > > > -               ifNil: [
> > > > > > > -                       aMenu add: 'play via MIDI' translated
> > action:
> > > > > > > #openMIDIPort]
> > > > > > > -               ifNotNil: [
> > > > > > > -                       aMenu add: 'play via built in synth'
> > > > translated
> > > > > > > action: #closeMIDIPort.
> > > > > > >                         aMenu add: 'new MIDI controller'
> > translated
> > > > > > > action: #makeMIDIController:].
> > > > > > >         aMenu addLine.
> > > > > > >         aMenu add: 'make a pause marker' translated action:
> > > > > > > #makeAPauseEvent:.
> > > > > > > +       aMenu popUpInWorld: self world!
> > > > > > > -
> > > > > > > -       aMenu popUpInWorld: self world.
> > > > > > > - !
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ScorePlayerMorph>>onScorePlayer:title: (in
> > category
> > > > > > > 'initialization') -----
> > > > > > >   onScorePlayer: aScorePlayer title: scoreName
> > > > > > >         | divider col r |
> > > > > > >         scorePlayer := aScorePlayer.
> > > > > > >         scorePlayer ifNotNil:
> > > > > > >                 [scorePlayer  reset.
> > > > > > >                 instrumentSelector := Array new: scorePlayer
> > score
> > > > tracks
> > > > > > > size].
> > > > > > >
> > > > > > >         self removeAllMorphs.
> > > > > > >         self addMorphBack: self makeControls.
> > > > > > >         scorePlayer ifNil: [^ self].
> > > > > > >
> > > > > > >         r := self makeRow
> > > > > > > +               hResizing: #spaceFill;
> > > > > > > -               hResizing: #shrinkWrap;
> > > > > > >                 vResizing: #shrinkWrap.
> > > > > > >         r addMorphBack: self rateControl;
> > > > > > >                 addMorphBack: (Morph newBounds: (0@0 extent:
> > 20@0)
> > > > color:
> > > > > > > Color transparent);
> > > > > > >                 addMorphBack: self volumeControl.
> > > > > > >         self addMorphBack: r.
> > > > > > >         self addMorphBack: self scrollControl.
> > > > > > >
> > > > > > >         col := AlignmentMorph newColumn color: color;
> > layoutInset: 0.
> > > > > > >         self addMorphBack: col.
> > > > > > >         1 to: scorePlayer trackCount do: [:trackIndex |
> > > > > > >                 divider := AlignmentMorph new
> > > > > > >                         extent: 10@1;
> > > > > > >                         borderWidth: 1;
> > > > > > >                         layoutInset: 0;
> > > > > > >                         borderColor: #raised;
> > > > > > >                         color: color;
> > > > > > >                         hResizing: #spaceFill;
> > > > > > >                         vResizing: #rigid.
> > > > > > >                 col addMorphBack: divider.
> > > > > > >                 col addMorphBack: (self trackControlsFor:
> > > > trackIndex)].
> > > > > > >
> > > > > > >         LastMIDIPort ifNotNil: [
> > > > > > >                 "use the most recently set MIDI port"
> > > > > > >                 scorePlayer openMIDIPort: LastMIDIPort].
> > > > > > >   !
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ScorePlayerMorph>>rateControl (in category
> > 'layout')
> > > > -----
> > > > > > >   rateControl
> > > > > > >
> > > > > > >         | rateSlider middleLine r |
> > > > > > >         rateSlider := SimpleSliderMorph new
> > > > > > >                 color: color;
> > > > > > >                 sliderColor: Color gray;
> > > > > > > +               extent: 180@12;
> > > > > > > -               extent: 180@6;
> > > > > > >                 target: self;
> > > > > > >                 actionSelector: #setLogRate:;
> > > > > > >                 minVal: -1.0;
> > > > > > >                 maxVal: 1.0;
> > > > > > >                 adjustToValue: 0.0.
> > > > > > >         middleLine := Morph new  "center indicator for pan
> > slider"
> > > > > > >                 color: (Color r: 0.4 g: 0.4 b: 0.4);
> > > > > > >                 extent: 1@(rateSlider height - 4);
> > > > > > >                 position: rateSlider center x@(rateSlider top +
> > 2).
> > > > > > >         rateSlider addMorphBack: middleLine.
> > > > > > >         r := self makeRow
> > > > > > > +               hResizing: #spaceFill;
> > > > > > > -               hResizing: #shrinkWrap;
> > > > > > >                 vResizing: #rigid;
> > > > > > >                 height: 24.
> > > > > > >         r addMorphBack: (StringMorph contents: 'slow '
> > translated).
> > > > > > >         r addMorphBack: rateSlider.
> > > > > > >         r addMorphBack: (StringMorph contents: ' fast'
> > translated).
> > > > > > >         ^ r
> > > > > > >   !
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ScorePlayerMorph>>scrollControl (in category
> > > > 'layout')
> > > > > > > -----
> > > > > > >   scrollControl
> > > > > > >
> > > > > > >         | r |
> > > > > > >         scrollSlider := SimpleSliderMorph new
> > > > > > >                 color: color;
> > > > > > >                 sliderColor: Color gray;
> > > > > > > +               extent: 360@12;
> > > > > > > -               extent: 360@6;
> > > > > > >                 target: scorePlayer;
> > > > > > >                 actionSelector: #positionInScore:;
> > > > > > >                 adjustToValue: scorePlayer positionInScore.
> > > > > > >         r := self makeRow
> > > > > > > +               hResizing: #spaceFill;
> > > > > > > -               hResizing: #shrinkWrap;
> > > > > > >                 vResizing: #rigid;
> > > > > > >                 height: 24.
> > > > > > >         r addMorphBack: (StringMorph contents: 'start '
> > translated).
> > > > > > >         r addMorphBack: scrollSlider.
> > > > > > >         r addMorphBack: (StringMorph contents: ' end'
> > translated).
> > > > > > >         ^ r
> > > > > > >   !
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in
> > > > category
> > > > > > > 'layout') -----
> > > > > > >   trackNumAndMuteButtonFor: trackIndex
> > > > > > >
> > > > > > >         | muteButton instSelector pianoRollColor r |
> > > > > > >         muteButton := SimpleSwitchMorph new
> > > > > > >                 onColor: (Color r: 1.0 g: 0.6 b: 0.6);
> > > > > > >                 offColor: color;
> > > > > > >                 color: color;
> > > > > > >                 label: 'Mute' translated;
> > > > > > >                 target: scorePlayer;
> > > > > > >                 actionSelector: #mutedForTrack:put:;
> > > > > > >                 arguments: (Array with: trackIndex).
> > > > > > >         instSelector := PopUpChoiceMorph new
> > > > > > >                 extent: 95@14;
> > > > > > >                 contentsClipped: 'oboe1';
> > > > > > >                 target: self;
> > > > > > >                 actionSelector: #atTrack:from:selectInstrument:;
> > > > > > >                 getItemsSelector: #instrumentChoicesForTrack:;
> > > > > > >                 getItemsArgs: (Array with: trackIndex).
> > > > > > >         instSelector arguments:
> > > > > > >                 (Array with: trackIndex with: instSelector).
> > > > > > >         instrumentSelector at: trackIndex put: instSelector.
> > > > > > >
> > > > > > >         "select track color using same color list as
> > > > PianoRollScoreMorph"
> > > > > > >         pianoRollColor := (Color wheel: scorePlayer score tracks
> > > > size) at:
> > > > > > > trackIndex.
> > > > > > >
> > > > > > >         r := self makeRow
> > > > > > >                 hResizing: #spaceFill;
> > > > > > >                 vResizing: #spaceFill;
> > > > > > >                 extent: 70@10.
> > > > > > >         r addMorphBack:
> > > > > > >                 ((StringMorph
> > > > > > >                         contents: trackIndex printString
> > > > > > >                         font: (TextStyle default fontOfSize: 24))
> > > > color:
> > > > > > > pianoRollColor).
> > > > > > >         trackIndex < 10
> > > > > > >                 ifTrue: [r addMorphBack: (Morph new color: color;
> > > > extent:
> > > > > > > 19@8)]  "spacer"
> > > > > > >                 ifFalse: [r addMorphBack: (Morph new color:
> > color;
> > > > extent:
> > > > > > > 8@8)].  "spacer"
> > > > > > >         r addMorphBack:
> > > > > > >                 (StringMorph new
> > > > > > > +                       extent: 80@14;
> > > > > > > -                       extent: 140@14;
> > > > > > >                         contentsClipped: (scorePlayer
> > infoForTrack:
> > > > > > > trackIndex)).
> > > > > > >         r addMorphBack: (Morph new color: color; extent: 8@8).
> > > > "spacer"
> > > > > > >         r addMorphBack: instSelector.
> > > > > > >         r addMorphBack: (AlignmentMorph newRow color: color).
> > > > "spacer"
> > > > > > >         r addMorphBack: muteButton.
> > > > > > >         ^ r
> > > > > > >   !
> > > > > > >
> > > > > > > Item was changed:
> > > > > > >   ----- Method: ScorePlayerMorph>>volumeControl (in category
> > > > 'layout')
> > > > > > > -----
> > > > > > >   volumeControl
> > > > > > >
> > > > > > >         | volumeSlider r |
> > > > > > >         volumeSlider := SimpleSliderMorph new
> > > > > > >                 color: color;
> > > > > > >                 sliderColor: Color gray;
> > > > > > > +               extent: 80@12;
> > > > > > > -               extent: 80@6;
> > > > > > >                 target: scorePlayer;
> > > > > > >                 actionSelector: #overallVolume:;
> > > > > > >                 adjustToValue: scorePlayer overallVolume.
> > > > > > >         r := self makeRow
> > > > > > > +               hResizing: #spaceFill;
> > > > > > > -               hResizing: #shrinkWrap;
> > > > > > >                 vResizing: #rigid;
> > > > > > >                 height: 24.
> > > > > > >         r addMorphBack: (StringMorph contents: 'soft  '
> > translated).
> > > > > > >         r addMorphBack: volumeSlider.
> > > > > > >         r addMorphBack: (StringMorph contents: ' loud'
> > translated).
> > > > > > >         ^ r
> > > > > > >   !
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> >
> > >
> >
> >
> >

>