<commit_before>
NATURAL_NOTES = {
  'C' => 0,
  'D' => 2,
  'E' => 4,
  'F' => 5,
  'G' => 7,
  'A' => 9,
  'B' => 11
}.freeze

MODIFIERS = {
  '#' => 1,
  'b' => -1,
  'B#' => -11,
  'Cb' => 11
}

def pitch_class(pitch_class)
  note = pitch_class[0]
  NATURAL_NOTES[note] + modifier(pitch_class)
end

private

def modifier(pitch_class)
  suffix = pitch_class[1]
  MODIFIERS[pitch_class] || MODIFIERS[suffix] || 0
end<commit_msg>Use note as variable name<commit_after>
NATURAL_NOTES = {
  'C' => 0,
  'D' => 2,
  'E' => 4,
  'F' => 5,
  'G' => 7,
  'A' => 9,
  'B' => 11
}.freeze

MODIFIERS = {
  '#' => 1,
  'b' => -1,
  'B#' => -11,
  'Cb' => 11
}

def pitch_class(note)
  natural_note = note[0]
  NATURAL_NOTES[natural_note] + modifier(note)
end

private

def modifier(note)
  suffix = note[1]
  MODIFIERS[note] || MODIFIERS[suffix] || 0
end
{'fraction_non_alphanumeric': 0.2132701421800948, 'fraction_numerical': 0.04028436018957346, 'mean_word_length': 3.1625615763546797, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '4106802', 'n_tokens_mistral': 441, 'n_tokens_neox': 398, 'n_words': 85}