Piano Player
Model was written in NetLogo 6.0
•
Viewed 201 times
•
Downloaded 21 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
extensions [ sound ] turtles-own [note-value] globals [chord-list] breed [suggestions suggestion] ;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;setup to setup ca reset-ticks ; create-keys white-keys black-keys ask turtles [if who >= 0 and who <= 36 [hatch-suggestions 1 [set ycor ycor + .9 set shape "suggestion" set size 1.18 set color red - 3.5]]] ask patches [set pcolor brown - 4 if pycor > 0 and pycor < 5 [set pcolor brown - 3.5]] ; crt 1 ; create power button (unnecessary) ; [set shape "dot" ; set color red - 2 ; set label "Power" ; setxy .5 6 ; ] ; grid end ;to grid ; used in process of creating interface ; crt 1 ; [set heading 0 ; setxy .5 .5 ; set color 2 ; pd ; repeat world-width ; [fd world-height ; set xcor xcor + 1] ; rt 90 ; repeat world-height ; [fd world-width ; set ycor ycor + 1] ; die] ;end to white-keys crt 22 [set shape "natural" set color 8 setxy who 1.5 set size 2 if remainder (who + 1) 7 = 1 [set note-value "c"] if remainder (who + 1) 7 = 2 [set note-value "d"] if remainder (who + 1) 7 = 3 [set note-value "e"] if remainder (who + 1) 7 = 4 [set note-value "f"] if remainder (who + 1) 7 = 5 [set note-value "g"] if remainder (who + 1) 7 = 6 [set note-value "a"] if remainder (who + 1) 7 = 0 [set note-value "b"]] end to black-key-pattern [starting-x] crt 1 [set shape "sharp" set size 2 set color 3 setxy starting-x 3.5 set note-value "c#"] set starting-x starting-x + 1 crt 1 [set shape "sharp" set size 2 set color 3 setxy starting-x 3.5 set note-value "d#"] set starting-x starting-x + 2 crt 1 [set shape "sharp" set size 2 set color 3 setxy starting-x 3.5 set note-value "f#"] set starting-x starting-x + 1 crt 1 [set shape "sharp" set size 2 set color 3 setxy starting-x 3.5 set note-value "g#"] set starting-x starting-x + 1 crt 1 [set shape "sharp" set size 2 set color 3 setxy starting-x 3.5 set note-value "a#"] set starting-x starting-x + 2 end to black-keys black-key-pattern .5 black-key-pattern 7.5 black-key-pattern 14.5 end ;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ;notes to c2 [duration] sound:play-note "Acoustic Grand Piano" 48 64 duration end to c#2 [duration] sound:play-note "Acoustic Grand Piano" 49 64 duration end to d2 [duration] sound:play-note "Acoustic Grand Piano" 50 64 duration end to d#2 [duration] sound:play-note "Acoustic Grand Piano" 51 64 duration end to e2 [duration] sound:play-note "Acoustic Grand Piano" 52 64 duration end to f2 [duration] sound:play-note "Acoustic Grand Piano" 53 64 duration end to f#2 [duration] sound:play-note "Acoustic Grand Piano" 54 64 duration end to g2 [duration] sound:play-note "Acoustic Grand Piano" 55 64 duration end to g#2 [duration] sound:play-note "Acoustic Grand Piano" 56 64 duration end to a3 [duration] sound:play-note "Acoustic Grand Piano" 57 64 duration end to a#3 [duration] sound:play-note "Acoustic Grand Piano" 58 64 duration end to b3 [duration] sound:play-note "Acoustic Grand Piano" 59 64 duration end to c3 [duration] sound:play-note "Acoustic Grand Piano" 60 64 duration end to c#3 [duration] sound:play-note "Acoustic Grand Piano" 61 64 duration end to d3 [duration] sound:play-note "Acoustic Grand Piano" 62 64 duration end to d#3 [duration] sound:play-note "Acoustic Grand Piano" 63 64 duration end to e3 [duration] sound:play-note "Acoustic Grand Piano" 64 64 duration end to f3 [duration] sound:play-note "Acoustic Grand Piano" 65 64 duration end to f#3 [duration] sound:play-note "Acoustic Grand Piano" 66 64 duration end to g3 [duration] sound:play-note "Acoustic Grand Piano" 67 64 duration end to g#3 [duration] sound:play-note "Acoustic Grand Piano" 68 64 duration end to a4 [duration] sound:play-note "Acoustic Grand Piano" 69 64 duration end to a#4 [duration] sound:play-note "Acoustic Grand Piano" 70 64 duration end to b4 [duration] sound:play-note "Acoustic Grand Piano" 71 64 duration end to c4 [duration] sound:play-note "Acoustic Grand Piano" 72 64 duration end to c#4 [duration] sound:play-note "Acoustic Grand Piano" 73 64 duration end to d4 [duration] sound:play-note "Acoustic Grand Piano" 74 64 duration end to d#4 [duration] sound:play-note "Acoustic Grand Piano" 75 64 duration end to e4 [duration] sound:play-note "Acoustic Grand Piano" 76 64 duration end to f4 [duration] sound:play-note "Acoustic Grand Piano" 77 64 duration end to f#4 [duration] sound:play-note "Acoustic Grand Piano" 78 64 duration end to g4 [duration] sound:play-note "Acoustic Grand Piano" 79 64 duration end to g#4 [duration] sound:play-note "Acoustic Grand Piano" 80 64 duration end to a5 [duration] sound:play-note "Acoustic Grand Piano" 81 64 duration end to a#5 [duration] sound:play-note "Acoustic Grand Piano" 82 64 duration end to b5 [duration] sound:play-note "Acoustic Grand Piano" 83 64 duration end to c5 [duration] sound:play-note "Acoustic Grand Piano" 84 64 duration end ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;playing notes to playkeyboard ; user controlled playing if mouse-down? [every .15 ;white keys [if patch mouse-xcor mouse-ycor = [patch-here] of turtle 0 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 0 [c2 note-length ask turtle 0 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 1 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 1 [d2 note-length ask turtle 1 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 2 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 2 [e2 note-length ask turtle 2 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 3 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 3 [f2 note-length ask turtle 3 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 4 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 4 [g2 note-length ask turtle 4 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 5 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 5 [a3 note-length ask turtle 5 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 6 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 6 [b3 note-length ask turtle 6 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 7 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 7 [c3 note-length ask turtle 7 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 8 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 8 [d3 note-length ask turtle 8 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 9 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 9 [e3 note-length ask turtle 9 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 10 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 10 [f3 note-length ask turtle 10 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 11 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 11 [g3 note-length ask turtle 11 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 12 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 12 [a4 note-length ask turtle 12 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 13 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 13 [b4 note-length ask turtle 13 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 14 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 14 [c4 note-length ask turtle 14 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 15 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 15 [d4 note-length ask turtle 15 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 16 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 16 [e4 note-length ask turtle 16 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 17 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 17 [f4 note-length ask turtle 17 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 18 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 18 [g4 note-length ask turtle 18 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 19 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 19 [a5 note-length ask turtle 19 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 20 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 20 [b5 note-length ask turtle 20 [set color 4]] if patch mouse-xcor mouse-ycor = [patch-here] of turtle 21 or patch mouse-xcor (mouse-ycor + 1) = [patch-here] of turtle 21 [c5 note-length ask turtle 21 [set color 4]] ;black keys if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 22 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 22 [c#2 note-length ask turtle 22 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 23 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 23 [d#2 note-length ask turtle 23 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 24 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 24 [f#2 note-length ask turtle 24 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 25 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 25 [g#2 note-length ask turtle 25 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 26 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 26 [a#3 note-length ask turtle 26 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 27 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 27 [c#3 note-length ask turtle 27 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 28 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 28 [d#3 note-length ask turtle 28 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 29 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 29 [f#3 note-length ask turtle 29 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 30 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 30 [g#3 note-length ask turtle 30 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 31 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 31 [a#4 note-length ask turtle 31 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 32 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 32 [c#4 note-length ask turtle 32 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 33 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 33 [d#4 note-length ask turtle 33 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 34 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 34 [f#4 note-length ask turtle 34 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 35 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 35 [g#4 note-length ask turtle 35 [set color 1]] if patch (mouse-xcor + .5) mouse-ycor = [patch-here] of turtle 36 or patch (mouse-xcor + .5) (mouse-ycor + 1) = [patch-here] of turtle 36 [a#5 note-length ask turtle 36 [set color 1]] ]] every .15 [ask turtles [if who <= 21 and who >= 0 [set color 8]] ask turtles [if who <= 36 and who >= 22 [set color 3]]] end ;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;speed/time keeping to-report pause ; the space between notes report 60 / bpm ;bpm = beats per minute end to metronome sound:play-drum "Hi wood block" 80 end ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;chords ;major chords to C-major c2 chord-duration e2 chord-duration g2 chord-duration c3 chord-duration ask suggestions with [note-value = "c"] [set color red] ask suggestions with [note-value = "e"] [set color red] ask suggestions with [note-value = "g"] [set color red] end to C#-major c#2 chord-duration f2 chord-duration g#2 chord-duration c#3 chord-duration ask suggestions with [note-value = "c#"] [set color red] ask suggestions with [note-value = "e#"] [set color red] ask suggestions with [note-value = "g#"] [set color red] end to D-major d2 chord-duration f#2 chord-duration a3 chord-duration d3 chord-duration ask suggestions with [note-value = "d"] [set color red] ask suggestions with [note-value = "f#"] [set color red] ask suggestions with [note-value = "a"] [set color red] end to Eb-major d#2 chord-duration g2 chord-duration a#3 chord-duration d#3 chord-duration ask suggestions with [note-value = "d#"] [set color red] ask suggestions with [note-value = "g"] [set color red] ask suggestions with [note-value = "a#"] [set color red] end to E-major e2 chord-duration g#2 chord-duration b3 chord-duration e3 chord-duration ask suggestions with [note-value = "e"] [set color red] ask suggestions with [note-value = "g#"] [set color red] ask suggestions with [note-value = "b"] [set color red] end to F-major c2 chord-duration f2 chord-duration a3 chord-duration c3 chord-duration ask suggestions with [note-value = "c"] [set color red] ask suggestions with [note-value = "f"] [set color red] ask suggestions with [note-value = "a"] [set color red] end to F#-major c#2 chord-duration f#2 chord-duration a#3 chord-duration c#3 chord-duration ask suggestions with [note-value = "c#"] [set color red] ask suggestions with [note-value = "f#"] [set color red] ask suggestions with [note-value = "a#"] [set color red] end to G-major d2 chord-duration g2 chord-duration b3 chord-duration ask suggestions with [note-value = "d"] [set color red] ask suggestions with [note-value = "g"] [set color red] ask suggestions with [note-value = "b"] [set color red] end to Ab-major c2 chord-duration g#2 chord-duration d#2 chord-duration c3 chord-duration ask suggestions with [note-value = "c"] [set color red] ask suggestions with [note-value = "g#"] [set color red] ask suggestions with [note-value = "d#"] [set color red] end to A-major c#2 chord-duration e2 chord-duration a3 chord-duration ask suggestions with [note-value = "c#"] [set color red] ask suggestions with [note-value = "e"] [set color red] ask suggestions with [note-value = "a"] [set color red] end to Bb-major d2 chord-duration f2 chord-duration a#3 chord-duration ask suggestions with [note-value = "d"] [set color red] ask suggestions with [note-value = "f"] [set color red] ask suggestions with [note-value = "a#"] [set color red] end to B-major d#2 chord-duration f#2 chord-duration b3 chord-duration ask suggestions with [note-value = "d#"] [set color red] ask suggestions with [note-value = "f#"] [set color red] ask suggestions with [note-value = "b"] [set color red] end ;minor chords to C-minor c2 chord-duration d#2 chord-duration g2 chord-duration c3 chord-duration ask suggestions with [note-value = "c"] [set color red] ask suggestions with [note-value = "d#"] [set color red] ask suggestions with [note-value = "g"] [set color red] end to C#-minor c#2 chord-duration e2 chord-duration g#2 chord-duration c#3 chord-duration ask suggestions with [note-value = "c#"] [set color red] ask suggestions with [note-value = "e"] [set color red] ask suggestions with [note-value = "g#"] [set color red] end to D-minor d2 chord-duration f2 chord-duration a3 chord-duration d3 chord-duration ask suggestions with [note-value = "d"] [set color red] ask suggestions with [note-value = "f"] [set color red] ask suggestions with [note-value = "a"] [set color red] end to Eb-minor d#2 chord-duration f#2 chord-duration a#3 chord-duration d#3 chord-duration ask suggestions with [note-value = "d#"] [set color red] ask suggestions with [note-value = "f#"] [set color red] ask suggestions with [note-value = "a#"] [set color red] end to E-minor e2 chord-duration g2 chord-duration b3 chord-duration e3 chord-duration ask suggestions with [note-value = "e"] [set color red] ask suggestions with [note-value = "g"] [set color red] ask suggestions with [note-value = "b"] [set color red] end to F-minor c2 chord-duration f2 chord-duration g#3 chord-duration c3 chord-duration ask suggestions with [note-value = "c"] [set color red] ask suggestions with [note-value = "f"] [set color red] ask suggestions with [note-value = "g#"] [set color red] end to F#-minor c#2 chord-duration f#2 chord-duration a3 chord-duration c#3 chord-duration ask suggestions with [note-value = "c#"] [set color red] ask suggestions with [note-value = "f#"] [set color red] ask suggestions with [note-value = "a"] [set color red] end to G-minor d2 chord-duration g2 chord-duration a#3 chord-duration g3 chord-duration ask suggestions with [note-value = "d"] [set color red] ask suggestions with [note-value = "g"] [set color red] ask suggestions with [note-value = "a#"] [set color red] end to Ab-minor g#2 chord-duration d#2 chord-duration b3 chord-duration ask suggestions with [note-value = "g#"] [set color red] ask suggestions with [note-value = "d#"] [set color red] ask suggestions with [note-value = "b"] [set color red] end to A-minor c2 chord-duration e2 chord-duration a3 chord-duration ask suggestions with [note-value = "c"] [set color red] ask suggestions with [note-value = "e"] [set color red] ask suggestions with [note-value = "a"] [set color red] end to Bb-minor c#2 chord-duration f2 chord-duration a#3 chord-duration ask suggestions with [note-value = "c#"] [set color red] ask suggestions with [note-value = "f"] [set color red] ask suggestions with [note-value = "a#"] [set color red] end to B-minor d2 chord-duration f#2 chord-duration b3 chord-duration ask suggestions with [note-value = "d"] [set color red] ask suggestions with [note-value = "f#"] [set color red] ask suggestions with [note-value = "b"] [set color red] end ;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ;function to play-chords every pause [tick if play-metronome [metronome]] if chord-pattern = "2 chords pattern" [play-2-chord-pattern-a] if chord-pattern = "3 chords pattern" [play-3-chord-pattern-a] if chord-pattern = "4 chords pattern" [play-4-chord-pattern-a] end to play-2-chord-pattern-a every pause [ if remainder ticks 8 = 1 [ask suggestions [set color red - 3.5] if first-chord = "C" [c-major] if first-chord = "C#" [c#-major] if first-chord = "D" [d-major] if first-chord = "Eb" [Eb-major] if first-chord = "E" [E-major] if first-chord = "F" [F-major] if first-chord = "F#" [f#-major] if first-chord = "G" [g-major] if first-chord = "Ab" [ab-major] if first-chord = "A" [a-major] if first-chord = "Bb" [bb-major] if first-chord = "B" [b-major] if first-chord = "Cm" [c-minor] if first-chord = "C#m" [c#-minor] if first-chord = "Dm" [d-minor] if first-chord = "Ebm" [eb-minor] if first-chord = "Em" [e-minor] if first-chord = "Fm" [f-minor] if first-chord = "F#m" [f#-minor] if first-chord = "Gm" [g-minor] if first-chord = "Abm" [ab-minor] if first-chord = "Am" [a-minor] if first-chord = "Bbm" [Bb-minor] if first-chord = "Bm" [B-minor] ] if remainder ticks 8 = 5 [ask suggestions [set color red - 3.5] if second-chord = "C" [c-major] if second-chord = "C#" [c#-major] if second-chord = "D" [d-major] if second-chord = "Eb" [Eb-major] if second-chord = "E" [E-major] if second-chord = "F" [F-major] if second-chord = "F#" [f#-major] if second-chord = "G" [g-major] if second-chord = "Ab" [ab-major] if second-chord = "A" [a-major] if second-chord = "Bb" [bb-major] if second-chord = "B" [b-major] if second-chord = "Cm" [c-minor] if second-chord = "C#m" [c#-minor] if second-chord = "Dm" [d-minor] if second-chord = "Ebm" [eb-minor] if second-chord = "Em" [e-minor] if second-chord = "Fm" [f-minor] if second-chord = "F#m" [f#-minor] if second-chord = "Gm" [g-minor] if second-chord = "Abm" [ab-minor] if second-chord = "Am" [a-minor] if second-chord = "Bbm" [Bb-minor] if second-chord = "Bm" [B-minor] ] ] end to play-3-chord-pattern-a every pause [ if remainder ticks 12 = 1 [ask suggestions [set color red - 3.5] if first-chord = "C" [c-major] if first-chord = "C#" [c#-major] if first-chord = "D" [d-major] if first-chord = "Eb" [Eb-major] if first-chord = "E" [E-major] if first-chord = "F" [F-major] if first-chord = "F#" [f#-major] if first-chord = "G" [g-major] if first-chord = "Ab" [ab-major] if first-chord = "A" [a-major] if first-chord = "Bb" [bb-major] if first-chord = "B" [b-major] if first-chord = "Cm" [c-minor] if first-chord = "C#m" [c#-minor] if first-chord = "Dm" [d-minor] if first-chord = "Ebm" [eb-minor] if first-chord = "Em" [e-minor] if first-chord = "Fm" [f-minor] if first-chord = "F#m" [f#-minor] if first-chord = "Gm" [g-minor] if first-chord = "Abm" [ab-minor] if first-chord = "Am" [a-minor] if first-chord = "Bbm" [Bb-minor] if first-chord = "Bm" [B-minor] ] if remainder ticks 12 = 5 [ask suggestions [set color red - 3.5] if second-chord = "C" [c-major] if second-chord = "C#" [c#-major] if second-chord = "D" [d-major] if second-chord = "Eb" [Eb-major] if second-chord = "E" [E-major] if second-chord = "F" [F-major] if second-chord = "F#" [f#-major] if second-chord = "G" [g-major] if second-chord = "Ab" [ab-major] if second-chord = "A" [a-major] if second-chord = "Bb" [bb-major] if second-chord = "B" [b-major] if second-chord = "Cm" [c-minor] if second-chord = "C#m" [c#-minor] if second-chord = "Dm" [d-minor] if second-chord = "Ebm" [eb-minor] if second-chord = "Em" [e-minor] if second-chord = "Fm" [f-minor] if second-chord = "F#m" [f#-minor] if second-chord = "Gm" [g-minor] if second-chord = "Abm" [ab-minor] if second-chord = "Am" [a-minor] if second-chord = "Bbm" [Bb-minor] if second-chord = "Bm" [B-minor] ] if remainder ticks 12 = 9 [ask suggestions [set color red - 3.5] if third-chord = "C" [c-major] if third-chord = "C#" [c#-major] if third-chord = "D" [d-major] if third-chord = "Eb" [Eb-major] if third-chord = "E" [E-major] if third-chord = "F" [F-major] if third-chord = "F#" [f#-major] if third-chord = "G" [g-major] if third-chord = "Ab" [ab-major] if third-chord = "A" [a-major] if third-chord = "Bb" [bb-major] if third-chord = "B" [b-major] if third-chord = "Cm" [c-minor] if third-chord = "C#m" [c#-minor] if third-chord = "Dm" [d-minor] if third-chord = "Ebm" [eb-minor] if third-chord = "Em" [e-minor] if third-chord = "Fm" [f-minor] if third-chord = "F#m" [f#-minor] if third-chord = "Gm" [g-minor] if third-chord = "Abm" [ab-minor] if third-chord = "Am" [a-minor] if third-chord = "Bbm" [Bb-minor] if third-chord = "Bm" [B-minor] ] ] end to play-4-chord-pattern-a every pause [ if remainder ticks 16 = 1 [ask suggestions [set color red - 3.5] if first-chord = "C" [c-major] if first-chord = "C#" [c#-major] if first-chord = "D" [d-major] if first-chord = "Eb" [Eb-major] if first-chord = "E" [E-major] if first-chord = "F" [F-major] if first-chord = "F#" [f#-major] if first-chord = "G" [g-major] if first-chord = "Ab" [ab-major] if first-chord = "A" [a-major] if first-chord = "Bb" [bb-major] if first-chord = "B" [b-major] if first-chord = "Cm" [c-minor] if first-chord = "C#m" [c#-minor] if first-chord = "Dm" [d-minor] if first-chord = "Ebm" [eb-minor] if first-chord = "Em" [e-minor] if first-chord = "Fm" [f-minor] if first-chord = "F#m" [f#-minor] if first-chord = "Gm" [g-minor] if first-chord = "Abm" [ab-minor] if first-chord = "Am" [a-minor] if first-chord = "Bbm" [Bb-minor] if first-chord = "Bm" [B-minor] ] if remainder ticks 16 = 5 [ask suggestions [set color red - 3.5] if second-chord = "C" [c-major] if second-chord = "C#" [c#-major] if second-chord = "D" [d-major] if second-chord = "Eb" [Eb-major] if second-chord = "E" [E-major] if second-chord = "F" [F-major] if second-chord = "F#" [f#-major] if second-chord = "G" [g-major] if second-chord = "Ab" [ab-major] if second-chord = "A" [a-major] if second-chord = "Bb" [bb-major] if second-chord = "B" [b-major] if second-chord = "Cm" [c-minor] if second-chord = "C#m" [c#-minor] if second-chord = "Dm" [d-minor] if second-chord = "Ebm" [eb-minor] if second-chord = "Em" [e-minor] if second-chord = "Fm" [f-minor] if second-chord = "F#m" [f#-minor] if second-chord = "Gm" [g-minor] if second-chord = "Abm" [ab-minor] if second-chord = "Am" [a-minor] if second-chord = "Bbm" [Bb-minor] if second-chord = "Bm" [B-minor] ] if remainder ticks 16 = 9 [ask suggestions [set color red - 3.5] if third-chord = "C" [c-major] if third-chord = "C#" [c#-major] if third-chord = "D" [d-major] if third-chord = "Eb" [Eb-major] if third-chord = "E" [E-major] if third-chord = "F" [F-major] if third-chord = "F#" [f#-major] if third-chord = "G" [g-major] if third-chord = "Ab" [ab-major] if third-chord = "A" [a-major] if third-chord = "Bb" [bb-major] if third-chord = "B" [b-major] if third-chord = "Cm" [c-minor] if third-chord = "C#m" [c#-minor] if third-chord = "Dm" [d-minor] if third-chord = "Ebm" [eb-minor] if third-chord = "Em" [e-minor] if third-chord = "Fm" [f-minor] if third-chord = "F#m" [f#-minor] if third-chord = "Gm" [g-minor] if third-chord = "Abm" [ab-minor] if third-chord = "Am" [a-minor] if third-chord = "Bbm" [Bb-minor] if third-chord = "Bm" [B-minor] ] if remainder ticks 16 = 13 [ask suggestions [set color red - 3.5] if fourth-chord = "C" [c-major] if fourth-chord = "C#" [c#-major] if fourth-chord = "D" [d-major] if fourth-chord = "Eb" [Eb-major] if fourth-chord = "E" [E-major] if fourth-chord = "F" [F-major] if fourth-chord = "F#" [f#-major] if fourth-chord = "G" [g-major] if fourth-chord = "Ab" [ab-major] if fourth-chord = "A" [a-major] if fourth-chord = "Bb" [bb-major] if fourth-chord = "B" [b-major] if fourth-chord = "Cm" [c-minor] if fourth-chord = "C#m" [c#-minor] if fourth-chord = "Dm" [d-minor] if fourth-chord = "Ebm" [eb-minor] if fourth-chord = "Em" [e-minor] if fourth-chord = "Fm" [f-minor] if fourth-chord = "F#m" [f#-minor] if fourth-chord = "Gm" [g-minor] if fourth-chord = "Abm" [ab-minor] if fourth-chord = "Am" [a-minor] if fourth-chord = "Bbm" [Bb-minor] if fourth-chord = "Bm" [B-minor] ] ] end ;to set-chords ; used in initial chord idea using lists ; set chord-list [] ; set chord-list lput first-chord chord-list ; if second-chord != "no chord" ; [set chord-list lput second-chord chord-list] ; if third-chord != "no chord" ; [set chord-list lput third-chord chord-list] ; if fourth-chord != "no chord" ; [set chord-list lput fourth-chord chord-list] ;end
There is only one version of this model, created about 8 years ago by Colin Stergios.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Piano Player .png | preview | Preview for 'Piano Player ' | about 8 years ago, by Colin Stergios | Download |
This model does not have any ancestors.
This model does not have any descendants.