Class: Music::Transcription::Tempo::QNPM

Inherits:
Music::Transcription::Tempo show all
Defined in:
lib/music-transcription/model/tempo.rb,
lib/music-transcription/conversion/tempo_conversion.rb

Constant Summary

Constants inherited from Music::Transcription::Tempo

CONVERSION_METHOD, PARSER

Constants included from Parseable

Parseable::DEFAULT_SPLIT_PATTERN

Instance Attribute Summary

Attributes inherited from Music::Transcription::Tempo

#value

Instance Method Summary collapse

Methods inherited from Music::Transcription::Tempo

#==, #clone, #convert, #initialize

Methods included from Parseable

included

Constructor Details

This class inherits a constructor from Music::Transcription::Tempo

Instance Method Details

#to_bpm(beat_dur) ⇒ Object



28
29
30
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 28

def to_bpm beat_dur
  Tempo::BPM.new(Rational(@value,4*beat_dur))
end

#to_npmObject



20
21
22
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 20

def to_npm
  Tempo::NPM.new(Rational(@value,4))
end

#to_npsObject



24
25
26
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 24

def to_nps
  Tempo::NPS.new(Rational(@value,240))
end

#to_sObject



19
# File 'lib/music-transcription/model/tempo.rb', line 19

def to_s; "#{@value}qnpm" end