Class: Music::Transcription::Tempo::NPS
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
66
67
68
|
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 66
def to_bpm beat_dur
Tempo::BPM.new(Rational(60,@value*beat_dur))
end
|
#to_npm ⇒ Object
70
71
72
|
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 70
def to_npm
Tempo::NPM.new(Rational(60,@value))
end
|
#to_qnpm ⇒ Object
62
63
64
|
# File 'lib/music-transcription/conversion/tempo_conversion.rb', line 62
def to_qnpm
Tempo::QNPM.new(Rational(240,@value))
end
|
#to_s ⇒ Object
22
|
# File 'lib/music-transcription/model/tempo.rb', line 22
def to_s; "#{@value}nps" end
|