-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into task/127-bug-fixing
- Loading branch information
Showing
77 changed files
with
292 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/MusicNotation-Editor.package/MNEditor.class/instance/addNewVariableStatement..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
statements | ||
addNewVariableStatement: aString | ||
self content localVariables notEmpty | ||
ifTrue: [^ (aString, (self createNewVariableStatement: aString))] | ||
ifTrue: [^ (aString, (self createNewVariableStatement))] | ||
ifFalse: [^ aString]. |
2 changes: 1 addition & 1 deletion
2
...s/instance/createNewVariableStatement..st → ...ss/instance/createNewVariableStatement.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
packages/MusicNotation-Editor.package/MNEditor.class/instance/setException.statement..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
evaluating | ||
setException: aMNEditorStatus statement: anInteger | ||
self status: aMNEditorStatus. | ||
self status applyStyleTo: self statement: anInteger. | ||
self status statementNumber: anInteger. | ||
self status applyStyleTo: self statement: anInteger. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/MusicNotation-Editor.package/MNEditor.class/instance/updateContentsNotSelected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
symbol selection | ||
updateContentsNotSelected | ||
(1 to: self content contentsList size) do: | ||
[ :i | self content applyStyleSelected: false toStatement: i toEditor: self]. | ||
[ :each | self content applyStyleSelected: false toStatement: each toEditor: self]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/MusicNotation-Editor.package/MNEditorContent.class/instance/endOfStatement..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
statement mapping | ||
endOfStatement: anInteger | ||
^ (self startOfStatement: anInteger) + ((self contentsList at: anInteger) size) - 1 | ||
| offset | | ||
offset := 1. | ||
^ (self startOfStatement: anInteger) + ((self contentsList at: anInteger) size) - offset |
2 changes: 1 addition & 1 deletion
2
...ages/MusicNotation-Editor.package/MNEditorContent.class/instance/rangeOffsetStatement..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
statement mapping | ||
rangeOffsetStatement: anInteger | ||
| offset | | ||
offset := ((1 to: anInteger - 1) collect: [:i | (self contentsList at: i) size] ). | ||
offset := ((1 to: anInteger - 1) collect: [:each| (self contentsList at: each) size] ). | ||
offset | ||
ifEmpty: [^ 0] | ||
ifNotEmpty: [^ offset sum]. |
2 changes: 1 addition & 1 deletion
2
packages/MusicNotation-Editor.package/MNEditorContent.class/instance/statementsOf..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
statement mapping | ||
statementsOf: aMNNote | ||
^ (1 to: self statementMapping size) | ||
select: [ :i | (self statementMapping at: i) includes: aMNNote]. | ||
select: [ :each | (self statementMapping at: each) includes: aMNNote]. |
2 changes: 1 addition & 1 deletion
2
...cNotation-Editor.package/MNEditorContent.class/instance/updateContentsSelect.toEditor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
updating style | ||
updateContentsSelect: aCollection toEditor: anEditor | ||
(1 to: self contentsList size) do: | ||
[ :i | self applyStyleSelected: (aCollection includes: i) toStatement: i toEditor: anEditor] | ||
[ :each | self applyStyleSelected: (aCollection includes: each) toStatement: each toEditor: anEditor] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...ges/MusicNotation-Editor.package/MNEditorStatusException.class/instance/rangeOffsetIn..st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...otation-Editor.package/MNEditorStatusException.class/instance/rangeOffsetIn.statement..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
range calculation | ||
rangeOffsetIn: anEditor statement: anInteger | ||
| offset | | ||
offset := ((1 to: anInteger - 1) collect: [:i | (anEditor content contentsList at: i) size] ). | ||
offset := ((1 to: anInteger - 1) collect: [:each | (anEditor content contentsList at: each) size] ). | ||
offset | ||
ifEmpty: [^ 0] | ||
ifNotEmpty: [^ offset sum]. |
3 changes: 0 additions & 3 deletions
3
...s/MusicNotation-Editor.package/MNEditorStatusException.class/instance/statementNumber..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...es/MusicNotation-Editor.package/MNEditorStatusException.class/instance/statementNumber.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ges/MusicNotation-Editor.package/MNEditorStatusException.class/instance/totalRange.in..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ages/MusicNotation-Editor.package/MNEditorStatusException.class/instance/totalRangeIn..st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/checkForEdgeCases..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
updating | ||
checkForEdgeCases: aCollection | ||
(self shouldIgnoreNote: aCollection) ifTrue: [self ignoreNote: aCollection first]. | ||
(self shouldSplitBeam: aCollection) ifTrue: [self splitBeam]. | ||
self update. |
8 changes: 8 additions & 0 deletions
8
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/checkForEdgeCases.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
updating | ||
checkForEdgeCases | ||
| upNotes downNotes | | ||
|
||
downNotes := self notes select: [ :note | note noteLayout up not]. | ||
upNotes := self notes select: [ :note | note noteLayout up]. | ||
self checkForEdgeCases: downNotes. | ||
self checkForEdgeCases: upNotes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/growStemsExcept..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
drawing | ||
growStemsExcept: aMNNoteMorph | ||
self notes do: [:note | note ~= aMNNoteMorph ifTrue: [note noteLayout stemLength: (self stemOffset: note)]]. |
4 changes: 4 additions & 0 deletions
4
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/ignoreNote..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
updating | ||
ignoreNote: aMNNoteMorph | ||
(self isOuterNote: aMNNoteMorph) ifFalse: [self growStemsExcept: aMNNoteMorph]. | ||
self notes remove: aMNNoteMorph. |
3 changes: 3 additions & 0 deletions
3
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/isOuterNote..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
calculating | ||
isOuterNote: aMNNoteMorph | ||
^ aMNNoteMorph = self notes first or: [aMNNoteMorph = self notes last] |
3 changes: 3 additions & 0 deletions
3
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/shouldIgnoreNote..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
calculating | ||
shouldIgnoreNote: aCollection | ||
^ aCollection size = 1 and: [self notes size > 2] |
3 changes: 3 additions & 0 deletions
3
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/shouldSplitBeam..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
calculating | ||
shouldSplitBeam: aCollection | ||
^ aCollection size = 2 and: [self notes size = 4] |
10 changes: 10 additions & 0 deletions
10
packages/MusicNotation-Graphics.package/MNBeamDrawer.class/instance/splitBeam.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
updating | ||
splitBeam | ||
| firstHalf secondHalf | | ||
|
||
firstHalf := OrderedCollection new add: self notes first; add: self notes second; yourself. | ||
secondHalf := OrderedCollection new add: self notes third; add: self notes last; yourself. | ||
|
||
self notes: firstHalf. | ||
self draw. | ||
self notes: secondHalf. |
Oops, something went wrong.