Skip to main content

convert notes to freq and vise verse

Project description

freq note converter


** recently I ran into a great package, that also supports note frequency conversion**

import librosa

librosa.hz_to_note(440.0)
   ['A5']
    
librosa.note_to_hz(['A3', 'A4', 'A5'])
   array([ 220.,  440.,  880.])

I like this librosa package, thus I will not continue with my package...


but if you still want to use this package, here's the documentation:

convert frequency to note and note to frequency.

currently, can only input frequency and note index, and not supporting note name and octave as input
usage example:
    input:
        import freq_note_converter

        val = freq_note_converter.from_freq(449)
        print(val.note)
    output:
        'A'
    input:
        print(val)
    output:
                    freq : 449
              note_index : 49
                    note : A
                  octave : 4
        offset_from_note : 0.351
        --------------------------------------------------
    input:
        freq_note_converter.from_note_index(49).print_me()
    output:
                    freq : 440.0
              note_index : 49
                    note : A
                  octave : 4
        offset_from_note : 0
        --------------------------------------------------

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freq_note_converter-0.2.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

freq_note_converter-0.2.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page