Sha256: ab3f1c3d4477f285d168eacf2fd1217ba66fb9b918ee6431aeb72413eea2fd0d
Contents?: true
Size: 538 Bytes
Versions: 1
Compression:
Stored size: 538 Bytes
Contents
# frozen_string_literal: true module Coltrane # Allows the creation of chord progressions using standard notations. # Ex: Progression.new('I-IV-V', key: 'Am') class Progression extend ClassicProgressions attr_reader :scale, :chords def initialize(roman_notation, roman_chords: [], key: nil, scale: nil) @scale = scale || Scale.from_key(key) rchords = roman_chords.any? ? roman_chords : roman_notation.split('-') @chords = rchords.map {|c| RomanChord.new(c, scale: @scale).chord } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
coltrane-1.0.26 | lib/coltrane/progression.rb |