platypush/plugins/sound/core.py
def freq_to_note(cls, frequency, A_frequency=STANDARD_A_FREQUENCY):
        """
        Converts a frequency in Hz to its closest MIDI note

        :param frequency: Frequency in Hz
        :type frequency: float

        :param A_frequency: Reference A4 frequency (default: 440 Hz)
        :type A_frequency: float
        """

        # TODO return also the offset in % between the provided frequency
        # and the standard MIDI note frequency
        return int(12.0 * math.log(frequency / A_frequency, 2)
                   + cls.STANDARD_A_MIDI_NOTE)

        Converts a frequency in Hz to its closest MIDI note

        :param frequency: Frequency in Hz
        :type frequency: float

        :param A_frequency: Reference A4 frequency (default: 440 Hz)
        :type A_frequency: float
        
Converts a frequency in Hz to its closest MIDI note
Converts a frequency in Hz to its closest MIDI note
def freq_to_note(cls, frequency, A_frequency=STANDARD_A_FREQUENCY):
        return int(12.0 * math.log(frequency / A_frequency, 2)
                   + cls.STANDARD_A_MIDI_NOTE)
def freq_to_note ( cls , frequency , A_frequency = STANDARD_A_FREQUENCY ) : return int ( 12.0 * math . log ( frequency / A_frequency , 2 ) + cls . STANDARD_A_MIDI_NOTE )
Converts a frequency in Hz to its closest MIDI note
Converts a frequency in Hz to its closest MIDI note
"""
        Converts a frequency in Hz to its closest MIDI note

        :param frequency: Frequency in Hz
        :type frequency: float

        :param A_frequency: Reference A4 frequency (default: 440 Hz)
        :type A_frequency: float
        """ # TODO return also the offset in % between the provided frequency # and the standard MIDI note frequency
cls
frequency
Frequency in Hz
Frequency in Hz
A_frequency
Reference A4 frequency (default: 440 Hz)
Reference A4 frequency ( default : 440 Hz )