coltrane 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/coltrane/classic_progressions.rb +22 -22
- data/lib/coltrane/progression.rb +9 -11
- data/lib/coltrane/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ad979024e346ac1c1ddd35f23cbd96fa3d8405ff1c545a8960798c0cc50fa77
|
4
|
+
data.tar.gz: 156bf60760dad3cf9838fd2adabe9488b28c0bfc785ae5718dc0bee9c31901f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 047e0899d7abc412a1004581d9e8dc2fc265e883771b073890abf9838e51f65ab7aa7c4fb1a72adb84007eb1309100d4e1b7af01456e8a8f3ed7d9adb511f6a1
|
7
|
+
data.tar.gz: eb4bf34e8f591523dbef9acec2c4596fa4c46ca057944921b6aec732e37f21b563a251c4b57cbcab56ad24fa6dcabe9bf954c2061722253d488c90a900ae8915
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
10
10
|
- Refactor notes and add pitch frequencies, pitch classes
|
11
11
|
|
12
12
|
|
13
|
+
## [1.1.1]
|
14
|
+
|
15
|
+
### Fixes
|
16
|
+
- Progression specs
|
17
|
+
|
18
|
+
### Adds
|
19
|
+
- `Progression.find(*%w[AM DM F#m EM])`
|
20
|
+
|
13
21
|
## [1.1.0]
|
14
22
|
|
15
23
|
### Changes
|
@@ -1,23 +1,23 @@
|
|
1
|
-
# frozen_string_literal: true
|
1
|
+
# # frozen_string_literal: true
|
2
2
|
|
3
|
-
module Coltrane
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
3
|
+
# module Coltrane
|
4
|
+
# # It's totally a wip yet.
|
5
|
+
# module ClassicProgressions
|
6
|
+
# PROGRESSIONS = {
|
7
|
+
# 'Pop' => %w[I V vi IV],
|
8
|
+
# 'Blues' => %w[I I I I IV IV I I V IV I I],
|
9
|
+
# 'Jazz Blues' => %w[
|
10
|
+
# I7 I7 IV7 IV7 I7 I7 I7 I7
|
11
|
+
# IV7 IV7 VI7 VI7 I7 I7 iii7 VI7
|
12
|
+
# ii7 ii7 V7 V7 I7 VI7 II7 V7
|
13
|
+
# ],
|
14
|
+
# 'Fifties' => %w[I IV V]
|
15
|
+
# # pop: [:major, [1, 5, 6, 4]],
|
16
|
+
# # fifties: [:major, [1, 6, 4, 5]],
|
17
|
+
# # blues: [:major, [1, 4, 1, 5, 4, 1]],
|
18
|
+
# # jazz: [:major, [2, 5, 1]],
|
19
|
+
# # jazz_minor: [:minor, [2, 5, 1]],
|
20
|
+
# # andalusian: [:minor, [1, 7, 6, 5]]
|
21
|
+
# }.freeze
|
22
|
+
# end
|
23
|
+
# end
|
data/lib/coltrane/progression.rb
CHANGED
@@ -9,11 +9,11 @@ module Coltrane
|
|
9
9
|
attr_reader :scale, :chords, :notation
|
10
10
|
|
11
11
|
def self.find(*chords)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
chords.map! { |c| Chord.new(name: c) } if chords[0].is_a?(String)
|
13
|
+
scales = Scale.having_chords(*chords).scales
|
14
|
+
scales.reduce([]) do |memo, scale|
|
15
|
+
memo + [Progression.new(chords: chords, scale: scale)]
|
16
|
+
end
|
17
17
|
end
|
18
18
|
|
19
19
|
def initialize(notation=nil, chords: nil, roman_chords: nil, key: nil, scale: nil)
|
@@ -45,15 +45,13 @@ module Coltrane
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def roman_chords
|
48
|
-
@roman_chords ||=
|
48
|
+
@roman_chords ||= chords.map do |c|
|
49
|
+
RomanChord.new(chord: c, scale: scale)
|
50
|
+
end
|
49
51
|
end
|
50
52
|
|
51
53
|
def notation
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
def rotate
|
56
|
-
|
54
|
+
roman_chords.map(&:notation).join('-')
|
57
55
|
end
|
58
56
|
end
|
59
57
|
end
|
data/lib/coltrane/version.rb
CHANGED