I have worked during the previous weeks on some transpositions features for Flat. I will try to explain in this post what is the logic behind music intervals.

Intervals are defined with 2 values: diatonic and chromatic.

Diatonic

Keyboard
StepDiatonicName
C0unison
D1second
E2third
F3fourth
G4fifth
A5sixth
B6seventh

Chromatic

StepDiatonicNameChromaticPrefix
C0unison0perfect
D1second2major
E2third4major
F3fourth5perfect
G4fifth7perfect
A5sixth9major
B6seventh11major

Alterations

You can add alterations to base pitch steps. The diatonic value stays the same while the chromatic value changes.

Enharmonics

Two notes with the same sound but different writing are called enharmonic — for instance: E# and F, E and Fb, B and Cb.