Sha256: aeae6cc8869547a0b397f1ce0110bd12f82cc2c8fd9b1705e392681f1c36276d

Contents?: true

Size: 239 Bytes

Versions: 45

Compression:

Stored size: 239 Bytes

Contents

class Numeric

  #
  # +mtof+: MIDI note to frequency converter
  #
  # interprets its receiver as a MIDI note and returns its frequency in Hertz
  #
  def mtof
    self.class.pitch_fork * (2.0**((self - MIDI_PITCH_FORK)/12.0))
  end

end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
ruby-mext-0.21.6 lib/mext/numeric/mtof.rb
ruby-mext-0.21.5 lib/mext/numeric/mtof.rb
ruby-mext-0.21.4 lib/mext/numeric/mtof.rb
ruby-mext-0.21.3 lib/mext/numeric/mtof.rb
ruby-mext-0.21.2 lib/mext/numeric/mtof.rb
ruby-mext-0.21.1 lib/mext/numeric/mtof.rb
ruby-mext-0.21.0 lib/mext/numeric/mtof.rb
ruby-mext-0.20.1 lib/mext/numeric/mtof.rb
ruby-mext-0.20.0 lib/mext/numeric/mtof.rb
ruby-mext-0.19.0 lib/mext/numeric/mtof.rb
ruby-mext-0.18.3 lib/mext/numeric/mtof.rb
ruby-mext-0.18.2 lib/mext/numeric/mtof.rb
ruby-mext-0.18.1 lib/mext/numeric/mtof.rb
ruby-mext-0.18.0 lib/mext/numeric/mtof.rb
ruby-mext-0.17.0 lib/mext/numeric/mtof.rb
ruby-mext-0.16.2 lib/mext/numeric/mtof.rb
ruby-mext-0.16.1 lib/mext/numeric/mtof.rb
ruby-mext-0.16.0 lib/mext/numeric/mtof.rb
ruby-mext-0.15.3 lib/mext/numeric/mtof.rb
ruby-mext-0.15.2 lib/mext/numeric/mtof.rb