Sha256: 539f66a448ab86cf12babacc16d5030cf0a17e67b87c89b030b347c2940821dc

Contents?: true

Size: 638 Bytes

Versions: 22

Compression:

Stored size: 638 Bytes

Contents

require 'coltrane/representation/piano/note_set'

module Coltrane
  module Representation
    class Piano
      attr_reader :octaves

      class << self

        def find_notes(notes)
          Piano::NoteSet.new(notes, piano: new)
        end

        def chord(chord)
          find_notes(
            chord.is_a?(Chord) ? chord.notes : Chord.new(name: chord).notes
          )
        end

        def black_notes
          Theory::Scale.pentatonic_major('C#', 4).notes
        end

        def white_notes
          Theory::Scale.major.notes
        end

      end

      def initialize
        @octaves
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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