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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c5035abfa591229d5cb00c1a55f95cbb7904fe4cb6fb02c3da0147ddb28713b
4
- data.tar.gz: c9d0b5de4c65af3f8bcb59b202720eb84c8ad16ce8f422b03536c6382db4e606
3
+ metadata.gz: 9ad979024e346ac1c1ddd35f23cbd96fa3d8405ff1c545a8960798c0cc50fa77
4
+ data.tar.gz: 156bf60760dad3cf9838fd2adabe9488b28c0bfc785ae5718dc0bee9c31901f9
5
5
  SHA512:
6
- metadata.gz: 62c750bd90a06738d6e1cbae6cfd15a2c1b45e0b0771f888aaad11a34a48234d28338315a62cf664afb5ba364589e609c77390f3fe1905c721845ad5e1f686d1
7
- data.tar.gz: 2dc63fb47d4f39df88daf56b24f0d0e229f274fe2807f57295461c4a26f05659932d5b8599f3285073a2a88cbf2fd4e1c3c6ae49d268900b2f643c7aa6645c13
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
- # 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
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
@@ -9,11 +9,11 @@ module Coltrane
9
9
  attr_reader :scale, :chords, :notation
10
10
 
11
11
  def self.find(*chords)
12
- # chords.map! { |c| Chord.new(name: c) } if chords[0].is_a?(String)
13
- # scales = Scale.having_chords(*chords).scales.map(&:pretty_name)
14
- # scales.reduce([]) do |memo, scale|
15
- # memo
16
- # end
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 ||= RomanChord.new()
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
- @notation || @scale
53
- end
54
-
55
- def rotate
56
-
54
+ roman_chords.map(&:notation).join('-')
57
55
  end
58
56
  end
59
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coltrane
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coltrane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Maciel