Sha256: 1208a33a0c304cd183a68761a371d918db764179040d8e5de96896b06625f5f1

Contents?: true

Size: 367 Bytes

Versions: 7

Compression:

Stored size: 367 Bytes

Contents

class HeadMusic::Note
  attr_reader :pitch, :rhythmic_value

  delegate :ticks, to: :rhythmic_value

  def initialize(pitch, rhythmic_unit, rhythmic_value_modifiers = {})
    @pitch = HeadMusic::Pitch.get(pitch)
    @rhythmic_value = HeadMusic::RhythmicValue.new(rhythmic_unit, rhythmic_value_modifiers)
  end

  def duration
    rhythmic_value.total_value
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
head_music-0.8.0 lib/head_music/note.rb
head_music-0.7.0 lib/head_music/note.rb
head_music-0.6.4 lib/head_music/note.rb
head_music-0.6.3 lib/head_music/note.rb
head_music-0.6.1 lib/head_music/note.rb
head_music-0.6.0 lib/head_music/note.rb
head_music-0.5.4 lib/head_music/note.rb