Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/musicality/notation/parsing/convenience_methods.rb

Instance Method Summary collapse

Instance Method Details

#to_durationObject Also known as: to_dur, to_d



41
42
43
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 41

def to_duration
  Musicality::Duration.parse(self)
end

#to_durations(pattern = " ") ⇒ Object Also known as: to_durs, to_ds



47
48
49
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 47

def to_durations pattern=" "
  Musicality::Duration.split_parse(self, pattern)
end

#to_keyObject Also known as: to_k



63
64
65
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 63

def to_key
  Musicality::Key.parse(self)
end

#to_meterObject



78
79
80
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 78

def to_meter
  Musicality::Meter.parse(self)
end

#to_noteObject Also known as: to_n



68
69
70
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 68

def to_note
  Musicality::Note.parse(self)
end

#to_notes(pattern = " ") ⇒ Object Also known as: to_ns



73
74
75
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 73

def to_notes pattern=" "
  Musicality::Note.split_parse(self, pattern)
end

#to_pitchObject Also known as: to_p



53
54
55
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 53

def to_pitch
  Musicality::Pitch.parse(self)
end

#to_pitches(pattern = " ") ⇒ Object Also known as: to_ps



58
59
60
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 58

def to_pitches pattern=" "
  Musicality::Pitch.split_parse(self, pattern)
end

#to_segmentObject



82
83
84
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 82

def to_segment
  Musicality::Segment.parse(self)
end