lib/midi_lyrics.rb in midi_lyrics-0.0.2 vs lib/midi_lyrics.rb in midi_lyrics-0.0.3

- old
+ new

@@ -30,9 +30,18 @@ def similar_to?(another) self.duration_in_pulses == another.duration_in_pulses && self.text == another.text end + def as_json + { + text: text, + start: start, + start2: start2, + duration: duration + } + end + private def format_time(time) @sequence.pulses_to_seconds(time.to_f).round(3) end end