n2m
- pitchtools.n2m(note)[source]
Convert a notename to a midinote
- Parameters:
note (
str) – the notename- Return type:
float- Returns:
the corresponding midi note
Two formats are supported:
1st format (pitchclass first):
C#2,D4,Db4+20,C4>,Eb5<2nd format (octave first):
2C#,4D+,7Eb-14
Note
The second format, with its clear hierarchy
octave:pitch:microtoneis the canonical one and used when converting a midinote to a notenameInput
Output
4C
60
4D-20
61.8
4Eb+
63.5
4E<
63.75
4C#-12
60.88
Microtonal alterations
Alteration
Cents
++50
--50
>+25
<-25
See also