Relative frequency ratio to MIDI pitch

ratio_to_pitch  ratio (number)

Convert a frequency ratio to a midi note which when added to a note will transpose the note to match the frequency ratio.

Introduced in v2.7

Examples

# Example 1

ratio_to_pitch 2



#=> 12.0



# Example 2

ratio_to_pitch 0.5



#=> -12.0