forked from beneggett/music_theory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds scale steps to enable chord progressions & chord scales
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module MusicTheory | ||
module ScaleSteps # Concern for Scale | ||
|
||
def i | ||
self | ||
end | ||
|
||
def ii | ||
set_scale_step(1) | ||
end | ||
|
||
def iii | ||
set_scale_step(2) | ||
end | ||
|
||
def iv | ||
set_scale_step(3) | ||
end | ||
|
||
def v | ||
set_scale_step(4) | ||
end | ||
|
||
def vi | ||
set_scale_step(5) | ||
end | ||
|
||
def vii | ||
set_scale_step(6) | ||
end | ||
|
||
def viii | ||
set_scale_step(7) | ||
end | ||
|
||
private | ||
|
||
def set_scale_step(jump) | ||
new_chord_scale = MusicTheory::Scale.new scale_type, distort: distort, frequency: scale_notes[jump].frequency, duration: duration | ||
new_chord_scale | ||
end | ||
|
||
end | ||
end |
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,3 @@ | ||
module MusicTheory | ||
VERSION = "0.1.0" | ||
VERSION = "0.1.1" | ||
end |