Class: Musicality::Tempo::BPM

Inherits:
Object
  • Object
show all
Defined in:
lib/musicality/notation/conversion/tempo_conversion.rb

Class Method Summary collapse

Class Method Details

.to_nps(bpm, beat_dur) ⇒ Object



19
20
21
# File 'lib/musicality/notation/conversion/tempo_conversion.rb', line 19

def self.to_nps bpm, beat_dur
  Rational(bpm*beat_dur,60)
end

.to_qnpm(bpm, beat_dur) ⇒ Object



15
16
17
# File 'lib/musicality/notation/conversion/tempo_conversion.rb', line 15

def self.to_qnpm bpm, beat_dur
  4*beat_dur*bpm
end