as_midinotes
- pitchtools.as_midinotes(x)
Tries to interpret x as a list of pitches, returns these as midinotes
- Parameters:
x – either list of midinotes (floats/ints), a list of notenames (str), one str with notenames (divided by spaces), or a single notename or midinote
- Return type:
list
[float
]- Returns:
the corresponding list of midinotes.
Example
>>> as_midinotes(["4G", "4C"]) [67., 60.] >>> as_midinotes((67, 60)) [67., 60.] >>> as_midinotes("4G 4C 4C+10hz") [67., 60., 60.65]