music.pitch_to_freq¶
- music.pitch_to_freq(start_freq=220.0, semitones=(0, 7, 7, 4, 7, 0))[source]¶
Generates a list of frequencies based on a list of semitones and a starting frequency.
This function calculates a list of frequencies based on the given list of semitones and a starting frequency. Each semitone value represents the number of semitones above or below the starting frequency.
- Parameters:
- Returns:
listA list of frequencies calculated from the given semitones and starting frequency.
- Parameters:
- Return type:
Examples
>>> pitch_to_freq() # Default semitones [0, 7, 7, 4, 7, 0] [220.0, 493.8833012561241, 493.8833012561241, 329.62755691286986, 493.8833012561241, 220.0] >>> pitch_to_freq(start_freq=440, semitones=[0, 12, 12, 12]) [440.0, 880.0, 880.0, 880.0]