Sha256: d0fb895eeaedc813ac03305545797441d303251435af91ba5382067a0a72f4bb

Contents?: true

Size: 484 Bytes

Versions: 23

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

# A staff is a set of lines and spaces that provides context for a pitch
class HeadMusic::Staff
  DEFAULT_LINE_COUNT = 5

  attr_reader :default_clef, :line_count, :instrument
  alias clef default_clef

  def initialize(default_clef, instrument: nil, line_count: nil)
    @default_clef = HeadMusic::Clef.get(default_clef)
    @line_count = line_count || DEFAULT_LINE_COUNT
    @instrument = HeadMusic::Instrument.get(instrument) if instrument
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
head_music-0.27.0 lib/head_music/staff.rb
head_music-0.26.3 lib/head_music/staff.rb
head_music-0.26.2 lib/head_music/staff.rb
head_music-0.26.1 lib/head_music/staff.rb
head_music-0.26.0 lib/head_music/staff.rb
head_music-0.25.0 lib/head_music/staff.rb
head_music-0.24.5 lib/head_music/staff.rb
head_music-0.24.4 lib/head_music/staff.rb
head_music-0.24.3 lib/head_music/staff.rb
head_music-0.24.2 lib/head_music/staff.rb
head_music-0.24.1 lib/head_music/staff.rb
head_music-0.24.0 lib/head_music/staff.rb
head_music-0.23.4 lib/head_music/staff.rb
head_music-0.23.3 lib/head_music/staff.rb
head_music-0.23.2 lib/head_music/staff.rb
head_music-0.23.1 lib/head_music/staff.rb
head_music-0.23.0 lib/head_music/staff.rb
head_music-0.22.0 lib/head_music/staff.rb
head_music-0.20.0 lib/head_music/staff.rb
head_music-0.19.2 lib/head_music/staff.rb