<commit_before>class Note
  include MIDIator::Notes
  attr_accessor :note, :duration

  def initialize note = C2, duration = 1
    @note     = note
    @duration = duration
  end

  def self.length note_length
    1.0/2 ** note_length
  end
end<commit_msg>Added documentation and constants to the Note class.<commit_after>class Note
  include MIDIator::Notes
  attr_accessor :note, :duration

  # Note length constants for readability
  WHOLE        = 0
  HALF         = 1
  QUARTER      = 2
  EIGHTH       = 3
  SIXTEENTH    = 4
  THIRTYSECOND = 5

  def initialize note = C2, duration = QUARTER
    @note     = note
    @duration = duration
  end

  # Gets a note length based on the following formula:
  #   1 / 2 ^ note_length
  #
  # Where note_length is the value passed into this method. There are various
  # constants on this class that help with this method, they are as follows:
  #
  # Note::WHOLE
  # Note::HALF
  # Note::QUARTER
  # Note::EIGHTH
  # Note::SIXTEENTH
  # Note::THIRTYSECOND
  def self.length note_length
    1.0/2 ** note_length
  end
end
{'fraction_non_alphanumeric': 0.07310215557638237, 'fraction_numerical': 0.015932521087160263, 'mean_word_length': 2.734265734265734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7013785', 'n_tokens_mistral': 369, 'n_tokens_neox': 349, 'n_words': 116}