lib/progression.rb
#Returns an array of chords in measure format
Returns an array of chords in measure format
Returns an array of chords in measure format
def progression_list(bpm=4)
        arr = []
        measure = []
        self.chords.each do |chord|
            measure << chord.value
            if measure.count == bpm.to_i
                arr << "  / #{measure.join(" , ")} /"
                measure = []
            end
            if self.chords.last == chord && measure.count != 0
                until measure.count == bpm.to_i
                    measure << " "
                end
                arr << "  / #{measure.join(" , ")} /"
            end
        end
        arr
    end
def progression_list ( bpm = 4 ) arr = [ ] measure = [ ] self . chords . each do | chord | measure << chord . value if measure . count == bpm . to_i arr << "  / #{measure.join(" , ")} /" measure = [ ] end if self . chords . last == chord && measure . count != 0 until measure . count == bpm . to_i measure << " " end arr << "  / #{measure.join(" , ")} /" end end arr end
Returns an array of chords in measure format
Returns an array of chords in measure format
bpm