Sha256: f4a4295e26118cfdbb00c0e97e67974c86802fd12ad7f1eca6dfbb22be1655f5

Contents?: true

Size: 1.07 KB

Versions: 20

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

module Coltrane
  module Theory
    # This module takes care of adding to progressions knowledge that is more
    # based on common standards and practices.
    module NotableProgressions
      PROGRESSIONS = {
        'Pop'        => ['I-V-vi-IV', :major],
        'Jazzy Pop'  => ['IM7-V7-vi7-IVM7',      :major],
        'Jazz'       => ['ii7-V7-I7',            :major],
        'Jazz Minor' => ['ii7-V7-i7',            :major],
        'Blues'      => ['IM7-IV7-I7-V7-IV7-I7', :major],
        'Jazz Blues' => ['I7-IV7-I7-V7-IV7-I7',  :major],
        'Fifties'    => ['I-vi-IV-V',            :major],
        'Circle'     => ['vi-ii-V-I',            :major],
        'Tune Up'    => ['ii7-V7-IM7-i7-IV7-IVM7-VIIM7', :minor]
      }.freeze

      PROGRESSIONS.each do |name, values|
        notation, scale_name = values
        define_method name.underscore do |note|
          note  = note.is_a?(Note) ? note : Note[note]
          scale = Scale.public_send(scale_name, note)
          new(notation, scale: scale)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
coltrane-4.1.2 lib/coltrane/theory/notable_progressions.rb
coltrane-4.1.1 lib/coltrane/theory/notable_progressions.rb
coltrane-4.1.0 lib/coltrane/theory/notable_progressions.rb
coltrane-4.0.6 lib/coltrane/theory/notable_progressions.rb
coltrane-4.0.5 lib/coltrane/theory/notable_progressions.rb
coltrane-4.0.4 lib/coltrane/theory/notable_progressions.rb
coltrane-4.0.3 lib/coltrane/theory/notable_progressions.rb
coltrane-3.4.2 lib/coltrane/theory/notable_progressions.rb
coltrane-3.4.1 lib/coltrane/theory/notable_progressions.rb
coltrane-3.4.0 lib/coltrane/theory/notable_progressions.rb
coltrane-3.3.3 lib/coltrane/theory/notable_progressions.rb
coltrane-3.3.2 lib/coltrane/theory/notable_progressions.rb
coltrane-3.3.1 lib/coltrane/theory/notable_progressions.rb
coltrane-3.3.0 lib/coltrane/theory/notable_progressions.rb
coltrane-3.2.0 lib/coltrane/theory/notable_progressions.rb
coltrane-3.1.3 lib/coltrane/theory/notable_progressions.rb
coltrane-3.1.2 lib/coltrane/theory/notable_progressions.rb
coltrane-3.1.1 lib/coltrane/theory/notable_progressions.rb
coltrane-3.1.0 lib/coltrane/theory/notable_progressions.rb
coltrane-3.0.0 lib/coltrane/theory/notable_progressions.rb