Skip to content

Commit

Permalink
Merge branch 'development' of origin into task/127-bug-fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
olschulz committed Jul 23, 2021
2 parents 083b7ed + 09c9bc2 commit f658e2f
Show file tree
Hide file tree
Showing 90 changed files with 829 additions and 179 deletions.
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].
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
isTriole
^ self triole isEmpty not
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)).
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
triole: anOrderedCollection
triole := anOrderedCollection.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
triole
triole ifNil: [triole := OrderedCollection new].
^ triole
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' ].
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"findNextTieStop" : "OS 6/10/2021 20:05",
"hasValidDuration" : "fb 7/14/2019 23:45",
"hash" : "mgjm 6/18/2019 21:45",
"initialize" : "OS 6/17/2021 22:00",
"initialize" : "OS 7/11/2021 18:26",
"isDotted" : "mgjm 5/26/2019 18:40",
"isEighthOrShorter" : "OS 7/1/2021 22:40",
"isEighthOrShorter" : "OS 7/11/2021 18:24",
"isTriole" : "OS 7/11/2021 18:25",
"lastNote" : "OS 7/5/2021 11:21",
"morph" : "RAD 6/11/2021 17:25",
"morph:" : "RAD 6/11/2021 17:25",
Expand All @@ -32,6 +33,7 @@
"pitches" : "mgjm 6/12/2019 07:39",
"pitches:" : "OS 6/10/2021 19:59",
"printOn:" : "mgjm 6/12/2019 07:05",
"setTriole:" : "OS 7/11/2021 18:26",
"slurStart" : "RAD 6/11/2021 17:25",
"slurStart:" : "RAD 6/11/2021 17:25",
"slurStop" : "RAD 6/11/2021 17:25",
Expand All @@ -40,4 +42,6 @@
"tieStart:" : "RAD 6/11/2021 20:14",
"tieStop" : "fb 7/14/2019 16:15",
"tieStop:" : "RAD 6/11/2021 20:14",
"validateDuration" : "fb 7/14/2019 23:51" } }
"triole" : "OS 7/11/2021 17:38",
"triole:" : "OS 7/11/2021 17:39",
"validateDuration" : "OS 7/11/2021 18:25" } }
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"slurStart",
"slurStop",
"chordPart",
"morph" ],
"morph",
"triole" ],
"name" : "MNNote",
"pools" : [
],
Expand Down
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.'

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"open" : "mgjm 7/1/2019 18:02",
"openAlleMeineEntchen" : "ld 5/23/2021 19:55",
"openContents:" : "RAD 5/27/2021 14:20",
"openTutorial" : "RAD 6/26/2021 23:04",
"openTutorial2" : "RAD 6/28/2021 10:26",
"openTutorial3" : "RAD 6/28/2021 10:25" },
"openTutorial" : "RAD 7/12/2021 18:40" },
"instance" : {
"aboutToStyle:" : "mgjm 7/1/2019 14:59",
"addModelItemsToWindowMenu:" : "mgjm 7/1/2019 18:57",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"canvas:notes:" : "OS 6/28/2021 15:31" },
},
"instance" : {
"beamExtent" : "OS 6/29/2021 16:58",
"beamHeight" : "OS 6/28/2021 16:50",
Expand All @@ -13,12 +13,7 @@
"isDiagonalOrSamePitch" : "OS 7/1/2021 15:17",
"isDiagonalOrSamePitchTill:pitch:" : "OS 7/1/2021 15:17",
"log2:" : "OS 6/28/2021 12:50",
"maxHeight" : "NH 6/27/2021 20:39",
"minHeight" : "NH 6/27/2021 20:39",
"noteHeadWith" : "RAD 6/5/2021 18:47",
"noteHeight:" : "NH 6/18/2021 16:16",
"notes" : "OS 6/28/2021 11:23",
"notes:" : "OS 7/1/2021 15:28",
"removeFlags" : "OS 6/28/2021 11:23",
"stemOffset:" : "OS 6/29/2021 16:50",
"update" : "OS 7/1/2021 15:28" } }
"stemOffset:" : "OS 6/29/2021 16:50" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"commentStamp" : "RAD 6/11/2021 19:07",
"instvars" : [
"notes" ],
],
"name" : "MNBeamDrawer",
"pools" : [
],
Expand Down
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)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
},
"canvas:startNote:endNote:" : "OS 7/11/2021 13:08" },
"instance" : {
"bowDownwards" : "RAD 6/11/2021 17:26",
"calculateBowHeightFrom:To:" : "OS 6/29/2021 16:49",
Expand Down
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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"class" : {
"canvas:notes:" : "OS 7/11/2021 12:59",
"canvas:startNote:endNote:" : "RAD 6/5/2021 18:09" },
"instance" : {
"accidentalsWidth:" : "OS 7/5/2021 11:43",
Expand All @@ -9,5 +10,10 @@
"draw" : "RAD 6/5/2021 17:32",
"endNote" : "RAD 6/11/2021 17:37",
"endNote:" : "RAD 6/11/2021 17:37",
"maxHeight" : "OS 7/11/2021 16:05",
"noteHeadWith" : "OS 7/11/2021 15:01",
"notes" : "OS 7/11/2021 12:59",
"notes:" : "OS 7/11/2021 12:59",
"startNote" : "RAD 6/11/2021 17:37",
"startNote:" : "RAD 6/11/2021 17:37" } }
"startNote:" : "RAD 6/11/2021 17:37",
"update" : "OS 7/11/2021 13:00" } }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"instvars" : [
"canvas",
"startNote",
"endNote" ],
"endNote",
"notes" ],
"name" : "MNMultiObjectDrawer",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"drawNoteheads:with:" : "mgjm 5/26/2019 16:51",
"drawRestWith:" : "fb 7/25/2019 15:17",
"drawStemWith:" : "mgjm 6/12/2019 15:59",
"drawWith:" : "ld 6/10/2021 15:37",
"drawWith:" : "OS 7/11/2021 14:17",
"dynamics" : "ld 6/5/2021 17:28",
"dynamics:" : "ld 6/5/2021 17:28",
"firstLedgerLine" : "MP 6/14/2021 18:55",
Expand Down
Loading

0 comments on commit f658e2f

Please sign in to comment.