code: def from_note(cls, note):
          
          if isinstance(note, bytes):
              note = note.decode('ascii')
          if isinstance(note, str):
              match = Tone.regex.match(note)
              if match:
                  octave = int(match.group('octave')) + 1
                  return cls.from_midi(
                      Tone.tones.index(match.group('note')) +
                      Tone.semitones[match.group('semi')] +
                      octave * 12)
          raise ValueError('invalid note specification: %r' % note)
docs: Construct a :class:`Tone` from a musical note which must consist of
          a capital letter A through G, followed by an optional semi-tone
          modifier ("b" for flat, "#" for sharp, or their Unicode equivalents),
          followed by an octave number (0 through 9).
  
          For example `concert A`_, the typical tuning note at 440Hz, would be
          represented as "A4". One semi-tone above this would be "A#4" or
          alternatively "Bb4". Unicode representations of sharp and flat are also
          accepted.