Sha256: f8195d8dca3e5a499e4cc0864401fd1bd98a4c40c460d6ae5bd1571f679d377c

Contents?: true

Size: 403 Bytes

Versions: 3

Compression:

Stored size: 403 Bytes

Contents

# frozen_string_literal: true

module Coltrane
  # Allows creation of chord progressions
  class Progression
    extend ClassicProgressions

    attr_reader :scale

    def initialize(_roman_notation, key: nil, scale: nil)
      @scale = Scale.from_key(key) unless key.nil?
    end

    # def chords

    # end

    private

    def chord_indexes
      scale.degrees.map { |d| d - 1 }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coltrane-1.0.21 lib/coltrane/progression.rb
coltrane-1.0.20 lib/coltrane/progression.rb
coltrane-1.0.2 lib/coltrane/progression.rb