Class: HeadMusic::Notation::MusicXML::PitchWriter
- Inherits:
-
Object
- Object
- HeadMusic::Notation::MusicXML::PitchWriter
- Defined in:
- lib/head_music/notation/music_xml/pitch_writer.rb
Overview
Converts pitches into the trio of values MusicXML’s
Unlike ABC, MusicXML’s
Class Method Summary collapse
-
.attributes(pitch) ⇒ Object
Returns a Hash of the step, alter, and octave for the pitch’s
element.
Class Method Details
.attributes(pitch) ⇒ Object
Returns a Hash of the step, alter, and octave for the pitch’s
12 13 14 15 16 17 18 19 |
# File 'lib/head_music/notation/music_xml/pitch_writer.rb', line 12 def self.attributes(pitch) pitch = HeadMusic::Rudiment::Pitch.get(pitch) { step: pitch.letter_name.to_s, alter: pitch.alteration_semitones, octave: pitch.register } end |