Class: Music::Transcription::Tempo::NPM
Constant Summary
CONVERSION_METHOD, PARSER
Constants included
from Parseable
Parseable::DEFAULT_SPLIT_PATTERN
Instance Attribute Summary
#value
Instance Method Summary
collapse
#==, #clone, #convert, #initialize
Methods included from Parseable
included
Instance Method Details
#to_bpm(beat_dur) ⇒ Object
42
43
44
|
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 42
def to_bpm beat_dur
Tempo::BPM.new(Rational(@value,beat_dur))
end
|
#to_nps ⇒ Object
38
39
40
|
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 38
def to_nps
Tempo::NPS.new(Rational(@value,60))
end
|
#to_qnpm ⇒ Object
34
35
36
|
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 34
def to_qnpm
Tempo::QNPM.new(4*@value)
end
|
#to_s ⇒ Object
20
|
# File 'lib/music-transcription/model/tempo.rb', line 20
def to_s; "#{@value}npm" end
|