-
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' of origin into task/127-bug-fixing
- Loading branch information
Showing
90 changed files
with
829 additions
and
179 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
packages/MusicNotation-Core.package/MNNote.class/instance/isEighthOrShorter.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 @@ | ||
validating | ||
isEighthOrShorter | ||
^ self duration denominator >= 8 | ||
self triole isEmpty | ||
ifFalse: [^ self duration denominator * (2/3) >= 8] | ||
ifTrue: [^ self duration denominator >= 8]. |
3 changes: 3 additions & 0 deletions
3
packages/MusicNotation-Core.package/MNNote.class/instance/isTriole.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 @@ | ||
accessing | ||
isTriole | ||
^ self triole isEmpty not |
4 changes: 4 additions & 0 deletions
4
packages/MusicNotation-Core.package/MNNote.class/instance/setTriole..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 @@ | ||
accessing | ||
setTriole: anOrderedCollection | ||
self triole: anOrderedCollection. | ||
self duration: (self duration * (2/3)). |
3 changes: 3 additions & 0 deletions
3
packages/MusicNotation-Core.package/MNNote.class/instance/triole..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 @@ | ||
accessing | ||
triole: anOrderedCollection | ||
triole := anOrderedCollection. |
4 changes: 4 additions & 0 deletions
4
packages/MusicNotation-Core.package/MNNote.class/instance/triole.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 @@ | ||
accessing | ||
triole | ||
triole ifNil: [triole := OrderedCollection new]. | ||
^ triole |
6 changes: 3 additions & 3 deletions
6
packages/MusicNotation-Core.package/MNNote.class/instance/validateDuration.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,8 +1,8 @@ | ||
validating | ||
validateDuration | ||
self duration strictlyPositive | ||
(self duration strictlyPositive or: [self isTriole]) | ||
ifFalse: [ MNInvalidValue for: self at: #duration description: 'duration is not strictly positive' ]. | ||
self duration denominator isPowerOfTwo | ||
(self duration denominator isPowerOfTwo or: [self isTriole]) | ||
ifFalse: [ MNInvalidValue for: self at: #duration description: 'denominator is not a power of two' ]. | ||
(self durationNumerator2 + 1) isPowerOfTwo | ||
((self durationNumerator2 + 1) isPowerOfTwo or: [self isTriole]) | ||
ifFalse: [ MNInvalidValue for: self at: #duration description: 'numerator is not dottable' ]. |
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
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
132 changes: 79 additions & 53 deletions
132
packages/MusicNotation-Editor.package/MNEditor.class/class/openTutorial.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,55 +1,81 @@ | ||
opening | ||
openTutorial | ||
"Ignore while linting" | ||
^ self openContents: '"Tutorial - James Bond" | ||
| coolBass | | ||
"set key" | ||
self measure keyFifths: 2. | ||
"enter notes" | ||
e4 / 8. | ||
f4s / 16 * 2. | ||
f4s / 8. | ||
f4s / 4. | ||
e4 / 8* 3. | ||
e4 / 8. | ||
g4 / 16 * 2. | ||
g4 / 8. | ||
g4 / 4. | ||
f4s / 8* 3. | ||
e4 / 8. | ||
f4s / 16 * 2. | ||
f4s / 8. | ||
f4s / 4. | ||
e4 / 8* 3. | ||
e4 / 8. | ||
g4 / 16 * 2. | ||
g4 / 8. | ||
g4 / 4. | ||
g4 / 8. | ||
f4s / 8. | ||
f4 / 8. | ||
f5 / 8. | ||
e5 / 4 dot. | ||
e5 / 8. | ||
b4 / 8. | ||
a4 / 8. | ||
b4 / 2. | ||
"easy way to create chords" | ||
e3 + g3 + b3 + f4s / 1. | ||
e3 + g3 + b3 + f4s / 2. | ||
"change time signature" | ||
self measure timeNumerator: 5 denominator: 4. | ||
"add new track" | ||
project addPart: MNPart new. | ||
self addMeasure: MNMeasure new. | ||
self measure keyFifths: 2. | ||
"change clef" | ||
self measure clef:( MNClef new sign: $f; line: 4). | ||
"create pattern" | ||
coolBass := {b2 . e1 . c3 . e1 . c3s . e1 . c3 . e1}. | ||
2 timesRepeat: [ coolBass / 4]. | ||
"play the song" | ||
project asSound play' | ||
"Ignore while linting" | ||
|
||
^ self openContents: '"Smoke On The Water" | ||
| lickOne | | ||
"set key" | ||
self measure keyFifths: 1. | ||
"easy way to create chords" | ||
d4 + g4 / 4. | ||
"set dynamics" | ||
self setDynamics: ''mf''. | ||
"enter notes" | ||
f4 + a4s / 4. | ||
g4 + c5 / 4 dot. | ||
d4 + g4 / 8. | ||
"create tie" | ||
self startTie. | ||
d4 + g4 / 8. | ||
self stopTie. | ||
f4 + a4s / 4. | ||
g4s + c5s / 8. | ||
g4 + c5 / 2. | ||
d4 + g4 / 4. | ||
f4 + a4s / 4. | ||
g4 + c5 / 4 dot. | ||
f4 + a4s / 8. | ||
self startTie. | ||
f4 + a4s / 8. | ||
self stopTie. | ||
d4 + g4 / 2 dot dot. | ||
"add new track" | ||
project addPart: (MNPart new addMeasure: MNMeasure new). | ||
"change clef" | ||
self addFClef. | ||
self measure keyFifths: 1. | ||
"enter notes" | ||
g1 / 8. | ||
self setDynamics: ''ff''. | ||
g1 / 8. | ||
"create pattern" | ||
lickOne := { g1 . g1 . g1 . g1 . g1 . g1 }. | ||
2 timesRepeat: [ lickOne / 8 ]. | ||
g1 / 8 * 2. | ||
g1 / 8 * 2. | ||
"create slur" | ||
self startSlur. | ||
a1s / 8. | ||
self stopSlur. | ||
self startSlur. | ||
a1s / 8. | ||
self stopSlur. | ||
c2 / 8 * 2. | ||
c2 / 8. | ||
a1s / 8. | ||
self startTie. | ||
a1s / 8. | ||
self stopTie. | ||
g1 / 8 * 4. | ||
e1 / 8. | ||
f1 / 8. | ||
f1s / 8. | ||
"play the song" | ||
project asSound play.' |
21 changes: 0 additions & 21 deletions
21
packages/MusicNotation-Editor.package/MNEditor.class/class/openTutorial2.st
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
packages/MusicNotation-Editor.package/MNEditor.class/class/openTutorial3.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
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
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/MNBowDrawer.class/class/canvas.startNote.endNote..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 @@ | ||
class initialization | ||
canvas: aCanvas startNote: startMNNoteMorph endNote: endMNNoteMorph | ||
^ self canvas: aCanvas notes: (OrderedCollection new add: startMNNoteMorph; add: endMNNoteMorph; yourself) |
2 changes: 1 addition & 1 deletion
2
packages/MusicNotation-Graphics.package/MNBowDrawer.class/methodProperties.json
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
...MNBeamDrawer.class/class/canvas.notes..st → ...ObjectDrawer.class/class/canvas.notes..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 @@ | ||
as yet unclassified | ||
class initialization | ||
canvas: aCanvas notes: anOrderedCollection | ||
^ self new | ||
canvas: aCanvas; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
Oops, something went wrong.